Average Error: 29.7 → 0.2
Time: 20.3s
Precision: 64
Internal Precision: 1344
\[2 - \sqrt{4 - \left(4 \cdot s\right) \cdot s}\]
\[{s}^{2} + \left(\frac{1}{4} \cdot {s}^{4} + \frac{1}{8} \cdot {s}^{6}\right)\]

Error

Bits error versus s

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 29.7

    \[2 - \sqrt{4 - \left(4 \cdot s\right) \cdot s}\]
  2. Taylor expanded around 0 0.2

    \[\leadsto \color{blue}{{s}^{2} + \left(\frac{1}{4} \cdot {s}^{4} + \frac{1}{8} \cdot {s}^{6}\right)}\]

Runtime

Time bar (total: 20.3s)Debug log

herbie shell --seed '#(2775764126 3555076145 3898259844 1891440260 2599947619 1948460636)' 
(FPCore (s)
  :name "2 - sqrt(4 - 4*s*s)"
  (- 2 (sqrt (- 4 (* (* 4 s) s)))))