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

Subject: Re: [xsl] XSL Documentation: a number is true when...
From: Norman Gray <norman@xxxxxxxxxxxxxxx>
Date: Wed, 25 Jul 2007 11:14:12 +0100
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

Current Thread