Average Error: 0.3 → 0.2
Time: 7.6s
Precision: 64
Internal precision: 128
\[\left(3.0 \cdot \left(2.0 - x \cdot 3.0\right)\right) \cdot x\]
\[\left(6.0 - 9.0 \cdot x\right) \cdot x\]

Error

Bits error versus x

Target

Original0.3
Comparison0.2
Herbie0.2
\[ 6.0 \cdot x - 9.0 \cdot {x}^2 \]

Derivation

  1. Initial program 0.3

    \[\left(3.0 \cdot \left(2.0 - x \cdot 3.0\right)\right) \cdot x\]
  2. Applied taylor 0.2

    \[\leadsto \left(6.0 - 9.0 \cdot x\right) \cdot x\]
  3. Taylor expanded around 0 0.2

    \[\leadsto \color{blue}{\left(6.0 - 9.0 \cdot x\right)} \cdot x\]
  4. Removed slow pow expressions

Runtime

Time bar (total: 7.6s) Debug log

Please include this information when filing a bug report:

herbie --seed '#(714698387 1352388742 3868645976 3741497216 3047604636 2974236668)'
(FPCore (x)
  :name "Diagrams.Tangent:$catParam from diagrams-lib-1.3.0.3, E"

  :target
  (- (* 6.0 x) (* 9.0 (sqr x)))

  (* (* 3.0 (- 2.0 (* x 3.0))) x))