I am trying to do simple subtraction arithmetic on two very large numbers.
(- 1.8305286640724363e+023 (floor 1.8305286640724363e+023))
When I do this, I get a result of 0.0. I expect the output:
(- 1.8305286640724363e+023 (floor 1.8305286640724363e+023)) => .2439521
An extended scientific designation will give me this answer.
183052866407243622723319.24395251 - 183052866407243622723319.00 = .2439521
I would like to represent these numbers as they are, with decimal numbers in place, unlike scientific notation, so I can achieve the desired result. Is there a way to do this in the framework of the Scheme? Any help, guide or link would be greatly appreciated :)
I am using DrRacket for Windows 64bit and R5RS Language.
EDIT
I thought that I would be as specific as possible with regard to the example of the arithmetic I am performing.
arithmetic:
(* 271979577247970257395 0.6180339887) => 1.6809262297150285e+020
yeilds = > 168092622971502827156.7975214365
:
(exact (* 271979577247970257395 0.6180339887)) => exact: undefined;
(inexact (* 271979577247970257395 0.6180339887)) => inexact: undefined;
, R5RS /? , , , :
(inexact->exact (* 271979577247970257395 0.6180339887)) => 168092622971502854144
:
(exact->inexact (* 271979577247970257395 0.6180339887)) => 1.6809262297150285e+020
, Big Float, - :
(bf-precision 128)
(bf (* 271979577247970257395 0.6180339887)) => (bf 168092622971502854144)
, . , , , , ! , , , , SCHEME. !:)