Average Error: 10.7 → 1.0
Time: 28.4s
Precision: 64
\[x + \frac{y \cdot \left(z - t\right)}{a - t}\]
\[\frac{\sqrt[3]{y} \cdot \sqrt[3]{y}}{\sqrt[3]{a - t} \cdot \sqrt[3]{a - t}} \cdot \left(\frac{\sqrt[3]{y}}{\sqrt[3]{a - t}} \cdot \left(z - t\right)\right) + x\]
x + \frac{y \cdot \left(z - t\right)}{a - t}
\frac{\sqrt[3]{y} \cdot \sqrt[3]{y}}{\sqrt[3]{a - t} \cdot \sqrt[3]{a - t}} \cdot \left(\frac{\sqrt[3]{y}}{\sqrt[3]{a - t}} \cdot \left(z - t\right)\right) + x
double code(double x, double y, double z, double t, double a) {
	return (x + ((y * (z - t)) / (a - t)));
}
double code(double x, double y, double z, double t, double a) {
	return ((((cbrt(y) * cbrt(y)) / (cbrt((a - t)) * cbrt((a - t)))) * ((cbrt(y) / cbrt((a - t))) * (z - t))) + x);
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Bits error versus a

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original10.7
Target1.4
Herbie1.0
\[x + \frac{y}{\frac{a - t}{z - t}}\]

Derivation

  1. Initial program 10.7

    \[x + \frac{y \cdot \left(z - t\right)}{a - t}\]
  2. Simplified2.8

    \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{a - t}, z - t, x\right)}\]
  3. Using strategy rm
  4. Applied fma-udef2.8

    \[\leadsto \color{blue}{\frac{y}{a - t} \cdot \left(z - t\right) + x}\]
  5. Using strategy rm
  6. Applied add-cube-cbrt3.3

    \[\leadsto \frac{y}{\color{blue}{\left(\sqrt[3]{a - t} \cdot \sqrt[3]{a - t}\right) \cdot \sqrt[3]{a - t}}} \cdot \left(z - t\right) + x\]
  7. Applied add-cube-cbrt3.4

    \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot \sqrt[3]{y}}}{\left(\sqrt[3]{a - t} \cdot \sqrt[3]{a - t}\right) \cdot \sqrt[3]{a - t}} \cdot \left(z - t\right) + x\]
  8. Applied times-frac3.4

    \[\leadsto \color{blue}{\left(\frac{\sqrt[3]{y} \cdot \sqrt[3]{y}}{\sqrt[3]{a - t} \cdot \sqrt[3]{a - t}} \cdot \frac{\sqrt[3]{y}}{\sqrt[3]{a - t}}\right)} \cdot \left(z - t\right) + x\]
  9. Applied associate-*l*1.0

    \[\leadsto \color{blue}{\frac{\sqrt[3]{y} \cdot \sqrt[3]{y}}{\sqrt[3]{a - t} \cdot \sqrt[3]{a - t}} \cdot \left(\frac{\sqrt[3]{y}}{\sqrt[3]{a - t}} \cdot \left(z - t\right)\right)} + x\]
  10. Final simplification1.0

    \[\leadsto \frac{\sqrt[3]{y} \cdot \sqrt[3]{y}}{\sqrt[3]{a - t} \cdot \sqrt[3]{a - t}} \cdot \left(\frac{\sqrt[3]{y}}{\sqrt[3]{a - t}} \cdot \left(z - t\right)\right) + x\]

Reproduce

herbie shell --seed 2020066 +o rules:numerics
(FPCore (x y z t a)
  :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, B"
  :precision binary64

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

  (+ x (/ (* y (- z t)) (- a t))))