Skip to content

A function of a small argument evaluates to 0 #2074

Closed

Description

@Rafael-SOWNet

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.

Part of #1944's class; found while working on it.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

Activity

  1. added this to the 2.7.0 milestone on Oct 22, 2026
  2. moved this from Todo to In Progress in AngouriMathon Oct 22, 2026
  3. added a commit that references this issue on Oct 22, 2026
    a9866da
  4. moved this from In Progress to Done in AngouriMathon Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions