\frac{x \cdot x}{y \cdot y} + \frac{z \cdot z}{t \cdot t}\begin{array}{l}
\mathbf{if}\;y \cdot y \le 7.60861 \cdot 10^{-322}:\\
\;\;\;\;\frac{x \cdot \frac{x}{y}}{y} + \frac{z}{t} \cdot \frac{z}{t}\\
\mathbf{elif}\;y \cdot y \le 4.5636386635572052 \cdot 10^{291}:\\
\;\;\;\;\frac{x}{\frac{y \cdot y}{x}} + \frac{z}{t} \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sqrt[3]{y} \cdot \sqrt[3]{y}} \cdot \left(\frac{x}{\sqrt[3]{y}} \cdot \frac{x}{y}\right) + \frac{z}{t} \cdot \frac{z}{t}\\
\end{array}double code(double x, double y, double z, double t) {
return ((double) (((double) (((double) (x * x)) / ((double) (y * y)))) + ((double) (((double) (z * z)) / ((double) (t * t))))));
}
double code(double x, double y, double z, double t) {
double VAR;
if ((((double) (y * y)) <= 7.6086109459552e-322)) {
VAR = ((double) (((double) (((double) (x * ((double) (x / y)))) / y)) + ((double) (((double) (z / t)) * ((double) (z / t))))));
} else {
double VAR_1;
if ((((double) (y * y)) <= 4.563638663557205e+291)) {
VAR_1 = ((double) (((double) (x / ((double) (((double) (y * y)) / x)))) + ((double) (((double) (z / t)) * ((double) (z / t))))));
} else {
VAR_1 = ((double) (((double) (((double) (1.0 / ((double) (((double) cbrt(y)) * ((double) cbrt(y)))))) * ((double) (((double) (x / ((double) cbrt(y)))) * ((double) (x / y)))))) + ((double) (((double) (z / t)) * ((double) (z / t))))));
}
VAR = VAR_1;
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 33.5 |
|---|---|
| Target | 0.4 |
| Herbie | 1.8 |
if (* y y) < 7.60861e-322Initial program 63.8
rmApplied times-frac63.7
rmApplied times-frac0.5
rmApplied associate-*r/5.4
Simplified5.4
if 7.60861e-322 < (* y y) < 4.5636386635572052e291Initial program 24.4
rmApplied times-frac7.6
rmApplied associate-/l*0.6
if 4.5636386635572052e291 < (* y y) Initial program 35.4
rmApplied times-frac19.6
rmApplied times-frac0.4
rmApplied add-cube-cbrt0.6
Applied *-un-lft-identity0.6
Applied times-frac0.6
Applied associate-*l*2.1
Final simplification1.8
herbie shell --seed 2020173
(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))))