\left(x + y\right) \cdot \left(x + y\right)
x \cdot x + \left(\left(x + y\right) + x\right) \cdot y
double f(double x, double y) {
double r27800404 = x;
double r27800405 = y;
double r27800406 = r27800404 + r27800405;
double r27800407 = r27800406 * r27800406;
return r27800407;
}
double f(double x, double y) {
double r27800408 = x;
double r27800409 = r27800408 * r27800408;
double r27800410 = y;
double r27800411 = r27800408 + r27800410;
double r27800412 = r27800411 + r27800408;
double r27800413 = r27800412 * r27800410;
double r27800414 = r27800409 + r27800413;
return r27800414;
}




Bits error versus x




Bits error versus y
Results
| Original | 0.0 |
|---|---|
| Target | 0.0 |
| Herbie | 0.0 |
Initial program 0.0
rmApplied distribute-rgt-in0.0
rmApplied distribute-lft-in0.0
Applied associate-+l+0.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2019162 +o rules:numerics
(FPCore (x y)
:name "Examples.Basics.BasicTests:f3 from sbv-4.4"
:herbie-target
(+ (* x x) (+ (* y y) (* 2 (* y x))))
(* (+ x y) (+ x y)))