Skip to content

A false root near 0 of 10^3 tanh(x / 10^3) = x / 2 #2645

Description

@Rafael-SOWNet

(10^3 tanh(x / 10^3) = x / 2).Solve("x") gives { 0, 1.1013…E-13 }. The second root is false: the real roots are 0 and ±1915.008… (the roots of tanh(t) = t / 2 times 1000). 10^6 tanh(x / 10^6) = x / 2 likewise gives -7.39…E-13 beside 0. 2.10.0 gives the same.

Before the root search, tanh is written in exponentials over a cleared denominator, 1000 (e^(2x/1000) - 1) - (e^(2x/1000) + 1) x / 2. Near 0 its terms of size 1000 cancel, so at 1.1e-13 the residual (about 1e-13) passes both the absolute floor and the check relative to the terms. Judging the residual on the equation as written, rather than on the rewritten form, would reject it.

#2644 adds the real roots ±1915.008… but keeps this false one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions