significant digits?
Jonathan Buzzard
jonathan at buzzard.org.uk
Fri Apr 11 19:22:16 CEST 2003
bminton at efn.org said:
> This is only for equality. In this specific instance, 0.95 as a float is
>
> 0.949999988079071044921875000000000000 in hex is "3F733333"
> 0.950000047683715820312500000000000000 in hex is "3F733334"
> so any number in the range
> [0.949999988079071044921875000000000000,0.950000047 683715820312500000000000000) is counted as equal to 0.95
It is *not* just for equality. The point is you could have something
that equates to less than 0.95 so a suitable printf of a value that
equated to something in the range of numbers near 0.95 that are
all treated the same will look less than 0.95, yet fail the
inequality test.
[SNIP]
> which, when run produces:
> FALSE
> FALSE
> TRUE
> TRUE
Which proves my point, though it is not really important in this instance
however.
JAB.
--
Jonathan A. Buzzard Email: jonathan at buzzard.me.uk
Northumberland, United Kingdom. Tel: +44 1661-832195
More information about the Bogofilter
mailing list