All decimal digits of reals in CAS
|
04-12-2015, 03:15 AM
(This post was last modified: 04-12-2015 03:21 AM by Joe Horn.)
Post: #6
|
|||
|
|||
RE: "dec": All decimal digits of reals in CAS
(04-11-2015 02:43 AM)compsystems Wrote: dec(e) => "2.7182818284590410939927096478641033172607421875" There seems to be a misunderstanding here. The "dec" program does not return "about 50 digits". It always returns ALL the digits, no matter how many that may be. The reason that dec(e) returns "2.7182818284590410939927096478641033172607421875" is because that decimal number is EXACTLY how Prime stores e internally in CAS. It's not an approximation.* "dec" returns the exact decimal of the real input, no matter how many decimal digits that may require. It doesn't arbitrarily stop after 50 digits, or any other number of digits. (Exception: if the input is a ratio of two integer-type objects, "dec" stops after outputting 1000 digits, as explained in the original posting). Other ways of seeing exactly the same value using my other routines: hex(e) --> "1.5BF0A8B14576p+1" d2f(e) --> 191282078589627/2^46 * Ok, ok, to be perfectly clear: it IS an approximation of the math constant e... but it's not an approximation of CAS's real floating-point value of e. It's exactly equal to THAT value, which is itself a rational approximation of the irrational constant known as "e". <0|ɸ|0> -Joe- |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
All decimal digits of reals in CAS - Joe Horn - 04-07-2015, 03:17 AM
RE: "dec": All decimal digits of reals in CAS - compsystems - 04-10-2015, 02:55 PM
RE: "dec": All decimal digits of reals in CAS - Terje Vallestad - 04-10-2015, 08:14 PM
RE: "dec": All decimal digits of reals in CAS - Han - 04-10-2015, 09:02 PM
RE: "dec": All decimal digits of reals in CAS - compsystems - 04-11-2015, 02:43 AM
RE: "dec": All decimal digits of reals in CAS - Joe Horn - 04-12-2015 03:15 AM
RE: "dec": All decimal digits of reals in CAS - Alberto Candel - 11-02-2016, 10:05 PM
RE: "dec": All decimal digits of reals in CAS - Joe Horn - 11-06-2016, 04:04 AM
RE: "dec": All decimal digits of reals in CAS - Alberto Candel - 11-06-2016, 05:44 AM
RE: "dec": All decimal digits of reals in CAS - Joe Horn - 11-07-2016, 04:16 AM
RE: "dec": All decimal digits of reals in CAS - Alberto Candel - 11-07-2016, 03:05 PM
|
User(s) browsing this thread: 1 Guest(s)