
(FPCore (x y z) :precision binary64 (fabs (- (/ (+ x 4.0) y) (* (/ x y) z))))
double code(double x, double y, double z) {
return fabs((((x + 4.0) / y) - ((x / y) * z)));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = abs((((x + 4.0d0) / y) - ((x / y) * z)))
end function
public static double code(double x, double y, double z) {
return Math.abs((((x + 4.0) / y) - ((x / y) * z)));
}
def code(x, y, z): return math.fabs((((x + 4.0) / y) - ((x / y) * z)))
function code(x, y, z) return abs(Float64(Float64(Float64(x + 4.0) / y) - Float64(Float64(x / y) * z))) end
function tmp = code(x, y, z) tmp = abs((((x + 4.0) / y) - ((x / y) * z))); end
code[x_, y_, z_] := N[Abs[N[(N[(N[(x + 4.0), $MachinePrecision] / y), $MachinePrecision] - N[(N[(x / y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right|
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (fabs (- (/ (+ x 4.0) y) (* (/ x y) z))))
double code(double x, double y, double z) {
return fabs((((x + 4.0) / y) - ((x / y) * z)));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = abs((((x + 4.0d0) / y) - ((x / y) * z)))
end function
public static double code(double x, double y, double z) {
return Math.abs((((x + 4.0) / y) - ((x / y) * z)));
}
def code(x, y, z): return math.fabs((((x + 4.0) / y) - ((x / y) * z)))
function code(x, y, z) return abs(Float64(Float64(Float64(x + 4.0) / y) - Float64(Float64(x / y) * z))) end
function tmp = code(x, y, z) tmp = abs((((x + 4.0) / y) - ((x / y) * z))); end
code[x_, y_, z_] := N[Abs[N[(N[(N[(x + 4.0), $MachinePrecision] / y), $MachinePrecision] - N[(N[(x / y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right|
\end{array}
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= y_m 5e-36) (fabs (* (/ -1.0 y_m) (fma x z (- -4.0 x)))) (fabs (- (/ (+ x 4.0) y_m) (/ x (/ y_m z))))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (y_m <= 5e-36) {
tmp = fabs(((-1.0 / y_m) * fma(x, z, (-4.0 - x))));
} else {
tmp = fabs((((x + 4.0) / y_m) - (x / (y_m / z))));
}
return tmp;
}
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (y_m <= 5e-36) tmp = abs(Float64(Float64(-1.0 / y_m) * fma(x, z, Float64(-4.0 - x)))); else tmp = abs(Float64(Float64(Float64(x + 4.0) / y_m) - Float64(x / Float64(y_m / z)))); end return tmp end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[y$95$m, 5e-36], N[Abs[N[(N[(-1.0 / y$95$m), $MachinePrecision] * N[(x * z + N[(-4.0 - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(N[(x + 4.0), $MachinePrecision] / y$95$m), $MachinePrecision] - N[(x / N[(y$95$m / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;y\_m \leq 5 \cdot 10^{-36}:\\
\;\;\;\;\left|\frac{-1}{y\_m} \cdot \mathsf{fma}\left(x, z, -4 - x\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{x + 4}{y\_m} - \frac{x}{\frac{y\_m}{z}}\right|\\
\end{array}
\end{array}
if y < 5.00000000000000004e-36Initial program 87.7%
Simplified96.7%
if 5.00000000000000004e-36 < y Initial program 95.1%
associate-*l/90.7%
associate-*r/99.7%
clear-num99.7%
un-div-inv99.7%
Applied egg-rr99.7%
y_m = (fabs.f64 y)
(FPCore (x y_m z)
:precision binary64
(let* ((t_0 (/ (+ x 4.0) y_m)) (t_1 (fabs (- t_0 (* z (/ x y_m))))))
(if (<= t_1 2e-84)
(fabs (- t_0 (/ x (/ y_m z))))
(if (<= t_1 INFINITY) t_1 (/ x y_m)))))y_m = fabs(y);
double code(double x, double y_m, double z) {
double t_0 = (x + 4.0) / y_m;
double t_1 = fabs((t_0 - (z * (x / y_m))));
double tmp;
if (t_1 <= 2e-84) {
tmp = fabs((t_0 - (x / (y_m / z))));
} else if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = x / y_m;
}
return tmp;
}
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double t_0 = (x + 4.0) / y_m;
double t_1 = Math.abs((t_0 - (z * (x / y_m))));
double tmp;
if (t_1 <= 2e-84) {
tmp = Math.abs((t_0 - (x / (y_m / z))));
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = x / y_m;
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): t_0 = (x + 4.0) / y_m t_1 = math.fabs((t_0 - (z * (x / y_m)))) tmp = 0 if t_1 <= 2e-84: tmp = math.fabs((t_0 - (x / (y_m / z)))) elif t_1 <= math.inf: tmp = t_1 else: tmp = x / y_m return tmp
y_m = abs(y) function code(x, y_m, z) t_0 = Float64(Float64(x + 4.0) / y_m) t_1 = abs(Float64(t_0 - Float64(z * Float64(x / y_m)))) tmp = 0.0 if (t_1 <= 2e-84) tmp = abs(Float64(t_0 - Float64(x / Float64(y_m / z)))); elseif (t_1 <= Inf) tmp = t_1; else tmp = Float64(x / y_m); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) t_0 = (x + 4.0) / y_m; t_1 = abs((t_0 - (z * (x / y_m)))); tmp = 0.0; if (t_1 <= 2e-84) tmp = abs((t_0 - (x / (y_m / z)))); elseif (t_1 <= Inf) tmp = t_1; else tmp = x / y_m; end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision]
code[x_, y$95$m_, z_] := Block[{t$95$0 = N[(N[(x + 4.0), $MachinePrecision] / y$95$m), $MachinePrecision]}, Block[{t$95$1 = N[Abs[N[(t$95$0 - N[(z * N[(x / y$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$1, 2e-84], N[Abs[N[(t$95$0 - N[(x / N[(y$95$m / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$1, Infinity], t$95$1, N[(x / y$95$m), $MachinePrecision]]]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
t_0 := \frac{x + 4}{y\_m}\\
t_1 := \left|t\_0 - z \cdot \frac{x}{y\_m}\right|\\
\mathbf{if}\;t\_1 \leq 2 \cdot 10^{-84}:\\
\;\;\;\;\left|t\_0 - \frac{x}{\frac{y\_m}{z}}\right|\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y\_m}\\
\end{array}
\end{array}
if (fabs.f64 (-.f64 (/.f64 (+.f64 x #s(literal 4 binary64)) y) (*.f64 (/.f64 x y) z))) < 2.0000000000000001e-84Initial program 87.3%
associate-*l/99.8%
associate-*r/99.8%
clear-num99.8%
un-div-inv99.8%
Applied egg-rr99.8%
if 2.0000000000000001e-84 < (fabs.f64 (-.f64 (/.f64 (+.f64 x #s(literal 4 binary64)) y) (*.f64 (/.f64 x y) z))) < +inf.0Initial program 99.9%
if +inf.0 < (fabs.f64 (-.f64 (/.f64 (+.f64 x #s(literal 4 binary64)) y) (*.f64 (/.f64 x y) z))) Initial program 0.0%
fabs-sub0.0%
associate-*l/26.3%
associate-*r/26.3%
fmm-def57.9%
distribute-neg-frac57.9%
+-commutative57.9%
distribute-neg-in57.9%
unsub-neg57.9%
metadata-eval57.9%
Simplified57.9%
fma-undefine26.3%
associate-*r/26.3%
associate-*l/0.0%
div-inv0.0%
sub-neg0.0%
metadata-eval0.0%
distribute-neg-in0.0%
+-commutative0.0%
cancel-sign-sub-inv0.0%
div-inv0.0%
fabs-sub0.0%
add-sqr-sqrt0.0%
fabs-sqr0.0%
add-sqr-sqrt0.0%
sub-neg0.0%
distribute-rgt-neg-in0.0%
Applied egg-rr0.0%
Taylor expanded in z around 0 21.1%
+-commutative21.1%
associate-*r/21.1%
metadata-eval21.1%
Simplified21.1%
Taylor expanded in x around inf 21.1%
Final simplification94.0%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (let* ((t_0 (fabs (- (/ (+ x 4.0) y_m) (* z (/ x y_m)))))) (if (<= t_0 INFINITY) t_0 (/ x y_m))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double t_0 = fabs((((x + 4.0) / y_m) - (z * (x / y_m))));
double tmp;
if (t_0 <= ((double) INFINITY)) {
tmp = t_0;
} else {
tmp = x / y_m;
}
return tmp;
}
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double t_0 = Math.abs((((x + 4.0) / y_m) - (z * (x / y_m))));
double tmp;
if (t_0 <= Double.POSITIVE_INFINITY) {
tmp = t_0;
} else {
tmp = x / y_m;
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): t_0 = math.fabs((((x + 4.0) / y_m) - (z * (x / y_m)))) tmp = 0 if t_0 <= math.inf: tmp = t_0 else: tmp = x / y_m return tmp
y_m = abs(y) function code(x, y_m, z) t_0 = abs(Float64(Float64(Float64(x + 4.0) / y_m) - Float64(z * Float64(x / y_m)))) tmp = 0.0 if (t_0 <= Inf) tmp = t_0; else tmp = Float64(x / y_m); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) t_0 = abs((((x + 4.0) / y_m) - (z * (x / y_m)))); tmp = 0.0; if (t_0 <= Inf) tmp = t_0; else tmp = x / y_m; end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision]
code[x_, y$95$m_, z_] := Block[{t$95$0 = N[Abs[N[(N[(N[(x + 4.0), $MachinePrecision] / y$95$m), $MachinePrecision] - N[(z * N[(x / y$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$0, Infinity], t$95$0, N[(x / y$95$m), $MachinePrecision]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
t_0 := \left|\frac{x + 4}{y\_m} - z \cdot \frac{x}{y\_m}\right|\\
\mathbf{if}\;t\_0 \leq \infty:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y\_m}\\
\end{array}
\end{array}
if (fabs.f64 (-.f64 (/.f64 (+.f64 x #s(literal 4 binary64)) y) (*.f64 (/.f64 x y) z))) < +inf.0Initial program 97.0%
if +inf.0 < (fabs.f64 (-.f64 (/.f64 (+.f64 x #s(literal 4 binary64)) y) (*.f64 (/.f64 x y) z))) Initial program 0.0%
fabs-sub0.0%
associate-*l/26.3%
associate-*r/26.3%
fmm-def57.9%
distribute-neg-frac57.9%
+-commutative57.9%
distribute-neg-in57.9%
unsub-neg57.9%
metadata-eval57.9%
Simplified57.9%
fma-undefine26.3%
associate-*r/26.3%
associate-*l/0.0%
div-inv0.0%
sub-neg0.0%
metadata-eval0.0%
distribute-neg-in0.0%
+-commutative0.0%
cancel-sign-sub-inv0.0%
div-inv0.0%
fabs-sub0.0%
add-sqr-sqrt0.0%
fabs-sqr0.0%
add-sqr-sqrt0.0%
sub-neg0.0%
distribute-rgt-neg-in0.0%
Applied egg-rr0.0%
Taylor expanded in z around 0 21.1%
+-commutative21.1%
associate-*r/21.1%
metadata-eval21.1%
Simplified21.1%
Taylor expanded in x around inf 21.1%
Final simplification91.4%
y_m = (fabs.f64 y)
(FPCore (x y_m z)
:precision binary64
(if (<= x -1.45e-41)
(/ x (/ y_m (+ -1.0 z)))
(if (<= x 4.0)
(/ (- 4.0 (* x z)) y_m)
(if (<= x 5.8e+251) (* x (/ (+ -1.0 z) (- y_m))) (* z (/ x y_m))))))y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= -1.45e-41) {
tmp = x / (y_m / (-1.0 + z));
} else if (x <= 4.0) {
tmp = (4.0 - (x * z)) / y_m;
} else if (x <= 5.8e+251) {
tmp = x * ((-1.0 + z) / -y_m);
} else {
tmp = z * (x / y_m);
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-1.45d-41)) then
tmp = x / (y_m / ((-1.0d0) + z))
else if (x <= 4.0d0) then
tmp = (4.0d0 - (x * z)) / y_m
else if (x <= 5.8d+251) then
tmp = x * (((-1.0d0) + z) / -y_m)
else
tmp = z * (x / y_m)
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double tmp;
if (x <= -1.45e-41) {
tmp = x / (y_m / (-1.0 + z));
} else if (x <= 4.0) {
tmp = (4.0 - (x * z)) / y_m;
} else if (x <= 5.8e+251) {
tmp = x * ((-1.0 + z) / -y_m);
} else {
tmp = z * (x / y_m);
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= -1.45e-41: tmp = x / (y_m / (-1.0 + z)) elif x <= 4.0: tmp = (4.0 - (x * z)) / y_m elif x <= 5.8e+251: tmp = x * ((-1.0 + z) / -y_m) else: tmp = z * (x / y_m) return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= -1.45e-41) tmp = Float64(x / Float64(y_m / Float64(-1.0 + z))); elseif (x <= 4.0) tmp = Float64(Float64(4.0 - Float64(x * z)) / y_m); elseif (x <= 5.8e+251) tmp = Float64(x * Float64(Float64(-1.0 + z) / Float64(-y_m))); else tmp = Float64(z * Float64(x / y_m)); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (x <= -1.45e-41) tmp = x / (y_m / (-1.0 + z)); elseif (x <= 4.0) tmp = (4.0 - (x * z)) / y_m; elseif (x <= 5.8e+251) tmp = x * ((-1.0 + z) / -y_m); else tmp = z * (x / y_m); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[x, -1.45e-41], N[(x / N[(y$95$m / N[(-1.0 + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.0], N[(N[(4.0 - N[(x * z), $MachinePrecision]), $MachinePrecision] / y$95$m), $MachinePrecision], If[LessEqual[x, 5.8e+251], N[(x * N[(N[(-1.0 + z), $MachinePrecision] / (-y$95$m)), $MachinePrecision]), $MachinePrecision], N[(z * N[(x / y$95$m), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.45 \cdot 10^{-41}:\\
\;\;\;\;\frac{x}{\frac{y\_m}{-1 + z}}\\
\mathbf{elif}\;x \leq 4:\\
\;\;\;\;\frac{4 - x \cdot z}{y\_m}\\
\mathbf{elif}\;x \leq 5.8 \cdot 10^{+251}:\\
\;\;\;\;x \cdot \frac{-1 + z}{-y\_m}\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{x}{y\_m}\\
\end{array}
\end{array}
if x < -1.44999999999999989e-41Initial program 86.6%
fabs-sub86.6%
associate-*l/80.5%
associate-*r/90.5%
fmm-def94.5%
distribute-neg-frac94.5%
+-commutative94.5%
distribute-neg-in94.5%
unsub-neg94.5%
metadata-eval94.5%
Simplified94.5%
fma-undefine90.5%
associate-*r/80.5%
associate-*l/86.6%
div-inv86.4%
sub-neg86.4%
metadata-eval86.4%
distribute-neg-in86.4%
+-commutative86.4%
cancel-sign-sub-inv86.4%
div-inv86.6%
fabs-sub86.6%
add-sqr-sqrt46.5%
fabs-sqr46.5%
add-sqr-sqrt46.9%
sub-neg46.9%
distribute-rgt-neg-in46.9%
Applied egg-rr46.9%
Taylor expanded in x around inf 50.4%
distribute-lft-in46.4%
mul-1-neg46.4%
distribute-rgt-neg-in46.4%
neg-sub046.4%
associate-+l-46.4%
associate-*r/43.8%
associate-*r/43.9%
*-rgt-identity43.9%
div-sub47.8%
sub-neg47.8%
mul-1-neg47.8%
*-commutative47.8%
distribute-lft-in47.8%
metadata-eval47.8%
sub-neg47.8%
associate-/l*50.4%
div-sub50.4%
neg-sub050.4%
*-commutative50.4%
distribute-rgt-neg-in50.4%
Simplified50.4%
*-commutative50.4%
clear-num50.4%
un-div-inv50.4%
add-sqr-sqrt50.1%
sqrt-unprod37.7%
sqr-neg37.7%
sqrt-unprod0.0%
add-sqr-sqrt49.6%
Applied egg-rr49.6%
if -1.44999999999999989e-41 < x < 4Initial program 94.9%
fabs-sub94.9%
associate-*l/99.8%
associate-*r/89.5%
fmm-def89.5%
distribute-neg-frac89.5%
+-commutative89.5%
distribute-neg-in89.5%
unsub-neg89.5%
metadata-eval89.5%
Simplified89.5%
fma-undefine89.5%
associate-*r/99.8%
associate-*l/94.9%
div-inv94.9%
sub-neg94.9%
metadata-eval94.9%
distribute-neg-in94.9%
+-commutative94.9%
cancel-sign-sub-inv94.9%
div-inv94.9%
fabs-sub94.9%
add-sqr-sqrt48.4%
fabs-sqr48.4%
add-sqr-sqrt49.8%
associate-*l/52.6%
sub-div52.6%
Applied egg-rr52.6%
Taylor expanded in x around 0 52.6%
if 4 < x < 5.7999999999999999e251Initial program 88.2%
fabs-sub88.2%
associate-*l/88.4%
associate-*r/92.1%
fmm-def94.1%
distribute-neg-frac94.1%
+-commutative94.1%
distribute-neg-in94.1%
unsub-neg94.1%
metadata-eval94.1%
Simplified94.1%
fma-undefine92.1%
associate-*r/88.4%
associate-*l/88.2%
div-inv88.0%
sub-neg88.0%
metadata-eval88.0%
distribute-neg-in88.0%
+-commutative88.0%
cancel-sign-sub-inv88.0%
div-inv88.2%
fabs-sub88.2%
add-sqr-sqrt42.9%
fabs-sqr42.9%
add-sqr-sqrt43.7%
sub-neg43.7%
distribute-rgt-neg-in43.7%
Applied egg-rr43.7%
Taylor expanded in x around inf 46.9%
distribute-lft-in41.0%
mul-1-neg41.0%
distribute-rgt-neg-in41.0%
neg-sub041.0%
associate-+l-41.0%
associate-*r/39.2%
associate-*r/39.3%
*-rgt-identity39.3%
div-sub45.2%
sub-neg45.2%
mul-1-neg45.2%
*-commutative45.2%
distribute-lft-in45.2%
metadata-eval45.2%
sub-neg45.2%
associate-/l*46.9%
div-sub46.9%
neg-sub046.9%
*-commutative46.9%
distribute-rgt-neg-in46.9%
Simplified46.9%
if 5.7999999999999999e251 < x Initial program 66.7%
fabs-sub66.7%
associate-*l/51.0%
associate-*r/75.0%
fmm-def91.7%
distribute-neg-frac91.7%
+-commutative91.7%
distribute-neg-in91.7%
unsub-neg91.7%
metadata-eval91.7%
Simplified91.7%
fma-undefine75.0%
associate-*r/51.0%
associate-*l/66.7%
div-inv66.7%
sub-neg66.7%
metadata-eval66.7%
distribute-neg-in66.7%
+-commutative66.7%
cancel-sign-sub-inv66.7%
div-inv66.7%
fabs-sub66.7%
add-sqr-sqrt25.0%
fabs-sqr25.0%
add-sqr-sqrt25.2%
sub-neg25.2%
distribute-rgt-neg-in25.2%
Applied egg-rr25.2%
Taylor expanded in x around inf 50.2%
distribute-lft-in25.2%
mul-1-neg25.2%
distribute-rgt-neg-in25.2%
neg-sub025.2%
associate-+l-25.2%
associate-*r/17.1%
associate-*r/17.1%
*-rgt-identity17.1%
div-sub42.1%
sub-neg42.1%
mul-1-neg42.1%
*-commutative42.1%
distribute-lft-in42.1%
metadata-eval42.1%
sub-neg42.1%
associate-/l*50.2%
div-sub50.2%
neg-sub050.2%
*-commutative50.2%
distribute-rgt-neg-in50.2%
Simplified50.2%
*-commutative50.2%
clear-num50.2%
un-div-inv50.2%
add-sqr-sqrt0.0%
sqrt-unprod26.1%
sqr-neg26.1%
sqrt-unprod49.9%
add-sqr-sqrt49.8%
Applied egg-rr49.8%
Taylor expanded in z around inf 25.9%
associate-*l/41.9%
*-commutative41.9%
Simplified41.9%
Final simplification50.1%
y_m = (fabs.f64 y)
(FPCore (x y_m z)
:precision binary64
(if (<= x -1.45e-41)
(/ x (/ y_m (+ -1.0 z)))
(if (<= x 4.0)
(/ (- 4.0 (* x z)) y_m)
(if (<= x 3.3e+251) (/ (- x (* x z)) y_m) (* z (/ x y_m))))))y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= -1.45e-41) {
tmp = x / (y_m / (-1.0 + z));
} else if (x <= 4.0) {
tmp = (4.0 - (x * z)) / y_m;
} else if (x <= 3.3e+251) {
tmp = (x - (x * z)) / y_m;
} else {
tmp = z * (x / y_m);
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-1.45d-41)) then
tmp = x / (y_m / ((-1.0d0) + z))
else if (x <= 4.0d0) then
tmp = (4.0d0 - (x * z)) / y_m
else if (x <= 3.3d+251) then
tmp = (x - (x * z)) / y_m
else
tmp = z * (x / y_m)
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double tmp;
if (x <= -1.45e-41) {
tmp = x / (y_m / (-1.0 + z));
} else if (x <= 4.0) {
tmp = (4.0 - (x * z)) / y_m;
} else if (x <= 3.3e+251) {
tmp = (x - (x * z)) / y_m;
} else {
tmp = z * (x / y_m);
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= -1.45e-41: tmp = x / (y_m / (-1.0 + z)) elif x <= 4.0: tmp = (4.0 - (x * z)) / y_m elif x <= 3.3e+251: tmp = (x - (x * z)) / y_m else: tmp = z * (x / y_m) return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= -1.45e-41) tmp = Float64(x / Float64(y_m / Float64(-1.0 + z))); elseif (x <= 4.0) tmp = Float64(Float64(4.0 - Float64(x * z)) / y_m); elseif (x <= 3.3e+251) tmp = Float64(Float64(x - Float64(x * z)) / y_m); else tmp = Float64(z * Float64(x / y_m)); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (x <= -1.45e-41) tmp = x / (y_m / (-1.0 + z)); elseif (x <= 4.0) tmp = (4.0 - (x * z)) / y_m; elseif (x <= 3.3e+251) tmp = (x - (x * z)) / y_m; else tmp = z * (x / y_m); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[x, -1.45e-41], N[(x / N[(y$95$m / N[(-1.0 + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.0], N[(N[(4.0 - N[(x * z), $MachinePrecision]), $MachinePrecision] / y$95$m), $MachinePrecision], If[LessEqual[x, 3.3e+251], N[(N[(x - N[(x * z), $MachinePrecision]), $MachinePrecision] / y$95$m), $MachinePrecision], N[(z * N[(x / y$95$m), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.45 \cdot 10^{-41}:\\
\;\;\;\;\frac{x}{\frac{y\_m}{-1 + z}}\\
\mathbf{elif}\;x \leq 4:\\
\;\;\;\;\frac{4 - x \cdot z}{y\_m}\\
\mathbf{elif}\;x \leq 3.3 \cdot 10^{+251}:\\
\;\;\;\;\frac{x - x \cdot z}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{x}{y\_m}\\
\end{array}
\end{array}
if x < -1.44999999999999989e-41Initial program 86.6%
fabs-sub86.6%
associate-*l/80.5%
associate-*r/90.5%
fmm-def94.5%
distribute-neg-frac94.5%
+-commutative94.5%
distribute-neg-in94.5%
unsub-neg94.5%
metadata-eval94.5%
Simplified94.5%
fma-undefine90.5%
associate-*r/80.5%
associate-*l/86.6%
div-inv86.4%
sub-neg86.4%
metadata-eval86.4%
distribute-neg-in86.4%
+-commutative86.4%
cancel-sign-sub-inv86.4%
div-inv86.6%
fabs-sub86.6%
add-sqr-sqrt46.5%
fabs-sqr46.5%
add-sqr-sqrt46.9%
sub-neg46.9%
distribute-rgt-neg-in46.9%
Applied egg-rr46.9%
Taylor expanded in x around inf 50.4%
distribute-lft-in46.4%
mul-1-neg46.4%
distribute-rgt-neg-in46.4%
neg-sub046.4%
associate-+l-46.4%
associate-*r/43.8%
associate-*r/43.9%
*-rgt-identity43.9%
div-sub47.8%
sub-neg47.8%
mul-1-neg47.8%
*-commutative47.8%
distribute-lft-in47.8%
metadata-eval47.8%
sub-neg47.8%
associate-/l*50.4%
div-sub50.4%
neg-sub050.4%
*-commutative50.4%
distribute-rgt-neg-in50.4%
Simplified50.4%
*-commutative50.4%
clear-num50.4%
un-div-inv50.4%
add-sqr-sqrt50.1%
sqrt-unprod37.7%
sqr-neg37.7%
sqrt-unprod0.0%
add-sqr-sqrt49.6%
Applied egg-rr49.6%
if -1.44999999999999989e-41 < x < 4Initial program 94.9%
fabs-sub94.9%
associate-*l/99.8%
associate-*r/89.5%
fmm-def89.5%
distribute-neg-frac89.5%
+-commutative89.5%
distribute-neg-in89.5%
unsub-neg89.5%
metadata-eval89.5%
Simplified89.5%
fma-undefine89.5%
associate-*r/99.8%
associate-*l/94.9%
div-inv94.9%
sub-neg94.9%
metadata-eval94.9%
distribute-neg-in94.9%
+-commutative94.9%
cancel-sign-sub-inv94.9%
div-inv94.9%
fabs-sub94.9%
add-sqr-sqrt48.4%
fabs-sqr48.4%
add-sqr-sqrt49.8%
associate-*l/52.6%
sub-div52.6%
Applied egg-rr52.6%
Taylor expanded in x around 0 52.6%
if 4 < x < 3.30000000000000018e251Initial program 88.2%
fabs-sub88.2%
associate-*l/88.4%
associate-*r/92.1%
fmm-def94.1%
distribute-neg-frac94.1%
+-commutative94.1%
distribute-neg-in94.1%
unsub-neg94.1%
metadata-eval94.1%
Simplified94.1%
fma-undefine92.1%
associate-*r/88.4%
associate-*l/88.2%
div-inv88.0%
sub-neg88.0%
metadata-eval88.0%
distribute-neg-in88.0%
+-commutative88.0%
cancel-sign-sub-inv88.0%
div-inv88.2%
fabs-sub88.2%
add-sqr-sqrt42.9%
fabs-sqr42.9%
add-sqr-sqrt43.7%
associate-*l/41.8%
sub-div47.7%
Applied egg-rr47.7%
Taylor expanded in x around inf 45.2%
if 3.30000000000000018e251 < x Initial program 66.7%
fabs-sub66.7%
associate-*l/51.0%
associate-*r/75.0%
fmm-def91.7%
distribute-neg-frac91.7%
+-commutative91.7%
distribute-neg-in91.7%
unsub-neg91.7%
metadata-eval91.7%
Simplified91.7%
fma-undefine75.0%
associate-*r/51.0%
associate-*l/66.7%
div-inv66.7%
sub-neg66.7%
metadata-eval66.7%
distribute-neg-in66.7%
+-commutative66.7%
cancel-sign-sub-inv66.7%
div-inv66.7%
fabs-sub66.7%
add-sqr-sqrt25.0%
fabs-sqr25.0%
add-sqr-sqrt25.2%
sub-neg25.2%
distribute-rgt-neg-in25.2%
Applied egg-rr25.2%
Taylor expanded in x around inf 50.2%
distribute-lft-in25.2%
mul-1-neg25.2%
distribute-rgt-neg-in25.2%
neg-sub025.2%
associate-+l-25.2%
associate-*r/17.1%
associate-*r/17.1%
*-rgt-identity17.1%
div-sub42.1%
sub-neg42.1%
mul-1-neg42.1%
*-commutative42.1%
distribute-lft-in42.1%
metadata-eval42.1%
sub-neg42.1%
associate-/l*50.2%
div-sub50.2%
neg-sub050.2%
*-commutative50.2%
distribute-rgt-neg-in50.2%
Simplified50.2%
*-commutative50.2%
clear-num50.2%
un-div-inv50.2%
add-sqr-sqrt0.0%
sqrt-unprod26.1%
sqr-neg26.1%
sqrt-unprod49.9%
add-sqr-sqrt49.8%
Applied egg-rr49.8%
Taylor expanded in z around inf 25.9%
associate-*l/41.9%
*-commutative41.9%
Simplified41.9%
Final simplification49.7%
y_m = (fabs.f64 y)
(FPCore (x y_m z)
:precision binary64
(if (<= x -1.45e-41)
(/ x (/ y_m (+ -1.0 z)))
(if (<= x 2.4e+202)
(/ (- (+ x 4.0) (* x z)) y_m)
(+ (/ (+ x 4.0) y_m) (* z (/ x y_m))))))y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= -1.45e-41) {
tmp = x / (y_m / (-1.0 + z));
} else if (x <= 2.4e+202) {
tmp = ((x + 4.0) - (x * z)) / y_m;
} else {
tmp = ((x + 4.0) / y_m) + (z * (x / y_m));
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-1.45d-41)) then
tmp = x / (y_m / ((-1.0d0) + z))
else if (x <= 2.4d+202) then
tmp = ((x + 4.0d0) - (x * z)) / y_m
else
tmp = ((x + 4.0d0) / y_m) + (z * (x / y_m))
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double tmp;
if (x <= -1.45e-41) {
tmp = x / (y_m / (-1.0 + z));
} else if (x <= 2.4e+202) {
tmp = ((x + 4.0) - (x * z)) / y_m;
} else {
tmp = ((x + 4.0) / y_m) + (z * (x / y_m));
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= -1.45e-41: tmp = x / (y_m / (-1.0 + z)) elif x <= 2.4e+202: tmp = ((x + 4.0) - (x * z)) / y_m else: tmp = ((x + 4.0) / y_m) + (z * (x / y_m)) return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= -1.45e-41) tmp = Float64(x / Float64(y_m / Float64(-1.0 + z))); elseif (x <= 2.4e+202) tmp = Float64(Float64(Float64(x + 4.0) - Float64(x * z)) / y_m); else tmp = Float64(Float64(Float64(x + 4.0) / y_m) + Float64(z * Float64(x / y_m))); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (x <= -1.45e-41) tmp = x / (y_m / (-1.0 + z)); elseif (x <= 2.4e+202) tmp = ((x + 4.0) - (x * z)) / y_m; else tmp = ((x + 4.0) / y_m) + (z * (x / y_m)); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[x, -1.45e-41], N[(x / N[(y$95$m / N[(-1.0 + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.4e+202], N[(N[(N[(x + 4.0), $MachinePrecision] - N[(x * z), $MachinePrecision]), $MachinePrecision] / y$95$m), $MachinePrecision], N[(N[(N[(x + 4.0), $MachinePrecision] / y$95$m), $MachinePrecision] + N[(z * N[(x / y$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.45 \cdot 10^{-41}:\\
\;\;\;\;\frac{x}{\frac{y\_m}{-1 + z}}\\
\mathbf{elif}\;x \leq 2.4 \cdot 10^{+202}:\\
\;\;\;\;\frac{\left(x + 4\right) - x \cdot z}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + 4}{y\_m} + z \cdot \frac{x}{y\_m}\\
\end{array}
\end{array}
if x < -1.44999999999999989e-41Initial program 86.6%
fabs-sub86.6%
associate-*l/80.5%
associate-*r/90.5%
fmm-def94.5%
distribute-neg-frac94.5%
+-commutative94.5%
distribute-neg-in94.5%
unsub-neg94.5%
metadata-eval94.5%
Simplified94.5%
fma-undefine90.5%
associate-*r/80.5%
associate-*l/86.6%
div-inv86.4%
sub-neg86.4%
metadata-eval86.4%
distribute-neg-in86.4%
+-commutative86.4%
cancel-sign-sub-inv86.4%
div-inv86.6%
fabs-sub86.6%
add-sqr-sqrt46.5%
fabs-sqr46.5%
add-sqr-sqrt46.9%
sub-neg46.9%
distribute-rgt-neg-in46.9%
Applied egg-rr46.9%
Taylor expanded in x around inf 50.4%
distribute-lft-in46.4%
mul-1-neg46.4%
distribute-rgt-neg-in46.4%
neg-sub046.4%
associate-+l-46.4%
associate-*r/43.8%
associate-*r/43.9%
*-rgt-identity43.9%
div-sub47.8%
sub-neg47.8%
mul-1-neg47.8%
*-commutative47.8%
distribute-lft-in47.8%
metadata-eval47.8%
sub-neg47.8%
associate-/l*50.4%
div-sub50.4%
neg-sub050.4%
*-commutative50.4%
distribute-rgt-neg-in50.4%
Simplified50.4%
*-commutative50.4%
clear-num50.4%
un-div-inv50.4%
add-sqr-sqrt50.1%
sqrt-unprod37.7%
sqr-neg37.7%
sqrt-unprod0.0%
add-sqr-sqrt49.6%
Applied egg-rr49.6%
if -1.44999999999999989e-41 < x < 2.4000000000000002e202Initial program 93.7%
fabs-sub93.7%
associate-*l/98.0%
associate-*r/90.9%
fmm-def90.9%
distribute-neg-frac90.9%
+-commutative90.9%
distribute-neg-in90.9%
unsub-neg90.9%
metadata-eval90.9%
Simplified90.9%
fma-undefine90.9%
associate-*r/98.0%
associate-*l/93.7%
div-inv93.6%
sub-neg93.6%
metadata-eval93.6%
distribute-neg-in93.6%
+-commutative93.6%
cancel-sign-sub-inv93.6%
div-inv93.7%
fabs-sub93.7%
add-sqr-sqrt49.0%
fabs-sqr49.0%
add-sqr-sqrt50.3%
associate-*l/51.8%
sub-div53.0%
Applied egg-rr53.0%
if 2.4000000000000002e202 < x Initial program 72.7%
fabs-sub72.7%
associate-*l/60.0%
associate-*r/77.3%
fmm-def90.9%
distribute-neg-frac90.9%
+-commutative90.9%
distribute-neg-in90.9%
unsub-neg90.9%
metadata-eval90.9%
Simplified90.9%
fma-undefine77.3%
associate-*r/60.0%
associate-*l/72.7%
div-inv72.7%
sub-neg72.7%
metadata-eval72.7%
distribute-neg-in72.7%
+-commutative72.7%
cancel-sign-sub-inv72.7%
div-inv72.7%
fabs-sub72.7%
add-sqr-sqrt18.2%
fabs-sqr18.2%
add-sqr-sqrt18.5%
sub-neg18.5%
distribute-rgt-neg-in18.5%
Applied egg-rr18.5%
add-sqr-sqrt9.3%
sqrt-unprod32.7%
sqr-neg32.7%
sqrt-unprod31.7%
add-sqr-sqrt32.1%
*-un-lft-identity32.1%
Applied egg-rr32.1%
*-lft-identity32.1%
Simplified32.1%
Final simplification50.2%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x -1.45e-41) (/ x (/ y_m (+ -1.0 z))) (if (<= x 3.3e+251) (/ (- (+ x 4.0) (* x z)) y_m) (* z (/ x y_m)))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= -1.45e-41) {
tmp = x / (y_m / (-1.0 + z));
} else if (x <= 3.3e+251) {
tmp = ((x + 4.0) - (x * z)) / y_m;
} else {
tmp = z * (x / y_m);
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-1.45d-41)) then
tmp = x / (y_m / ((-1.0d0) + z))
else if (x <= 3.3d+251) then
tmp = ((x + 4.0d0) - (x * z)) / y_m
else
tmp = z * (x / y_m)
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double tmp;
if (x <= -1.45e-41) {
tmp = x / (y_m / (-1.0 + z));
} else if (x <= 3.3e+251) {
tmp = ((x + 4.0) - (x * z)) / y_m;
} else {
tmp = z * (x / y_m);
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= -1.45e-41: tmp = x / (y_m / (-1.0 + z)) elif x <= 3.3e+251: tmp = ((x + 4.0) - (x * z)) / y_m else: tmp = z * (x / y_m) return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= -1.45e-41) tmp = Float64(x / Float64(y_m / Float64(-1.0 + z))); elseif (x <= 3.3e+251) tmp = Float64(Float64(Float64(x + 4.0) - Float64(x * z)) / y_m); else tmp = Float64(z * Float64(x / y_m)); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (x <= -1.45e-41) tmp = x / (y_m / (-1.0 + z)); elseif (x <= 3.3e+251) tmp = ((x + 4.0) - (x * z)) / y_m; else tmp = z * (x / y_m); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[x, -1.45e-41], N[(x / N[(y$95$m / N[(-1.0 + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.3e+251], N[(N[(N[(x + 4.0), $MachinePrecision] - N[(x * z), $MachinePrecision]), $MachinePrecision] / y$95$m), $MachinePrecision], N[(z * N[(x / y$95$m), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.45 \cdot 10^{-41}:\\
\;\;\;\;\frac{x}{\frac{y\_m}{-1 + z}}\\
\mathbf{elif}\;x \leq 3.3 \cdot 10^{+251}:\\
\;\;\;\;\frac{\left(x + 4\right) - x \cdot z}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{x}{y\_m}\\
\end{array}
\end{array}
if x < -1.44999999999999989e-41Initial program 86.6%
fabs-sub86.6%
associate-*l/80.5%
associate-*r/90.5%
fmm-def94.5%
distribute-neg-frac94.5%
+-commutative94.5%
distribute-neg-in94.5%
unsub-neg94.5%
metadata-eval94.5%
Simplified94.5%
fma-undefine90.5%
associate-*r/80.5%
associate-*l/86.6%
div-inv86.4%
sub-neg86.4%
metadata-eval86.4%
distribute-neg-in86.4%
+-commutative86.4%
cancel-sign-sub-inv86.4%
div-inv86.6%
fabs-sub86.6%
add-sqr-sqrt46.5%
fabs-sqr46.5%
add-sqr-sqrt46.9%
sub-neg46.9%
distribute-rgt-neg-in46.9%
Applied egg-rr46.9%
Taylor expanded in x around inf 50.4%
distribute-lft-in46.4%
mul-1-neg46.4%
distribute-rgt-neg-in46.4%
neg-sub046.4%
associate-+l-46.4%
associate-*r/43.8%
associate-*r/43.9%
*-rgt-identity43.9%
div-sub47.8%
sub-neg47.8%
mul-1-neg47.8%
*-commutative47.8%
distribute-lft-in47.8%
metadata-eval47.8%
sub-neg47.8%
associate-/l*50.4%
div-sub50.4%
neg-sub050.4%
*-commutative50.4%
distribute-rgt-neg-in50.4%
Simplified50.4%
*-commutative50.4%
clear-num50.4%
un-div-inv50.4%
add-sqr-sqrt50.1%
sqrt-unprod37.7%
sqr-neg37.7%
sqrt-unprod0.0%
add-sqr-sqrt49.6%
Applied egg-rr49.6%
if -1.44999999999999989e-41 < x < 3.30000000000000018e251Initial program 92.9%
fabs-sub92.9%
associate-*l/96.4%
associate-*r/90.3%
fmm-def90.9%
distribute-neg-frac90.9%
+-commutative90.9%
distribute-neg-in90.9%
unsub-neg90.9%
metadata-eval90.9%
Simplified90.9%
fma-undefine90.3%
associate-*r/96.4%
associate-*l/92.9%
div-inv92.8%
sub-neg92.8%
metadata-eval92.8%
distribute-neg-in92.8%
+-commutative92.8%
cancel-sign-sub-inv92.8%
div-inv92.9%
fabs-sub92.9%
add-sqr-sqrt46.7%
fabs-sqr46.7%
add-sqr-sqrt48.0%
associate-*l/49.3%
sub-div51.1%
Applied egg-rr51.1%
if 3.30000000000000018e251 < x Initial program 66.7%
fabs-sub66.7%
associate-*l/51.0%
associate-*r/75.0%
fmm-def91.7%
distribute-neg-frac91.7%
+-commutative91.7%
distribute-neg-in91.7%
unsub-neg91.7%
metadata-eval91.7%
Simplified91.7%
fma-undefine75.0%
associate-*r/51.0%
associate-*l/66.7%
div-inv66.7%
sub-neg66.7%
metadata-eval66.7%
distribute-neg-in66.7%
+-commutative66.7%
cancel-sign-sub-inv66.7%
div-inv66.7%
fabs-sub66.7%
add-sqr-sqrt25.0%
fabs-sqr25.0%
add-sqr-sqrt25.2%
sub-neg25.2%
distribute-rgt-neg-in25.2%
Applied egg-rr25.2%
Taylor expanded in x around inf 50.2%
distribute-lft-in25.2%
mul-1-neg25.2%
distribute-rgt-neg-in25.2%
neg-sub025.2%
associate-+l-25.2%
associate-*r/17.1%
associate-*r/17.1%
*-rgt-identity17.1%
div-sub42.1%
sub-neg42.1%
mul-1-neg42.1%
*-commutative42.1%
distribute-lft-in42.1%
metadata-eval42.1%
sub-neg42.1%
associate-/l*50.2%
div-sub50.2%
neg-sub050.2%
*-commutative50.2%
distribute-rgt-neg-in50.2%
Simplified50.2%
*-commutative50.2%
clear-num50.2%
un-div-inv50.2%
add-sqr-sqrt0.0%
sqrt-unprod26.1%
sqr-neg26.1%
sqrt-unprod49.9%
add-sqr-sqrt49.8%
Applied egg-rr49.8%
Taylor expanded in z around inf 25.9%
associate-*l/41.9%
*-commutative41.9%
Simplified41.9%
Final simplification50.2%
y_m = (fabs.f64 y)
(FPCore (x y_m z)
:precision binary64
(if (<= x -9.8e-14)
(/ x (- y_m))
(if (<= x -1.45e-41)
(/ (* x z) y_m)
(if (<= x 4.0) (/ 4.0 y_m) (/ x y_m)))))y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= -9.8e-14) {
tmp = x / -y_m;
} else if (x <= -1.45e-41) {
tmp = (x * z) / y_m;
} else if (x <= 4.0) {
tmp = 4.0 / y_m;
} else {
tmp = x / y_m;
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-9.8d-14)) then
tmp = x / -y_m
else if (x <= (-1.45d-41)) then
tmp = (x * z) / y_m
else if (x <= 4.0d0) then
tmp = 4.0d0 / y_m
else
tmp = x / y_m
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double tmp;
if (x <= -9.8e-14) {
tmp = x / -y_m;
} else if (x <= -1.45e-41) {
tmp = (x * z) / y_m;
} else if (x <= 4.0) {
tmp = 4.0 / y_m;
} else {
tmp = x / y_m;
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= -9.8e-14: tmp = x / -y_m elif x <= -1.45e-41: tmp = (x * z) / y_m elif x <= 4.0: tmp = 4.0 / y_m else: tmp = x / y_m return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= -9.8e-14) tmp = Float64(x / Float64(-y_m)); elseif (x <= -1.45e-41) tmp = Float64(Float64(x * z) / y_m); elseif (x <= 4.0) tmp = Float64(4.0 / y_m); else tmp = Float64(x / y_m); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (x <= -9.8e-14) tmp = x / -y_m; elseif (x <= -1.45e-41) tmp = (x * z) / y_m; elseif (x <= 4.0) tmp = 4.0 / y_m; else tmp = x / y_m; end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[x, -9.8e-14], N[(x / (-y$95$m)), $MachinePrecision], If[LessEqual[x, -1.45e-41], N[(N[(x * z), $MachinePrecision] / y$95$m), $MachinePrecision], If[LessEqual[x, 4.0], N[(4.0 / y$95$m), $MachinePrecision], N[(x / y$95$m), $MachinePrecision]]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.8 \cdot 10^{-14}:\\
\;\;\;\;\frac{x}{-y\_m}\\
\mathbf{elif}\;x \leq -1.45 \cdot 10^{-41}:\\
\;\;\;\;\frac{x \cdot z}{y\_m}\\
\mathbf{elif}\;x \leq 4:\\
\;\;\;\;\frac{4}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y\_m}\\
\end{array}
\end{array}
if x < -9.79999999999999989e-14Initial program 87.0%
fabs-sub87.0%
associate-*l/79.1%
associate-*r/89.8%
fmm-def94.1%
distribute-neg-frac94.1%
+-commutative94.1%
distribute-neg-in94.1%
unsub-neg94.1%
metadata-eval94.1%
Simplified94.1%
fma-undefine89.8%
associate-*r/79.1%
associate-*l/87.0%
div-inv86.9%
sub-neg86.9%
metadata-eval86.9%
distribute-neg-in86.9%
+-commutative86.9%
cancel-sign-sub-inv86.9%
div-inv87.0%
fabs-sub87.0%
add-sqr-sqrt46.9%
fabs-sqr46.9%
add-sqr-sqrt47.3%
sub-neg47.3%
distribute-rgt-neg-in47.3%
Applied egg-rr47.3%
Taylor expanded in x around inf 51.0%
distribute-lft-in46.8%
mul-1-neg46.8%
distribute-rgt-neg-in46.8%
neg-sub046.8%
associate-+l-46.8%
associate-*r/44.0%
associate-*r/44.1%
*-rgt-identity44.1%
div-sub48.3%
sub-neg48.3%
mul-1-neg48.3%
*-commutative48.3%
distribute-lft-in48.3%
metadata-eval48.3%
sub-neg48.3%
associate-/l*51.1%
div-sub51.0%
neg-sub051.0%
*-commutative51.0%
distribute-rgt-neg-in51.0%
Simplified51.1%
*-commutative51.1%
clear-num51.0%
un-div-inv51.1%
add-sqr-sqrt50.8%
sqrt-unprod37.4%
sqr-neg37.4%
sqrt-unprod0.0%
add-sqr-sqrt48.9%
Applied egg-rr48.9%
Taylor expanded in z around 0 31.2%
associate-*r/31.2%
mul-1-neg31.2%
Simplified31.2%
if -9.79999999999999989e-14 < x < -1.44999999999999989e-41Initial program 80.8%
fabs-sub80.8%
associate-*l/100.0%
associate-*r/99.7%
fmm-def99.7%
distribute-neg-frac99.7%
+-commutative99.7%
distribute-neg-in99.7%
unsub-neg99.7%
metadata-eval99.7%
Simplified99.7%
add-sqr-sqrt60.0%
fabs-sqr60.0%
add-sqr-sqrt59.8%
fma-undefine59.8%
associate-*r/60.1%
associate-*l/40.8%
div-inv40.8%
sub-neg40.8%
metadata-eval40.8%
distribute-neg-in40.8%
+-commutative40.8%
cancel-sign-sub-inv40.8%
div-inv40.8%
associate-*l/60.1%
sub-div60.1%
Applied egg-rr60.1%
Taylor expanded in z around inf 60.1%
if -1.44999999999999989e-41 < x < 4Initial program 94.9%
fabs-sub94.9%
associate-*l/99.8%
associate-*r/89.5%
fmm-def89.5%
distribute-neg-frac89.5%
+-commutative89.5%
distribute-neg-in89.5%
unsub-neg89.5%
metadata-eval89.5%
Simplified89.5%
fma-undefine89.5%
associate-*r/99.8%
associate-*l/94.9%
div-inv94.9%
sub-neg94.9%
metadata-eval94.9%
distribute-neg-in94.9%
+-commutative94.9%
cancel-sign-sub-inv94.9%
div-inv94.9%
fabs-sub94.9%
add-sqr-sqrt48.4%
fabs-sqr48.4%
add-sqr-sqrt49.8%
sub-neg49.8%
distribute-rgt-neg-in49.8%
Applied egg-rr49.8%
Taylor expanded in x around 0 36.3%
if 4 < x Initial program 84.1%
fabs-sub84.1%
associate-*l/81.3%
associate-*r/88.8%
fmm-def93.6%
distribute-neg-frac93.6%
+-commutative93.6%
distribute-neg-in93.6%
unsub-neg93.6%
metadata-eval93.6%
Simplified93.6%
fma-undefine88.8%
associate-*r/81.3%
associate-*l/84.1%
div-inv83.9%
sub-neg83.9%
metadata-eval83.9%
distribute-neg-in83.9%
+-commutative83.9%
cancel-sign-sub-inv83.9%
div-inv84.1%
fabs-sub84.1%
add-sqr-sqrt39.5%
fabs-sqr39.5%
add-sqr-sqrt40.2%
sub-neg40.2%
distribute-rgt-neg-in40.2%
Applied egg-rr40.2%
Taylor expanded in z around 0 26.8%
+-commutative26.8%
associate-*r/26.8%
metadata-eval26.8%
Simplified26.8%
Taylor expanded in x around inf 24.9%
Final simplification32.6%
y_m = (fabs.f64 y)
(FPCore (x y_m z)
:precision binary64
(if (<= x -1.5e-13)
(/ x (- y_m))
(if (<= x -1.45e-41)
(* x (/ z y_m))
(if (<= x 4.0) (/ 4.0 y_m) (/ x y_m)))))y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= -1.5e-13) {
tmp = x / -y_m;
} else if (x <= -1.45e-41) {
tmp = x * (z / y_m);
} else if (x <= 4.0) {
tmp = 4.0 / y_m;
} else {
tmp = x / y_m;
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-1.5d-13)) then
tmp = x / -y_m
else if (x <= (-1.45d-41)) then
tmp = x * (z / y_m)
else if (x <= 4.0d0) then
tmp = 4.0d0 / y_m
else
tmp = x / y_m
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double tmp;
if (x <= -1.5e-13) {
tmp = x / -y_m;
} else if (x <= -1.45e-41) {
tmp = x * (z / y_m);
} else if (x <= 4.0) {
tmp = 4.0 / y_m;
} else {
tmp = x / y_m;
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= -1.5e-13: tmp = x / -y_m elif x <= -1.45e-41: tmp = x * (z / y_m) elif x <= 4.0: tmp = 4.0 / y_m else: tmp = x / y_m return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= -1.5e-13) tmp = Float64(x / Float64(-y_m)); elseif (x <= -1.45e-41) tmp = Float64(x * Float64(z / y_m)); elseif (x <= 4.0) tmp = Float64(4.0 / y_m); else tmp = Float64(x / y_m); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (x <= -1.5e-13) tmp = x / -y_m; elseif (x <= -1.45e-41) tmp = x * (z / y_m); elseif (x <= 4.0) tmp = 4.0 / y_m; else tmp = x / y_m; end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[x, -1.5e-13], N[(x / (-y$95$m)), $MachinePrecision], If[LessEqual[x, -1.45e-41], N[(x * N[(z / y$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.0], N[(4.0 / y$95$m), $MachinePrecision], N[(x / y$95$m), $MachinePrecision]]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.5 \cdot 10^{-13}:\\
\;\;\;\;\frac{x}{-y\_m}\\
\mathbf{elif}\;x \leq -1.45 \cdot 10^{-41}:\\
\;\;\;\;x \cdot \frac{z}{y\_m}\\
\mathbf{elif}\;x \leq 4:\\
\;\;\;\;\frac{4}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y\_m}\\
\end{array}
\end{array}
if x < -1.49999999999999992e-13Initial program 87.0%
fabs-sub87.0%
associate-*l/79.1%
associate-*r/89.8%
fmm-def94.1%
distribute-neg-frac94.1%
+-commutative94.1%
distribute-neg-in94.1%
unsub-neg94.1%
metadata-eval94.1%
Simplified94.1%
fma-undefine89.8%
associate-*r/79.1%
associate-*l/87.0%
div-inv86.9%
sub-neg86.9%
metadata-eval86.9%
distribute-neg-in86.9%
+-commutative86.9%
cancel-sign-sub-inv86.9%
div-inv87.0%
fabs-sub87.0%
add-sqr-sqrt46.9%
fabs-sqr46.9%
add-sqr-sqrt47.3%
sub-neg47.3%
distribute-rgt-neg-in47.3%
Applied egg-rr47.3%
Taylor expanded in x around inf 51.0%
distribute-lft-in46.8%
mul-1-neg46.8%
distribute-rgt-neg-in46.8%
neg-sub046.8%
associate-+l-46.8%
associate-*r/44.0%
associate-*r/44.1%
*-rgt-identity44.1%
div-sub48.3%
sub-neg48.3%
mul-1-neg48.3%
*-commutative48.3%
distribute-lft-in48.3%
metadata-eval48.3%
sub-neg48.3%
associate-/l*51.1%
div-sub51.0%
neg-sub051.0%
*-commutative51.0%
distribute-rgt-neg-in51.0%
Simplified51.1%
*-commutative51.1%
clear-num51.0%
un-div-inv51.1%
add-sqr-sqrt50.8%
sqrt-unprod37.4%
sqr-neg37.4%
sqrt-unprod0.0%
add-sqr-sqrt48.9%
Applied egg-rr48.9%
Taylor expanded in z around 0 31.2%
associate-*r/31.2%
mul-1-neg31.2%
Simplified31.2%
if -1.49999999999999992e-13 < x < -1.44999999999999989e-41Initial program 80.8%
fabs-sub80.8%
associate-*l/100.0%
associate-*r/99.7%
fmm-def99.7%
distribute-neg-frac99.7%
+-commutative99.7%
distribute-neg-in99.7%
unsub-neg99.7%
metadata-eval99.7%
Simplified99.7%
add-sqr-sqrt60.0%
fabs-sqr60.0%
add-sqr-sqrt59.8%
fma-undefine59.8%
associate-*r/60.1%
associate-*l/40.8%
div-inv40.8%
sub-neg40.8%
metadata-eval40.8%
distribute-neg-in40.8%
+-commutative40.8%
cancel-sign-sub-inv40.8%
associate-*l/60.1%
associate-*r/59.8%
div-inv59.8%
Applied egg-rr59.8%
associate-*r/60.1%
div-sub60.1%
clear-num60.1%
Applied egg-rr60.1%
Taylor expanded in z around inf 60.1%
associate-*r/59.8%
Simplified59.8%
if -1.44999999999999989e-41 < x < 4Initial program 94.9%
fabs-sub94.9%
associate-*l/99.8%
associate-*r/89.5%
fmm-def89.5%
distribute-neg-frac89.5%
+-commutative89.5%
distribute-neg-in89.5%
unsub-neg89.5%
metadata-eval89.5%
Simplified89.5%
fma-undefine89.5%
associate-*r/99.8%
associate-*l/94.9%
div-inv94.9%
sub-neg94.9%
metadata-eval94.9%
distribute-neg-in94.9%
+-commutative94.9%
cancel-sign-sub-inv94.9%
div-inv94.9%
fabs-sub94.9%
add-sqr-sqrt48.4%
fabs-sqr48.4%
add-sqr-sqrt49.8%
sub-neg49.8%
distribute-rgt-neg-in49.8%
Applied egg-rr49.8%
Taylor expanded in x around 0 36.3%
if 4 < x Initial program 84.1%
fabs-sub84.1%
associate-*l/81.3%
associate-*r/88.8%
fmm-def93.6%
distribute-neg-frac93.6%
+-commutative93.6%
distribute-neg-in93.6%
unsub-neg93.6%
metadata-eval93.6%
Simplified93.6%
fma-undefine88.8%
associate-*r/81.3%
associate-*l/84.1%
div-inv83.9%
sub-neg83.9%
metadata-eval83.9%
distribute-neg-in83.9%
+-commutative83.9%
cancel-sign-sub-inv83.9%
div-inv84.1%
fabs-sub84.1%
add-sqr-sqrt39.5%
fabs-sqr39.5%
add-sqr-sqrt40.2%
sub-neg40.2%
distribute-rgt-neg-in40.2%
Applied egg-rr40.2%
Taylor expanded in z around 0 26.8%
+-commutative26.8%
associate-*r/26.8%
metadata-eval26.8%
Simplified26.8%
Taylor expanded in x around inf 24.9%
Final simplification32.6%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x -1.45e-41) (/ x (/ y_m (+ -1.0 z))) (if (<= x 0.088) (/ (- 4.0 (* x z)) y_m) (/ (+ x 4.0) y_m))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= -1.45e-41) {
tmp = x / (y_m / (-1.0 + z));
} else if (x <= 0.088) {
tmp = (4.0 - (x * z)) / y_m;
} else {
tmp = (x + 4.0) / y_m;
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-1.45d-41)) then
tmp = x / (y_m / ((-1.0d0) + z))
else if (x <= 0.088d0) then
tmp = (4.0d0 - (x * z)) / y_m
else
tmp = (x + 4.0d0) / y_m
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double tmp;
if (x <= -1.45e-41) {
tmp = x / (y_m / (-1.0 + z));
} else if (x <= 0.088) {
tmp = (4.0 - (x * z)) / y_m;
} else {
tmp = (x + 4.0) / y_m;
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= -1.45e-41: tmp = x / (y_m / (-1.0 + z)) elif x <= 0.088: tmp = (4.0 - (x * z)) / y_m else: tmp = (x + 4.0) / y_m return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= -1.45e-41) tmp = Float64(x / Float64(y_m / Float64(-1.0 + z))); elseif (x <= 0.088) tmp = Float64(Float64(4.0 - Float64(x * z)) / y_m); else tmp = Float64(Float64(x + 4.0) / y_m); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (x <= -1.45e-41) tmp = x / (y_m / (-1.0 + z)); elseif (x <= 0.088) tmp = (4.0 - (x * z)) / y_m; else tmp = (x + 4.0) / y_m; end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[x, -1.45e-41], N[(x / N[(y$95$m / N[(-1.0 + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 0.088], N[(N[(4.0 - N[(x * z), $MachinePrecision]), $MachinePrecision] / y$95$m), $MachinePrecision], N[(N[(x + 4.0), $MachinePrecision] / y$95$m), $MachinePrecision]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.45 \cdot 10^{-41}:\\
\;\;\;\;\frac{x}{\frac{y\_m}{-1 + z}}\\
\mathbf{elif}\;x \leq 0.088:\\
\;\;\;\;\frac{4 - x \cdot z}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + 4}{y\_m}\\
\end{array}
\end{array}
if x < -1.44999999999999989e-41Initial program 86.6%
fabs-sub86.6%
associate-*l/80.5%
associate-*r/90.5%
fmm-def94.5%
distribute-neg-frac94.5%
+-commutative94.5%
distribute-neg-in94.5%
unsub-neg94.5%
metadata-eval94.5%
Simplified94.5%
fma-undefine90.5%
associate-*r/80.5%
associate-*l/86.6%
div-inv86.4%
sub-neg86.4%
metadata-eval86.4%
distribute-neg-in86.4%
+-commutative86.4%
cancel-sign-sub-inv86.4%
div-inv86.6%
fabs-sub86.6%
add-sqr-sqrt46.5%
fabs-sqr46.5%
add-sqr-sqrt46.9%
sub-neg46.9%
distribute-rgt-neg-in46.9%
Applied egg-rr46.9%
Taylor expanded in x around inf 50.4%
distribute-lft-in46.4%
mul-1-neg46.4%
distribute-rgt-neg-in46.4%
neg-sub046.4%
associate-+l-46.4%
associate-*r/43.8%
associate-*r/43.9%
*-rgt-identity43.9%
div-sub47.8%
sub-neg47.8%
mul-1-neg47.8%
*-commutative47.8%
distribute-lft-in47.8%
metadata-eval47.8%
sub-neg47.8%
associate-/l*50.4%
div-sub50.4%
neg-sub050.4%
*-commutative50.4%
distribute-rgt-neg-in50.4%
Simplified50.4%
*-commutative50.4%
clear-num50.4%
un-div-inv50.4%
add-sqr-sqrt50.1%
sqrt-unprod37.7%
sqr-neg37.7%
sqrt-unprod0.0%
add-sqr-sqrt49.6%
Applied egg-rr49.6%
if -1.44999999999999989e-41 < x < 0.087999999999999995Initial program 94.9%
fabs-sub94.9%
associate-*l/99.8%
associate-*r/89.5%
fmm-def89.5%
distribute-neg-frac89.5%
+-commutative89.5%
distribute-neg-in89.5%
unsub-neg89.5%
metadata-eval89.5%
Simplified89.5%
fma-undefine89.5%
associate-*r/99.8%
associate-*l/94.9%
div-inv94.9%
sub-neg94.9%
metadata-eval94.9%
distribute-neg-in94.9%
+-commutative94.9%
cancel-sign-sub-inv94.9%
div-inv94.9%
fabs-sub94.9%
add-sqr-sqrt48.4%
fabs-sqr48.4%
add-sqr-sqrt49.8%
associate-*l/52.6%
sub-div52.6%
Applied egg-rr52.6%
Taylor expanded in x around 0 52.6%
if 0.087999999999999995 < x Initial program 84.1%
fabs-sub84.1%
associate-*l/81.3%
associate-*r/88.8%
fmm-def93.6%
distribute-neg-frac93.6%
+-commutative93.6%
distribute-neg-in93.6%
unsub-neg93.6%
metadata-eval93.6%
Simplified93.6%
fma-undefine88.8%
associate-*r/81.3%
associate-*l/84.1%
div-inv83.9%
sub-neg83.9%
metadata-eval83.9%
distribute-neg-in83.9%
+-commutative83.9%
cancel-sign-sub-inv83.9%
div-inv84.1%
fabs-sub84.1%
add-sqr-sqrt39.5%
fabs-sqr39.5%
add-sqr-sqrt40.2%
sub-neg40.2%
distribute-rgt-neg-in40.2%
Applied egg-rr40.2%
Taylor expanded in z around 0 26.8%
*-rgt-identity26.8%
associate-*r/26.7%
distribute-rgt-in26.7%
+-commutative26.7%
associate-*l/26.9%
*-lft-identity26.9%
+-commutative26.9%
Simplified26.9%
Final simplification45.4%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x -1.5e-13) (/ (- -4.0 x) y_m) (if (<= x -1.45e-41) (/ (* x z) y_m) (/ (+ x 4.0) y_m))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= -1.5e-13) {
tmp = (-4.0 - x) / y_m;
} else if (x <= -1.45e-41) {
tmp = (x * z) / y_m;
} else {
tmp = (x + 4.0) / y_m;
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-1.5d-13)) then
tmp = ((-4.0d0) - x) / y_m
else if (x <= (-1.45d-41)) then
tmp = (x * z) / y_m
else
tmp = (x + 4.0d0) / y_m
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double tmp;
if (x <= -1.5e-13) {
tmp = (-4.0 - x) / y_m;
} else if (x <= -1.45e-41) {
tmp = (x * z) / y_m;
} else {
tmp = (x + 4.0) / y_m;
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= -1.5e-13: tmp = (-4.0 - x) / y_m elif x <= -1.45e-41: tmp = (x * z) / y_m else: tmp = (x + 4.0) / y_m return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= -1.5e-13) tmp = Float64(Float64(-4.0 - x) / y_m); elseif (x <= -1.45e-41) tmp = Float64(Float64(x * z) / y_m); else tmp = Float64(Float64(x + 4.0) / y_m); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (x <= -1.5e-13) tmp = (-4.0 - x) / y_m; elseif (x <= -1.45e-41) tmp = (x * z) / y_m; else tmp = (x + 4.0) / y_m; end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[x, -1.5e-13], N[(N[(-4.0 - x), $MachinePrecision] / y$95$m), $MachinePrecision], If[LessEqual[x, -1.45e-41], N[(N[(x * z), $MachinePrecision] / y$95$m), $MachinePrecision], N[(N[(x + 4.0), $MachinePrecision] / y$95$m), $MachinePrecision]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.5 \cdot 10^{-13}:\\
\;\;\;\;\frac{-4 - x}{y\_m}\\
\mathbf{elif}\;x \leq -1.45 \cdot 10^{-41}:\\
\;\;\;\;\frac{x \cdot z}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + 4}{y\_m}\\
\end{array}
\end{array}
if x < -1.49999999999999992e-13Initial program 87.0%
fabs-sub87.0%
associate-*l/79.1%
associate-*r/89.8%
fmm-def94.1%
distribute-neg-frac94.1%
+-commutative94.1%
distribute-neg-in94.1%
unsub-neg94.1%
metadata-eval94.1%
Simplified94.1%
add-sqr-sqrt45.4%
fabs-sqr45.4%
add-sqr-sqrt46.0%
fma-undefine43.2%
associate-*r/35.2%
associate-*l/40.3%
div-inv40.3%
sub-neg40.3%
metadata-eval40.3%
distribute-neg-in40.3%
+-commutative40.3%
cancel-sign-sub-inv40.3%
div-inv40.3%
associate-*l/35.2%
sub-div40.9%
Applied egg-rr40.9%
Taylor expanded in z around 0 31.3%
distribute-lft-in31.3%
metadata-eval31.3%
mul-1-neg31.3%
sub-neg31.3%
Simplified31.3%
if -1.49999999999999992e-13 < x < -1.44999999999999989e-41Initial program 80.8%
fabs-sub80.8%
associate-*l/100.0%
associate-*r/99.7%
fmm-def99.7%
distribute-neg-frac99.7%
+-commutative99.7%
distribute-neg-in99.7%
unsub-neg99.7%
metadata-eval99.7%
Simplified99.7%
add-sqr-sqrt60.0%
fabs-sqr60.0%
add-sqr-sqrt59.8%
fma-undefine59.8%
associate-*r/60.1%
associate-*l/40.8%
div-inv40.8%
sub-neg40.8%
metadata-eval40.8%
distribute-neg-in40.8%
+-commutative40.8%
cancel-sign-sub-inv40.8%
div-inv40.8%
associate-*l/60.1%
sub-div60.1%
Applied egg-rr60.1%
Taylor expanded in z around inf 60.1%
if -1.44999999999999989e-41 < x Initial program 91.2%
fabs-sub91.2%
associate-*l/93.4%
associate-*r/89.3%
fmm-def90.9%
distribute-neg-frac90.9%
+-commutative90.9%
distribute-neg-in90.9%
unsub-neg90.9%
metadata-eval90.9%
Simplified90.9%
fma-undefine89.3%
associate-*r/93.4%
associate-*l/91.2%
div-inv91.1%
sub-neg91.1%
metadata-eval91.1%
distribute-neg-in91.1%
+-commutative91.1%
cancel-sign-sub-inv91.1%
div-inv91.2%
fabs-sub91.2%
add-sqr-sqrt45.3%
fabs-sqr45.3%
add-sqr-sqrt46.4%
sub-neg46.4%
distribute-rgt-neg-in46.4%
Applied egg-rr46.4%
Taylor expanded in z around 0 33.0%
*-rgt-identity33.0%
associate-*r/33.0%
distribute-rgt-in33.0%
+-commutative33.0%
associate-*l/33.0%
*-lft-identity33.0%
+-commutative33.0%
Simplified33.0%
Final simplification33.1%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x -1.5e-13) (/ x (- y_m)) (if (<= x -1.45e-41) (/ (* x z) y_m) (/ (+ x 4.0) y_m))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= -1.5e-13) {
tmp = x / -y_m;
} else if (x <= -1.45e-41) {
tmp = (x * z) / y_m;
} else {
tmp = (x + 4.0) / y_m;
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-1.5d-13)) then
tmp = x / -y_m
else if (x <= (-1.45d-41)) then
tmp = (x * z) / y_m
else
tmp = (x + 4.0d0) / y_m
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double tmp;
if (x <= -1.5e-13) {
tmp = x / -y_m;
} else if (x <= -1.45e-41) {
tmp = (x * z) / y_m;
} else {
tmp = (x + 4.0) / y_m;
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= -1.5e-13: tmp = x / -y_m elif x <= -1.45e-41: tmp = (x * z) / y_m else: tmp = (x + 4.0) / y_m return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= -1.5e-13) tmp = Float64(x / Float64(-y_m)); elseif (x <= -1.45e-41) tmp = Float64(Float64(x * z) / y_m); else tmp = Float64(Float64(x + 4.0) / y_m); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (x <= -1.5e-13) tmp = x / -y_m; elseif (x <= -1.45e-41) tmp = (x * z) / y_m; else tmp = (x + 4.0) / y_m; end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[x, -1.5e-13], N[(x / (-y$95$m)), $MachinePrecision], If[LessEqual[x, -1.45e-41], N[(N[(x * z), $MachinePrecision] / y$95$m), $MachinePrecision], N[(N[(x + 4.0), $MachinePrecision] / y$95$m), $MachinePrecision]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.5 \cdot 10^{-13}:\\
\;\;\;\;\frac{x}{-y\_m}\\
\mathbf{elif}\;x \leq -1.45 \cdot 10^{-41}:\\
\;\;\;\;\frac{x \cdot z}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + 4}{y\_m}\\
\end{array}
\end{array}
if x < -1.49999999999999992e-13Initial program 87.0%
fabs-sub87.0%
associate-*l/79.1%
associate-*r/89.8%
fmm-def94.1%
distribute-neg-frac94.1%
+-commutative94.1%
distribute-neg-in94.1%
unsub-neg94.1%
metadata-eval94.1%
Simplified94.1%
fma-undefine89.8%
associate-*r/79.1%
associate-*l/87.0%
div-inv86.9%
sub-neg86.9%
metadata-eval86.9%
distribute-neg-in86.9%
+-commutative86.9%
cancel-sign-sub-inv86.9%
div-inv87.0%
fabs-sub87.0%
add-sqr-sqrt46.9%
fabs-sqr46.9%
add-sqr-sqrt47.3%
sub-neg47.3%
distribute-rgt-neg-in47.3%
Applied egg-rr47.3%
Taylor expanded in x around inf 51.0%
distribute-lft-in46.8%
mul-1-neg46.8%
distribute-rgt-neg-in46.8%
neg-sub046.8%
associate-+l-46.8%
associate-*r/44.0%
associate-*r/44.1%
*-rgt-identity44.1%
div-sub48.3%
sub-neg48.3%
mul-1-neg48.3%
*-commutative48.3%
distribute-lft-in48.3%
metadata-eval48.3%
sub-neg48.3%
associate-/l*51.1%
div-sub51.0%
neg-sub051.0%
*-commutative51.0%
distribute-rgt-neg-in51.0%
Simplified51.1%
*-commutative51.1%
clear-num51.0%
un-div-inv51.1%
add-sqr-sqrt50.8%
sqrt-unprod37.4%
sqr-neg37.4%
sqrt-unprod0.0%
add-sqr-sqrt48.9%
Applied egg-rr48.9%
Taylor expanded in z around 0 31.2%
associate-*r/31.2%
mul-1-neg31.2%
Simplified31.2%
if -1.49999999999999992e-13 < x < -1.44999999999999989e-41Initial program 80.8%
fabs-sub80.8%
associate-*l/100.0%
associate-*r/99.7%
fmm-def99.7%
distribute-neg-frac99.7%
+-commutative99.7%
distribute-neg-in99.7%
unsub-neg99.7%
metadata-eval99.7%
Simplified99.7%
add-sqr-sqrt60.0%
fabs-sqr60.0%
add-sqr-sqrt59.8%
fma-undefine59.8%
associate-*r/60.1%
associate-*l/40.8%
div-inv40.8%
sub-neg40.8%
metadata-eval40.8%
distribute-neg-in40.8%
+-commutative40.8%
cancel-sign-sub-inv40.8%
div-inv40.8%
associate-*l/60.1%
sub-div60.1%
Applied egg-rr60.1%
Taylor expanded in z around inf 60.1%
if -1.44999999999999989e-41 < x Initial program 91.2%
fabs-sub91.2%
associate-*l/93.4%
associate-*r/89.3%
fmm-def90.9%
distribute-neg-frac90.9%
+-commutative90.9%
distribute-neg-in90.9%
unsub-neg90.9%
metadata-eval90.9%
Simplified90.9%
fma-undefine89.3%
associate-*r/93.4%
associate-*l/91.2%
div-inv91.1%
sub-neg91.1%
metadata-eval91.1%
distribute-neg-in91.1%
+-commutative91.1%
cancel-sign-sub-inv91.1%
div-inv91.2%
fabs-sub91.2%
add-sqr-sqrt45.3%
fabs-sqr45.3%
add-sqr-sqrt46.4%
sub-neg46.4%
distribute-rgt-neg-in46.4%
Applied egg-rr46.4%
Taylor expanded in z around 0 33.0%
*-rgt-identity33.0%
associate-*r/33.0%
distribute-rgt-in33.0%
+-commutative33.0%
associate-*l/33.0%
*-lft-identity33.0%
+-commutative33.0%
Simplified33.0%
Final simplification33.1%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x -10.5) (/ x (- y_m)) (if (<= x 4.0) (/ 4.0 y_m) (/ x y_m))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= -10.5) {
tmp = x / -y_m;
} else if (x <= 4.0) {
tmp = 4.0 / y_m;
} else {
tmp = x / y_m;
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-10.5d0)) then
tmp = x / -y_m
else if (x <= 4.0d0) then
tmp = 4.0d0 / y_m
else
tmp = x / y_m
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double tmp;
if (x <= -10.5) {
tmp = x / -y_m;
} else if (x <= 4.0) {
tmp = 4.0 / y_m;
} else {
tmp = x / y_m;
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= -10.5: tmp = x / -y_m elif x <= 4.0: tmp = 4.0 / y_m else: tmp = x / y_m return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= -10.5) tmp = Float64(x / Float64(-y_m)); elseif (x <= 4.0) tmp = Float64(4.0 / y_m); else tmp = Float64(x / y_m); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (x <= -10.5) tmp = x / -y_m; elseif (x <= 4.0) tmp = 4.0 / y_m; else tmp = x / y_m; end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[x, -10.5], N[(x / (-y$95$m)), $MachinePrecision], If[LessEqual[x, 4.0], N[(4.0 / y$95$m), $MachinePrecision], N[(x / y$95$m), $MachinePrecision]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -10.5:\\
\;\;\;\;\frac{x}{-y\_m}\\
\mathbf{elif}\;x \leq 4:\\
\;\;\;\;\frac{4}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y\_m}\\
\end{array}
\end{array}
if x < -10.5Initial program 86.8%
fabs-sub86.8%
associate-*l/78.8%
associate-*r/89.7%
fmm-def94.0%
distribute-neg-frac94.0%
+-commutative94.0%
distribute-neg-in94.0%
unsub-neg94.0%
metadata-eval94.0%
Simplified94.0%
fma-undefine89.7%
associate-*r/78.8%
associate-*l/86.8%
div-inv86.7%
sub-neg86.7%
metadata-eval86.7%
distribute-neg-in86.7%
+-commutative86.7%
cancel-sign-sub-inv86.7%
div-inv86.8%
fabs-sub86.8%
add-sqr-sqrt47.6%
fabs-sqr47.6%
add-sqr-sqrt48.0%
sub-neg48.0%
distribute-rgt-neg-in48.0%
Applied egg-rr48.0%
Taylor expanded in x around inf 51.8%
distribute-lft-in47.4%
mul-1-neg47.4%
distribute-rgt-neg-in47.4%
neg-sub047.4%
associate-+l-47.4%
associate-*r/44.7%
associate-*r/44.7%
*-rgt-identity44.7%
div-sub49.0%
sub-neg49.0%
mul-1-neg49.0%
*-commutative49.0%
distribute-lft-in49.0%
metadata-eval49.0%
sub-neg49.0%
associate-/l*51.8%
div-sub51.8%
neg-sub051.8%
*-commutative51.8%
distribute-rgt-neg-in51.8%
Simplified51.8%
*-commutative51.8%
clear-num51.8%
un-div-inv51.8%
add-sqr-sqrt51.5%
sqrt-unprod38.0%
sqr-neg38.0%
sqrt-unprod0.0%
add-sqr-sqrt48.2%
Applied egg-rr48.2%
Taylor expanded in z around 0 31.7%
associate-*r/31.7%
mul-1-neg31.7%
Simplified31.7%
if -10.5 < x < 4Initial program 94.4%
fabs-sub94.4%
associate-*l/99.8%
associate-*r/90.0%
fmm-def90.0%
distribute-neg-frac90.0%
+-commutative90.0%
distribute-neg-in90.0%
unsub-neg90.0%
metadata-eval90.0%
Simplified90.0%
fma-undefine90.0%
associate-*r/99.8%
associate-*l/94.4%
div-inv94.4%
sub-neg94.4%
metadata-eval94.4%
distribute-neg-in94.4%
+-commutative94.4%
cancel-sign-sub-inv94.4%
div-inv94.4%
fabs-sub94.4%
add-sqr-sqrt47.7%
fabs-sqr47.7%
add-sqr-sqrt49.1%
sub-neg49.1%
distribute-rgt-neg-in49.1%
Applied egg-rr49.1%
Taylor expanded in x around 0 34.8%
if 4 < x Initial program 84.1%
fabs-sub84.1%
associate-*l/81.3%
associate-*r/88.8%
fmm-def93.6%
distribute-neg-frac93.6%
+-commutative93.6%
distribute-neg-in93.6%
unsub-neg93.6%
metadata-eval93.6%
Simplified93.6%
fma-undefine88.8%
associate-*r/81.3%
associate-*l/84.1%
div-inv83.9%
sub-neg83.9%
metadata-eval83.9%
distribute-neg-in83.9%
+-commutative83.9%
cancel-sign-sub-inv83.9%
div-inv84.1%
fabs-sub84.1%
add-sqr-sqrt39.5%
fabs-sqr39.5%
add-sqr-sqrt40.2%
sub-neg40.2%
distribute-rgt-neg-in40.2%
Applied egg-rr40.2%
Taylor expanded in z around 0 26.8%
+-commutative26.8%
associate-*r/26.8%
metadata-eval26.8%
Simplified26.8%
Taylor expanded in x around inf 24.9%
Final simplification31.5%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x -4.1e-53) (/ x (/ y_m (+ -1.0 z))) (/ (+ x 4.0) y_m)))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= -4.1e-53) {
tmp = x / (y_m / (-1.0 + z));
} else {
tmp = (x + 4.0) / y_m;
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-4.1d-53)) then
tmp = x / (y_m / ((-1.0d0) + z))
else
tmp = (x + 4.0d0) / y_m
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double tmp;
if (x <= -4.1e-53) {
tmp = x / (y_m / (-1.0 + z));
} else {
tmp = (x + 4.0) / y_m;
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= -4.1e-53: tmp = x / (y_m / (-1.0 + z)) else: tmp = (x + 4.0) / y_m return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= -4.1e-53) tmp = Float64(x / Float64(y_m / Float64(-1.0 + z))); else tmp = Float64(Float64(x + 4.0) / y_m); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (x <= -4.1e-53) tmp = x / (y_m / (-1.0 + z)); else tmp = (x + 4.0) / y_m; end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[x, -4.1e-53], N[(x / N[(y$95$m / N[(-1.0 + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + 4.0), $MachinePrecision] / y$95$m), $MachinePrecision]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.1 \cdot 10^{-53}:\\
\;\;\;\;\frac{x}{\frac{y\_m}{-1 + z}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + 4}{y\_m}\\
\end{array}
\end{array}
if x < -4.1000000000000001e-53Initial program 86.6%
fabs-sub86.6%
associate-*l/80.5%
associate-*r/90.5%
fmm-def94.5%
distribute-neg-frac94.5%
+-commutative94.5%
distribute-neg-in94.5%
unsub-neg94.5%
metadata-eval94.5%
Simplified94.5%
fma-undefine90.5%
associate-*r/80.5%
associate-*l/86.6%
div-inv86.4%
sub-neg86.4%
metadata-eval86.4%
distribute-neg-in86.4%
+-commutative86.4%
cancel-sign-sub-inv86.4%
div-inv86.6%
fabs-sub86.6%
add-sqr-sqrt46.5%
fabs-sqr46.5%
add-sqr-sqrt46.9%
sub-neg46.9%
distribute-rgt-neg-in46.9%
Applied egg-rr46.9%
Taylor expanded in x around inf 50.4%
distribute-lft-in46.4%
mul-1-neg46.4%
distribute-rgt-neg-in46.4%
neg-sub046.4%
associate-+l-46.4%
associate-*r/43.8%
associate-*r/43.9%
*-rgt-identity43.9%
div-sub47.8%
sub-neg47.8%
mul-1-neg47.8%
*-commutative47.8%
distribute-lft-in47.8%
metadata-eval47.8%
sub-neg47.8%
associate-/l*50.4%
div-sub50.4%
neg-sub050.4%
*-commutative50.4%
distribute-rgt-neg-in50.4%
Simplified50.4%
*-commutative50.4%
clear-num50.4%
un-div-inv50.4%
add-sqr-sqrt50.1%
sqrt-unprod37.7%
sqr-neg37.7%
sqrt-unprod0.0%
add-sqr-sqrt49.6%
Applied egg-rr49.6%
if -4.1000000000000001e-53 < x Initial program 91.2%
fabs-sub91.2%
associate-*l/93.4%
associate-*r/89.3%
fmm-def90.9%
distribute-neg-frac90.9%
+-commutative90.9%
distribute-neg-in90.9%
unsub-neg90.9%
metadata-eval90.9%
Simplified90.9%
fma-undefine89.3%
associate-*r/93.4%
associate-*l/91.2%
div-inv91.1%
sub-neg91.1%
metadata-eval91.1%
distribute-neg-in91.1%
+-commutative91.1%
cancel-sign-sub-inv91.1%
div-inv91.2%
fabs-sub91.2%
add-sqr-sqrt45.3%
fabs-sqr45.3%
add-sqr-sqrt46.4%
sub-neg46.4%
distribute-rgt-neg-in46.4%
Applied egg-rr46.4%
Taylor expanded in z around 0 33.0%
*-rgt-identity33.0%
associate-*r/33.0%
distribute-rgt-in33.0%
+-commutative33.0%
associate-*l/33.0%
*-lft-identity33.0%
+-commutative33.0%
Simplified33.0%
Final simplification37.9%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x 4.0) (/ 4.0 y_m) (/ x y_m)))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= 4.0) {
tmp = 4.0 / y_m;
} else {
tmp = x / y_m;
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 4.0d0) then
tmp = 4.0d0 / y_m
else
tmp = x / y_m
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double tmp;
if (x <= 4.0) {
tmp = 4.0 / y_m;
} else {
tmp = x / y_m;
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= 4.0: tmp = 4.0 / y_m else: tmp = x / y_m return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= 4.0) tmp = Float64(4.0 / y_m); else tmp = Float64(x / y_m); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (x <= 4.0) tmp = 4.0 / y_m; else tmp = x / y_m; end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[x, 4.0], N[(4.0 / y$95$m), $MachinePrecision], N[(x / y$95$m), $MachinePrecision]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq 4:\\
\;\;\;\;\frac{4}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y\_m}\\
\end{array}
\end{array}
if x < 4Initial program 91.7%
fabs-sub91.7%
associate-*l/92.3%
associate-*r/89.9%
fmm-def91.4%
distribute-neg-frac91.4%
+-commutative91.4%
distribute-neg-in91.4%
unsub-neg91.4%
metadata-eval91.4%
Simplified91.4%
fma-undefine89.9%
associate-*r/92.3%
associate-*l/91.7%
div-inv91.6%
sub-neg91.6%
metadata-eval91.6%
distribute-neg-in91.6%
+-commutative91.6%
cancel-sign-sub-inv91.6%
div-inv91.7%
fabs-sub91.7%
add-sqr-sqrt47.7%
fabs-sqr47.7%
add-sqr-sqrt48.7%
sub-neg48.7%
distribute-rgt-neg-in48.7%
Applied egg-rr48.7%
Taylor expanded in x around 0 23.4%
if 4 < x Initial program 84.1%
fabs-sub84.1%
associate-*l/81.3%
associate-*r/88.8%
fmm-def93.6%
distribute-neg-frac93.6%
+-commutative93.6%
distribute-neg-in93.6%
unsub-neg93.6%
metadata-eval93.6%
Simplified93.6%
fma-undefine88.8%
associate-*r/81.3%
associate-*l/84.1%
div-inv83.9%
sub-neg83.9%
metadata-eval83.9%
distribute-neg-in83.9%
+-commutative83.9%
cancel-sign-sub-inv83.9%
div-inv84.1%
fabs-sub84.1%
add-sqr-sqrt39.5%
fabs-sqr39.5%
add-sqr-sqrt40.2%
sub-neg40.2%
distribute-rgt-neg-in40.2%
Applied egg-rr40.2%
Taylor expanded in z around 0 26.8%
+-commutative26.8%
associate-*r/26.8%
metadata-eval26.8%
Simplified26.8%
Taylor expanded in x around inf 24.9%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (/ 4.0 y_m))
y_m = fabs(y);
double code(double x, double y_m, double z) {
return 4.0 / y_m;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
code = 4.0d0 / y_m
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
return 4.0 / y_m;
}
y_m = math.fabs(y) def code(x, y_m, z): return 4.0 / y_m
y_m = abs(y) function code(x, y_m, z) return Float64(4.0 / y_m) end
y_m = abs(y); function tmp = code(x, y_m, z) tmp = 4.0 / y_m; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := N[(4.0 / y$95$m), $MachinePrecision]
\begin{array}{l}
y_m = \left|y\right|
\\
\frac{4}{y\_m}
\end{array}
Initial program 89.8%
fabs-sub89.8%
associate-*l/89.6%
associate-*r/89.6%
fmm-def92.0%
distribute-neg-frac92.0%
+-commutative92.0%
distribute-neg-in92.0%
unsub-neg92.0%
metadata-eval92.0%
Simplified92.0%
fma-undefine89.6%
associate-*r/89.6%
associate-*l/89.8%
div-inv89.7%
sub-neg89.7%
metadata-eval89.7%
distribute-neg-in89.7%
+-commutative89.7%
cancel-sign-sub-inv89.7%
div-inv89.8%
fabs-sub89.8%
add-sqr-sqrt45.6%
fabs-sqr45.6%
add-sqr-sqrt46.6%
sub-neg46.6%
distribute-rgt-neg-in46.6%
Applied egg-rr46.6%
Taylor expanded in x around 0 18.6%
herbie shell --seed 2024150
(FPCore (x y z)
:name "fabs fraction 1"
:precision binary64
(fabs (- (/ (+ x 4.0) y) (* (/ x y) z))))