Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2009-10

size of extended

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

peter green

in the freepascal "programmers guide" it says "For all other processors which support floating point operations, the extended type is a nickname for the type which supports the most precision". A few points about this

1: is there a table anywhere of the size of extended on different platforms? if so should it be included in or at least referenced form the programmers guide?
2: the mentions of m68k (which was dropped a while back afaict) and very little else in the manual makes me suspect the manual in general may be rather outdated.
3: afaict x64 appears to have true extended yet the text strongly implies that x86 is the only architecture that does.

Reply by email

Jonas Maebe
to peter green
peter green wrote
1: is there a table anywhere of the size of extended on different platforms?

No.

2: the mentions of m68k (which was dropped a while back afaict) and very little else in the manual makes me suspect the manual in general may be rather outdated.

The section on floating point precision might be. Extrapolating from that to the entire manual is a bit of a stretch. m68k support also hasn't been dropped as in "we won't ever support that anymore" (as opposed to e.g. go32v1 support), and at least one person occasionally works on fixing the m68k support in the compiler again. Removing all references now and possibly adding them again later does not seem like a useful exercise.

3: afaict x64 appears to have true extended yet the text strongly implies that x86 is the only architecture that does.

x86_64 supports 80 bit extended on some OSes, see http://bugs.freepascal.org/view.php?id=14874

In general, it's a bad idea to depend on extended being of any particular size. Simply assume that sizeof(extended) >= sizeof (double). If you need more than double precision, use a specialised library (unless you are only interested in i386 support).

Jonas

Reply by email