[illumos-Developer] Ugh... xdr_{float,double} problems
Garrett D'Amore
garrett at damore.org
Mon Jan 31 16:30:56 PST 2011
I think that largely sums my feeling of floating point in general....
Bill Sommerfeld <sommerfeld at hamachi.org> wrote:
>On 01/31/11 15:34, Garrett D'Amore wrote:
>> It sounds like all the main CPU targets support IEEE 754. The only
>> reasonable (?) question IMO is S390. Roland? Neale?
>
>There is an extensive discussion of floating point formats at:
>
>http://www.quadibloc.com/comp/cp0201.htm
>
>There is definitely a least one "IBM" floating point encoding out there.
>
>Apollo's NCS RPC protocol (which is about as old as xdr) supported four
>different floating point format tags: IEEE, Vax, Cray, and IBM (mainframe).
>
>My conclusion from the time I spent working in the group at apollo that
>did NCS is that you're generally better off avoiding the use of floating
>point numbers in wire protocols if at all humanly possible. Lossless
>conversion between formats is often impossible, and a round-trip
>conversion between formats is likely to give you back a slightly
>different number.
>
>Probably best to let sleeping dogs lie here..
>
> - Bill
>
>_______________________________________________
>Developer mailing list
>Developer at lists.illumos.org
>http://lists.illumos.org/m/listinfo/developer
More information about the Developer
mailing list