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
A function of a small argument evaluates to 0 #2074
A function of a small argument evaluates to 0 at the default hundred digits. Measured on 2.6.0:
Input
Evaluates to
Value
sin(10^(-60))
0
1e-60
tan(10^(-60))
0
1e-60
arcsin(10^(-60))
0
1e-60
arctan(10^(-60))
0
1e-60
erf(10^(-60))
0
1.128…e-60
sin(pi)
0
0, which is right
Cause. Each kernel creates its value with the floor at zero at half the working digits, absolute. That floor exists for the residual a function leaves at its own zeros: sin(pi) evaluates to about 1e-100. But that residual is relative to the argument, about 1e-100 * pi, and a function of an exact small argument cancels nothing. #2072 makes the floor relative to what cancelled for arithmetic. The same, with the argument's size as the scale, would separate these two cases for the functions.
sinh(10^(-60)) is a different case. It is evaluated from e^(10^(-60)), which is 1 within half the digits.
Activity
Measure a function's residual against its argument (#2076)