Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Jan 2003 19:43:51 +1100 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Mike Barcroft <mike@FreeBSD.ORG>
Cc:        Kyle Martin <mkm@ieee.org>, Ryan Younce <ryany@pobox.com>, <standards@FreeBSD.ORG>
Subject:   Re: a few missing types in math.h
Message-ID:  <20030104192813.S8432-100000@gamplex.bde.org>
In-Reply-To: <20030103194148.A79470@espresso.q9media.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 3 Jan 2003, Mike Barcroft wrote:

> This needs to at least be conditional on __ISO_C_VISIBLE >= 1999, but I
> wonder if we should make these variable types MD.
>
> If we don't want to make them MD, I'd recommend the following patch:
>
> %%%
> Index: math.h
> ===================================================================
> RCS file: /work/repo/src/lib/msun/src/math.h,v
> retrieving revision 1.20
> diff -u -r1.20 math.h
> --- math.h	31 Oct 2002 23:05:20 -0000	1.20
> +++ math.h	4 Nov 2002 15:25:29 -0000
> ...
> @@ -26,6 +28,12 @@
>  } __infinity;
>  #define HUGE_VAL	(__infinity.__ud)
>
> +#if __ISO_C_VISIBLE >= 1999
> +typedef	float	float_t;
> +typedef	double	double_t;
> +#define	FLT_EVAL_METHOD	0
> +#endif

All these are are MD.  For i386's FLT_EVAL_METHOD should be some negative
number < -1 (implementation defined as broken: the evaluation method
depends on whether the operands are const, and on their types and compiler
flags and optimization side effects if they are variables), and double
seems to be least incorrect for both float_t and float_t (float_t should
not be float since floats are inefficient, especially if method 0 is
actually implemented for them).  I think this stuff is less broken for
other arches since the hardware supports method 0 efficiently which is what
gcc prefers.

Bruce


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




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