[fpc-devel] real, float, double specs
Martin Frb
lazarus at mfriebe.de
Wed Feb 12 01:53:45 CET 2014
I am trying to figure out the internal representation of these. (So they
can be converted, including conversion form sizes not present in fpc)
They are all floating point? Pascal has no fixed point? (nevertheless,
rules for fixed point may also be of interest)
dwarf2 says it is specified in each platforms ABI, but I have not found
that (not even found the ABI yet).
Only found:
http://en.wikipedia.org/wiki/Computer_number_format#Representing_fractions_in_binary
And http://www.freepascal.org/docs-html/ref/refsu6.html#x28-310003.1.2
> Type Range Significant digits Size
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------
> Real platform dependant ??? 4 or 8
> Single 1.5E-45 .. 3.4E38 7-8 4
> Double 5.0E-324 .. 1.7E308 15-16 8
> Extended 1.9E-4932 .. 1.1E4932 19-20 10
> Comp -2E64+1 .. 2E63-1 19-20 8
> Currency -922337203685477.5808 .. 922337203685477.5807 19-20 8
>
apparently there also is real46 (never heard of real16)
The size will actually be in the dwarf, so that I got.
But from that how do I know how many bits are in the exponent? (and how
many in the number). Apparently it depends on the CPU? But where to get
the info?
(later dwarf give bit sizes for the exponent.)
http://www.freepascal.org/docs-html/prog/progsu157.html#x200-2050008.2.5
is missing images?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20140212/98074a60/attachment.html>
More information about the fpc-devel
mailing list