Average Error: 29.4 → 0.2
Time: 3.2s
Precision: binary64
\[\]
\[\]

Error

Bits error versus x

Derivation

  1. Split input into 2 regimes
  2. if (- (/ x (+ x 1.0)) (/ (+ x 1.0) (- x 1.0))) < 8.4395697880213e-6

    1. Initial program 58.9

      \[\]
    2. Using strategy rm
    3. Applied add-log-exp58.9

      \[\leadsto \]
    4. Applied add-log-exp58.9

      \[\leadsto \]
    5. Applied diff-log58.9

      \[\leadsto \]
    6. Simplified58.9

      \[\leadsto \]
    7. Taylor expanded around inf 0.6

      \[\leadsto \]
    8. Simplified0.3

      \[\leadsto \]

    if 8.4395697880213e-6 < (- (/ x (+ x 1.0)) (/ (+ x 1.0) (- x 1.0)))

    1. Initial program 0.1

      \[\]
    2. Using strategy rm
    3. Applied div-inv0.1

      \[\leadsto \]
  3. Recombined 2 regimes into one program.
  4. Final simplification0.2

    \[\leadsto \]

Reproduce

herbie shell --seed 2020179 
(FPCore (x)
  :name "Asymptote C"
  :precision binary64
  (- (/ x (+ x 1.0)) (/ (+ x 1.0) (- x 1.0))))