|Anonymous | Login||02-29-2020 03:43 UTC|
|Main | My View | View Issues | Change Log | Docs|
|Viewing Issue Advanced Details [ Jump to Notes ]||[ View Simple ] [ Issue History ] [ Print ]|
|ID||Category||Severity||Reproducibility||Date Submitted||Last Update|
|0006711||[Squeak] Kernel||minor||always||10-08-07 02:10||12-01-08 22:59|
|ETA||none||Fixed in Version||3.10||Product Version||3.10|
|Summary||0006711: FloatTest is wrong|
|Description||FloatTest>>testNaN2 is wrong. It first denies that nan1 = nan1 (which, bizarre as it may seem, is correct) and then asserts that nan1 = nan1. I changed that last statement to nan1 == nan1.|
|Steps To Reproduce|
|Attached Files||FloatTest-testNaN2-M6711.cs.st [^] (1,351 bytes) 10-08-07 02:13|
(0011259 - 927 - 1044 - 1044 - 1044 - 1044 - 1044)
Note that in testNaN1 Float nan == Float nan does answer true.
It rely on the fact that Float nan is a constant ^NaN.
But has this any usefull meaning?
I mean, is this really a deliberated feature, or just a side effect of current implementation?
I tend to interpret it a side effect, because most operations will produce a NaN which is ~~ Float nan:
(0.0 ln / 0.0 ln) == Float nan. "is false"
(0.0 ln / 0.0 ln) isNan. "is true'
So user should never use test == Float nan. It might be true sometimes (when coming from Float nan or Number readFrom: 'NaN'), wrong most times.
User should use isNan. That's what the test should emphasize as a feature.
So, this == test just assert that implementation is what it is, which must NOT be interpreted by user as a feature.
This test just forbid implementation to change, which is arbitrary and useless, and might not be portable across dialects and/or versions.
(0011260 - 65 - 65 - 65 - 65 - 65 - 65)
|Note that in 7137, test is correctly nan1 == nan1 (dtl 10/1/2004)|
(0012819 - 55 - 55 - 55 - 55 - 55 - 55)
|Harvested as update 7151 and released with Squeak 3.10.|
|10-08-07 02:10||RalphJohnson||New Issue|
|10-08-07 02:13||RalphJohnson||File Added: FloatTest-testNaN2-M6711.cs.st|
|10-08-07 14:38||RalphJohnson||Assigned To||=> RalphJohnson|
|10-08-07 14:38||RalphJohnson||Status||new => assigned|
|10-08-07 20:08||nicolas cellier||Note Added: 0011259|
|10-08-07 21:10||nicolas cellier||Note Added: 0011260|
|10-09-07 20:40||edgardec||Status||assigned => resolved|
|10-09-07 20:40||edgardec||version||=> 3.10|
|12-01-08 22:59||KenCausey||Status||resolved => closed|
|12-01-08 22:59||KenCausey||Note Added: 0012819|
|12-01-08 22:59||KenCausey||Resolution||open => fixed|
|12-01-08 22:59||KenCausey||Fixed in Version||=> 3.10|
| Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
52 total queries executed.|
38 unique queries executed.