close Warning: Can't synchronize with repository "(default)" ("(default)" is not readable or not a Git repository.). Look in the Trac log for more information.

Opened 9 years ago

Closed 9 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 for double-double's.
  • Implement a log10 function for double-double's.

Change History (1)

comment:1 Changed 9 years ago by Raymond Toy

Resolution: fixed
Status: newclosed

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.

Note: See TracTickets for help on using tickets.