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

Garrett D'Amore garrett at nexenta.com
Tue Feb 1 07:20:21 PST 2011


On 02/ 1/11 06:25 AM, Jason King wrote:
> 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.
>    

I think I'd leave the portable code there, with a big honking comment 
describing what we've already discussed here.  We don't want someone 
else to have to go through all this painful discovery in the future.

     - Garrett




More information about the Developer mailing list