You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
arcoth, arcsch, arsech, a square root and Ci drop a part much smaller than their input #2677
On master (4674e66), these evaluations drop a value or a part that is small relative to the rest of the input. Reference values are from mpmath at 400 digits.
.Evaled
master
true value
arcoth(10^20), arcsch(10^20)
1.0E-20
same (correct)
arcoth(10^60)
0
1.0E-60
arcsch(10^60)
0
1.0E-60
arsech(10^50 * i)
-1.5707…i
1.0E-50 - 1.5707…i
(1 + 10^(-50) * i)^(1/2)
1
1 + 5.0E-51i
Ci(10^60 + i)
0
1.28136E-60 - 6.54802E-61i
Two causes look likely. Both are unconfirmed.
The parser writes arcoth(x) as 1/2 * ln((x + 1) / (x - 1)), and arcsch and arsech are expanded the same way. A logarithm of 1 + tiny loses tiny relative to the 1.
The root search rounds a phase of 5e-51 onto 0.
Found while fixing #2675 (#2676), which leaves these unchanged.
Activity
Evaluate a logarithm again only for a 0 a sum left, not for a 1 (#2677)
Read a written decimal's distance from 1 to the working digits only (#…
Leave a modulus on the unit circle to its parts' rounding (#2677)
Merge origin/master (e89bc39) into the #2677 branch
Ask the logarithm's own value whether it may be near 1 (#2677)
Merge origin/master (d6e3ed5) into the #2677 branch
Take a base near 1 only where its distance is placed (#2677)