Opened 16 years ago
Closed 16 years ago
#24 closed defect (fixed)
Float contagion for expt
Reported by: | Raymond Toy | Owned by: | somebody |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | Core | Version: | 2008-09 |
Keywords: | Cc: |
Description
Consider
* (expt 2 #c(-.5d0 0)) #C(0.7071067805131506d0 0.0d0)
Compare that with
* (expt 2d0 #c(-.5d0 0)) #C(0.7071067811865475d0 0.0d0) * (sqrt .5d0) 0.7071067811865476d0
I think we should apply float contagion in the first case to produce the more accurate result.
Note: See
TracTickets for help on using
tickets.
Should return the more accurate answer in snapshot 2008-11.
Both arguments are effectively coerced to the most precise argument before computing the exponential.
The above result happens because we compute the result as
(log 2)
only has single-precision accuracy.We now compute it as