Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003373 [Squeak] Kernel minor always 03-28-06 21:14 04-30-06 20:55
Reporter nicolas cellier View Status public  
Assigned To
Priority normal Resolution fixed  
Status closed   Product Version 3.9
Summary 0003373: Float asFraction does not handle gradual underflow
Description as explicitely stated in Float>>#asTrueFraction comment

"(Does not handle gradual underflow or NANs.)"

1.0e-316 asFraction asFloat.
    "will answer 1.1125369342536e-308"

ouch!
Additional Information
Attached Files  Float-asFraction-Test.1.cs [^] (350 bytes) 03-28-06 21:38
 Float-asFraction-Patch.1.cs [^] (2,300 bytes) 03-28-06 21:40
 Float-asFraction-Patch.2.cs [^] (2,327 bytes) 03-29-06 00:59

- Relationships
related to 0007323closed  A mother for bugs and problems with Fractions. 

- Notes
(0004593 - 161 - 173 - 173 - 173 - 173 - 173)
nicolas cellier
03-28-06 21:41

a test and a patch are included.

I did not check that patch was the better possible vis a vis Fraction reduction (gcd: time spent ?), but it seems to work OK.
 
(0004596 - 270 - 300 - 300 - 300 - 300 - 300)
nicolas cellier
03-29-06 01:02

Second version of Float>>asTrueFraction is just to speed things up a little.
Rationale: i have to use it in Float hash and this will degrade performances...

Due to LargeInteger arithmetic, this is not a very efficient algorithm.
Should think of writing a primitive.
 
(0004832 - 11 - 11 - 11 - 11 - 11 - 11)
ducasse
04-30-06 20:37

in 39a-7027
 
(0004833 - 11 - 11 - 11 - 11 - 11 - 11)
ducasse
04-30-06 20:55

in 39a-7027
 

- Issue History
Date Modified Username Field Change
03-28-06 21:14 nicolas cellier New Issue
03-28-06 21:38 nicolas cellier File Added: Float-asFraction-Test.1.cs
03-28-06 21:40 nicolas cellier File Added: Float-asFraction-Patch.1.cs
03-28-06 21:41 nicolas cellier Note Added: 0004593
03-29-06 00:59 nicolas cellier File Added: Float-asFraction-Patch.2.cs
03-29-06 01:02 nicolas cellier Note Added: 0004596
04-30-06 20:37 ducasse Status new => closed
04-30-06 20:37 ducasse Note Added: 0004832
04-30-06 20:37 ducasse Resolution open => fixed
04-30-06 20:55 ducasse Note Added: 0004833
03-28-09 01:05 wiz Relationship added related to 0007323


Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
58 total queries executed.
38 unique queries executed.
Powered by Mantis Bugtracker