(FPCore (x y z t)
:precision binary64
(/ (+ x (/ (- (* y z) x) (- (* t z) x))) (+ x 1.0)))
↓
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* z t) x)) (t_2 (/ (+ x (/ (- (* y z) x) t_1)) (+ x 1.0))))
(if (<= t_2 -1e+105)
(/ y (/ t_1 (/ z (+ x 1.0))))
(if (<= t_2 2e+211)
(/ (+ x (/ (fma y z (- x)) (fma z t (- x)))) (+ x 1.0))
(* (/ 1.0 (+ x 1.0)) (+ x (/ y t)))))))
if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x 1)) < -9.9999999999999994e104
Initial program 27.0
\[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1}
\]
Simplified27.0
\[\leadsto \color{blue}{\frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1}}
\]
Proof
(/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 z t) x))) (+.f64 x 1)): 0 points increase in error, 0 points decrease in error
(/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (Rewrite<= *-commutative_binary64 (*.f64 t z)) x))) (+.f64 x 1)): 0 points increase in error, 0 points decrease in error
\[\leadsto \color{blue}{\frac{y}{\frac{t \cdot z - x}{\frac{z}{x + 1}}}}
\]
Proof
(/.f64 y (/.f64 (-.f64 (*.f64 t z) x) (/.f64 z (+.f64 x 1)))): 0 points increase in error, 0 points decrease in error
(/.f64 y (/.f64 (-.f64 (Rewrite=> *-commutative_binary64 (*.f64 z t)) x) (/.f64 z (+.f64 x 1)))): 0 points increase in error, 0 points decrease in error
(/.f64 y (/.f64 (Rewrite=> fma-neg_binary64 (fma.f64 z t (neg.f64 x))) (/.f64 z (+.f64 x 1)))): 0 points increase in error, 0 points decrease in error
(/.f64 y (/.f64 (fma.f64 z t (neg.f64 x)) (/.f64 z (Rewrite=> +-commutative_binary64 (+.f64 1 x))))): 0 points increase in error, 0 points decrease in error
(/.f64 y (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (fma.f64 z t (neg.f64 x)) (+.f64 1 x)) z))): 7 points increase in error, 11 points decrease in error
(/.f64 y (/.f64 (*.f64 (Rewrite<= fma-neg_binary64 (-.f64 (*.f64 z t) x)) (+.f64 1 x)) z)): 0 points increase in error, 0 points decrease in error
(/.f64 y (/.f64 (*.f64 (-.f64 (Rewrite<= *-commutative_binary64 (*.f64 t z)) x) (+.f64 1 x)) z)): 0 points increase in error, 0 points decrease in error
(Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 y z) (*.f64 (-.f64 (*.f64 t z) x) (+.f64 1 x)))): 56 points increase in error, 24 points decrease in error
if -9.9999999999999994e104 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x 1)) < 1.9999999999999999e211
Initial program 0.7
\[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1}
\]
(/.f64 (+.f64 x (/.f64 (fma.f64 y z (neg.f64 x)) (fma.f64 z t (neg.f64 x)))) (+.f64 x 1)): 0 points increase in error, 0 points decrease in error
(/.f64 (+.f64 x (/.f64 (Rewrite<= fma-neg_binary64 (-.f64 (*.f64 y z) x)) (fma.f64 z t (neg.f64 x)))) (+.f64 x 1)): 1 points increase in error, 0 points decrease in error
(/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (Rewrite<= fma-neg_binary64 (-.f64 (*.f64 z t) x)))) (+.f64 x 1)): 0 points increase in error, 0 points decrease in error
(/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (Rewrite<= *-commutative_binary64 (*.f64 t z)) x))) (+.f64 x 1)): 0 points increase in error, 0 points decrease in error
if 1.9999999999999999e211 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x 1))
Initial program 53.6
\[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1}
\]
Simplified53.6
\[\leadsto \color{blue}{\frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1}}
\]
Proof
(/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 z t) x))) (+.f64 x 1)): 0 points increase in error, 0 points decrease in error
(/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (Rewrite<= *-commutative_binary64 (*.f64 t z)) x))) (+.f64 x 1)): 0 points increase in error, 0 points decrease in error
herbie shell --seed 2022338
(FPCore (x y z t)
:name "Diagrams.Trail:splitAtParam from diagrams-lib-1.3.0.3, A"
:precision binary64
:herbie-target
(/ (+ x (- (/ y (- t (/ x z))) (/ x (- (* t z) x)))) (+ x 1.0))
(/ (+ x (/ (- (* y z) x) (- (* t z) x))) (+ x 1.0)))