Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #2638
| 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 | 2011-05-23 10:27 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <irdcpl$3pu$1@smc.vnet.net> (permalink) |
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