Average Error: 0.1 → 0.1
Time: 16.2s
Precision: 64
Internal precision: 128
\[x \cdot \left(1.0 - x \cdot y\right)\]
\[1.0 \cdot x + \left(-x \cdot y\right) \cdot x\]

Error

Bits error versus x

Bits error versus y

Target

Original0.1
Comparison0.1
Herbie0.1
\[ x \cdot \left(1.0 - x \cdot y\right) \]

Derivation

  1. Initial program 0.1

    \[x \cdot \left(1.0 - x \cdot y\right)\]
  2. Using strategy rm
  3. Applied sub-neg 0.1

    \[\leadsto x \cdot \color{blue}{\left(1.0 + \left(-x \cdot y\right)\right)}\]
  4. Applied distribute-rgt-in 0.1

    \[\leadsto \color{blue}{1.0 \cdot x + \left(-x \cdot y\right) \cdot x}\]
  5. Removed slow pow expressions

Runtime

Time bar (total: 16.2s) Debug log

Please include this information when filing a bug report:

herbie --seed '#(937181842 1521647761 540087358 3634931625 1628325771 3457446866)'
(FPCore (x y)
  :name "Numeric.SpecFunctions:log1p from math-functions-0.1.5.2, A"

  :target
  (* x (- 1.0 (* x y)))

  (* x (- 1.0 (* x y))))