\[\begin{array}{l}
t_1 := y \cdot \frac{x}{a + a} + t \cdot \left(z \cdot \frac{-4.5}{a}\right)\\
t_2 := x \cdot y + t \cdot \left(z \cdot -9\right)\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+217}:\\
\;\;\;\;\frac{\mathsf{fma}\left(z \cdot -9, t, x \cdot y\right)}{a \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
(FPCore (x y z t a)
:precision binary64
(/ (- (* x y) (* (* z 9.0) t)) (* a 2.0)))
↓
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (* y (/ x (+ a a))) (* t (* z (/ -4.5 a)))))
(t_2 (+ (* x y) (* t (* z -9.0)))))
(if (<= t_2 (- INFINITY))
t_1
(if (<= t_2 5e+217) (/ (fma (* z -9.0) t (* x y)) (* a 2.0)) t_1))))
double code(double x, double y, double z, double t, double a) {
return ((x * y) - ((z * 9.0) * t)) / (a * 2.0);
}
(-.f64 (*.f64 y (/.f64 x (+.f64 a a))) (/.f64 (*.f64 (*.f64 t z) 9/2) a)): 0 points increase in error, 0 points decrease in error
(-.f64 (Rewrite=> associate-*r/_binary64 (/.f64 (*.f64 y x) (+.f64 a a))) (/.f64 (*.f64 (*.f64 t z) 9/2) a)): 25 points increase in error, 33 points decrease in error
(-.f64 (/.f64 (Rewrite<= *-commutative_binary64 (*.f64 x y)) (+.f64 a a)) (/.f64 (*.f64 (*.f64 t z) 9/2) a)): 0 points increase in error, 0 points decrease in error
(-.f64 (Rewrite<= associate-*r/_binary64 (*.f64 x (/.f64 y (+.f64 a a)))) (/.f64 (*.f64 (*.f64 t z) 9/2) a)): 29 points increase in error, 26 points decrease in error
(-.f64 (*.f64 x (/.f64 y (+.f64 a a))) (/.f64 (*.f64 (Rewrite<= *-commutative_binary64 (*.f64 z t)) 9/2) a)): 0 points increase in error, 0 points decrease in error
(-.f64 (*.f64 x (/.f64 y (+.f64 a a))) (/.f64 (*.f64 (*.f64 z t) (Rewrite<= metadata-eval (*.f64 9 1/2))) a)): 0 points increase in error, 0 points decrease in error
(-.f64 (*.f64 x (/.f64 y (+.f64 a a))) (/.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 (*.f64 z t) 9) 1/2)) a)): 0 points increase in error, 0 points decrease in error
(-.f64 (*.f64 x (/.f64 y (+.f64 a a))) (/.f64 (*.f64 (Rewrite<= *-commutative_binary64 (*.f64 9 (*.f64 z t))) 1/2) a)): 0 points increase in error, 0 points decrease in error
(-.f64 (*.f64 x (/.f64 y (+.f64 a a))) (Rewrite<= associate-*r/_binary64 (*.f64 (*.f64 9 (*.f64 z t)) (/.f64 1/2 a)))): 19 points increase in error, 16 points decrease in error
(Rewrite=> fma-neg_binary64 (fma.f64 x (/.f64 y (+.f64 a a)) (neg.f64 (*.f64 (*.f64 9 (*.f64 z t)) (/.f64 1/2 a))))): 1 points increase in error, 0 points decrease in error
(fma.f64 (Rewrite<= /-rgt-identity_binary64 (/.f64 x 1)) (/.f64 y (+.f64 a a)) (neg.f64 (*.f64 (*.f64 9 (*.f64 z t)) (/.f64 1/2 a)))): 0 points increase in error, 0 points decrease in error
herbie shell --seed 2022330
(FPCore (x y z t a)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, I"
:precision binary64
:herbie-target
(if (< a -2.090464557976709e+86) (- (* 0.5 (/ (* y x) a)) (* 4.5 (/ t (/ a z)))) (if (< a 2.144030707833976e+99) (/ (- (* x y) (* z (* 9.0 t))) (* a 2.0)) (- (* (/ y a) (* x 0.5)) (* (/ t a) (* z 4.5)))))
(/ (- (* x y) (* (* z 9.0) t)) (* a 2.0)))