[Oberon] FP
Jan Verhoeven
jan at verhoeven272.nl
Tue Apr 15 20:40:10 CEST 2014
The real question should be: do we *need* floating point numbers?
And if so, do we, Oberon developers, need to confirm to old fashioned
standards?
A standard FP num ranges from 10^-38 to 10^38 but with just 7 of the 76
decimals significant. So FP numbers are only useful when the full set of
them is within a narrow range between 'x' and 'x.10^8'
Now suppose one would omit the FP number and use 64 bit integers. That
would yield a range of [-10^19 .. +10^19] with 20 significant digits...
Yet, at no additional cost for processing the numbers.
Or, if that is not acceptable, the scaled integer could be useful: a 32
bit mantissa plus 32 bit exponent.
I know this is not standard but neither is Oberon. If you are to use an
80487 then you need to supply the numbers in the correct format. If you
create your own CPU you can create your own format. No IEEE required.
And in software, anything goes. Yes, 30 years ago, the 24+8 format was
great. On 8 bit machines.
Times have changed, but the 24+8 format hasn't.
For the user, it doesn't matter. (s)he will just use the type REAL. And
for him/her it make no difference how we have defined the high precision
number in firmware.
--
Groetjes
Jan Verhoeven
More information about the Oberon
mailing list