gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Comments on gm2 floating-point output


From: Gaius Mulley
Subject: Re: Comments on gm2 floating-point output
Date: Sat, 11 May 2024 13:47:56 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)

"Fischlin  Andreas" <andreas.fischlin@env.ethz.ch> writes:

> Concerning gm2 it is not clear to me what this all means. Perhaps
> someone else could provide some answers as I do not know what the
> approach is that was chosen for gm2 when it comes to implement the
> IEEE floating point standard. Is gm2 mostly relying on existing C
> libraries, hoping they work correctly?

Hi Andreas,

yes gm2 builds upon the C (and C++ for ieee128) libraries.  It maps
LONGREAL onto C/C++ long double(s).  So as long as the long double
support is complete - modula-2 behaves correctly.  For most targets this
is the case.

If long double implementation is incomplete (currently this is true for
some powerpc long double 128 bit targets - then the following applies):

Internally within GCC depending gm2 maps LONGREAL onto __float128.

   https://gcc.gnu.org/wiki/Ieee128PowerPC

For hardware which doesn't support IEEE 754R 128-bit floating point type
software emultation is performed by a modern glibc.  As far as I
understand the software emulation is complete.

For powerpc (see above) there are some targets which don't have the
hardware and haven't installed a modern glibc - in which case we are
currently out of luck :-)

The positive view is that glibc with ieee128 support will become the
default and hopefully the problem will disappear,

regards,
Gaius



reply via email to

[Prev in Thread] Current Thread [Next in Thread]