Anonymous | Login | 01-16-2021 15:31 UTC |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
0006983 | [Squeak] Kernel | minor | always | 03-14-08 22:37 | 04-18-10 22:05 | ||||
Reporter | nicolas cellier | View Status | public | ||||||
Assigned To | nicolas cellier | ||||||||
Priority | normal | Resolution | fixed | ||||||
Status | closed | Product Version | 3.10 | ||||||
Summary | 0006983: Float nan isLiteral. It should not. | ||||||||
Description |
There is no way to store Float nan as a literal. (Yes there is one, but there should not. It is a bug of Number>>readFrom:, see 0006982) Examples: self assert: (Compiler evaluate: Float nan storeString) isNan. self assert: (Compiler evaluate: (Array with: Float nan) storeString) first isNan. |
||||||||
Additional Information |
I have an easy and cheap way to define isLiteral which is synonym of isFinite: ^(self - self) isZero |
||||||||
Attached Files |
![]() ![]() |
||||||||
|
![]() |
|
(0011924 - 327 - 351 - 351 - 351 - 351 - 351) nicolas cellier 03-14-08 22:55 |
Note that there are still literal representation of Float infinity, like 1.0e1000. However, since Float infinity is not able to print literaly, and isLiteral is intended for print, i think it's better to answer false for infinite Floats too. Unless you really like (Array with: Float infinity) to be printed #(1.0e1000) ? |
(0011926 - 315 - 365 - 365 - 503 - 503 - 503) nicolas cellier 03-15-08 00:28 |
Note that the patch does not solve storeString bugs indicated above. See 0001631 for a possible solution. (Array with: Float nan) storeString -> '((Array new: 1) at: 1 put: NaN; yourself)' A side effect is that Float nan and Float infinity are no more selfEvaluating... (which is true until 0001631 is fixed). |
(0012894 - 179 - 233 - 233 - 233 - 233 - 233) nicolas cellier 01-04-09 22:34 |
"fix begin" Installer mantis bug: 6983 fix:'Float-isLiteral-Patch-M6983-nice.1.cs'. "fix test" Installer mantis bug: 6983 fix:'FLoat-isLiteral-Test-M6983-nice.1.cs'. "fix end" |
(0013283 - 59 - 59 - 209 - 209 - 209 - 209) nicolas cellier 08-24-09 20:20 |
Fixed in http://source.squeak.org/trunk/Kernel-nice.207.mcz [^] |
Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
57 total queries executed. 40 unique queries executed. |