x \cdot x - \left(y \cdot 4\right) \cdot z
x \cdot x - z \cdot \left(y \cdot 4\right)
(FPCore (x y z) :precision binary64 (- (* x x) (* (* y 4.0) z)))
(FPCore (x y z) :precision binary64 (- (* x x) (* z (* y 4.0))))
double code(double x, double y, double z) {
return (x * x) - ((y * 4.0) * z);
}
double code(double x, double y, double z) {
return (x * x) - (z * (y * 4.0));
}







Bits error versus x







Bits error versus y







Bits error versus z
Results
| Alternative 1 | |
|---|---|
| Error | 11.6 |
| Cost | 648 |
| Alternative 2 | |
|---|---|
| Error | 35.5 |
| Cost | 192 |
| Alternative 3 | |
|---|---|
| Error | 59.3 |
| Cost | 64 |
| Alternative 4 | |
|---|---|
| Error | 61.3 |
| Cost | 64 |

Initial program 0.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2021044
(FPCore (x y z)
:name "Graphics.Rasterific.QuadraticFormula:discriminant from Rasterific-0.6.1"
:precision binary64
(- (* x x) (* (* y 4.0) z)))