Opened 10 years ago
Closed 10 years ago
#110 closed defect (fixed)
(log 100w0 10) and (log 100w0 10w0) return different values
Reported by: | Raymond Toy | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | Core | Version: | 20f |
Keywords: | Cc: |
Description
As the summary says;
* (log 100w0 10w0) 2.0w0 * (log 100w0 10) 1.999999999999999999999999999999985158075320114658w0
This is because when the base is rational, we use the kernel::log2
to compute the necessary logs in case the rational number is so large that it won't fit in double-double
.
Two possible solutions (not necessarily mutually exclusive):
- Improve the accuracy of
log2
fordouble-double
's. - Implement a
log10
function fordouble-double
's.
Note: See
TracTickets for help on using
tickets.
Fixed by adding a double-double implementation of log10. Now
(log 100w0 10w0)
and(log 100w0 10)
return the same value of 2w0.Solution was implemented in changeset:4d3255 and changeset:d46a4bf.