[FIX][BUG] Float NaN's ( [er][et][su][cd] patch provided for #testNaN2 )

lewis at mail.msen.com lewis at mail.msen.com
Sun Sep 26 14:33:46 UTC 2004


These tests provide coverage of Float behavior that is often confusing
for Squeakers. Nice method comments. Good stuff, this should prevent a
lot of confusion in the future!

I have attached a patch for the #testNaN2 method. Question for Boris:
Did this test actually pass on your Squeak system?

>From the attached change set:
The #testNaN2 test was using 1.0e200 to produce a Float infinity,
which in turn produced a couple of different Float NaN values.
However, the MaxVal of Float is supposed to be about 1.0e309.

I changed the numbers in the test to 1.0e400 to guarantee creation
of NaN values, and also added one line to the test that reconfirms
the check:
  self deny: Float infinity sin = Float infinity tan.

This produced the intended behavior for the test. The only question
is, how could the test ever have worked in the first place? Is there
a Squeak platform for which Float is *not* implemented as a
double precision floating point?!?

I also corrected a spelling error in a #testZero1 method comment.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FloatTest-patch-dtl.cs.gz
Type: application/octet-stream
Size: 826 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20040926/d820f348/FloatTest-patch-dtl.cs.obj


More information about the Squeak-dev mailing list