Pathological floating point problems: Difference between revisions

Content added Content deleted
(Added Easylang)
 
Line 1,517: Line 1,517:
task2
task2
print ""
print ""
#
proc mul f . bal bal$[] .
proc mul f . bal bal$[] .
for i = len bal$[] downto 1
for i = len bal$[] downto 1
Line 1,528: Line 1,529:
proc task2ok . .
proc task2ok . .
print "--- Task 2 OK ---"
print "--- Task 2 OK ---"
e$ = "2.7182818284590452353602874713526624977572470"
bal = 2
bal = number substr e$ 1 1
bal$[] = strchars "7182818284590452353602874713526624977572470"
bal$[] = strchars substr e$ 3 999
bal -= 1
bal -= 1
for i = 1 to 25
for i = 1 to 25