Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #2651

Re: get a, b from numbers in the form a+b Pi

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!news.glorb.com!newsfeeds.sol.net!post2.nntp.sol.net!posts.news.twtelecom.net!nnrp3.twtelecom.net!not-for-mail
From Roland Franzius <roland.franzius@uos.de>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: get a, b from numbers in the form a+b Pi
Date Mon, 23 May 2011 10:22:43 +0000 (UTC)
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Sender steve@smc.vnet.net
Approved Steven M. Christensen <steve@smc.vnet.net>, Moderator
Message-ID <irdchj$3it$1@smc.vnet.net> (permalink)
References <iraq88$ls8$1@smc.vnet.net>
Lines 26
NNTP-Posting-Date 23 May 2011 09:23:46 GMT
NNTP-Posting-Host e5dcb985.news.twtelecom.net
X-Trace DXC=MUVLnP9R^0_=W9SRB>9:nQC_A=>8kQj6]=_1NR_H?JP]aWGR;0NSLdUEFiONJ7[GoVMWhM_;l`o^Q
X-Complaints-To abuse@twtelecom.net
Xref x330-a1.tempe.blueboxinc.net comp.soft-sys.math.mathematica:2651

Show key headers only | View raw


Am 22.05.2011 12:58, schrieb 1.156:
> I have lists  of numbers (Mathematica output) all numerically in the
> form a + b*Pi and I'm trying to extract the values of a and b for
> further work.
>
> Here's an example of the best I've been able to do so far:
>
> nums={1/2 (-2+\[Pi]),-2+(3 \[Pi])/4,-(11/3)+(5 \[Pi])/4,5/48 (-64+21
> \[Pi]),-(61/5)+(63 \[Pi])/16,-(338/15)+(231 \[Pi])/32};
> {FullForm[#][[1,1]],FullForm[#][[1,2]]/\[Pi]}&/@nums
>
> When I run this line of code 4 of the six input numbers give me the
> {a,b} I'm looking for but the first and fourth entries fail because the
> form isn't right. Possibly I could patch this scheme to look for a small
> finite set of possibilities of input number form but I suspect I may a
> long way from attacking this problem correctly.
>
> Can someone offer some other ideas on how to pull this off? Many thanks
> for looking at this. Rob

CoefficientList[ nums, {\[Pi]}]

-- 

Roland Franzius

Back to comp.soft-sys.math.mathematica | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

get a, b from numbers in the form a+b Pi "1.156" <rob@piovere.com> - 2011-05-22 10:58 +0000
  Re: get a, b from numbers in the form a+b Pi "Nasser M. Abbasi" <nma@12000.org> - 2011-05-23 10:26 +0000
  Re: get a, b from numbers in the form a+b Pi Albert Retey <awnl@gmx-topmail.de> - 2011-05-23 10:28 +0000
  Re: get a, b from numbers in the form a+b Pi Wolfgang Windsteiger <Wolfgang.Windsteiger@risc.jku.at> - 2011-05-23 10:28 +0000
  Re: get a, b from numbers in the form a+b Pi Peter Breitfeld <phbrf@t-online.de> - 2011-05-23 10:28 +0000
  Re: get a, b from numbers in the form a+b Pi Peter Pein <petsie@dordos.net> - 2011-05-23 10:29 +0000
  Re: get a, b from numbers in the form a+b Pi Roland Franzius <roland.franzius@uos.de> - 2011-05-23 10:22 +0000
  Re: get a, b from numbers in the form a+b Pi Armand Tamzarian <mike.honeychurch@gmail.com> - 2011-05-23 10:26 +0000
  Re: get a, b from numbers in the form a+b Pi Stefan Salanski <wutchamacallit27@gmail.com> - 2011-05-23 10:23 +0000
  Re: get a, b from numbers in the form a+b Pi Ray Koopman <koopman@sfu.ca> - 2011-05-23 10:23 +0000

csiph-web