[fpc-pascal] Floating-point number representation on various platforms

Tom Verhoeff T.Verhoeff at tue.nl
Sun Feb 5 13:32:02 CET 2006

While writing a paper (several years ago) about the traps of using
floating-point numbers, I prepared a unit FloatView to "play" with
the internal representation according to the IEEE Std, including
to print it in various formats.

Initially, I made this work for the Linux/i386 platform only.  Later,
I tweaked it for Mac OS X (different byte order).  It supports only the
IEEE Std Single and Double format (not Extended).

I would like to make this unit available, but hesitate, because of
its platform dependence (and currently limited platform support).

Question 1: Is there an interest in such a unit?

Question 2: Any suggestions as to how to make it more platform independent,
or how to support multiple platforms in an easy way?

Looking forward to some feedback,

	Tom Verhoeff
E-MAIL: T.Verhoeff @ TUE.NL     | Fac. of Math. & Computing Science
PHONE:  +31 40 247 41 25        | Eindhoven University of Technology
FAX:    +31 40 247 54 04        | PO Box 513, NL-5600 MB Eindhoven
http://www.win.tue.nl/~wstomv/  | The Netherlands

More information about the fpc-pascal mailing list