Average Error: 2.1 → 0.9
Time: 3.7s
Precision: binary64
\[\frac{x}{y} \cdot \left(z - t\right) + t\]
\[t + \left(\sqrt[3]{x} \cdot \sqrt[3]{\frac{1}{y}}\right) \cdot \left({\left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right)}^{2} \cdot \left(z - t\right)\right)\]
\frac{x}{y} \cdot \left(z - t\right) + t
t + \left(\sqrt[3]{x} \cdot \sqrt[3]{\frac{1}{y}}\right) \cdot \left({\left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right)}^{2} \cdot \left(z - t\right)\right)
(FPCore (x y z t) :precision binary64 (+ (* (/ x y) (- z t)) t))
(FPCore (x y z t)
 :precision binary64
 (+
  t
  (*
   (* (cbrt x) (cbrt (/ 1.0 y)))
   (* (pow (/ (cbrt x) (cbrt y)) 2.0) (- z t)))))
double code(double x, double y, double z, double t) {
	return ((x / y) * (z - t)) + t;
}
double code(double x, double y, double z, double t) {
	return t + ((cbrt(x) * cbrt(1.0 / y)) * (pow((cbrt(x) / cbrt(y)), 2.0) * (z - t)));
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original2.1
Target2.3
Herbie0.9
\[\begin{array}{l} \mathbf{if}\;z < 2.759456554562692 \cdot 10^{-282}:\\ \;\;\;\;\frac{x}{y} \cdot \left(z - t\right) + t\\ \mathbf{elif}\;z < 2.326994450874436 \cdot 10^{-110}:\\ \;\;\;\;x \cdot \frac{z - t}{y} + t\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y} \cdot \left(z - t\right) + t\\ \end{array}\]

Derivation

  1. Initial program 2.1

    \[\frac{x}{y} \cdot \left(z - t\right) + t\]
  2. Using strategy rm
  3. Applied add-cube-cbrt_binary642.6

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

    \[\leadsto \color{blue}{\left(\sqrt[3]{\frac{x}{y}} \cdot \sqrt[3]{\frac{x}{y}}\right) \cdot \left(\sqrt[3]{\frac{x}{y}} \cdot \left(z - t\right)\right)} + t\]
  5. Simplified2.6

    \[\leadsto \left(\sqrt[3]{\frac{x}{y}} \cdot \sqrt[3]{\frac{x}{y}}\right) \cdot \color{blue}{\left(\left(z - t\right) \cdot \sqrt[3]{\frac{x}{y}}\right)} + t\]
  6. Using strategy rm
  7. Applied associate-*l*_binary642.6

    \[\leadsto \color{blue}{\sqrt[3]{\frac{x}{y}} \cdot \left(\sqrt[3]{\frac{x}{y}} \cdot \left(\left(z - t\right) \cdot \sqrt[3]{\frac{x}{y}}\right)\right)} + t\]
  8. Simplified2.6

    \[\leadsto \sqrt[3]{\frac{x}{y}} \cdot \color{blue}{\left({\left(\sqrt[3]{\frac{x}{y}}\right)}^{2} \cdot \left(z - t\right)\right)} + t\]
  9. Using strategy rm
  10. Applied cbrt-div_binary642.6

    \[\leadsto \sqrt[3]{\frac{x}{y}} \cdot \left({\color{blue}{\left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right)}}^{2} \cdot \left(z - t\right)\right) + t\]
  11. Using strategy rm
  12. Applied div-inv_binary642.6

    \[\leadsto \sqrt[3]{\color{blue}{x \cdot \frac{1}{y}}} \cdot \left({\left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right)}^{2} \cdot \left(z - t\right)\right) + t\]
  13. Applied cbrt-prod_binary640.9

    \[\leadsto \color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{\frac{1}{y}}\right)} \cdot \left({\left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right)}^{2} \cdot \left(z - t\right)\right) + t\]
  14. Final simplification0.9

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

Reproduce

herbie shell --seed 2020232 
(FPCore (x y z t)
  :name "Numeric.Signal.Multichannel:$cget from hsignal-0.2.7.1"
  :precision binary64

  :herbie-target
  (if (< z 2.759456554562692e-282) (+ (* (/ x y) (- z t)) t) (if (< z 2.326994450874436e-110) (+ (* x (/ (- z t) y)) t) (+ (* (/ x y) (- z t)) t)))

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