
(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 17 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 3e-45) (fabs (* (/ -1.0 y_m) (fma x z (- -4.0 x)))) (fabs (fma x (/ z y_m) (/ (- -4.0 x) y_m)))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (y_m <= 3e-45) {
tmp = fabs(((-1.0 / y_m) * fma(x, z, (-4.0 - x))));
} else {
tmp = fabs(fma(x, (z / y_m), ((-4.0 - x) / y_m)));
}
return tmp;
}
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (y_m <= 3e-45) tmp = abs(Float64(Float64(-1.0 / y_m) * fma(x, z, Float64(-4.0 - x)))); else tmp = abs(fma(x, Float64(z / y_m), Float64(Float64(-4.0 - x) / y_m))); end return tmp end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[y$95$m, 3e-45], N[Abs[N[(N[(-1.0 / y$95$m), $MachinePrecision] * N[(x * z + N[(-4.0 - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(x * N[(z / y$95$m), $MachinePrecision] + N[(N[(-4.0 - x), $MachinePrecision] / y$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;y\_m \leq 3 \cdot 10^{-45}:\\
\;\;\;\;\left|\frac{-1}{y\_m} \cdot \mathsf{fma}\left(x, z, -4 - x\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\mathsf{fma}\left(x, \frac{z}{y\_m}, \frac{-4 - x}{y\_m}\right)\right|\\
\end{array}
\end{array}
if y < 3.00000000000000011e-45Initial program 93.2%
Simplified99.8%
if 3.00000000000000011e-45 < y Initial program 94.5%
fabs-sub94.5%
associate-*l/84.0%
associate-*r/99.8%
fmm-def99.8%
distribute-neg-frac99.8%
+-commutative99.8%
distribute-neg-in99.8%
unsub-neg99.8%
metadata-eval99.8%
Simplified99.8%
y_m = (fabs.f64 y)
(FPCore (x y_m z)
:precision binary64
(let* ((t_0 (/ (+ x 4.0) y_m)) (t_1 (fabs (- (* z (/ x y_m)) t_0))))
(if (or (<= t_1 2e-99) (not (<= t_1 2e+301)))
(fabs (* (/ -1.0 y_m) (fma x z (- -4.0 x))))
(fabs (- t_0 (/ z (/ y_m x)))))))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(((z * (x / y_m)) - t_0));
double tmp;
if ((t_1 <= 2e-99) || !(t_1 <= 2e+301)) {
tmp = fabs(((-1.0 / y_m) * fma(x, z, (-4.0 - x))));
} else {
tmp = fabs((t_0 - (z / (y_m / x))));
}
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(Float64(z * Float64(x / y_m)) - t_0)) tmp = 0.0 if ((t_1 <= 2e-99) || !(t_1 <= 2e+301)) tmp = abs(Float64(Float64(-1.0 / y_m) * fma(x, z, Float64(-4.0 - x)))); else tmp = abs(Float64(t_0 - Float64(z / Float64(y_m / x)))); end return 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[(N[(z * N[(x / y$95$m), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[t$95$1, 2e-99], N[Not[LessEqual[t$95$1, 2e+301]], $MachinePrecision]], N[Abs[N[(N[(-1.0 / y$95$m), $MachinePrecision] * N[(x * z + N[(-4.0 - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(t$95$0 - N[(z / N[(y$95$m / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
t_0 := \frac{x + 4}{y\_m}\\
t_1 := \left|z \cdot \frac{x}{y\_m} - t\_0\right|\\
\mathbf{if}\;t\_1 \leq 2 \cdot 10^{-99} \lor \neg \left(t\_1 \leq 2 \cdot 10^{+301}\right):\\
\;\;\;\;\left|\frac{-1}{y\_m} \cdot \mathsf{fma}\left(x, z, -4 - x\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\left|t\_0 - \frac{z}{\frac{y\_m}{x}}\right|\\
\end{array}
\end{array}
if (fabs.f64 (-.f64 (/.f64 (+.f64 x #s(literal 4 binary64)) y) (*.f64 (/.f64 x y) z))) < 2e-99 or 2.00000000000000011e301 < (fabs.f64 (-.f64 (/.f64 (+.f64 x #s(literal 4 binary64)) y) (*.f64 (/.f64 x y) z))) Initial program 82.3%
Simplified99.9%
if 2e-99 < (fabs.f64 (-.f64 (/.f64 (+.f64 x #s(literal 4 binary64)) y) (*.f64 (/.f64 x y) z))) < 2.00000000000000011e301Initial program 99.8%
*-commutative99.8%
clear-num99.7%
un-div-inv99.8%
Applied egg-rr99.8%
Final simplification99.8%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (let* ((t_0 (fabs (- (* z (/ x y_m)) (/ (+ x 4.0) y_m))))) (if (<= t_0 INFINITY) t_0 (fabs (* (/ -1.0 y_m) (* x z))))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double t_0 = fabs(((z * (x / y_m)) - ((x + 4.0) / y_m)));
double tmp;
if (t_0 <= ((double) INFINITY)) {
tmp = t_0;
} else {
tmp = fabs(((-1.0 / y_m) * (x * z)));
}
return tmp;
}
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double t_0 = Math.abs(((z * (x / y_m)) - ((x + 4.0) / y_m)));
double tmp;
if (t_0 <= Double.POSITIVE_INFINITY) {
tmp = t_0;
} else {
tmp = Math.abs(((-1.0 / y_m) * (x * z)));
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): t_0 = math.fabs(((z * (x / y_m)) - ((x + 4.0) / y_m))) tmp = 0 if t_0 <= math.inf: tmp = t_0 else: tmp = math.fabs(((-1.0 / y_m) * (x * z))) return tmp
y_m = abs(y) function code(x, y_m, z) t_0 = abs(Float64(Float64(z * Float64(x / y_m)) - Float64(Float64(x + 4.0) / y_m))) tmp = 0.0 if (t_0 <= Inf) tmp = t_0; else tmp = abs(Float64(Float64(-1.0 / y_m) * Float64(x * z))); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) t_0 = abs(((z * (x / y_m)) - ((x + 4.0) / y_m))); tmp = 0.0; if (t_0 <= Inf) tmp = t_0; else tmp = abs(((-1.0 / y_m) * (x * z))); 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[(z * N[(x / y$95$m), $MachinePrecision]), $MachinePrecision] - N[(N[(x + 4.0), $MachinePrecision] / y$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$0, Infinity], t$95$0, N[Abs[N[(N[(-1.0 / y$95$m), $MachinePrecision] * N[(x * z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
t_0 := \left|z \cdot \frac{x}{y\_m} - \frac{x + 4}{y\_m}\right|\\
\mathbf{if}\;t\_0 \leq \infty:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{-1}{y\_m} \cdot \left(x \cdot z\right)\right|\\
\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.4%
if +inf.0 < (fabs.f64 (-.f64 (/.f64 (+.f64 x #s(literal 4 binary64)) y) (*.f64 (/.f64 x y) z))) Initial program 0.0%
Simplified100.0%
Taylor expanded in z around inf 53.1%
Final simplification95.7%
y_m = (fabs.f64 y)
(FPCore (x y_m z)
:precision binary64
(let* ((t_0 (* x (/ z y_m))) (t_1 (/ (+ x 4.0) y_m)))
(if (<= x -2.05e-13)
(- t_0 t_1)
(if (<= x 7.5e+193) (+ t_1 (/ z (/ y_m x))) (- t_1 t_0)))))y_m = fabs(y);
double code(double x, double y_m, double z) {
double t_0 = x * (z / y_m);
double t_1 = (x + 4.0) / y_m;
double tmp;
if (x <= -2.05e-13) {
tmp = t_0 - t_1;
} else if (x <= 7.5e+193) {
tmp = t_1 + (z / (y_m / x));
} else {
tmp = t_1 - t_0;
}
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) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x * (z / y_m)
t_1 = (x + 4.0d0) / y_m
if (x <= (-2.05d-13)) then
tmp = t_0 - t_1
else if (x <= 7.5d+193) then
tmp = t_1 + (z / (y_m / x))
else
tmp = t_1 - t_0
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double t_0 = x * (z / y_m);
double t_1 = (x + 4.0) / y_m;
double tmp;
if (x <= -2.05e-13) {
tmp = t_0 - t_1;
} else if (x <= 7.5e+193) {
tmp = t_1 + (z / (y_m / x));
} else {
tmp = t_1 - t_0;
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): t_0 = x * (z / y_m) t_1 = (x + 4.0) / y_m tmp = 0 if x <= -2.05e-13: tmp = t_0 - t_1 elif x <= 7.5e+193: tmp = t_1 + (z / (y_m / x)) else: tmp = t_1 - t_0 return tmp
y_m = abs(y) function code(x, y_m, z) t_0 = Float64(x * Float64(z / y_m)) t_1 = Float64(Float64(x + 4.0) / y_m) tmp = 0.0 if (x <= -2.05e-13) tmp = Float64(t_0 - t_1); elseif (x <= 7.5e+193) tmp = Float64(t_1 + Float64(z / Float64(y_m / x))); else tmp = Float64(t_1 - t_0); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) t_0 = x * (z / y_m); t_1 = (x + 4.0) / y_m; tmp = 0.0; if (x <= -2.05e-13) tmp = t_0 - t_1; elseif (x <= 7.5e+193) tmp = t_1 + (z / (y_m / x)); else tmp = t_1 - t_0; end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision]
code[x_, y$95$m_, z_] := Block[{t$95$0 = N[(x * N[(z / y$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x + 4.0), $MachinePrecision] / y$95$m), $MachinePrecision]}, If[LessEqual[x, -2.05e-13], N[(t$95$0 - t$95$1), $MachinePrecision], If[LessEqual[x, 7.5e+193], N[(t$95$1 + N[(z / N[(y$95$m / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
t_0 := x \cdot \frac{z}{y\_m}\\
t_1 := \frac{x + 4}{y\_m}\\
\mathbf{if}\;x \leq -2.05 \cdot 10^{-13}:\\
\;\;\;\;t\_0 - t\_1\\
\mathbf{elif}\;x \leq 7.5 \cdot 10^{+193}:\\
\;\;\;\;t\_1 + \frac{z}{\frac{y\_m}{x}}\\
\mathbf{else}:\\
\;\;\;\;t\_1 - t\_0\\
\end{array}
\end{array}
if x < -2.0500000000000001e-13Initial program 92.1%
fabs-sub92.1%
associate-*l/89.3%
associate-*r/96.8%
fmm-def98.4%
distribute-neg-frac98.4%
+-commutative98.4%
distribute-neg-in98.4%
unsub-neg98.4%
metadata-eval98.4%
Simplified98.4%
add-sqr-sqrt52.9%
fabs-sqr52.9%
add-sqr-sqrt53.5%
fma-undefine53.5%
associate-*r/50.5%
associate-*l/53.4%
div-inv53.4%
sub-neg53.4%
metadata-eval53.4%
distribute-neg-in53.4%
+-commutative53.4%
cancel-sign-sub-inv53.4%
div-inv53.4%
associate-*l/50.5%
associate-*r/53.5%
Applied egg-rr53.5%
if -2.0500000000000001e-13 < x < 7.5000000000000008e193Initial program 94.2%
fabs-sub94.2%
associate-*l/96.0%
associate-*r/91.8%
fmm-def93.5%
distribute-neg-frac93.5%
+-commutative93.5%
distribute-neg-in93.5%
unsub-neg93.5%
metadata-eval93.5%
Simplified93.5%
fma-undefine91.8%
associate-*r/96.0%
associate-*l/94.2%
div-inv94.1%
sub-neg94.1%
metadata-eval94.1%
distribute-neg-in94.1%
+-commutative94.1%
cancel-sign-sub-inv94.1%
div-inv94.2%
fabs-sub94.2%
add-sqr-sqrt54.6%
fabs-sqr54.6%
add-sqr-sqrt55.6%
associate-*l/56.7%
associate-*r/53.0%
Applied egg-rr53.0%
*-commutative53.0%
associate-/r/55.7%
frac-2neg55.7%
add-sqr-sqrt24.9%
sqrt-unprod43.8%
sqr-neg43.8%
sqrt-unprod28.2%
add-sqr-sqrt48.7%
Applied egg-rr48.7%
if 7.5000000000000008e193 < x Initial program 93.9%
fabs-sub93.9%
associate-*l/78.2%
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%
fma-undefine99.7%
associate-*r/78.2%
associate-*l/93.9%
div-inv93.8%
sub-neg93.8%
metadata-eval93.8%
distribute-neg-in93.8%
+-commutative93.8%
cancel-sign-sub-inv93.8%
div-inv93.9%
fabs-sub93.9%
add-sqr-sqrt58.5%
fabs-sqr58.5%
add-sqr-sqrt58.8%
associate-*l/37.2%
associate-*r/58.7%
Applied egg-rr58.7%
Final simplification50.5%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x -4.0) (- (* x (/ z y_m)) (/ (+ x 4.0) y_m)) (if (<= x 2.3e+16) (/ (- (+ x 4.0) (* x z)) y_m) (* x (/ (- 1.0 z) y_m)))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= -4.0) {
tmp = (x * (z / y_m)) - ((x + 4.0) / y_m);
} else if (x <= 2.3e+16) {
tmp = ((x + 4.0) - (x * z)) / y_m;
} else {
tmp = x * ((1.0 - z) / 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 = (x * (z / y_m)) - ((x + 4.0d0) / y_m)
else if (x <= 2.3d+16) then
tmp = ((x + 4.0d0) - (x * z)) / y_m
else
tmp = x * ((1.0d0 - z) / 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 = (x * (z / y_m)) - ((x + 4.0) / y_m);
} else if (x <= 2.3e+16) {
tmp = ((x + 4.0) - (x * z)) / y_m;
} else {
tmp = x * ((1.0 - z) / y_m);
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= -4.0: tmp = (x * (z / y_m)) - ((x + 4.0) / y_m) elif x <= 2.3e+16: tmp = ((x + 4.0) - (x * z)) / y_m else: tmp = x * ((1.0 - z) / y_m) return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= -4.0) tmp = Float64(Float64(x * Float64(z / y_m)) - Float64(Float64(x + 4.0) / y_m)); elseif (x <= 2.3e+16) tmp = Float64(Float64(Float64(x + 4.0) - Float64(x * z)) / y_m); else tmp = Float64(x * Float64(Float64(1.0 - z) / 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 = (x * (z / y_m)) - ((x + 4.0) / y_m); elseif (x <= 2.3e+16) tmp = ((x + 4.0) - (x * z)) / y_m; else tmp = x * ((1.0 - z) / 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[(N[(x * N[(z / y$95$m), $MachinePrecision]), $MachinePrecision] - N[(N[(x + 4.0), $MachinePrecision] / y$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.3e+16], N[(N[(N[(x + 4.0), $MachinePrecision] - N[(x * z), $MachinePrecision]), $MachinePrecision] / y$95$m), $MachinePrecision], N[(x * N[(N[(1.0 - z), $MachinePrecision] / y$95$m), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4:\\
\;\;\;\;x \cdot \frac{z}{y\_m} - \frac{x + 4}{y\_m}\\
\mathbf{elif}\;x \leq 2.3 \cdot 10^{+16}:\\
\;\;\;\;\frac{\left(x + 4\right) - x \cdot z}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{1 - z}{y\_m}\\
\end{array}
\end{array}
if x < -4Initial program 92.0%
fabs-sub92.0%
associate-*l/89.2%
associate-*r/96.8%
fmm-def98.3%
distribute-neg-frac98.3%
+-commutative98.3%
distribute-neg-in98.3%
unsub-neg98.3%
metadata-eval98.3%
Simplified98.3%
add-sqr-sqrt52.2%
fabs-sqr52.2%
add-sqr-sqrt52.7%
fma-undefine52.7%
associate-*r/49.7%
associate-*l/52.7%
div-inv52.6%
sub-neg52.6%
metadata-eval52.6%
distribute-neg-in52.6%
+-commutative52.6%
cancel-sign-sub-inv52.6%
div-inv52.7%
associate-*l/49.7%
associate-*r/52.7%
Applied egg-rr52.7%
if -4 < x < 2.3e16Initial program 95.3%
fabs-sub95.3%
associate-*l/99.9%
associate-*r/91.4%
fmm-def91.4%
distribute-neg-frac91.4%
+-commutative91.4%
distribute-neg-in91.4%
unsub-neg91.4%
metadata-eval91.4%
Simplified91.4%
fma-undefine91.4%
associate-*r/99.9%
associate-*l/95.3%
div-inv95.3%
sub-neg95.3%
metadata-eval95.3%
distribute-neg-in95.3%
+-commutative95.3%
cancel-sign-sub-inv95.3%
div-inv95.3%
fabs-sub95.3%
add-sqr-sqrt56.3%
fabs-sqr56.3%
add-sqr-sqrt57.4%
associate-*l/60.2%
sub-div60.2%
Applied egg-rr60.2%
if 2.3e16 < x Initial program 91.8%
fabs-sub91.8%
associate-*l/83.0%
associate-*r/95.0%
fmm-def99.8%
distribute-neg-frac99.8%
+-commutative99.8%
distribute-neg-in99.8%
unsub-neg99.8%
metadata-eval99.8%
Simplified99.8%
fma-undefine95.0%
associate-*r/83.0%
associate-*l/91.8%
div-inv91.6%
sub-neg91.6%
metadata-eval91.6%
distribute-neg-in91.6%
+-commutative91.6%
cancel-sign-sub-inv91.6%
div-inv91.8%
fabs-sub91.8%
add-sqr-sqrt51.2%
fabs-sqr51.2%
add-sqr-sqrt51.8%
associate-*l/43.0%
sub-div44.6%
Applied egg-rr44.6%
Taylor expanded in x around inf 44.6%
associate-/l*55.0%
Simplified55.0%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x -3.4) (* (/ x y_m) (+ -1.0 z)) (if (<= x 5e+16) (/ (- (+ x 4.0) (* x z)) y_m) (* x (/ (- 1.0 z) y_m)))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= -3.4) {
tmp = (x / y_m) * (-1.0 + z);
} else if (x <= 5e+16) {
tmp = ((x + 4.0) - (x * z)) / y_m;
} else {
tmp = x * ((1.0 - z) / 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 <= (-3.4d0)) then
tmp = (x / y_m) * ((-1.0d0) + z)
else if (x <= 5d+16) then
tmp = ((x + 4.0d0) - (x * z)) / y_m
else
tmp = x * ((1.0d0 - z) / 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 <= -3.4) {
tmp = (x / y_m) * (-1.0 + z);
} else if (x <= 5e+16) {
tmp = ((x + 4.0) - (x * z)) / y_m;
} else {
tmp = x * ((1.0 - z) / y_m);
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= -3.4: tmp = (x / y_m) * (-1.0 + z) elif x <= 5e+16: tmp = ((x + 4.0) - (x * z)) / y_m else: tmp = x * ((1.0 - z) / y_m) return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= -3.4) tmp = Float64(Float64(x / y_m) * Float64(-1.0 + z)); elseif (x <= 5e+16) tmp = Float64(Float64(Float64(x + 4.0) - Float64(x * z)) / y_m); else tmp = Float64(x * Float64(Float64(1.0 - z) / y_m)); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (x <= -3.4) tmp = (x / y_m) * (-1.0 + z); elseif (x <= 5e+16) tmp = ((x + 4.0) - (x * z)) / y_m; else tmp = x * ((1.0 - z) / y_m); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[x, -3.4], N[(N[(x / y$95$m), $MachinePrecision] * N[(-1.0 + z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5e+16], N[(N[(N[(x + 4.0), $MachinePrecision] - N[(x * z), $MachinePrecision]), $MachinePrecision] / y$95$m), $MachinePrecision], N[(x * N[(N[(1.0 - z), $MachinePrecision] / y$95$m), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.4:\\
\;\;\;\;\frac{x}{y\_m} \cdot \left(-1 + z\right)\\
\mathbf{elif}\;x \leq 5 \cdot 10^{+16}:\\
\;\;\;\;\frac{\left(x + 4\right) - x \cdot z}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{1 - z}{y\_m}\\
\end{array}
\end{array}
if x < -3.39999999999999991Initial program 92.0%
fabs-sub92.0%
associate-*l/89.2%
associate-*r/96.8%
fmm-def98.3%
distribute-neg-frac98.3%
+-commutative98.3%
distribute-neg-in98.3%
unsub-neg98.3%
metadata-eval98.3%
Simplified98.3%
add-sqr-sqrt52.2%
fabs-sqr52.2%
add-sqr-sqrt52.7%
fma-undefine52.7%
associate-*r/49.7%
associate-*l/52.7%
div-inv52.6%
sub-neg52.6%
metadata-eval52.6%
distribute-neg-in52.6%
+-commutative52.6%
cancel-sign-sub-inv52.6%
div-inv52.7%
associate-*l/49.7%
sub-div49.7%
Applied egg-rr49.7%
Taylor expanded in x around inf 48.3%
div-sub48.3%
*-commutative48.3%
associate-*r/51.3%
*-un-lft-identity51.3%
distribute-rgt-out--51.3%
Applied egg-rr51.3%
if -3.39999999999999991 < x < 5e16Initial program 95.3%
fabs-sub95.3%
associate-*l/99.9%
associate-*r/91.4%
fmm-def91.4%
distribute-neg-frac91.4%
+-commutative91.4%
distribute-neg-in91.4%
unsub-neg91.4%
metadata-eval91.4%
Simplified91.4%
fma-undefine91.4%
associate-*r/99.9%
associate-*l/95.3%
div-inv95.3%
sub-neg95.3%
metadata-eval95.3%
distribute-neg-in95.3%
+-commutative95.3%
cancel-sign-sub-inv95.3%
div-inv95.3%
fabs-sub95.3%
add-sqr-sqrt56.3%
fabs-sqr56.3%
add-sqr-sqrt57.4%
associate-*l/60.2%
sub-div60.2%
Applied egg-rr60.2%
if 5e16 < x Initial program 91.8%
fabs-sub91.8%
associate-*l/83.0%
associate-*r/95.0%
fmm-def99.8%
distribute-neg-frac99.8%
+-commutative99.8%
distribute-neg-in99.8%
unsub-neg99.8%
metadata-eval99.8%
Simplified99.8%
fma-undefine95.0%
associate-*r/83.0%
associate-*l/91.8%
div-inv91.6%
sub-neg91.6%
metadata-eval91.6%
distribute-neg-in91.6%
+-commutative91.6%
cancel-sign-sub-inv91.6%
div-inv91.8%
fabs-sub91.8%
add-sqr-sqrt51.2%
fabs-sqr51.2%
add-sqr-sqrt51.8%
associate-*l/43.0%
sub-div44.6%
Applied egg-rr44.6%
Taylor expanded in x around inf 44.6%
associate-/l*55.0%
Simplified55.0%
Final simplification56.8%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x -0.18) (* (/ x y_m) (+ -1.0 z)) (if (<= x 4.0) (/ (- 4.0 (* x z)) y_m) (* x (/ (- 1.0 z) y_m)))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= -0.18) {
tmp = (x / y_m) * (-1.0 + z);
} else if (x <= 4.0) {
tmp = (4.0 - (x * z)) / y_m;
} else {
tmp = x * ((1.0 - z) / 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 <= (-0.18d0)) then
tmp = (x / y_m) * ((-1.0d0) + z)
else if (x <= 4.0d0) then
tmp = (4.0d0 - (x * z)) / y_m
else
tmp = x * ((1.0d0 - z) / 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 <= -0.18) {
tmp = (x / y_m) * (-1.0 + z);
} else if (x <= 4.0) {
tmp = (4.0 - (x * z)) / y_m;
} else {
tmp = x * ((1.0 - z) / y_m);
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= -0.18: tmp = (x / y_m) * (-1.0 + z) elif x <= 4.0: tmp = (4.0 - (x * z)) / y_m else: tmp = x * ((1.0 - z) / y_m) return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= -0.18) tmp = Float64(Float64(x / y_m) * Float64(-1.0 + z)); elseif (x <= 4.0) tmp = Float64(Float64(4.0 - Float64(x * z)) / y_m); else tmp = Float64(x * Float64(Float64(1.0 - z) / y_m)); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (x <= -0.18) tmp = (x / y_m) * (-1.0 + z); elseif (x <= 4.0) tmp = (4.0 - (x * z)) / y_m; else tmp = x * ((1.0 - z) / y_m); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[x, -0.18], N[(N[(x / y$95$m), $MachinePrecision] * N[(-1.0 + z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.0], N[(N[(4.0 - N[(x * z), $MachinePrecision]), $MachinePrecision] / y$95$m), $MachinePrecision], N[(x * N[(N[(1.0 - z), $MachinePrecision] / y$95$m), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.18:\\
\;\;\;\;\frac{x}{y\_m} \cdot \left(-1 + z\right)\\
\mathbf{elif}\;x \leq 4:\\
\;\;\;\;\frac{4 - x \cdot z}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{1 - z}{y\_m}\\
\end{array}
\end{array}
if x < -0.17999999999999999Initial program 92.0%
fabs-sub92.0%
associate-*l/89.2%
associate-*r/96.8%
fmm-def98.3%
distribute-neg-frac98.3%
+-commutative98.3%
distribute-neg-in98.3%
unsub-neg98.3%
metadata-eval98.3%
Simplified98.3%
add-sqr-sqrt52.2%
fabs-sqr52.2%
add-sqr-sqrt52.7%
fma-undefine52.7%
associate-*r/49.7%
associate-*l/52.7%
div-inv52.6%
sub-neg52.6%
metadata-eval52.6%
distribute-neg-in52.6%
+-commutative52.6%
cancel-sign-sub-inv52.6%
div-inv52.7%
associate-*l/49.7%
sub-div49.7%
Applied egg-rr49.7%
Taylor expanded in x around inf 48.3%
div-sub48.3%
*-commutative48.3%
associate-*r/51.3%
*-un-lft-identity51.3%
distribute-rgt-out--51.3%
Applied egg-rr51.3%
if -0.17999999999999999 < x < 4Initial program 95.1%
fabs-sub95.1%
associate-*l/99.9%
associate-*r/91.0%
fmm-def91.0%
distribute-neg-frac91.0%
+-commutative91.0%
distribute-neg-in91.0%
unsub-neg91.0%
metadata-eval91.0%
Simplified91.0%
fma-undefine91.0%
associate-*r/99.9%
associate-*l/95.1%
div-inv95.1%
sub-neg95.1%
metadata-eval95.1%
distribute-neg-in95.1%
+-commutative95.1%
cancel-sign-sub-inv95.1%
div-inv95.1%
fabs-sub95.1%
add-sqr-sqrt56.6%
fabs-sqr56.6%
add-sqr-sqrt57.8%
associate-*l/60.7%
sub-div60.7%
Applied egg-rr60.7%
Taylor expanded in x around 0 60.1%
if 4 < x Initial program 92.4%
fabs-sub92.4%
associate-*l/84.5%
associate-*r/95.4%
fmm-def99.8%
distribute-neg-frac99.8%
+-commutative99.8%
distribute-neg-in99.8%
unsub-neg99.8%
metadata-eval99.8%
Simplified99.8%
fma-undefine95.4%
associate-*r/84.5%
associate-*l/92.4%
div-inv92.3%
sub-neg92.3%
metadata-eval92.3%
distribute-neg-in92.3%
+-commutative92.3%
cancel-sign-sub-inv92.3%
div-inv92.4%
fabs-sub92.4%
add-sqr-sqrt51.1%
fabs-sqr51.1%
add-sqr-sqrt51.7%
associate-*l/43.7%
sub-div45.1%
Applied egg-rr45.1%
Taylor expanded in x around inf 44.2%
associate-/l*53.7%
Simplified53.7%
Final simplification56.2%
y_m = (fabs.f64 y)
(FPCore (x y_m z)
:precision binary64
(if (<= x -4.0)
(* (/ x y_m) (+ -1.0 z))
(if (<= x 206000000000.0)
(+ (/ x y_m) (/ 4.0 y_m))
(* x (/ (- 1.0 z) y_m)))))y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= -4.0) {
tmp = (x / y_m) * (-1.0 + z);
} else if (x <= 206000000000.0) {
tmp = (x / y_m) + (4.0 / y_m);
} else {
tmp = x * ((1.0 - z) / 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 = (x / y_m) * ((-1.0d0) + z)
else if (x <= 206000000000.0d0) then
tmp = (x / y_m) + (4.0d0 / y_m)
else
tmp = x * ((1.0d0 - z) / 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 = (x / y_m) * (-1.0 + z);
} else if (x <= 206000000000.0) {
tmp = (x / y_m) + (4.0 / y_m);
} else {
tmp = x * ((1.0 - z) / y_m);
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= -4.0: tmp = (x / y_m) * (-1.0 + z) elif x <= 206000000000.0: tmp = (x / y_m) + (4.0 / y_m) else: tmp = x * ((1.0 - z) / y_m) return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= -4.0) tmp = Float64(Float64(x / y_m) * Float64(-1.0 + z)); elseif (x <= 206000000000.0) tmp = Float64(Float64(x / y_m) + Float64(4.0 / y_m)); else tmp = Float64(x * Float64(Float64(1.0 - z) / 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 = (x / y_m) * (-1.0 + z); elseif (x <= 206000000000.0) tmp = (x / y_m) + (4.0 / y_m); else tmp = x * ((1.0 - z) / 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[(N[(x / y$95$m), $MachinePrecision] * N[(-1.0 + z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 206000000000.0], N[(N[(x / y$95$m), $MachinePrecision] + N[(4.0 / y$95$m), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(1.0 - z), $MachinePrecision] / y$95$m), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4:\\
\;\;\;\;\frac{x}{y\_m} \cdot \left(-1 + z\right)\\
\mathbf{elif}\;x \leq 206000000000:\\
\;\;\;\;\frac{x}{y\_m} + \frac{4}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{1 - z}{y\_m}\\
\end{array}
\end{array}
if x < -4Initial program 92.0%
fabs-sub92.0%
associate-*l/89.2%
associate-*r/96.8%
fmm-def98.3%
distribute-neg-frac98.3%
+-commutative98.3%
distribute-neg-in98.3%
unsub-neg98.3%
metadata-eval98.3%
Simplified98.3%
add-sqr-sqrt52.2%
fabs-sqr52.2%
add-sqr-sqrt52.7%
fma-undefine52.7%
associate-*r/49.7%
associate-*l/52.7%
div-inv52.6%
sub-neg52.6%
metadata-eval52.6%
distribute-neg-in52.6%
+-commutative52.6%
cancel-sign-sub-inv52.6%
div-inv52.7%
associate-*l/49.7%
sub-div49.7%
Applied egg-rr49.7%
Taylor expanded in x around inf 48.3%
div-sub48.3%
*-commutative48.3%
associate-*r/51.3%
*-un-lft-identity51.3%
distribute-rgt-out--51.3%
Applied egg-rr51.3%
if -4 < x < 2.06e11Initial program 95.3%
fabs-sub95.3%
associate-*l/99.9%
associate-*r/91.3%
fmm-def91.3%
distribute-neg-frac91.3%
+-commutative91.3%
distribute-neg-in91.3%
unsub-neg91.3%
metadata-eval91.3%
Simplified91.3%
fma-undefine91.3%
associate-*r/99.9%
associate-*l/95.3%
div-inv95.3%
sub-neg95.3%
metadata-eval95.3%
distribute-neg-in95.3%
+-commutative95.3%
cancel-sign-sub-inv95.3%
div-inv95.3%
fabs-sub95.3%
add-sqr-sqrt56.4%
fabs-sqr56.4%
add-sqr-sqrt57.5%
associate-*l/60.4%
associate-*r/53.2%
Applied egg-rr53.2%
*-commutative53.2%
associate-/r/57.6%
frac-2neg57.6%
add-sqr-sqrt25.3%
sqrt-unprod43.9%
sqr-neg43.9%
sqrt-unprod28.4%
add-sqr-sqrt53.0%
Applied egg-rr53.0%
Taylor expanded in z around 0 42.8%
+-commutative42.8%
associate-*r/42.8%
metadata-eval42.8%
Simplified42.8%
if 2.06e11 < x Initial program 92.0%
fabs-sub92.0%
associate-*l/83.5%
associate-*r/95.1%
fmm-def99.8%
distribute-neg-frac99.8%
+-commutative99.8%
distribute-neg-in99.8%
unsub-neg99.8%
metadata-eval99.8%
Simplified99.8%
fma-undefine95.1%
associate-*r/83.5%
associate-*l/92.0%
div-inv91.9%
sub-neg91.9%
metadata-eval91.9%
distribute-neg-in91.9%
+-commutative91.9%
cancel-sign-sub-inv91.9%
div-inv92.0%
fabs-sub92.0%
add-sqr-sqrt51.2%
fabs-sqr51.2%
add-sqr-sqrt51.8%
associate-*l/43.2%
sub-div44.8%
Applied egg-rr44.8%
Taylor expanded in x around inf 44.6%
associate-/l*54.7%
Simplified54.7%
Final simplification47.9%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x -4.0) (* (/ x y_m) (+ -1.0 z)) (if (<= x 32500000000.0) (/ (+ x 4.0) y_m) (* x (/ (- 1.0 z) y_m)))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= -4.0) {
tmp = (x / y_m) * (-1.0 + z);
} else if (x <= 32500000000.0) {
tmp = (x + 4.0) / y_m;
} else {
tmp = x * ((1.0 - z) / 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 = (x / y_m) * ((-1.0d0) + z)
else if (x <= 32500000000.0d0) then
tmp = (x + 4.0d0) / y_m
else
tmp = x * ((1.0d0 - z) / 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 = (x / y_m) * (-1.0 + z);
} else if (x <= 32500000000.0) {
tmp = (x + 4.0) / y_m;
} else {
tmp = x * ((1.0 - z) / y_m);
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= -4.0: tmp = (x / y_m) * (-1.0 + z) elif x <= 32500000000.0: tmp = (x + 4.0) / y_m else: tmp = x * ((1.0 - z) / y_m) return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= -4.0) tmp = Float64(Float64(x / y_m) * Float64(-1.0 + z)); elseif (x <= 32500000000.0) tmp = Float64(Float64(x + 4.0) / y_m); else tmp = Float64(x * Float64(Float64(1.0 - z) / 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 = (x / y_m) * (-1.0 + z); elseif (x <= 32500000000.0) tmp = (x + 4.0) / y_m; else tmp = x * ((1.0 - z) / 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[(N[(x / y$95$m), $MachinePrecision] * N[(-1.0 + z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 32500000000.0], N[(N[(x + 4.0), $MachinePrecision] / y$95$m), $MachinePrecision], N[(x * N[(N[(1.0 - z), $MachinePrecision] / y$95$m), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4:\\
\;\;\;\;\frac{x}{y\_m} \cdot \left(-1 + z\right)\\
\mathbf{elif}\;x \leq 32500000000:\\
\;\;\;\;\frac{x + 4}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{1 - z}{y\_m}\\
\end{array}
\end{array}
if x < -4Initial program 92.0%
fabs-sub92.0%
associate-*l/89.2%
associate-*r/96.8%
fmm-def98.3%
distribute-neg-frac98.3%
+-commutative98.3%
distribute-neg-in98.3%
unsub-neg98.3%
metadata-eval98.3%
Simplified98.3%
add-sqr-sqrt52.2%
fabs-sqr52.2%
add-sqr-sqrt52.7%
fma-undefine52.7%
associate-*r/49.7%
associate-*l/52.7%
div-inv52.6%
sub-neg52.6%
metadata-eval52.6%
distribute-neg-in52.6%
+-commutative52.6%
cancel-sign-sub-inv52.6%
div-inv52.7%
associate-*l/49.7%
sub-div49.7%
Applied egg-rr49.7%
Taylor expanded in x around inf 48.3%
div-sub48.3%
*-commutative48.3%
associate-*r/51.3%
*-un-lft-identity51.3%
distribute-rgt-out--51.3%
Applied egg-rr51.3%
if -4 < x < 3.25e10Initial program 95.3%
fabs-sub95.3%
associate-*l/99.9%
associate-*r/91.3%
fmm-def91.3%
distribute-neg-frac91.3%
+-commutative91.3%
distribute-neg-in91.3%
unsub-neg91.3%
metadata-eval91.3%
Simplified91.3%
fma-undefine91.3%
associate-*r/99.9%
associate-*l/95.3%
div-inv95.3%
sub-neg95.3%
metadata-eval95.3%
distribute-neg-in95.3%
+-commutative95.3%
cancel-sign-sub-inv95.3%
div-inv95.3%
fabs-sub95.3%
add-sqr-sqrt56.4%
fabs-sqr56.4%
add-sqr-sqrt57.5%
associate-*l/60.4%
clear-num60.4%
frac-sub34.1%
Applied egg-rr34.1%
Taylor expanded in z around 0 42.8%
+-commutative42.8%
Simplified42.8%
if 3.25e10 < x Initial program 92.0%
fabs-sub92.0%
associate-*l/83.5%
associate-*r/95.1%
fmm-def99.8%
distribute-neg-frac99.8%
+-commutative99.8%
distribute-neg-in99.8%
unsub-neg99.8%
metadata-eval99.8%
Simplified99.8%
fma-undefine95.1%
associate-*r/83.5%
associate-*l/92.0%
div-inv91.9%
sub-neg91.9%
metadata-eval91.9%
distribute-neg-in91.9%
+-commutative91.9%
cancel-sign-sub-inv91.9%
div-inv92.0%
fabs-sub92.0%
add-sqr-sqrt51.2%
fabs-sqr51.2%
add-sqr-sqrt51.8%
associate-*l/43.2%
sub-div44.8%
Applied egg-rr44.8%
Taylor expanded in x around inf 44.6%
associate-/l*54.7%
Simplified54.7%
Final simplification47.9%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x -4.0) (* x (/ (+ -1.0 z) y_m)) (if (<= x 280000000000.0) (/ (+ x 4.0) y_m) (* x (/ (- 1.0 z) y_m)))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= -4.0) {
tmp = x * ((-1.0 + z) / y_m);
} else if (x <= 280000000000.0) {
tmp = (x + 4.0) / y_m;
} else {
tmp = x * ((1.0 - z) / 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 = x * (((-1.0d0) + z) / y_m)
else if (x <= 280000000000.0d0) then
tmp = (x + 4.0d0) / y_m
else
tmp = x * ((1.0d0 - z) / 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 = x * ((-1.0 + z) / y_m);
} else if (x <= 280000000000.0) {
tmp = (x + 4.0) / y_m;
} else {
tmp = x * ((1.0 - z) / y_m);
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= -4.0: tmp = x * ((-1.0 + z) / y_m) elif x <= 280000000000.0: tmp = (x + 4.0) / y_m else: tmp = x * ((1.0 - z) / y_m) return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= -4.0) tmp = Float64(x * Float64(Float64(-1.0 + z) / y_m)); elseif (x <= 280000000000.0) tmp = Float64(Float64(x + 4.0) / y_m); else tmp = Float64(x * Float64(Float64(1.0 - z) / 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 = x * ((-1.0 + z) / y_m); elseif (x <= 280000000000.0) tmp = (x + 4.0) / y_m; else tmp = x * ((1.0 - z) / 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[(x * N[(N[(-1.0 + z), $MachinePrecision] / y$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 280000000000.0], N[(N[(x + 4.0), $MachinePrecision] / y$95$m), $MachinePrecision], N[(x * N[(N[(1.0 - z), $MachinePrecision] / y$95$m), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4:\\
\;\;\;\;x \cdot \frac{-1 + z}{y\_m}\\
\mathbf{elif}\;x \leq 280000000000:\\
\;\;\;\;\frac{x + 4}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{1 - z}{y\_m}\\
\end{array}
\end{array}
if x < -4Initial program 92.0%
fabs-sub92.0%
associate-*l/89.2%
associate-*r/96.8%
fmm-def98.3%
distribute-neg-frac98.3%
+-commutative98.3%
distribute-neg-in98.3%
unsub-neg98.3%
metadata-eval98.3%
Simplified98.3%
add-sqr-sqrt52.2%
fabs-sqr52.2%
add-sqr-sqrt52.7%
fma-undefine52.7%
associate-*r/49.7%
associate-*l/52.7%
div-inv52.6%
sub-neg52.6%
metadata-eval52.6%
distribute-neg-in52.6%
+-commutative52.6%
cancel-sign-sub-inv52.6%
div-inv52.7%
associate-*l/49.7%
sub-div49.7%
Applied egg-rr49.7%
Taylor expanded in x around inf 48.3%
associate-/l*51.2%
sub-neg51.2%
metadata-eval51.2%
Simplified51.2%
if -4 < x < 2.8e11Initial program 95.3%
fabs-sub95.3%
associate-*l/99.9%
associate-*r/91.3%
fmm-def91.3%
distribute-neg-frac91.3%
+-commutative91.3%
distribute-neg-in91.3%
unsub-neg91.3%
metadata-eval91.3%
Simplified91.3%
fma-undefine91.3%
associate-*r/99.9%
associate-*l/95.3%
div-inv95.3%
sub-neg95.3%
metadata-eval95.3%
distribute-neg-in95.3%
+-commutative95.3%
cancel-sign-sub-inv95.3%
div-inv95.3%
fabs-sub95.3%
add-sqr-sqrt56.4%
fabs-sqr56.4%
add-sqr-sqrt57.5%
associate-*l/60.4%
clear-num60.4%
frac-sub34.1%
Applied egg-rr34.1%
Taylor expanded in z around 0 42.8%
+-commutative42.8%
Simplified42.8%
if 2.8e11 < x Initial program 92.0%
fabs-sub92.0%
associate-*l/83.5%
associate-*r/95.1%
fmm-def99.8%
distribute-neg-frac99.8%
+-commutative99.8%
distribute-neg-in99.8%
unsub-neg99.8%
metadata-eval99.8%
Simplified99.8%
fma-undefine95.1%
associate-*r/83.5%
associate-*l/92.0%
div-inv91.9%
sub-neg91.9%
metadata-eval91.9%
distribute-neg-in91.9%
+-commutative91.9%
cancel-sign-sub-inv91.9%
div-inv92.0%
fabs-sub92.0%
add-sqr-sqrt51.2%
fabs-sqr51.2%
add-sqr-sqrt51.8%
associate-*l/43.2%
sub-div44.8%
Applied egg-rr44.8%
Taylor expanded in x around inf 44.6%
associate-/l*54.7%
Simplified54.7%
Final simplification47.8%
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(Float64(-x) / 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 92.0%
fabs-sub92.0%
associate-*l/89.2%
associate-*r/96.8%
fmm-def98.3%
distribute-neg-frac98.3%
+-commutative98.3%
distribute-neg-in98.3%
unsub-neg98.3%
metadata-eval98.3%
Simplified98.3%
add-sqr-sqrt52.2%
fabs-sqr52.2%
add-sqr-sqrt52.7%
fma-undefine52.7%
associate-*r/49.7%
associate-*l/52.7%
div-inv52.6%
sub-neg52.6%
metadata-eval52.6%
distribute-neg-in52.6%
+-commutative52.6%
cancel-sign-sub-inv52.6%
div-inv52.7%
associate-*l/49.7%
sub-div49.7%
Applied egg-rr49.7%
Taylor expanded in x around inf 48.3%
Taylor expanded in z around 0 29.5%
mul-1-neg29.5%
distribute-frac-neg29.5%
Simplified29.5%
if -10.5 < x < 4Initial program 95.1%
fabs-sub95.1%
associate-*l/99.9%
associate-*r/91.0%
fmm-def91.0%
distribute-neg-frac91.0%
+-commutative91.0%
distribute-neg-in91.0%
unsub-neg91.0%
metadata-eval91.0%
Simplified91.0%
fma-undefine91.0%
associate-*r/99.9%
associate-*l/95.1%
div-inv95.1%
sub-neg95.1%
metadata-eval95.1%
distribute-neg-in95.1%
+-commutative95.1%
cancel-sign-sub-inv95.1%
div-inv95.1%
fabs-sub95.1%
add-sqr-sqrt56.6%
fabs-sqr56.6%
add-sqr-sqrt57.8%
associate-*l/60.7%
associate-*r/53.3%
Applied egg-rr53.3%
*-commutative53.3%
associate-/r/57.8%
frac-2neg57.8%
add-sqr-sqrt25.3%
sqrt-unprod44.5%
sqr-neg44.5%
sqrt-unprod28.5%
add-sqr-sqrt53.1%
Applied egg-rr53.1%
Taylor expanded in x around 0 42.8%
if 4 < x Initial program 92.4%
fabs-sub92.4%
associate-*l/84.5%
associate-*r/95.4%
fmm-def99.8%
distribute-neg-frac99.8%
+-commutative99.8%
distribute-neg-in99.8%
unsub-neg99.8%
metadata-eval99.8%
Simplified99.8%
fma-undefine95.4%
associate-*r/84.5%
associate-*l/92.4%
div-inv92.3%
sub-neg92.3%
metadata-eval92.3%
distribute-neg-in92.3%
+-commutative92.3%
cancel-sign-sub-inv92.3%
div-inv92.4%
fabs-sub92.4%
add-sqr-sqrt51.1%
fabs-sqr51.1%
add-sqr-sqrt51.7%
associate-*l/43.7%
associate-*r/53.2%
Applied egg-rr53.2%
*-commutative53.2%
associate-/r/51.8%
frac-2neg51.8%
add-sqr-sqrt27.9%
sqrt-unprod40.2%
sqr-neg40.2%
sqrt-unprod26.0%
add-sqr-sqrt36.6%
Applied egg-rr36.6%
Taylor expanded in z around 0 27.5%
+-commutative27.5%
associate-*r/27.5%
metadata-eval27.5%
Simplified27.5%
Taylor expanded in x around inf 26.7%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x -3.8) (* x (/ (+ -1.0 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 <= -3.8) {
tmp = x * ((-1.0 + 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 <= (-3.8d0)) then
tmp = x * (((-1.0d0) + 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 <= -3.8) {
tmp = x * ((-1.0 + 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 <= -3.8: tmp = x * ((-1.0 + 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 <= -3.8) tmp = Float64(x * Float64(Float64(-1.0 + 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 <= -3.8) tmp = x * ((-1.0 + 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, -3.8], N[(x * N[(N[(-1.0 + z), $MachinePrecision] / y$95$m), $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 -3.8:\\
\;\;\;\;x \cdot \frac{-1 + z}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + 4}{y\_m}\\
\end{array}
\end{array}
if x < -3.7999999999999998Initial program 92.0%
fabs-sub92.0%
associate-*l/89.2%
associate-*r/96.8%
fmm-def98.3%
distribute-neg-frac98.3%
+-commutative98.3%
distribute-neg-in98.3%
unsub-neg98.3%
metadata-eval98.3%
Simplified98.3%
add-sqr-sqrt52.2%
fabs-sqr52.2%
add-sqr-sqrt52.7%
fma-undefine52.7%
associate-*r/49.7%
associate-*l/52.7%
div-inv52.6%
sub-neg52.6%
metadata-eval52.6%
distribute-neg-in52.6%
+-commutative52.6%
cancel-sign-sub-inv52.6%
div-inv52.7%
associate-*l/49.7%
sub-div49.7%
Applied egg-rr49.7%
Taylor expanded in x around inf 48.3%
associate-/l*51.2%
sub-neg51.2%
metadata-eval51.2%
Simplified51.2%
if -3.7999999999999998 < x Initial program 94.2%
fabs-sub94.2%
associate-*l/94.4%
associate-*r/92.6%
fmm-def94.1%
distribute-neg-frac94.1%
+-commutative94.1%
distribute-neg-in94.1%
unsub-neg94.1%
metadata-eval94.1%
Simplified94.1%
fma-undefine92.6%
associate-*r/94.4%
associate-*l/94.2%
div-inv94.1%
sub-neg94.1%
metadata-eval94.1%
distribute-neg-in94.1%
+-commutative94.1%
cancel-sign-sub-inv94.1%
div-inv94.2%
fabs-sub94.2%
add-sqr-sqrt54.7%
fabs-sqr54.7%
add-sqr-sqrt55.6%
associate-*l/54.7%
clear-num54.7%
frac-sub33.2%
Applied egg-rr33.2%
Taylor expanded in z around 0 37.7%
+-commutative37.7%
Simplified37.7%
Final simplification41.1%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x -4.0) (/ (- -4.0 x) y_m) (/ (+ x 4.0) y_m)))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= -4.0) {
tmp = (-4.0 - x) / 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 <= (-4.0d0)) then
tmp = ((-4.0d0) - x) / 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 <= -4.0) {
tmp = (-4.0 - x) / 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 <= -4.0: tmp = (-4.0 - x) / 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 <= -4.0) tmp = Float64(Float64(-4.0 - x) / 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 <= -4.0) tmp = (-4.0 - x) / 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, -4.0], N[(N[(-4.0 - x), $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 -4:\\
\;\;\;\;\frac{-4 - x}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + 4}{y\_m}\\
\end{array}
\end{array}
if x < -4Initial program 92.0%
fabs-sub92.0%
associate-*l/89.2%
associate-*r/96.8%
fmm-def98.3%
distribute-neg-frac98.3%
+-commutative98.3%
distribute-neg-in98.3%
unsub-neg98.3%
metadata-eval98.3%
Simplified98.3%
add-sqr-sqrt52.2%
fabs-sqr52.2%
add-sqr-sqrt52.7%
fma-undefine52.7%
associate-*r/49.7%
associate-*l/52.7%
div-inv52.6%
sub-neg52.6%
metadata-eval52.6%
distribute-neg-in52.6%
+-commutative52.6%
cancel-sign-sub-inv52.6%
div-inv52.7%
associate-*l/49.7%
sub-div49.7%
Applied egg-rr49.7%
Taylor expanded in z around 0 30.9%
associate-*r/30.9%
distribute-lft-in30.9%
metadata-eval30.9%
neg-mul-130.9%
sub-neg30.9%
Simplified30.9%
if -4 < x Initial program 94.2%
fabs-sub94.2%
associate-*l/94.4%
associate-*r/92.6%
fmm-def94.1%
distribute-neg-frac94.1%
+-commutative94.1%
distribute-neg-in94.1%
unsub-neg94.1%
metadata-eval94.1%
Simplified94.1%
fma-undefine92.6%
associate-*r/94.4%
associate-*l/94.2%
div-inv94.1%
sub-neg94.1%
metadata-eval94.1%
distribute-neg-in94.1%
+-commutative94.1%
cancel-sign-sub-inv94.1%
div-inv94.2%
fabs-sub94.2%
add-sqr-sqrt54.7%
fabs-sqr54.7%
add-sqr-sqrt55.6%
associate-*l/54.7%
clear-num54.7%
frac-sub33.2%
Applied egg-rr33.2%
Taylor expanded in z around 0 37.7%
+-commutative37.7%
Simplified37.7%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x -4.0) (/ (- x) y_m) (/ (+ x 4.0) y_m)))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= -4.0) {
tmp = -x / 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 <= (-4.0d0)) then
tmp = -x / 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 <= -4.0) {
tmp = -x / 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 <= -4.0: tmp = -x / 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 <= -4.0) tmp = Float64(Float64(-x) / 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 <= -4.0) tmp = -x / 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, -4.0], N[((-x) / 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 -4:\\
\;\;\;\;\frac{-x}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + 4}{y\_m}\\
\end{array}
\end{array}
if x < -4Initial program 92.0%
fabs-sub92.0%
associate-*l/89.2%
associate-*r/96.8%
fmm-def98.3%
distribute-neg-frac98.3%
+-commutative98.3%
distribute-neg-in98.3%
unsub-neg98.3%
metadata-eval98.3%
Simplified98.3%
add-sqr-sqrt52.2%
fabs-sqr52.2%
add-sqr-sqrt52.7%
fma-undefine52.7%
associate-*r/49.7%
associate-*l/52.7%
div-inv52.6%
sub-neg52.6%
metadata-eval52.6%
distribute-neg-in52.6%
+-commutative52.6%
cancel-sign-sub-inv52.6%
div-inv52.7%
associate-*l/49.7%
sub-div49.7%
Applied egg-rr49.7%
Taylor expanded in x around inf 48.3%
Taylor expanded in z around 0 29.5%
mul-1-neg29.5%
distribute-frac-neg29.5%
Simplified29.5%
if -4 < x Initial program 94.2%
fabs-sub94.2%
associate-*l/94.4%
associate-*r/92.6%
fmm-def94.1%
distribute-neg-frac94.1%
+-commutative94.1%
distribute-neg-in94.1%
unsub-neg94.1%
metadata-eval94.1%
Simplified94.1%
fma-undefine92.6%
associate-*r/94.4%
associate-*l/94.2%
div-inv94.1%
sub-neg94.1%
metadata-eval94.1%
distribute-neg-in94.1%
+-commutative94.1%
cancel-sign-sub-inv94.1%
div-inv94.2%
fabs-sub94.2%
add-sqr-sqrt54.7%
fabs-sqr54.7%
add-sqr-sqrt55.6%
associate-*l/54.7%
clear-num54.7%
frac-sub33.2%
Applied egg-rr33.2%
Taylor expanded in z around 0 37.7%
+-commutative37.7%
Simplified37.7%
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 94.1%
fabs-sub94.1%
associate-*l/96.3%
associate-*r/92.9%
fmm-def93.5%
distribute-neg-frac93.5%
+-commutative93.5%
distribute-neg-in93.5%
unsub-neg93.5%
metadata-eval93.5%
Simplified93.5%
fma-undefine92.9%
associate-*r/96.3%
associate-*l/94.1%
div-inv94.0%
sub-neg94.0%
metadata-eval94.0%
distribute-neg-in94.0%
+-commutative94.0%
cancel-sign-sub-inv94.0%
div-inv94.1%
fabs-sub94.1%
add-sqr-sqrt50.9%
fabs-sqr50.9%
add-sqr-sqrt51.8%
associate-*l/53.8%
associate-*r/50.4%
Applied egg-rr50.4%
*-commutative50.4%
associate-/r/51.9%
frac-2neg51.9%
add-sqr-sqrt25.9%
sqrt-unprod43.4%
sqr-neg43.4%
sqrt-unprod25.8%
add-sqr-sqrt52.2%
Applied egg-rr52.2%
Taylor expanded in x around 0 29.6%
if 4 < x Initial program 92.4%
fabs-sub92.4%
associate-*l/84.5%
associate-*r/95.4%
fmm-def99.8%
distribute-neg-frac99.8%
+-commutative99.8%
distribute-neg-in99.8%
unsub-neg99.8%
metadata-eval99.8%
Simplified99.8%
fma-undefine95.4%
associate-*r/84.5%
associate-*l/92.4%
div-inv92.3%
sub-neg92.3%
metadata-eval92.3%
distribute-neg-in92.3%
+-commutative92.3%
cancel-sign-sub-inv92.3%
div-inv92.4%
fabs-sub92.4%
add-sqr-sqrt51.1%
fabs-sqr51.1%
add-sqr-sqrt51.7%
associate-*l/43.7%
associate-*r/53.2%
Applied egg-rr53.2%
*-commutative53.2%
associate-/r/51.8%
frac-2neg51.8%
add-sqr-sqrt27.9%
sqrt-unprod40.2%
sqr-neg40.2%
sqrt-unprod26.0%
add-sqr-sqrt36.6%
Applied egg-rr36.6%
Taylor expanded in z around 0 27.5%
+-commutative27.5%
associate-*r/27.5%
metadata-eval27.5%
Simplified27.5%
Taylor expanded in x around inf 26.7%
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 93.6%
fabs-sub93.6%
associate-*l/93.1%
associate-*r/93.6%
fmm-def95.2%
distribute-neg-frac95.2%
+-commutative95.2%
distribute-neg-in95.2%
unsub-neg95.2%
metadata-eval95.2%
Simplified95.2%
fma-undefine93.6%
associate-*r/93.1%
associate-*l/93.6%
div-inv93.6%
sub-neg93.6%
metadata-eval93.6%
distribute-neg-in93.6%
+-commutative93.6%
cancel-sign-sub-inv93.6%
div-inv93.6%
fabs-sub93.6%
add-sqr-sqrt50.9%
fabs-sqr50.9%
add-sqr-sqrt51.8%
associate-*l/51.1%
associate-*r/51.2%
Applied egg-rr51.2%
*-commutative51.2%
associate-/r/51.8%
frac-2neg51.8%
add-sqr-sqrt26.5%
sqrt-unprod42.6%
sqr-neg42.6%
sqrt-unprod25.9%
add-sqr-sqrt48.1%
Applied egg-rr48.1%
Taylor expanded in x around 0 22.7%
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 93.6%
fabs-sub93.6%
associate-*l/93.1%
associate-*r/93.6%
fmm-def95.2%
distribute-neg-frac95.2%
+-commutative95.2%
distribute-neg-in95.2%
unsub-neg95.2%
metadata-eval95.2%
Simplified95.2%
add-sqr-sqrt43.2%
fabs-sqr43.2%
add-sqr-sqrt44.1%
fma-undefine43.7%
associate-*r/43.3%
associate-*l/43.2%
div-inv43.1%
sub-neg43.1%
metadata-eval43.1%
distribute-neg-in43.1%
+-commutative43.1%
cancel-sign-sub-inv43.1%
div-inv43.2%
associate-*l/43.3%
sub-div44.1%
Applied egg-rr44.1%
Taylor expanded in x around 0 16.1%
herbie shell --seed 2024181
(FPCore (x y z)
:name "fabs fraction 1"
:precision binary64
(fabs (- (/ (+ x 4.0) y) (* (/ x y) z))))