Average Error: 12.1 → 2.8
Time: 28.2s
Precision: 64
Internal Precision: 384
\[\frac{x \cdot \left(y + z\right)}{z}\]
\[\frac{x}{\frac{z}{y + z}}\]

Error

Bits error versus x

Bits error versus y

Bits error versus z

Target

Original12.1
Target2.8
Herbie2.8
\[\frac{x}{\frac{z}{y + z}}\]

Derivation

  1. Initial program 12.1

    \[\frac{x \cdot \left(y + z\right)}{z}\]
  2. Using strategy rm
  3. Applied associate-/l*2.8

    \[\leadsto \color{blue}{\frac{x}{\frac{z}{y + z}}}\]
  4. Removed slow pow expressions.

Runtime

Time bar (total: 28.2s)Debug log

herbie shell --seed '#(1567391828 2030694642 2833800258 828025724 3004380912 3532991858)' +o setup:early-exit
(FPCore (x y z)
  :name "Numeric.SpecFunctions:choose from math-functions-0.1.5.2"

  :herbie-target
  (/ x (/ z (+ y z)))

  (/ (* x (+ y z)) z))