Average Error: 7.6 → 0.0
Time: 14.8s
Precision: 64
Internal precision: 128
\[\frac{x \cdot y}{y + 1.0}\]
\[\frac{x}{1} \cdot \frac{y}{y + 1.0}\]

Error

Bits error versus x

Bits error versus y

Target

Original7.6
Comparison0.0
Herbie0.0
\[ \begin{array}{l} \mathbf{if}\;y \lt -3693.8482788297247:\\ \;\;\;\;\frac{x}{{y}^2} - \left(\frac{x}{y} - x\right)\\ \mathbf{if}\;y \lt 6799310503.41891:\\ \;\;\;\;\frac{x \cdot y}{y + 1.0}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{{y}^2} - \left(\frac{x}{y} - x\right)\\ \end{array} \]

Derivation

  1. Initial program 7.6

    \[\frac{x \cdot y}{y + 1.0}\]
  2. Using strategy rm
  3. Applied *-un-lft-identity 7.6

    \[\leadsto \frac{x \cdot y}{\color{blue}{1 \cdot \left(y + 1.0\right)}}\]
  4. Applied times-frac 0.0

    \[\leadsto \color{blue}{\frac{x}{1} \cdot \frac{y}{y + 1.0}}\]
  5. Removed slow pow expressions

Runtime

Time bar (total: 14.8s) Debug log

Please include this information when filing a bug report:

herbie --seed '#(9972562 2048231255 1147971859 3111148232 792590272 2058179135)'
(FPCore (x y)
  :name "Diagrams.Trail:splitAtParam  from diagrams-lib-1.3.0.3, B"

  :target
  (if (< y -3693.8482788297247) (- (/ x (sqr y)) (- (/ x y) x)) (if (< y 6799310503.41891) (/ (* x y) (+ y 1.0)) (- (/ x (sqr y)) (- (/ x y) x))))

  (/ (* x y) (+ y 1.0)))