(FPCore (x y z t a)
:precision binary64
(/ (* (* x y) z) (sqrt (- (* z z) (* t a)))))
↓
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (/ t z) (/ a z))))
(if (<= z -2.25e+105)
(/ (* x y) (fma 0.5 t_1 -1.0))
(if (<= z -2.6e-123)
(* x (/ (* z y) (sqrt (- (* z z) (* t a)))))
(if (<= z 6.6e-81)
(* (* (pow (- t) -0.5) (pow a -0.5)) (* x (* z y)))
(/ (* x y) (sqrt (- 1.0 t_1))))))))
(fma.f64 1/2 (*.f64 (/.f64 t z) (/.f64 a z)) -1): 0 points increase in error, 0 points decrease in error
(fma.f64 1/2 (Rewrite<= times-frac_binary64 (/.f64 (*.f64 t a) (*.f64 z z))) -1): 22 points increase in error, 8 points decrease in error
(fma.f64 1/2 (/.f64 (Rewrite<= *-commutative_binary64 (*.f64 a t)) (*.f64 z z)) -1): 0 points increase in error, 0 points decrease in error
(fma.f64 1/2 (/.f64 (*.f64 a t) (Rewrite<= unpow2_binary64 (pow.f64 z 2))) -1): 0 points increase in error, 0 points decrease in error
(fma.f64 1/2 (/.f64 (*.f64 a t) (pow.f64 z 2)) (Rewrite<= metadata-eval (neg.f64 1))): 0 points increase in error, 0 points decrease in error
(Rewrite<= fma-neg_binary64 (-.f64 (*.f64 1/2 (/.f64 (*.f64 a t) (pow.f64 z 2))) 1)): 0 points increase in error, 0 points decrease in error
if -2.2500000000000001e105 < z < -2.59999999999999995e-123
Initial program 7.7
\[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}
\]
Simplified7.7
\[\leadsto \color{blue}{x \cdot \frac{y \cdot z}{\sqrt{z \cdot z - t \cdot a}}}
\]
Proof
(*.f64 x (/.f64 (*.f64 y z) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a))))): 0 points increase in error, 0 points decrease in error
(Rewrite=> associate-*r/_binary64 (/.f64 (*.f64 x (*.f64 y z)) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a))))): 39 points increase in error, 15 points decrease in error
(/.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 x y) z)) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a)))): 10 points increase in error, 41 points decrease in error
if -2.59999999999999995e-123 < z < 6.59999999999999975e-81
Initial program 16.0
\[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}
\]
Applied egg-rr15.3
\[\leadsto \color{blue}{{\left(z \cdot z - t \cdot a\right)}^{-0.5} \cdot \left(x \cdot \left(y \cdot z\right)\right)}
\]
(sqrt.f64 (-.f64 1 (*.f64 (/.f64 t z) (/.f64 a z)))): 0 points increase in error, 0 points decrease in error
(sqrt.f64 (-.f64 (Rewrite<= *-inverses_binary64 (/.f64 (*.f64 z z) (*.f64 z z))) (*.f64 (/.f64 t z) (/.f64 a z)))): 87 points increase in error, 0 points decrease in error
(sqrt.f64 (-.f64 (/.f64 (*.f64 z z) (*.f64 z z)) (Rewrite<= times-frac_binary64 (/.f64 (*.f64 t a) (*.f64 z z))))): 6 points increase in error, 5 points decrease in error
(sqrt.f64 (Rewrite<= div-sub_binary64 (/.f64 (-.f64 (*.f64 z z) (*.f64 t a)) (*.f64 z z)))): 0 points increase in error, 0 points decrease in error
herbie shell --seed 2022330
(FPCore (x y z t a)
:name "Statistics.Math.RootFinding:ridders from math-functions-0.1.5.2"
:precision binary64
:herbie-target
(if (< z -3.1921305903852764e+46) (- (* y x)) (if (< z 5.976268120920894e+90) (/ (* x z) (/ (sqrt (- (* z z) (* a t))) y)) (* y x)))
(/ (* (* x y) z) (sqrt (- (* z z) (* t a)))))