Re: G_MINFLOAT definition?



On Wed, 20 Jun 2001, Tim Janik wrote:

> we do rely in IEEE compliant float/double implementations.
> 
>         * glib.h: added GFloatIEEE754 and GDoubleIEEE754 unions to access sign,
>         mantissa and exponent of IEEE floats and doubles (required by the new
>         version of g_printf_string_upper_bound). the unions are endian specific,
>         we handle G_LITTLE_ENDIAN and G_BIG_ENDIAN as of currently. ieee floats
>         and doubles are supported (used for storage) by at least intel, ppc and
>         sparc, reference:
>         http://twister.ou.edu/workshop.docs/common-tools/numerical_comp_guide/ncg_math.doc.html
> 
> we've yet to see a machine that glib runs on, that doesn't support
> IEEE floats. and if we do, we're in trouble (or at least those machine's
> suers ;)
> 

Sorry for the unclarity. By IEEE floating point people usually (ok, so I
am using a specific definition of people here) mean:
	* full and correct support for denormals
	* all arithmetic ops working correcttly in all four rounding modes
	* full and correct support for NAN/+-Inf
	* consistent 

Lot's of things that provide the binary format don't provide some of the
other parts, potentially differning with compile time flags. 

Even on x86 you have to take a lot of care to really have IEEE floating
point. 8-)

> 
> ---
> ciaoTJ
> 

	Sander

One day a tortoise will learn to fly
	-- Terry Pratchett, 'Small Gods'





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