Done
Copy link
Milestone
Description
On master (4674e66), evaluating an inverse or hyperbolic function at an argument past about 10^50 drops a part of the answer, or invents one. Reference values are from mpmath at 700 digits.
.Evaled |
master | true value |
|---|---|---|
arcsin(10^60) |
1.5707… - 138.848…i |
same (correct) |
arcsin(10^100) |
1.5707… |
1.5707… - 230.9517i |
arcsin(10^200), arcsin(10^500) |
0 |
1.5707… - 461.2102i, 1.5707… - 1151.9857i |
arccos(10^500) |
1.5707… |
1151.9857i |
tanh(10^40 * i) |
0.69307i |
same (correct) |
tanh(10^60 * i) |
-2.2211 - 1.4903i |
-1.4903i (real part 0) |
Ci(10^20) |
-6.4525E-21 |
same (correct) |
Ci(10^50) |
0 |
-7.8967E-51 |
The likely cause is that the complex paths treat any part below about 10^-50 times the size of the argument as zero. At a large argument this keeps rounding noise as a real part, as in tanh(10^60 i), and throws away an imaginary part the answer needs, as in arcsin. Ci drops its whole value the same way once that value is below that relative scale.
Found while checking #2668's fix (#2674), which keeps master's answers past 10^1000 the same and does not reach this range.
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
- StatusShow more project fieldsDone
Activity
Keep every part of a complex value past 10^50 (#2675) (#2676)