Bug #776
FloatStr prints a NUL character
Status:
Closed
Priority:
Normal
Assignee:
Category:
Maths Bugs
Target version:
Description
FloatStr
prints out a NUL character in some cases.
J := 38478521676166483490305685030818526171181904643421577733382705346571894686085840002453315602443444444401/38478521676166483605741250097796497856523182881313912761668255277583712667477744737709244389536050430475222646784; FloatStr(J,19); 9.99999999999999997
History
#1 Updated by John Abbott almost 9 years ago
JAA is sure that smaller examples exist (but too tired to search now).
NOTE it seems that redmine does not like having NUL chars pasted into it... the example output above is truncated at the NUL
#2 Updated by John Abbott almost 9 years ago
- Status changed from New to In Progress
- % Done changed from 0 to 10
The problem seems to be ILogBase(...,10) giving a wrong result: it gives -9 instead of -10.
#3 Updated by John Abbott almost 9 years ago
- Status changed from In Progress to Feedback
- % Done changed from 10 to 90
The bug was some overly delicate bug in ILogBase
implemented in BigRat.C
; I had forgotten to allow for possible fp rounding :-(
All seems OK now; the new code is less "slick" but shorter and apparently correct.
#4 Updated by John Abbott over 8 years ago
- Status changed from Feedback to Closed
- % Done changed from 90 to 100
No problems have surfaced in the last 5 months, so closing.