(FPCore (x y z t a b)
:precision binary64
(/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)))
↓
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t)))
(t_2 (/ (- (+ (* a (+ y t)) (* z (+ x y))) (* y b)) t_1))
(t_3 (+ (- a (* b (/ y (+ y t)))) (* z (/ (+ x y) t_1)))))
(if (<= t_2 (- INFINITY)) t_3 (if (<= t_2 5e+241) t_2 t_3))))
if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -inf.0 or 5.00000000000000025e241 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))
Initial program 61.6
\[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}
\]
(+.f64 (/.f64 (-.f64 (*.f64 a (+.f64 y t)) (*.f64 y b)) (+.f64 y (+.f64 t x))) (*.f64 (/.f64 (+.f64 y x) (+.f64 y (+.f64 t x))) z)): 0 points increase in error, 0 points decrease in error
(+.f64 (/.f64 (-.f64 (*.f64 a (+.f64 y t)) (*.f64 y b)) (+.f64 y (+.f64 t x))) (Rewrite<= associate-/r/_binary64 (/.f64 (+.f64 y x) (/.f64 (+.f64 y (+.f64 t x)) z)))): 21 points increase in error, 5 points decrease in error
(+.f64 (/.f64 (-.f64 (*.f64 a (+.f64 y t)) (*.f64 y b)) (+.f64 y (+.f64 t x))) (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (+.f64 y x) z) (+.f64 y (+.f64 t x))))): 48 points increase in error, 18 points decrease in error
(Rewrite<= +-commutative_binary64 (+.f64 (/.f64 (*.f64 (+.f64 y x) z) (+.f64 y (+.f64 t x))) (/.f64 (-.f64 (*.f64 a (+.f64 y t)) (*.f64 y b)) (+.f64 y (+.f64 t x))))): 0 points increase in error, 0 points decrease in error
(+.f64 (/.f64 (*.f64 (+.f64 y x) z) (+.f64 y (+.f64 t x))) (Rewrite=> div-sub_binary64 (-.f64 (/.f64 (*.f64 a (+.f64 y t)) (+.f64 y (+.f64 t x))) (/.f64 (*.f64 y b) (+.f64 y (+.f64 t x)))))): 0 points increase in error, 1 points decrease in error
(Rewrite<= associate--l+_binary64 (-.f64 (+.f64 (/.f64 (*.f64 (+.f64 y x) z) (+.f64 y (+.f64 t x))) (/.f64 (*.f64 a (+.f64 y t)) (+.f64 y (+.f64 t x)))) (/.f64 (*.f64 y b) (+.f64 y (+.f64 t x))))): 0 points increase in error, 0 points decrease in error
(-.f64 (/.f64 a 1) (*.f64 (/.f64 y (+.f64 y t)) b)): 0 points increase in error, 0 points decrease in error
(-.f64 (/.f64 a (Rewrite<= *-inverses_binary64 (/.f64 (+.f64 y t) (+.f64 y t)))) (*.f64 (/.f64 y (+.f64 y t)) b)): 0 points increase in error, 0 points decrease in error
(-.f64 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 a (+.f64 y t)) (+.f64 y t))) (*.f64 (/.f64 y (+.f64 y t)) b)): 55 points increase in error, 1 points decrease in error
(-.f64 (/.f64 (*.f64 a (+.f64 y t)) (+.f64 y t)) (Rewrite<= associate-/r/_binary64 (/.f64 y (/.f64 (+.f64 y t) b)))): 15 points increase in error, 13 points decrease in error
(-.f64 (/.f64 (*.f64 a (+.f64 y t)) (+.f64 y t)) (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 y b) (+.f64 y t)))): 31 points increase in error, 16 points decrease in error
(Rewrite<= div-sub_binary64 (/.f64 (-.f64 (*.f64 a (+.f64 y t)) (*.f64 y b)) (+.f64 y t))): 1 points increase in error, 1 points decrease in error
if -inf.0 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 5.00000000000000025e241
Initial program 0.3
\[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}
\]
herbie shell --seed 2022316
(FPCore (x y z t a b)
:name "AI.Clustering.Hierarchical.Internal:ward from clustering-0.2.1"
:precision binary64
:herbie-target
(if (< (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)) -3.5813117084150564e+153) (- (+ z a) b) (if (< (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)) 1.2285964308315609e+82) (/ 1.0 (/ (+ (+ x t) y) (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)))) (- (+ z a) b)))
(/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)))