xsl-list
[Top] [All Lists]

Re: [xsl] XSL Documentation: a number is true when...

2007-07-25 03:14:28

Kai, hello.

On 25 Jul 2007, at 10:57, Kai Hackemesser wrote:

a number is true if and only if it is neither positive or negative
     zero nor NaN<<

My problem may be just lack of english language, but I need some explanation here. What is meant by positive or negative zero? From my math understandings zero is neither positive nor negative. If I drop that and say, a number is true when the value is neither zero nor NaN, would this be correct?

On essentially all significant hardware these days, floating point numbers are represented according to the IEEE 754 standard[1]. Amongst other things, that includes special bit patterns for positive and negative infinity, a large set of bit patterns for NaN (not-a- number), and the property that zero can be signed, so that 1.0*0.0= +0.0 and -1.0*0.0 = -0.0. The distinction matters in certain numerical contexts, but is ignorable for everyone else.

All the best,

Norman

[1] http://en.wikipedia.org/wiki/IEEE_754


--
------------------------------------------------------------
Norman Gray  :  http://nxg.me.uk
eurovotech.org  :  University of Leicester, UK



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>