All decimal digits of reals in CAS
|
04-22-2015, 03:33 AM
(This post was last modified: 04-22-2015 03:33 AM by Joe Horn.)
Post: #7
|
|||
|
|||
RE: "dec": All decimal digits of reals in CAS
(04-20-2015 02:54 PM)compsystems Wrote: Please Joe Horn can comment on each line of code DEC() to understand the logic of the algorithm See listing below. The explanations are below their respective lines of code. "Pathological input" means reals so close to integers that some CAS functions fail to distinguish between them and the neighboring integer. Basic concept: Multiply by 10, chop off the integer part, and repeat, until input goes to zero. Input --> Output string at each iteration 3.1416 --> "3." 1.416 --> "3.1" 4.16 --> "3.14" 1.6 --> "3.141" 6 --> "3.1416" 0 --> Exit Code: #cas <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: 3 Guest(s)