Arithmetic evaluation: Difference between revisions
m
fraction accuracy
m (→{{header|Sidef}}: minor code simplifications) |
m (fraction accuracy) |
||
Line 3,644:
procedure get_token()
atom n, fraction
integer dec
skipspaces()
Line 3,656:
end while
if ch='.' then
dec =
fraction = 0
while 1 do
nxtch(0)
if ch<'0' or ch>'9' then exit end if
dec *= 10
end while
n += fraction/dec
end if
-- if find(ch,"eE") then -- you get the idea
|