\frac{x \cdot x}{y \cdot y} + \frac{z \cdot z}{t \cdot t}\begin{array}{l}
\mathbf{if}\;y \cdot y \le 2.04599685349181801 \cdot 10^{-307}:\\
\;\;\;\;\frac{x}{y} \cdot \frac{x}{y} + z \cdot \frac{\frac{z}{t}}{t}\\
\mathbf{elif}\;y \cdot y \le 1.3962320537088231 \cdot 10^{307}:\\
\;\;\;\;x \cdot \frac{\frac{x}{y}}{y} + \frac{z}{t} \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{\sqrt[3]{y} \cdot \sqrt[3]{y}} \cdot \frac{x}{\sqrt[3]{y}} + \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)) <= 2.045996853491818e-307)) {
VAR = ((double) (((double) (((double) (x / y)) * ((double) (x / y)))) + ((double) (z * ((double) (((double) (z / t)) / t))))));
} else {
double VAR_1;
if ((((double) (y * y)) <= 1.396232053708823e+307)) {
VAR_1 = ((double) (((double) (x * ((double) (((double) (x / y)) / y)))) + ((double) (((double) (z / t)) * ((double) (z / t))))));
} else {
VAR_1 = ((double) (((double) (((double) (((double) (x / y)) / ((double) (((double) cbrt(y)) * ((double) cbrt(y)))))) * ((double) (x / ((double) cbrt(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.9 |
|---|---|
| Target | 0.4 |
| Herbie | 1.0 |
if (* y y) < 2.04599685349181801e-307Initial program 62.7
rmApplied times-frac61.8
rmApplied times-frac0.5
rmApplied *-un-lft-identity0.5
Applied add-sqr-sqrt33.8
Applied times-frac33.8
Applied *-un-lft-identity33.8
Applied add-sqr-sqrt33.8
Applied times-frac33.8
Applied swap-sqr35.3
Simplified35.3
Simplified3.7
if 2.04599685349181801e-307 < (* y y) < 1.3962320537088231e307Initial program 25.4
rmApplied times-frac7.4
rmApplied times-frac0.4
rmApplied *-un-lft-identity0.4
Applied add-sqr-sqrt32.6
Applied times-frac32.6
Applied *-un-lft-identity32.6
Applied add-sqr-sqrt32.6
Applied times-frac32.7
Applied swap-sqr32.7
Simplified32.6
Simplified0.4
if 1.3962320537088231e307 < (* y y) Initial program 35.9
rmApplied times-frac20.7
rmApplied times-frac0.4
rmApplied add-cube-cbrt0.6
Applied *-un-lft-identity0.6
Applied times-frac0.6
Applied associate-*r*1.1
Simplified1.1
Final simplification1.0
herbie shell --seed 2020147
(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))))