
(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 4e-50) (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 <= 4e-50) {
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 <= 4e-50) 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, 4e-50], 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 4 \cdot 10^{-50}:\\
\;\;\;\;\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 < 4.00000000000000003e-50Initial program 92.0%
Simplified98.7%
if 4.00000000000000003e-50 < y Initial program 97.7%
fabs-sub97.7%
associate-*l/92.0%
associate-*r/99.9%
fmm-def99.9%
distribute-neg-frac99.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
metadata-eval99.9%
Simplified99.9%
y_m = (fabs.f64 y)
(FPCore (x y_m z)
:precision binary64
(let* ((t_0 (/ (+ x 4.0) y_m)))
(if (<= (- t_0 (* z (/ x y_m))) -2e-43)
(fabs (- t_0 (/ z (/ y_m x))))
(fabs (* (/ -1.0 y_m) (fma x z (- -4.0 x)))))))y_m = fabs(y);
double code(double x, double y_m, double z) {
double t_0 = (x + 4.0) / y_m;
double tmp;
if ((t_0 - (z * (x / y_m))) <= -2e-43) {
tmp = fabs((t_0 - (z / (y_m / x))));
} else {
tmp = fabs(((-1.0 / y_m) * fma(x, z, (-4.0 - x))));
}
return tmp;
}
y_m = abs(y) function code(x, y_m, z) t_0 = Float64(Float64(x + 4.0) / y_m) tmp = 0.0 if (Float64(t_0 - Float64(z * Float64(x / y_m))) <= -2e-43) tmp = abs(Float64(t_0 - Float64(z / Float64(y_m / x)))); else tmp = abs(Float64(Float64(-1.0 / y_m) * fma(x, z, Float64(-4.0 - 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]}, If[LessEqual[N[(t$95$0 - N[(z * N[(x / y$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -2e-43], N[Abs[N[(t$95$0 - N[(z / N[(y$95$m / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(-1.0 / y$95$m), $MachinePrecision] * N[(x * z + N[(-4.0 - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
t_0 := \frac{x + 4}{y\_m}\\
\mathbf{if}\;t\_0 - z \cdot \frac{x}{y\_m} \leq -2 \cdot 10^{-43}:\\
\;\;\;\;\left|t\_0 - \frac{z}{\frac{y\_m}{x}}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{-1}{y\_m} \cdot \mathsf{fma}\left(x, z, -4 - x\right)\right|\\
\end{array}
\end{array}
if (-.f64 (/.f64 (+.f64 x #s(literal 4 binary64)) y) (*.f64 (/.f64 x y) z)) < -2.00000000000000015e-43Initial program 99.9%
*-commutative99.9%
clear-num99.9%
un-div-inv100.0%
Applied egg-rr100.0%
if -2.00000000000000015e-43 < (-.f64 (/.f64 (+.f64 x #s(literal 4 binary64)) y) (*.f64 (/.f64 x y) z)) Initial program 90.3%
Simplified99.2%
Final simplification99.5%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (let* ((t_0 (- (/ (+ x 4.0) y_m) (* z (/ x y_m))))) (if (<= t_0 INFINITY) (fabs t_0) (/ x (- y_m)))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double t_0 = ((x + 4.0) / y_m) - (z * (x / y_m));
double tmp;
if (t_0 <= ((double) INFINITY)) {
tmp = fabs(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 = ((x + 4.0) / y_m) - (z * (x / y_m));
double tmp;
if (t_0 <= Double.POSITIVE_INFINITY) {
tmp = Math.abs(t_0);
} 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) - (z * (x / y_m)) tmp = 0 if t_0 <= math.inf: tmp = math.fabs(t_0) else: tmp = x / -y_m return tmp
y_m = abs(y) function code(x, y_m, z) t_0 = Float64(Float64(Float64(x + 4.0) / y_m) - Float64(z * Float64(x / y_m))) tmp = 0.0 if (t_0 <= Inf) tmp = abs(t_0); else tmp = Float64(x / Float64(-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) - (z * (x / y_m)); tmp = 0.0; if (t_0 <= Inf) tmp = abs(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[(N[(N[(x + 4.0), $MachinePrecision] / y$95$m), $MachinePrecision] - N[(z * N[(x / y$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, Infinity], N[Abs[t$95$0], $MachinePrecision], N[(x / (-y$95$m)), $MachinePrecision]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
t_0 := \frac{x + 4}{y\_m} - z \cdot \frac{x}{y\_m}\\
\mathbf{if}\;t\_0 \leq \infty:\\
\;\;\;\;\left|t\_0\right|\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{-y\_m}\\
\end{array}
\end{array}
if (-.f64 (/.f64 (+.f64 x #s(literal 4 binary64)) y) (*.f64 (/.f64 x y) z)) < +inf.0Initial program 98.1%
if +inf.0 < (-.f64 (/.f64 (+.f64 x #s(literal 4 binary64)) y) (*.f64 (/.f64 x y) z)) Initial program 0.0%
fabs-sub0.0%
associate-*l/18.2%
associate-*r/18.2%
fmm-def54.5%
distribute-neg-frac54.5%
+-commutative54.5%
distribute-neg-in54.5%
unsub-neg54.5%
metadata-eval54.5%
Simplified54.5%
add-sqr-sqrt27.3%
fabs-sqr27.3%
add-sqr-sqrt27.3%
fma-undefine9.1%
associate-*r/9.1%
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%
associate-*l/9.1%
sub-div27.3%
Applied egg-rr27.3%
Taylor expanded in z around 0 54.5%
associate-*r/54.5%
distribute-lft-in54.5%
metadata-eval54.5%
neg-mul-154.5%
sub-neg54.5%
Simplified54.5%
Taylor expanded in x around inf 54.5%
neg-mul-154.5%
Simplified54.5%
Final simplification96.2%
y_m = (fabs.f64 y)
(FPCore (x y_m z)
:precision binary64
(let* ((t_0 (/ (+ x 4.0) y_m)))
(if (<= x -9.6e+252)
(- (* x (/ z y_m)) t_0)
(if (<= x -1250000.0)
(- (/ z (/ y_m (- x))) t_0)
(/ (- (+ x 4.0) (* x z)) y_m)))))y_m = fabs(y);
double code(double x, double y_m, double z) {
double t_0 = (x + 4.0) / y_m;
double tmp;
if (x <= -9.6e+252) {
tmp = (x * (z / y_m)) - t_0;
} else if (x <= -1250000.0) {
tmp = (z / (y_m / -x)) - t_0;
} else {
tmp = ((x + 4.0) - (x * 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) :: t_0
real(8) :: tmp
t_0 = (x + 4.0d0) / y_m
if (x <= (-9.6d+252)) then
tmp = (x * (z / y_m)) - t_0
else if (x <= (-1250000.0d0)) then
tmp = (z / (y_m / -x)) - t_0
else
tmp = ((x + 4.0d0) - (x * 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 t_0 = (x + 4.0) / y_m;
double tmp;
if (x <= -9.6e+252) {
tmp = (x * (z / y_m)) - t_0;
} else if (x <= -1250000.0) {
tmp = (z / (y_m / -x)) - t_0;
} else {
tmp = ((x + 4.0) - (x * z)) / y_m;
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): t_0 = (x + 4.0) / y_m tmp = 0 if x <= -9.6e+252: tmp = (x * (z / y_m)) - t_0 elif x <= -1250000.0: tmp = (z / (y_m / -x)) - t_0 else: tmp = ((x + 4.0) - (x * z)) / y_m return tmp
y_m = abs(y) function code(x, y_m, z) t_0 = Float64(Float64(x + 4.0) / y_m) tmp = 0.0 if (x <= -9.6e+252) tmp = Float64(Float64(x * Float64(z / y_m)) - t_0); elseif (x <= -1250000.0) tmp = Float64(Float64(z / Float64(y_m / Float64(-x))) - t_0); else tmp = Float64(Float64(Float64(x + 4.0) - Float64(x * z)) / 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; tmp = 0.0; if (x <= -9.6e+252) tmp = (x * (z / y_m)) - t_0; elseif (x <= -1250000.0) tmp = (z / (y_m / -x)) - t_0; else tmp = ((x + 4.0) - (x * z)) / 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]}, If[LessEqual[x, -9.6e+252], N[(N[(x * N[(z / y$95$m), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[x, -1250000.0], N[(N[(z / N[(y$95$m / (-x)), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(x + 4.0), $MachinePrecision] - N[(x * z), $MachinePrecision]), $MachinePrecision] / y$95$m), $MachinePrecision]]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
t_0 := \frac{x + 4}{y\_m}\\
\mathbf{if}\;x \leq -9.6 \cdot 10^{+252}:\\
\;\;\;\;x \cdot \frac{z}{y\_m} - t\_0\\
\mathbf{elif}\;x \leq -1250000:\\
\;\;\;\;\frac{z}{\frac{y\_m}{-x}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(x + 4\right) - x \cdot z}{y\_m}\\
\end{array}
\end{array}
if x < -9.5999999999999996e252Initial program 92.3%
fabs-sub92.3%
associate-*l/93.2%
associate-*r/99.9%
fmm-def99.9%
distribute-neg-frac99.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
metadata-eval99.9%
Simplified99.9%
add-sqr-sqrt45.9%
fabs-sqr45.9%
add-sqr-sqrt46.1%
fma-undefine46.1%
associate-*r/39.4%
associate-*l/38.5%
div-inv38.4%
sub-neg38.4%
metadata-eval38.4%
distribute-neg-in38.4%
+-commutative38.4%
cancel-sign-sub-inv38.4%
div-inv38.5%
associate-*l/39.4%
associate-*r/46.1%
Applied egg-rr46.1%
if -9.5999999999999996e252 < x < -1.25e6Initial program 87.4%
fabs-sub87.4%
associate-*l/83.6%
associate-*r/89.4%
fmm-def93.6%
distribute-neg-frac93.6%
+-commutative93.6%
distribute-neg-in93.6%
unsub-neg93.6%
metadata-eval93.6%
Simplified93.6%
add-sqr-sqrt49.7%
fabs-sqr49.7%
add-sqr-sqrt50.3%
fma-undefine48.2%
associate-*r/42.4%
associate-*l/48.2%
div-inv48.1%
sub-neg48.1%
metadata-eval48.1%
distribute-neg-in48.1%
+-commutative48.1%
cancel-sign-sub-inv48.1%
div-inv48.2%
associate-*l/42.4%
associate-*r/48.2%
Applied egg-rr48.2%
*-commutative48.2%
associate-/r/48.2%
frac-2neg48.2%
add-sqr-sqrt20.9%
sqrt-unprod41.0%
sqr-neg41.0%
sqrt-unprod23.8%
add-sqr-sqrt40.6%
Applied egg-rr40.6%
if -1.25e6 < x Initial program 95.5%
fabs-sub95.5%
associate-*l/95.4%
associate-*r/92.6%
fmm-def93.6%
distribute-neg-frac93.6%
+-commutative93.6%
distribute-neg-in93.6%
unsub-neg93.6%
metadata-eval93.6%
Simplified93.6%
fma-undefine92.6%
associate-*r/95.4%
associate-*l/95.5%
div-inv95.5%
sub-neg95.5%
metadata-eval95.5%
distribute-neg-in95.5%
+-commutative95.5%
cancel-sign-sub-inv95.5%
div-inv95.5%
fabs-sub95.5%
add-sqr-sqrt50.5%
fabs-sqr50.5%
add-sqr-sqrt51.4%
associate-*l/51.9%
sub-div53.4%
Applied egg-rr53.4%
Final simplification50.6%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x -26000000000000.0) (* x (/ (+ -1.0 z) y_m)) (if (<= x 0.0003) (/ (- 4.0 (* x z)) y_m) (* (/ x y_m) (+ z 1.0)))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= -26000000000000.0) {
tmp = x * ((-1.0 + z) / y_m);
} else if (x <= 0.0003) {
tmp = (4.0 - (x * z)) / y_m;
} else {
tmp = (x / y_m) * (z + 1.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) :: tmp
if (x <= (-26000000000000.0d0)) then
tmp = x * (((-1.0d0) + z) / y_m)
else if (x <= 0.0003d0) then
tmp = (4.0d0 - (x * z)) / y_m
else
tmp = (x / y_m) * (z + 1.0d0)
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 <= -26000000000000.0) {
tmp = x * ((-1.0 + z) / y_m);
} else if (x <= 0.0003) {
tmp = (4.0 - (x * z)) / y_m;
} else {
tmp = (x / y_m) * (z + 1.0);
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= -26000000000000.0: tmp = x * ((-1.0 + z) / y_m) elif x <= 0.0003: tmp = (4.0 - (x * z)) / y_m else: tmp = (x / y_m) * (z + 1.0) return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= -26000000000000.0) tmp = Float64(x * Float64(Float64(-1.0 + z) / y_m)); elseif (x <= 0.0003) tmp = Float64(Float64(4.0 - Float64(x * z)) / y_m); else tmp = Float64(Float64(x / y_m) * Float64(z + 1.0)); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (x <= -26000000000000.0) tmp = x * ((-1.0 + z) / y_m); elseif (x <= 0.0003) tmp = (4.0 - (x * z)) / y_m; else tmp = (x / y_m) * (z + 1.0); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[x, -26000000000000.0], N[(x * N[(N[(-1.0 + z), $MachinePrecision] / y$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 0.0003], N[(N[(4.0 - N[(x * z), $MachinePrecision]), $MachinePrecision] / y$95$m), $MachinePrecision], N[(N[(x / y$95$m), $MachinePrecision] * N[(z + 1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -26000000000000:\\
\;\;\;\;x \cdot \frac{-1 + z}{y\_m}\\
\mathbf{elif}\;x \leq 0.0003:\\
\;\;\;\;\frac{4 - x \cdot z}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y\_m} \cdot \left(z + 1\right)\\
\end{array}
\end{array}
if x < -2.6e13Initial program 88.1%
fabs-sub88.1%
associate-*l/85.2%
associate-*r/91.4%
fmm-def94.8%
distribute-neg-frac94.8%
+-commutative94.8%
distribute-neg-in94.8%
unsub-neg94.8%
metadata-eval94.8%
Simplified94.8%
add-sqr-sqrt48.8%
fabs-sqr48.8%
add-sqr-sqrt49.2%
fma-undefine47.5%
associate-*r/41.3%
associate-*l/45.9%
div-inv45.8%
sub-neg45.8%
metadata-eval45.8%
distribute-neg-in45.8%
+-commutative45.8%
cancel-sign-sub-inv45.8%
div-inv45.9%
associate-*l/41.3%
sub-div43.0%
Applied egg-rr43.0%
Taylor expanded in x around inf 43.0%
associate-/l*49.1%
sub-neg49.1%
metadata-eval49.1%
Simplified49.1%
if -2.6e13 < x < 2.99999999999999974e-4Initial program 96.2%
fabs-sub96.2%
associate-*l/99.9%
associate-*r/91.5%
fmm-def91.5%
distribute-neg-frac91.5%
+-commutative91.5%
distribute-neg-in91.5%
unsub-neg91.5%
metadata-eval91.5%
Simplified91.5%
fma-undefine91.5%
associate-*r/99.9%
associate-*l/96.2%
div-inv96.1%
sub-neg96.1%
metadata-eval96.1%
distribute-neg-in96.1%
+-commutative96.1%
cancel-sign-sub-inv96.1%
div-inv96.2%
fabs-sub96.2%
add-sqr-sqrt53.8%
fabs-sqr53.8%
add-sqr-sqrt54.9%
associate-*l/56.4%
sub-div56.4%
Applied egg-rr56.4%
Taylor expanded in x around 0 54.1%
if 2.99999999999999974e-4 < x Initial program 94.6%
fabs-sub94.6%
associate-*l/88.3%
associate-*r/94.6%
fmm-def97.3%
distribute-neg-frac97.3%
+-commutative97.3%
distribute-neg-in97.3%
unsub-neg97.3%
metadata-eval97.3%
Simplified97.3%
fma-undefine94.6%
associate-*r/88.3%
associate-*l/94.6%
div-inv94.4%
sub-neg94.4%
metadata-eval94.4%
distribute-neg-in94.4%
+-commutative94.4%
cancel-sign-sub-inv94.4%
div-inv94.6%
fabs-sub94.6%
add-sqr-sqrt45.1%
fabs-sqr45.1%
add-sqr-sqrt45.7%
sub-neg45.7%
distribute-rgt-neg-in45.7%
Applied egg-rr45.7%
Taylor expanded in x around inf 45.7%
*-un-lft-identity45.7%
*-commutative45.7%
distribute-rgt-out49.7%
add-sqr-sqrt16.1%
sqrt-unprod41.9%
sqr-neg41.9%
sqrt-unprod29.5%
add-sqr-sqrt55.9%
+-commutative55.9%
Applied egg-rr55.9%
Final simplification53.5%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x -5.8e-19) (* x (/ (+ -1.0 z) y_m)) (if (<= x 3.3e-54) (/ 4.0 y_m) (* (/ x y_m) (+ z 1.0)))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= -5.8e-19) {
tmp = x * ((-1.0 + z) / y_m);
} else if (x <= 3.3e-54) {
tmp = 4.0 / y_m;
} else {
tmp = (x / y_m) * (z + 1.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) :: tmp
if (x <= (-5.8d-19)) then
tmp = x * (((-1.0d0) + z) / y_m)
else if (x <= 3.3d-54) then
tmp = 4.0d0 / y_m
else
tmp = (x / y_m) * (z + 1.0d0)
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 <= -5.8e-19) {
tmp = x * ((-1.0 + z) / y_m);
} else if (x <= 3.3e-54) {
tmp = 4.0 / y_m;
} else {
tmp = (x / y_m) * (z + 1.0);
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= -5.8e-19: tmp = x * ((-1.0 + z) / y_m) elif x <= 3.3e-54: tmp = 4.0 / y_m else: tmp = (x / y_m) * (z + 1.0) return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= -5.8e-19) tmp = Float64(x * Float64(Float64(-1.0 + z) / y_m)); elseif (x <= 3.3e-54) tmp = Float64(4.0 / y_m); else tmp = Float64(Float64(x / y_m) * Float64(z + 1.0)); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (x <= -5.8e-19) tmp = x * ((-1.0 + z) / y_m); elseif (x <= 3.3e-54) tmp = 4.0 / y_m; else tmp = (x / y_m) * (z + 1.0); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[x, -5.8e-19], N[(x * N[(N[(-1.0 + z), $MachinePrecision] / y$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.3e-54], N[(4.0 / y$95$m), $MachinePrecision], N[(N[(x / y$95$m), $MachinePrecision] * N[(z + 1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.8 \cdot 10^{-19}:\\
\;\;\;\;x \cdot \frac{-1 + z}{y\_m}\\
\mathbf{elif}\;x \leq 3.3 \cdot 10^{-54}:\\
\;\;\;\;\frac{4}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y\_m} \cdot \left(z + 1\right)\\
\end{array}
\end{array}
if x < -5.8e-19Initial program 90.2%
fabs-sub90.2%
associate-*l/87.8%
associate-*r/92.9%
fmm-def95.7%
distribute-neg-frac95.7%
+-commutative95.7%
distribute-neg-in95.7%
unsub-neg95.7%
metadata-eval95.7%
Simplified95.7%
add-sqr-sqrt46.9%
fabs-sqr46.9%
add-sqr-sqrt47.6%
fma-undefine46.2%
associate-*r/41.1%
associate-*l/44.8%
div-inv44.8%
sub-neg44.8%
metadata-eval44.8%
distribute-neg-in44.8%
+-commutative44.8%
cancel-sign-sub-inv44.8%
div-inv44.8%
associate-*l/41.1%
sub-div42.5%
Applied egg-rr42.5%
Taylor expanded in x around inf 41.4%
associate-/l*46.4%
sub-neg46.4%
metadata-eval46.4%
Simplified46.4%
if -5.8e-19 < x < 3.29999999999999993e-54Initial program 95.4%
fabs-sub95.4%
associate-*l/99.9%
associate-*r/89.7%
fmm-def89.7%
distribute-neg-frac89.7%
+-commutative89.7%
distribute-neg-in89.7%
unsub-neg89.7%
metadata-eval89.7%
Simplified89.7%
fma-undefine89.7%
associate-*r/99.9%
associate-*l/95.4%
div-inv95.4%
sub-neg95.4%
metadata-eval95.4%
distribute-neg-in95.4%
+-commutative95.4%
cancel-sign-sub-inv95.4%
div-inv95.4%
fabs-sub95.4%
add-sqr-sqrt51.8%
fabs-sqr51.8%
add-sqr-sqrt53.0%
associate-*l/54.8%
sub-div54.8%
Applied egg-rr54.8%
Taylor expanded in x around 0 47.5%
if 3.29999999999999993e-54 < x Initial program 95.1%
fabs-sub95.1%
associate-*l/89.6%
associate-*r/95.1%
fmm-def97.5%
distribute-neg-frac97.5%
+-commutative97.5%
distribute-neg-in97.5%
unsub-neg97.5%
metadata-eval97.5%
Simplified97.5%
fma-undefine95.1%
associate-*r/89.6%
associate-*l/95.1%
div-inv95.0%
sub-neg95.0%
metadata-eval95.0%
distribute-neg-in95.0%
+-commutative95.0%
cancel-sign-sub-inv95.0%
div-inv95.1%
fabs-sub95.1%
add-sqr-sqrt47.3%
fabs-sqr47.3%
add-sqr-sqrt47.9%
sub-neg47.9%
distribute-rgt-neg-in47.9%
Applied egg-rr47.9%
Taylor expanded in x around inf 45.8%
*-un-lft-identity45.8%
*-commutative45.8%
distribute-rgt-out49.4%
add-sqr-sqrt15.6%
sqrt-unprod38.9%
sqr-neg38.9%
sqrt-unprod27.8%
add-sqr-sqrt51.4%
+-commutative51.4%
Applied egg-rr51.4%
Final simplification48.5%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x -4.3e-19) (* x (/ (+ -1.0 z) y_m)) (if (<= x 3.5e+14) (/ (+ x 4.0) y_m) (* (/ x y_m) (- 1.0 z)))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= -4.3e-19) {
tmp = x * ((-1.0 + z) / y_m);
} else if (x <= 3.5e+14) {
tmp = (x + 4.0) / y_m;
} else {
tmp = (x / y_m) * (1.0 - z);
}
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.3d-19)) then
tmp = x * (((-1.0d0) + z) / y_m)
else if (x <= 3.5d+14) then
tmp = (x + 4.0d0) / y_m
else
tmp = (x / y_m) * (1.0d0 - z)
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.3e-19) {
tmp = x * ((-1.0 + z) / y_m);
} else if (x <= 3.5e+14) {
tmp = (x + 4.0) / y_m;
} else {
tmp = (x / y_m) * (1.0 - z);
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= -4.3e-19: tmp = x * ((-1.0 + z) / y_m) elif x <= 3.5e+14: tmp = (x + 4.0) / y_m else: tmp = (x / y_m) * (1.0 - z) return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= -4.3e-19) tmp = Float64(x * Float64(Float64(-1.0 + z) / y_m)); elseif (x <= 3.5e+14) tmp = Float64(Float64(x + 4.0) / y_m); else tmp = Float64(Float64(x / y_m) * Float64(1.0 - z)); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (x <= -4.3e-19) tmp = x * ((-1.0 + z) / y_m); elseif (x <= 3.5e+14) tmp = (x + 4.0) / y_m; else tmp = (x / y_m) * (1.0 - z); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[x, -4.3e-19], N[(x * N[(N[(-1.0 + z), $MachinePrecision] / y$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.5e+14], N[(N[(x + 4.0), $MachinePrecision] / y$95$m), $MachinePrecision], N[(N[(x / y$95$m), $MachinePrecision] * N[(1.0 - z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.3 \cdot 10^{-19}:\\
\;\;\;\;x \cdot \frac{-1 + z}{y\_m}\\
\mathbf{elif}\;x \leq 3.5 \cdot 10^{+14}:\\
\;\;\;\;\frac{x + 4}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y\_m} \cdot \left(1 - z\right)\\
\end{array}
\end{array}
if x < -4.3e-19Initial program 90.2%
fabs-sub90.2%
associate-*l/87.8%
associate-*r/92.9%
fmm-def95.7%
distribute-neg-frac95.7%
+-commutative95.7%
distribute-neg-in95.7%
unsub-neg95.7%
metadata-eval95.7%
Simplified95.7%
add-sqr-sqrt46.9%
fabs-sqr46.9%
add-sqr-sqrt47.6%
fma-undefine46.2%
associate-*r/41.1%
associate-*l/44.8%
div-inv44.8%
sub-neg44.8%
metadata-eval44.8%
distribute-neg-in44.8%
+-commutative44.8%
cancel-sign-sub-inv44.8%
div-inv44.8%
associate-*l/41.1%
sub-div42.5%
Applied egg-rr42.5%
Taylor expanded in x around inf 41.4%
associate-/l*46.4%
sub-neg46.4%
metadata-eval46.4%
Simplified46.4%
if -4.3e-19 < x < 3.5e14Initial program 95.9%
fabs-sub95.9%
associate-*l/99.9%
associate-*r/90.8%
fmm-def90.8%
distribute-neg-frac90.8%
+-commutative90.8%
distribute-neg-in90.8%
unsub-neg90.8%
metadata-eval90.8%
Simplified90.8%
fma-undefine90.8%
associate-*r/99.9%
associate-*l/95.9%
div-inv95.8%
sub-neg95.8%
metadata-eval95.8%
distribute-neg-in95.8%
+-commutative95.8%
cancel-sign-sub-inv95.8%
div-inv95.9%
fabs-sub95.9%
add-sqr-sqrt52.4%
fabs-sqr52.4%
add-sqr-sqrt53.6%
associate-*l/55.2%
sub-div55.2%
Applied egg-rr55.2%
Taylor expanded in z around 0 44.4%
if 3.5e14 < x Initial program 94.4%
fabs-sub94.4%
associate-*l/87.8%
associate-*r/94.4%
fmm-def97.2%
distribute-neg-frac97.2%
+-commutative97.2%
distribute-neg-in97.2%
unsub-neg97.2%
metadata-eval97.2%
Simplified97.2%
fma-undefine94.4%
associate-*r/87.8%
associate-*l/94.4%
div-inv94.2%
sub-neg94.2%
metadata-eval94.2%
distribute-neg-in94.2%
+-commutative94.2%
cancel-sign-sub-inv94.2%
div-inv94.4%
fabs-sub94.4%
add-sqr-sqrt45.6%
fabs-sqr45.6%
add-sqr-sqrt46.2%
associate-*l/44.9%
sub-div49.0%
Applied egg-rr49.0%
Taylor expanded in x around inf 49.0%
*-commutative49.0%
associate-/l*50.3%
Simplified50.3%
Final simplification46.6%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x -5.8e-19) (* x (/ (+ -1.0 z) y_m)) (if (<= x 3.5e+14) (/ (+ 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 <= -5.8e-19) {
tmp = x * ((-1.0 + z) / y_m);
} else if (x <= 3.5e+14) {
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 <= (-5.8d-19)) then
tmp = x * (((-1.0d0) + z) / y_m)
else if (x <= 3.5d+14) 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 <= -5.8e-19) {
tmp = x * ((-1.0 + z) / y_m);
} else if (x <= 3.5e+14) {
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 <= -5.8e-19: tmp = x * ((-1.0 + z) / y_m) elif x <= 3.5e+14: 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 <= -5.8e-19) tmp = Float64(x * Float64(Float64(-1.0 + z) / y_m)); elseif (x <= 3.5e+14) 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 <= -5.8e-19) tmp = x * ((-1.0 + z) / y_m); elseif (x <= 3.5e+14) 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, -5.8e-19], N[(x * N[(N[(-1.0 + z), $MachinePrecision] / y$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.5e+14], 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 -5.8 \cdot 10^{-19}:\\
\;\;\;\;x \cdot \frac{-1 + z}{y\_m}\\
\mathbf{elif}\;x \leq 3.5 \cdot 10^{+14}:\\
\;\;\;\;\frac{x + 4}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{1 - z}{y\_m}\\
\end{array}
\end{array}
if x < -5.8e-19Initial program 90.2%
fabs-sub90.2%
associate-*l/87.8%
associate-*r/92.9%
fmm-def95.7%
distribute-neg-frac95.7%
+-commutative95.7%
distribute-neg-in95.7%
unsub-neg95.7%
metadata-eval95.7%
Simplified95.7%
add-sqr-sqrt46.9%
fabs-sqr46.9%
add-sqr-sqrt47.6%
fma-undefine46.2%
associate-*r/41.1%
associate-*l/44.8%
div-inv44.8%
sub-neg44.8%
metadata-eval44.8%
distribute-neg-in44.8%
+-commutative44.8%
cancel-sign-sub-inv44.8%
div-inv44.8%
associate-*l/41.1%
sub-div42.5%
Applied egg-rr42.5%
Taylor expanded in x around inf 41.4%
associate-/l*46.4%
sub-neg46.4%
metadata-eval46.4%
Simplified46.4%
if -5.8e-19 < x < 3.5e14Initial program 95.9%
fabs-sub95.9%
associate-*l/99.9%
associate-*r/90.8%
fmm-def90.8%
distribute-neg-frac90.8%
+-commutative90.8%
distribute-neg-in90.8%
unsub-neg90.8%
metadata-eval90.8%
Simplified90.8%
fma-undefine90.8%
associate-*r/99.9%
associate-*l/95.9%
div-inv95.8%
sub-neg95.8%
metadata-eval95.8%
distribute-neg-in95.8%
+-commutative95.8%
cancel-sign-sub-inv95.8%
div-inv95.9%
fabs-sub95.9%
add-sqr-sqrt52.4%
fabs-sqr52.4%
add-sqr-sqrt53.6%
associate-*l/55.2%
sub-div55.2%
Applied egg-rr55.2%
Taylor expanded in z around 0 44.4%
if 3.5e14 < x Initial program 94.4%
fabs-sub94.4%
associate-*l/87.8%
associate-*r/94.4%
fmm-def97.2%
distribute-neg-frac97.2%
+-commutative97.2%
distribute-neg-in97.2%
unsub-neg97.2%
metadata-eval97.2%
Simplified97.2%
fma-undefine94.4%
associate-*r/87.8%
associate-*l/94.4%
div-inv94.2%
sub-neg94.2%
metadata-eval94.2%
distribute-neg-in94.2%
+-commutative94.2%
cancel-sign-sub-inv94.2%
div-inv94.4%
fabs-sub94.4%
add-sqr-sqrt45.6%
fabs-sqr45.6%
add-sqr-sqrt46.2%
sub-neg46.2%
distribute-rgt-neg-in46.2%
Applied egg-rr46.2%
Taylor expanded in x around -inf 50.3%
mul-1-neg50.3%
div-sub50.3%
associate-/l*49.0%
sub-neg49.0%
metadata-eval49.0%
distribute-rgt-in49.0%
neg-mul-149.0%
sub-neg49.0%
*-lft-identity49.0%
sub-neg49.0%
distribute-rgt-in49.0%
*-rgt-identity49.0%
remove-double-neg49.0%
*-commutative49.0%
mul-1-neg49.0%
associate-*r*49.0%
neg-mul-149.0%
distribute-rgt-neg-in49.0%
mul-1-neg49.0%
distribute-lft-in49.0%
neg-mul-149.0%
+-commutative49.0%
associate-*r*49.0%
Simplified50.3%
Final simplification46.6%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x -26000000000000.0) (* x (/ (+ -1.0 z) y_m)) (/ (- (+ x 4.0) (* x z)) y_m)))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= -26000000000000.0) {
tmp = x * ((-1.0 + z) / y_m);
} else {
tmp = ((x + 4.0) - (x * 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 <= (-26000000000000.0d0)) then
tmp = x * (((-1.0d0) + z) / y_m)
else
tmp = ((x + 4.0d0) - (x * 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 <= -26000000000000.0) {
tmp = x * ((-1.0 + z) / y_m);
} else {
tmp = ((x + 4.0) - (x * z)) / y_m;
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= -26000000000000.0: tmp = x * ((-1.0 + z) / y_m) else: tmp = ((x + 4.0) - (x * z)) / y_m return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= -26000000000000.0) tmp = Float64(x * Float64(Float64(-1.0 + z) / y_m)); else tmp = Float64(Float64(Float64(x + 4.0) - Float64(x * z)) / y_m); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (x <= -26000000000000.0) tmp = x * ((-1.0 + z) / y_m); else tmp = ((x + 4.0) - (x * z)) / y_m; end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[x, -26000000000000.0], N[(x * N[(N[(-1.0 + z), $MachinePrecision] / y$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x + 4.0), $MachinePrecision] - N[(x * z), $MachinePrecision]), $MachinePrecision] / y$95$m), $MachinePrecision]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -26000000000000:\\
\;\;\;\;x \cdot \frac{-1 + z}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(x + 4\right) - x \cdot z}{y\_m}\\
\end{array}
\end{array}
if x < -2.6e13Initial program 88.1%
fabs-sub88.1%
associate-*l/85.2%
associate-*r/91.4%
fmm-def94.8%
distribute-neg-frac94.8%
+-commutative94.8%
distribute-neg-in94.8%
unsub-neg94.8%
metadata-eval94.8%
Simplified94.8%
add-sqr-sqrt48.8%
fabs-sqr48.8%
add-sqr-sqrt49.2%
fma-undefine47.5%
associate-*r/41.3%
associate-*l/45.9%
div-inv45.8%
sub-neg45.8%
metadata-eval45.8%
distribute-neg-in45.8%
+-commutative45.8%
cancel-sign-sub-inv45.8%
div-inv45.9%
associate-*l/41.3%
sub-div43.0%
Applied egg-rr43.0%
Taylor expanded in x around inf 43.0%
associate-/l*49.1%
sub-neg49.1%
metadata-eval49.1%
Simplified49.1%
if -2.6e13 < x Initial program 95.6%
fabs-sub95.6%
associate-*l/95.5%
associate-*r/92.7%
fmm-def93.7%
distribute-neg-frac93.7%
+-commutative93.7%
distribute-neg-in93.7%
unsub-neg93.7%
metadata-eval93.7%
Simplified93.7%
fma-undefine92.7%
associate-*r/95.5%
associate-*l/95.6%
div-inv95.5%
sub-neg95.5%
metadata-eval95.5%
distribute-neg-in95.5%
+-commutative95.5%
cancel-sign-sub-inv95.5%
div-inv95.6%
fabs-sub95.6%
add-sqr-sqrt50.5%
fabs-sqr50.5%
add-sqr-sqrt51.4%
associate-*l/51.9%
sub-div53.4%
Applied egg-rr53.4%
Final simplification52.4%
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 88.9%
fabs-sub88.9%
associate-*l/86.3%
associate-*r/92.0%
fmm-def95.2%
distribute-neg-frac95.2%
+-commutative95.2%
distribute-neg-in95.2%
unsub-neg95.2%
metadata-eval95.2%
Simplified95.2%
add-sqr-sqrt49.7%
fabs-sqr49.7%
add-sqr-sqrt50.2%
fma-undefine48.6%
associate-*r/42.9%
associate-*l/47.1%
div-inv47.0%
sub-neg47.0%
metadata-eval47.0%
distribute-neg-in47.0%
+-commutative47.0%
cancel-sign-sub-inv47.0%
div-inv47.1%
associate-*l/42.9%
sub-div44.5%
Applied egg-rr44.5%
Taylor expanded in z around 0 28.6%
associate-*r/28.6%
distribute-lft-in28.6%
metadata-eval28.6%
neg-mul-128.6%
sub-neg28.6%
Simplified28.6%
Taylor expanded in x around inf 28.6%
neg-mul-128.6%
Simplified28.6%
if -10.5 < x < 4Initial program 96.0%
fabs-sub96.0%
associate-*l/99.9%
associate-*r/91.1%
fmm-def91.1%
distribute-neg-frac91.1%
+-commutative91.1%
distribute-neg-in91.1%
unsub-neg91.1%
metadata-eval91.1%
Simplified91.1%
fma-undefine91.1%
associate-*r/99.9%
associate-*l/96.0%
div-inv96.0%
sub-neg96.0%
metadata-eval96.0%
distribute-neg-in96.0%
+-commutative96.0%
cancel-sign-sub-inv96.0%
div-inv96.0%
fabs-sub96.0%
add-sqr-sqrt54.4%
fabs-sqr54.4%
add-sqr-sqrt55.6%
associate-*l/57.1%
sub-div57.1%
Applied egg-rr57.1%
Taylor expanded in x around 0 42.7%
if 4 < x Initial program 94.6%
fabs-sub94.6%
associate-*l/88.3%
associate-*r/94.6%
fmm-def97.3%
distribute-neg-frac97.3%
+-commutative97.3%
distribute-neg-in97.3%
unsub-neg97.3%
metadata-eval97.3%
Simplified97.3%
fma-undefine94.6%
associate-*r/88.3%
associate-*l/94.6%
div-inv94.4%
sub-neg94.4%
metadata-eval94.4%
distribute-neg-in94.4%
+-commutative94.4%
cancel-sign-sub-inv94.4%
div-inv94.6%
fabs-sub94.6%
add-sqr-sqrt45.1%
fabs-sqr45.1%
add-sqr-sqrt45.7%
sub-neg45.7%
distribute-rgt-neg-in45.7%
Applied egg-rr45.7%
Taylor expanded in x around -inf 49.6%
mul-1-neg49.6%
div-sub49.6%
associate-/l*48.4%
sub-neg48.4%
metadata-eval48.4%
distribute-rgt-in48.4%
neg-mul-148.4%
sub-neg48.4%
*-lft-identity48.4%
sub-neg48.4%
distribute-rgt-in48.4%
*-rgt-identity48.4%
remove-double-neg48.4%
*-commutative48.4%
mul-1-neg48.4%
associate-*r*48.4%
neg-mul-148.4%
distribute-rgt-neg-in48.4%
mul-1-neg48.4%
distribute-lft-in48.4%
neg-mul-148.4%
+-commutative48.4%
associate-*r*48.4%
Simplified49.6%
Taylor expanded in z around 0 32.9%
Final simplification36.3%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x -5.5e-19) (* 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 <= -5.5e-19) {
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 <= (-5.5d-19)) 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 <= -5.5e-19) {
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 <= -5.5e-19: 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 <= -5.5e-19) 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 <= -5.5e-19) 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, -5.5e-19], 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 -5.5 \cdot 10^{-19}:\\
\;\;\;\;x \cdot \frac{-1 + z}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + 4}{y\_m}\\
\end{array}
\end{array}
if x < -5.4999999999999996e-19Initial program 90.2%
fabs-sub90.2%
associate-*l/87.8%
associate-*r/92.9%
fmm-def95.7%
distribute-neg-frac95.7%
+-commutative95.7%
distribute-neg-in95.7%
unsub-neg95.7%
metadata-eval95.7%
Simplified95.7%
add-sqr-sqrt46.9%
fabs-sqr46.9%
add-sqr-sqrt47.6%
fma-undefine46.2%
associate-*r/41.1%
associate-*l/44.8%
div-inv44.8%
sub-neg44.8%
metadata-eval44.8%
distribute-neg-in44.8%
+-commutative44.8%
cancel-sign-sub-inv44.8%
div-inv44.8%
associate-*l/41.1%
sub-div42.5%
Applied egg-rr42.5%
Taylor expanded in x around inf 41.4%
associate-/l*46.4%
sub-neg46.4%
metadata-eval46.4%
Simplified46.4%
if -5.4999999999999996e-19 < x Initial program 95.3%
fabs-sub95.3%
associate-*l/95.2%
associate-*r/92.2%
fmm-def93.3%
distribute-neg-frac93.3%
+-commutative93.3%
distribute-neg-in93.3%
unsub-neg93.3%
metadata-eval93.3%
Simplified93.3%
fma-undefine92.2%
associate-*r/95.2%
associate-*l/95.3%
div-inv95.2%
sub-neg95.2%
metadata-eval95.2%
distribute-neg-in95.2%
+-commutative95.2%
cancel-sign-sub-inv95.2%
div-inv95.3%
fabs-sub95.3%
add-sqr-sqrt49.7%
fabs-sqr49.7%
add-sqr-sqrt50.7%
associate-*l/51.2%
sub-div52.8%
Applied egg-rr52.8%
Taylor expanded in z around 0 40.4%
Final simplification42.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 88.9%
fabs-sub88.9%
associate-*l/86.3%
associate-*r/92.0%
fmm-def95.2%
distribute-neg-frac95.2%
+-commutative95.2%
distribute-neg-in95.2%
unsub-neg95.2%
metadata-eval95.2%
Simplified95.2%
add-sqr-sqrt49.7%
fabs-sqr49.7%
add-sqr-sqrt50.2%
fma-undefine48.6%
associate-*r/42.9%
associate-*l/47.1%
div-inv47.0%
sub-neg47.0%
metadata-eval47.0%
distribute-neg-in47.0%
+-commutative47.0%
cancel-sign-sub-inv47.0%
div-inv47.1%
associate-*l/42.9%
sub-div44.5%
Applied egg-rr44.5%
Taylor expanded in z around 0 28.6%
associate-*r/28.6%
distribute-lft-in28.6%
metadata-eval28.6%
neg-mul-128.6%
sub-neg28.6%
Simplified28.6%
if -4 < x Initial program 95.5%
fabs-sub95.5%
associate-*l/95.4%
associate-*r/92.5%
fmm-def93.5%
distribute-neg-frac93.5%
+-commutative93.5%
distribute-neg-in93.5%
unsub-neg93.5%
metadata-eval93.5%
Simplified93.5%
fma-undefine92.5%
associate-*r/95.4%
associate-*l/95.5%
div-inv95.4%
sub-neg95.4%
metadata-eval95.4%
distribute-neg-in95.4%
+-commutative95.4%
cancel-sign-sub-inv95.4%
div-inv95.5%
fabs-sub95.5%
add-sqr-sqrt50.8%
fabs-sqr50.8%
add-sqr-sqrt51.7%
associate-*l/52.1%
sub-div53.7%
Applied egg-rr53.7%
Taylor expanded in z around 0 39.8%
Final simplification37.0%
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(x / Float64(-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 88.9%
fabs-sub88.9%
associate-*l/86.3%
associate-*r/92.0%
fmm-def95.2%
distribute-neg-frac95.2%
+-commutative95.2%
distribute-neg-in95.2%
unsub-neg95.2%
metadata-eval95.2%
Simplified95.2%
add-sqr-sqrt49.7%
fabs-sqr49.7%
add-sqr-sqrt50.2%
fma-undefine48.6%
associate-*r/42.9%
associate-*l/47.1%
div-inv47.0%
sub-neg47.0%
metadata-eval47.0%
distribute-neg-in47.0%
+-commutative47.0%
cancel-sign-sub-inv47.0%
div-inv47.1%
associate-*l/42.9%
sub-div44.5%
Applied egg-rr44.5%
Taylor expanded in z around 0 28.6%
associate-*r/28.6%
distribute-lft-in28.6%
metadata-eval28.6%
neg-mul-128.6%
sub-neg28.6%
Simplified28.6%
Taylor expanded in x around inf 28.6%
neg-mul-128.6%
Simplified28.6%
if -4 < x Initial program 95.5%
fabs-sub95.5%
associate-*l/95.4%
associate-*r/92.5%
fmm-def93.5%
distribute-neg-frac93.5%
+-commutative93.5%
distribute-neg-in93.5%
unsub-neg93.5%
metadata-eval93.5%
Simplified93.5%
fma-undefine92.5%
associate-*r/95.4%
associate-*l/95.5%
div-inv95.4%
sub-neg95.4%
metadata-eval95.4%
distribute-neg-in95.4%
+-commutative95.4%
cancel-sign-sub-inv95.4%
div-inv95.5%
fabs-sub95.5%
add-sqr-sqrt50.8%
fabs-sqr50.8%
add-sqr-sqrt51.7%
associate-*l/52.1%
sub-div53.7%
Applied egg-rr53.7%
Taylor expanded in z around 0 39.8%
Final simplification37.0%
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 93.5%
fabs-sub93.5%
associate-*l/95.1%
associate-*r/91.5%
fmm-def92.6%
distribute-neg-frac92.6%
+-commutative92.6%
distribute-neg-in92.6%
unsub-neg92.6%
metadata-eval92.6%
Simplified92.6%
fma-undefine91.5%
associate-*r/95.1%
associate-*l/93.5%
div-inv93.5%
sub-neg93.5%
metadata-eval93.5%
distribute-neg-in93.5%
+-commutative93.5%
cancel-sign-sub-inv93.5%
div-inv93.5%
fabs-sub93.5%
add-sqr-sqrt50.0%
fabs-sqr50.0%
add-sqr-sqrt51.0%
associate-*l/52.5%
sub-div54.7%
Applied egg-rr54.7%
Taylor expanded in x around 0 28.7%
if 4 < x Initial program 94.6%
fabs-sub94.6%
associate-*l/88.3%
associate-*r/94.6%
fmm-def97.3%
distribute-neg-frac97.3%
+-commutative97.3%
distribute-neg-in97.3%
unsub-neg97.3%
metadata-eval97.3%
Simplified97.3%
fma-undefine94.6%
associate-*r/88.3%
associate-*l/94.6%
div-inv94.4%
sub-neg94.4%
metadata-eval94.4%
distribute-neg-in94.4%
+-commutative94.4%
cancel-sign-sub-inv94.4%
div-inv94.6%
fabs-sub94.6%
add-sqr-sqrt45.1%
fabs-sqr45.1%
add-sqr-sqrt45.7%
sub-neg45.7%
distribute-rgt-neg-in45.7%
Applied egg-rr45.7%
Taylor expanded in x around -inf 49.6%
mul-1-neg49.6%
div-sub49.6%
associate-/l*48.4%
sub-neg48.4%
metadata-eval48.4%
distribute-rgt-in48.4%
neg-mul-148.4%
sub-neg48.4%
*-lft-identity48.4%
sub-neg48.4%
distribute-rgt-in48.4%
*-rgt-identity48.4%
remove-double-neg48.4%
*-commutative48.4%
mul-1-neg48.4%
associate-*r*48.4%
neg-mul-148.4%
distribute-rgt-neg-in48.4%
mul-1-neg48.4%
distribute-lft-in48.4%
neg-mul-148.4%
+-commutative48.4%
associate-*r*48.4%
Simplified49.6%
Taylor expanded in z around 0 32.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 93.8%
fabs-sub93.8%
associate-*l/93.1%
associate-*r/92.4%
fmm-def93.9%
distribute-neg-frac93.9%
+-commutative93.9%
distribute-neg-in93.9%
unsub-neg93.9%
metadata-eval93.9%
Simplified93.9%
fma-undefine92.4%
associate-*r/93.1%
associate-*l/93.8%
div-inv93.7%
sub-neg93.7%
metadata-eval93.7%
distribute-neg-in93.7%
+-commutative93.7%
cancel-sign-sub-inv93.7%
div-inv93.8%
fabs-sub93.8%
add-sqr-sqrt48.6%
fabs-sqr48.6%
add-sqr-sqrt49.4%
associate-*l/50.1%
sub-div52.9%
Applied egg-rr52.9%
Taylor expanded in x around 0 21.1%
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.8%
fabs-sub93.8%
associate-*l/93.1%
associate-*r/92.4%
fmm-def93.9%
distribute-neg-frac93.9%
+-commutative93.9%
distribute-neg-in93.9%
unsub-neg93.9%
metadata-eval93.9%
Simplified93.9%
add-sqr-sqrt44.5%
fabs-sqr44.5%
add-sqr-sqrt45.5%
fma-undefine44.7%
associate-*r/44.3%
associate-*l/45.8%
div-inv45.7%
sub-neg45.7%
metadata-eval45.7%
distribute-neg-in45.7%
+-commutative45.7%
cancel-sign-sub-inv45.7%
div-inv45.8%
associate-*l/44.3%
sub-div45.1%
Applied egg-rr45.1%
Taylor expanded in x around 0 16.7%
herbie shell --seed 2024151
(FPCore (x y z)
:name "fabs fraction 1"
:precision binary64
(fabs (- (/ (+ x 4.0) y) (* (/ x y) z))))