[illumos-Developer] Ugh... xdr_{float,double} problems
Owen Shepherd
owen.shepherd at e43.eu
Mon Jan 31 16:22:14 PST 2011
On 1 Feb 2011, at 00:14, Bill Sommerfeld 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
S390 being as it is, it wouldn't surprise me if it has both IBM and 754 modes (And 754 mode is the way you're supposed to do things in new software)
-- Owen Shepherd
http://www.owenshepherd.net/
owen.shepherd at e43.eu (general) / oshepherd1 at shef.ac.uk (university)
More information about the Developer
mailing list