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

Error

Bits error versus x

Bits error versus y

Bits error versus z

Target

Original0.1
Comparison0.1
Herbie0.1
\[ \left(\left(y + x\right) - z\right) - \left(y + 0.5\right) \cdot \log y \]

Derivation

  1. Initial program 0.1

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

    \[\leadsto \left(\color{blue}{\left(x + \left(-\left(y + 0.5\right) \cdot \log y\right)\right)} + y\right) - z\]
  4. Applied associate-+l+ 0.1

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

Runtime

Time bar (total: 29.8s) Debug log

Please include this information when filing a bug report:

herbie --seed '#(2383813786 1816248793 2138708643 2656393320 2838733375 1575668751)'
(FPCore (x y z)
  :name "Numeric.SpecFunctions:stirlingError from math-functions-0.1.5.2"

  :target
  (- (- (+ y x) z) (* (+ y 0.5) (log y)))

  (- (+ (- x (* (+ y 0.5) (log y))) y) z))