From: nsz Date: Sat, 3 Mar 2012 20:50:05 +0000 (+0100) Subject: libm updates, link to prototype lib X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=d1ead004efc7440632d5c475f8736203ad37e286;p=www libm updates, link to prototype lib --- diff --git a/libm/index.html b/libm/index.html index 296e769..611a08e 100644 --- a/libm/index.html +++ b/libm/index.html @@ -7,6 +7,7 @@ so already existing code is used. +

Prototype

+ +

Sources

The math code is mostly from freebsd which in turn is based on fdlibm. @@ -31,36 +49,17 @@ cvs -d $CVSROOT get src/li

Design issues

-

The math code is available but there are still many design questions. +

@@ -104,7 +101,8 @@ in a portable way in c:
  • float is ieee binary32
  • double is ieee binary64 -(and old non-standard representations are not supported) +(C99 annex F +makes these mandatory)

    The endianness may still vary, but that can be worked around by using a union with a single large enough @@ -123,8 +121,8 @@ various representations: (and other non-standard formats are not supported)

    ld64 is easy to handle: all long double functions -are aliased to the corresponding double one -(long double is treated equivalently to double) +are just wrappers around the corresponding double ones +(aliasing is non-conformant)

    ld80 is the most common (i386, x86_64), it means 64bit significand with explicit msb (inconsistent with other ieee formats), @@ -136,7 +134,9 @@ ld128 is rare (sparc64 with software emulation), it means Endianness can vary (although on the supported i386 and x86_64 it is the same) and there is no large enough unsigned int to handle it. (In case of ld80 internal padding can vary as well, eg -m68k and m88k cpus use different ld80 than the intel ones) +m68k and m88k cpus use different ld80 than the intel ones.) +So there can be further variations in the binary representation +than just ld80 and ld128.

    Ugly

    @@ -144,7 +144,6 @@ m68k and m88k cpus use different ld80 than the intel ones)

    Some notes are from: http://www.vinc17.org/research/extended.en.html -

    libm implementations