Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #2638
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!newspump.sol.net!posts.news.twtelecom.net!nnrp3.twtelecom.net!not-for-mail |
|---|---|
| From | Themis Matsoukas <tmatsoukas@me.com> |
| 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:27:01 +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 | <irdcpl$3pu$1@smc.vnet.net> (permalink) |
| Lines | 14 |
| NNTP-Posting-Date | 23 May 2011 09:28:03 GMT |
| NNTP-Posting-Host | e5dcb985.news.twtelecom.net |
| X-Trace | DXC=`25Ola^AFYocJhQ<W;:kglC_A=>8kQj6m=_1NR_H?JPm0hKU?XklfJcEFiONJ7[Gof=O896cmEnjk |
| X-Complaints-To | abuse@twtelecom.net |
| Xref | x330-a1.tempe.blueboxinc.net comp.soft-sys.math.mathematica:2638 |
Show key headers only | View raw
The following is not elegant (quite brute force, really) but does what you want:
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};
a = nums /. \[Pi] -> 0;
b = Expand[(nums - (nums /. \[Pi] -> 0))/\[Pi]];
ab = Transpose[{a, b}]
{{-1, 1/2}, {-2, 3/4}, {-(11/3), 5/4}, {-(20/3), 35/16}, {-(61/5), 63/
16}, {-(338/15), 231/32}}
Themis
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: get a, b from numbers in the form a+b Pi Themis Matsoukas <tmatsoukas@me.com> - 2011-05-23 10:27 +0000
csiph-web