\frac{x \cdot x}{y \cdot y} + \frac{z \cdot z}{t \cdot t}\frac{x}{y} \cdot \frac{x}{y} + \frac{z}{t} \cdot \frac{z}{t}(FPCore (x y z t) :precision binary64 (+ (/ (* x x) (* y y)) (/ (* z z) (* t t))))
(FPCore (x y z t) :precision binary64 (+ (* (/ x y) (/ x y)) (* (/ z t) (/ z t))))
double code(double x, double y, double z, double t) {
return ((x * x) / (y * y)) + ((z * z) / (t * t));
}
double code(double x, double y, double z, double t) {
return ((x / y) * (x / y)) + ((z / t) * (z / t));
}







Bits error versus x







Bits error versus y







Bits error versus z







Bits error versus t
Results
| Original | 33.8 |
|---|---|
| Target | 0.4 |
| Herbie | 0.4 |
| Alternative 1 | |
|---|---|
| Error | 29.5 |
| Cost | 960 |
| Alternative 2 | |
|---|---|
| Error | 52.8 |
| Cost | 64 |
| Alternative 3 | |
|---|---|
| Error | 60.7 |
| Cost | 64 |

Initial program 33.8
rmApplied times-frac_binary64_1747519.4
rmApplied times-frac_binary64_174750.4
Simplified0.4
Final simplification0.4
herbie shell --seed 2021044
(FPCore (x y z t)
:name "Graphics.Rasterific.Svg.PathConverter:arcToSegments from rasterific-svg-0.2.3.1"
:precision binary64
:herbie-target
(+ (pow (/ x y) 2.0) (pow (/ z t) 2.0))
(+ (/ (* x x) (* y y)) (/ (* z z) (* t t))))