[illumos-Developer] Ugh... xdr_{float,double} problems

Deano deano at rattie.demon.co.uk
Tue Feb 1 06:55:35 PST 2011


A compiler error would be preferred it I was porting, I rather have the
compiler mark "Here be dragons" then find it after hours of hard debugging
some obscure rounding error later on.

Done a fair amount of platform porting and I always prefer the compiler to
just stop than try and patch over things that aren't really patch over-able.

Just My 2p,
Deano
deano at cloudpixies.com

-----Original Message-----
From: Jason King [mailto:jason.brian.king at gmail.com] 
Sent: 01 February 2011 14:26
To: Joerg Schilling
Cc: developer at lists.illumos.org
Subject: Re: [illumos-Developer] Ugh... xdr_{float,double} problems

On Tue, Feb 1, 2011 at 3:30 AM, Joerg Schilling
<Joerg.Schilling at fokus.fraunhofer.de> wrote:
> "Garrett D'Amore" <garrett at nexenta.com> wrote:
>
>> It sounds like all the main CPU targets support IEEE 754.  The only
>> reasonable (?) question IMO is S390.  Roland?  Neale?
>
> If I interpret the floating point code written by David M. Gay from AT&T
> correctly, then IBM and VAX are the two mayor deviations from IEEE.
>
> But HPPA uses at least different parameters for long double than other
IEEE
> architectures do.
>
> Jörg

Just to get back to the question at hand.  Is it reasonable to assume
if someone is going to port Illumos to a platform that doesn't support
IEEE 754 to have them write conversion code (that can utilize
knowledge of the native format during the conversion) instead of a
generic routine that is both slow and very likely to introduce greater
rounding errors?

If so, I will just remove the portable code altogether and just emit a
compiler error to notify porters.  If not, I will revert it to an
#ifdef to select between the two implementations.

_______________________________________________
Developer mailing list
Developer at lists.illumos.org
http://lists.illumos.org/m/listinfo/developer




More information about the Developer mailing list