[om] OM Floats (XML Representation)

Mike Dewar miked at nag.co.uk
Mon Dec 1 15:34:15 CET 2003


I agree with James - we ought to stick with the IEEE definition of NaN
since the XSD one is so far out of step with other standards.  However
Bill was right to note that Java only has one NaN value, even though the
IEEE standard allows lots (as pointed out by Richard Fateman), so not
everybody else is fully IEEE compliant either.  This should perhaps be
pointed out in the standard as a possible issue for phrasebook
developers.

To get back to David's original question, although it would be useful to
allow <OMF dec="NaN"/> we should be clear that this is not the only way
to create NaNs and that e.g. <OMF hex="7FFFFFFF"/> is also OK (assuming
that represents a NaN), so an application handling floating point data
should be able to import both.  With that proviso I think that we should
allow NaN, Inf and -Inf as values of the `dec' attribute, but that we
should not type the value of the attribute as an xsd:double because of
its definition of NaNs and that we should explain this decision in the
section describing the XML encoding.

Maybe the informal description of OMF should also say something along
the lines of "the dec attribute will typically be used to contain the
result of calling a print method in a programming language such as C or
Java, while the hex attribute will be used to contain a hexadecimal
encoding of the actual bit pattern of the number in question".  What do
people think?

Mike. 

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
--
om at openmath.org  -  general discussion on OpenMath
Post public announcements to om-announce at openmath.org
Automatic list maintenance software at majordomo at openmath.org
Mail om-owner at openmath.org for assistance with any problems



More information about the Om mailing list