(FPCore (x y z t a b)
:precision binary64
(+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* (* a 27.0) b)))
↓
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (* a 27.0)))
(t_2 (+ (+ (* x 2.0) (* t (* z (* y -9.0)))) t_1)))
(if (<= t_2 (- INFINITY))
(+ (+ x x) (* (* y t) (* z -9.0)))
(if (<= t_2 4e+283)
(+ t_1 (+ (* x 2.0) (* t (* -9.0 (* y z)))))
(+ (+ (* 27.0 (* a b)) (* x 2.0)) (* -9.0 (* z (* y t))))))))
\[\leadsto \color{blue}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(y, t \cdot \left(z \cdot -9\right), a \cdot \left(27 \cdot b\right)\right)\right)}
\]
Proof
(fma.f64 x 2 (fma.f64 y (*.f64 t (*.f64 z -9)) (*.f64 a (*.f64 27 b)))): 0 points increase in error, 0 points decrease in error
(fma.f64 x 2 (fma.f64 y (*.f64 t (*.f64 z (Rewrite<= metadata-eval (neg.f64 9)))) (*.f64 a (*.f64 27 b)))): 0 points increase in error, 0 points decrease in error
(fma.f64 x 2 (fma.f64 y (*.f64 t (Rewrite<= distribute-rgt-neg-in_binary64 (neg.f64 (*.f64 z 9)))) (*.f64 a (*.f64 27 b)))): 0 points increase in error, 0 points decrease in error
(fma.f64 x 2 (fma.f64 y (*.f64 t (neg.f64 (Rewrite<= *-commutative_binary64 (*.f64 9 z)))) (*.f64 a (*.f64 27 b)))): 0 points increase in error, 0 points decrease in error
(fma.f64 x 2 (fma.f64 y (Rewrite<= *-commutative_binary64 (*.f64 (neg.f64 (*.f64 9 z)) t)) (*.f64 a (*.f64 27 b)))): 0 points increase in error, 0 points decrease in error
(fma.f64 x 2 (fma.f64 y (Rewrite=> distribute-lft-neg-out_binary64 (neg.f64 (*.f64 (*.f64 9 z) t))) (*.f64 a (*.f64 27 b)))): 0 points increase in error, 0 points decrease in error
(fma.f64 x 2 (fma.f64 y (neg.f64 (*.f64 (*.f64 9 z) t)) (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 a 27) b)))): 8 points increase in error, 17 points decrease in error
(fma.f64 x 2 (Rewrite<= fma-def_binary64 (+.f64 (*.f64 y (neg.f64 (*.f64 (*.f64 9 z) t))) (*.f64 (*.f64 a 27) b)))): 1 points increase in error, 0 points decrease in error
(fma.f64 x 2 (+.f64 (Rewrite<= distribute-rgt-neg-in_binary64 (neg.f64 (*.f64 y (*.f64 (*.f64 9 z) t)))) (*.f64 (*.f64 a 27) b))): 0 points increase in error, 0 points decrease in error
(fma.f64 x 2 (+.f64 (neg.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 y (*.f64 9 z)) t))) (*.f64 (*.f64 a 27) b))): 27 points increase in error, 25 points decrease in error
(fma.f64 x 2 (+.f64 (neg.f64 (*.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 y 9) z)) t)) (*.f64 (*.f64 a 27) b))): 10 points increase in error, 12 points decrease in error
(fma.f64 x 2 (+.f64 (neg.f64 (*.f64 (*.f64 (*.f64 y 9) z) t)) (Rewrite<= remove-double-neg_binary64 (neg.f64 (neg.f64 (*.f64 (*.f64 a 27) b)))))): 0 points increase in error, 0 points decrease in error
(fma.f64 x 2 (Rewrite<= distribute-neg-in_binary64 (neg.f64 (+.f64 (*.f64 (*.f64 (*.f64 y 9) z) t) (neg.f64 (*.f64 (*.f64 a 27) b)))))): 0 points increase in error, 0 points decrease in error
(fma.f64 x 2 (neg.f64 (Rewrite<= sub-neg_binary64 (-.f64 (*.f64 (*.f64 (*.f64 y 9) z) t) (*.f64 (*.f64 a 27) b))))): 0 points increase in error, 0 points decrease in error
(Rewrite<= fma-neg_binary64 (-.f64 (*.f64 x 2) (-.f64 (*.f64 (*.f64 (*.f64 y 9) z) t) (*.f64 (*.f64 a 27) b)))): 0 points increase in error, 0 points decrease in error
(Rewrite<= associate-+l-_binary64 (+.f64 (-.f64 (*.f64 x 2) (*.f64 (*.f64 (*.f64 y 9) z) t)) (*.f64 (*.f64 a 27) b))): 0 points increase in error, 0 points decrease in error
herbie shell --seed 2022291
(FPCore (x y z t a b)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, A"
:precision binary64
:herbie-target
(if (< y 7.590524218811189e-161) (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* a (* 27.0 b))) (+ (- (* x 2.0) (* 9.0 (* y (* t z)))) (* (* a 27.0) b)))
(+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* (* a 27.0) b)))