Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Dec 1998 01:31:10 +1100
From:      Bruce Evans <bde@zeta.org.au>
To:        bde@zeta.org.au, dfr@nlsystems.com
Cc:        cvs-all@FreeBSD.ORG, cvs-committers@FreeBSD.ORG, dfr@FreeBSD.ORG
Subject:   Re: cvs commit: src/sys/alpha/alpha machdep.c sys_machdep.c src/sys/alpha/include alpha_cpu.h fpu.h ieeefp.h sysarch.h src/lib/libc/alpha SYS.h src/lib/libc/alpha/gen Makefile.inc fpgetmask.c fpgetround.c fpgetsticky.c fpsetmask.c fpsetround.c ...
Message-ID:  <199812231431.BAA28606@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>> Applications should use the documented interface, which is
>> 
>> 	#include <floatingpoint.h>
>> 
>> We seem to have obtained this interface from Sun.  AltaVista finds many
>> hits on <floatingpoint.h> in SunOS and Solaris man pages, e.g.,
>> 
>> 	http://www.sees.bangor.ac.uk/~bill/man/intro3.html
>> 
>> It goes with <sys/ieeefp.h>, which we don't have (we had it in
>> FreeBSD.1.x, but I moved it to <machine/ieeefp.h> because it was
>> i386-specific :-).
>> 
>> This interface should be superseded by the C9x <fenv.h> interface.
>
>I was following the NetBSD naming.  If there is a standard interface to
>use this then then we should follow it and maybe deprecate
>ieeefp.h/floatingpoint.h or

It is more screwed up than I thought.  The Sun contents of the Sun
<floatingpoint.h> is nothing like ours.  Precision masks bits seem
to be in Sun's <sys/ieeefp.h>, but they have different names, and
IIRC the function names are different too.  Our function names are
found in HPUX and Intel (Paragon only?) man pages.  HPUX apparently
declares them in <math.h> and Paragon apparently declares them in
<ieeefp.h>.  Paragon seems to have the same interface as NetBSD.

Better yet, all of the "i386" interfaces are incompatible with the
NetBSD/ Paragon ones, because the typedefs are spelled properly
(with a trailing _t) only for the i386 interfaces.  Even rev.1.1
in FreeBSD-1.x has the _t's.

<fenv.h> must be better than this even if no one has implemented it.
It has been implemented mainly by Apple according to AltaVista.

Here is part of <fenv.h>:
 
	void fesetexceptflag(const fexcept_t *flagp, int excepts);
	int fesetround(int round);
	void fesetenv(const fenv_t *envp);

Bruce

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199812231431.BAA28606>