
(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-109) (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-109) {
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-109) 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-109], 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^{-109}:\\
\;\;\;\;\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 < 4e-109Initial program 90.5%
Simplified95.6%
if 4e-109 < y Initial program 92.1%
fabs-sub92.1%
associate-*l/93.9%
associate-*r/98.6%
fma-neg99.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)) (t_1 (fabs (- t_0 (* z (/ x y_m))))))
(if (or (<= t_1 4e-11) (not (<= t_1 5e+297)))
(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((t_0 - (z * (x / y_m))));
double tmp;
if ((t_1 <= 4e-11) || !(t_1 <= 5e+297)) {
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(t_0 - Float64(z * Float64(x / y_m)))) tmp = 0.0 if ((t_1 <= 4e-11) || !(t_1 <= 5e+297)) 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[(t$95$0 - N[(z * N[(x / y$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[t$95$1, 4e-11], N[Not[LessEqual[t$95$1, 5e+297]], $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|t\_0 - z \cdot \frac{x}{y\_m}\right|\\
\mathbf{if}\;t\_1 \leq 4 \cdot 10^{-11} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+297}\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))) < 3.99999999999999976e-11 or 4.9999999999999998e297 < (fabs.f64 (-.f64 (/.f64 (+.f64 x #s(literal 4 binary64)) y) (*.f64 (/.f64 x y) z))) Initial program 83.9%
Simplified99.9%
if 3.99999999999999976e-11 < (fabs.f64 (-.f64 (/.f64 (+.f64 x #s(literal 4 binary64)) y) (*.f64 (/.f64 x y) z))) < 4.9999999999999998e297Initial program 99.7%
*-commutative99.7%
clear-num99.7%
un-div-inv99.8%
Applied egg-rr99.8%
Final simplification99.9%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (let* ((t_0 (fabs (- (/ (+ x 4.0) y_m) (* z (/ x y_m)))))) (if (<= t_0 INFINITY) t_0 (/ (+ -1.0 z) (/ y_m (- x))))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double t_0 = fabs((((x + 4.0) / y_m) - (z * (x / y_m))));
double tmp;
if (t_0 <= ((double) INFINITY)) {
tmp = t_0;
} else {
tmp = (-1.0 + z) / (y_m / -x);
}
return tmp;
}
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double t_0 = Math.abs((((x + 4.0) / y_m) - (z * (x / y_m))));
double tmp;
if (t_0 <= Double.POSITIVE_INFINITY) {
tmp = t_0;
} else {
tmp = (-1.0 + z) / (y_m / -x);
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): t_0 = math.fabs((((x + 4.0) / y_m) - (z * (x / y_m)))) tmp = 0 if t_0 <= math.inf: tmp = t_0 else: tmp = (-1.0 + z) / (y_m / -x) return tmp
y_m = abs(y) function code(x, y_m, z) t_0 = abs(Float64(Float64(Float64(x + 4.0) / y_m) - Float64(z * Float64(x / y_m)))) tmp = 0.0 if (t_0 <= Inf) tmp = t_0; else tmp = Float64(Float64(-1.0 + z) / Float64(y_m / Float64(-x))); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) t_0 = abs((((x + 4.0) / y_m) - (z * (x / y_m)))); tmp = 0.0; if (t_0 <= Inf) tmp = t_0; else tmp = (-1.0 + z) / (y_m / -x); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision]
code[x_, y$95$m_, z_] := Block[{t$95$0 = N[Abs[N[(N[(N[(x + 4.0), $MachinePrecision] / y$95$m), $MachinePrecision] - N[(z * N[(x / y$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$0, Infinity], t$95$0, N[(N[(-1.0 + z), $MachinePrecision] / N[(y$95$m / (-x)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
t_0 := \left|\frac{x + 4}{y\_m} - z \cdot \frac{x}{y\_m}\right|\\
\mathbf{if}\;t\_0 \leq \infty:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{-1 + z}{\frac{y\_m}{-x}}\\
\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.1%
if +inf.0 < (fabs.f64 (-.f64 (/.f64 (+.f64 x #s(literal 4 binary64)) y) (*.f64 (/.f64 x y) z))) Initial program 0.0%
fabs-sub0.0%
associate-*l/18.8%
associate-*r/18.8%
fma-neg50.0%
distribute-neg-frac50.0%
+-commutative50.0%
distribute-neg-in50.0%
unsub-neg50.0%
metadata-eval50.0%
Simplified50.0%
add-sqr-sqrt25.0%
fabs-sqr25.0%
add-sqr-sqrt25.0%
fma-undefine12.5%
associate-*r/12.5%
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/12.5%
sub-div56.3%
Applied egg-rr56.3%
Taylor expanded in x around inf 56.3%
sub-neg56.3%
metadata-eval56.3%
distribute-rgt-in56.3%
neg-mul-156.3%
sub-neg56.3%
div-sub12.5%
associate-*r/0.0%
sub-neg0.0%
neg-mul-10.0%
distribute-rgt-out56.3%
Simplified56.3%
associate-*l/56.3%
associate-*r/56.3%
add-sqr-sqrt31.3%
sqrt-unprod50.0%
sqr-neg50.0%
sqrt-unprod18.8%
add-sqr-sqrt43.8%
distribute-rgt-neg-out43.8%
associate-*r/43.8%
*-commutative43.8%
associate-*r/43.8%
clear-num43.8%
un-div-inv43.8%
Applied egg-rr43.8%
Final simplification93.8%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x -110000000.0) (* (/ x y_m) (+ -1.0 z)) (if (<= x 2600.0) (/ (- 4.0 (* x z)) y_m) (* (/ (+ -1.0 z) y_m) (- x)))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= -110000000.0) {
tmp = (x / y_m) * (-1.0 + z);
} else if (x <= 2600.0) {
tmp = (4.0 - (x * z)) / y_m;
} else {
tmp = ((-1.0 + z) / y_m) * -x;
}
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 <= (-110000000.0d0)) then
tmp = (x / y_m) * ((-1.0d0) + z)
else if (x <= 2600.0d0) then
tmp = (4.0d0 - (x * z)) / y_m
else
tmp = (((-1.0d0) + z) / y_m) * -x
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 <= -110000000.0) {
tmp = (x / y_m) * (-1.0 + z);
} else if (x <= 2600.0) {
tmp = (4.0 - (x * z)) / y_m;
} else {
tmp = ((-1.0 + z) / y_m) * -x;
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= -110000000.0: tmp = (x / y_m) * (-1.0 + z) elif x <= 2600.0: tmp = (4.0 - (x * z)) / y_m else: tmp = ((-1.0 + z) / y_m) * -x return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= -110000000.0) tmp = Float64(Float64(x / y_m) * Float64(-1.0 + z)); elseif (x <= 2600.0) tmp = Float64(Float64(4.0 - Float64(x * z)) / y_m); else tmp = Float64(Float64(Float64(-1.0 + z) / y_m) * Float64(-x)); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (x <= -110000000.0) tmp = (x / y_m) * (-1.0 + z); elseif (x <= 2600.0) tmp = (4.0 - (x * z)) / y_m; else tmp = ((-1.0 + z) / y_m) * -x; end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[x, -110000000.0], N[(N[(x / y$95$m), $MachinePrecision] * N[(-1.0 + z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2600.0], N[(N[(4.0 - N[(x * z), $MachinePrecision]), $MachinePrecision] / y$95$m), $MachinePrecision], N[(N[(N[(-1.0 + z), $MachinePrecision] / y$95$m), $MachinePrecision] * (-x)), $MachinePrecision]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -110000000:\\
\;\;\;\;\frac{x}{y\_m} \cdot \left(-1 + z\right)\\
\mathbf{elif}\;x \leq 2600:\\
\;\;\;\;\frac{4 - x \cdot z}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1 + z}{y\_m} \cdot \left(-x\right)\\
\end{array}
\end{array}
if x < -1.1e8Initial program 88.5%
fabs-sub88.5%
associate-*l/79.3%
associate-*r/88.5%
fma-neg92.8%
distribute-neg-frac92.8%
+-commutative92.8%
distribute-neg-in92.8%
unsub-neg92.8%
metadata-eval92.8%
Simplified92.8%
add-sqr-sqrt51.1%
fabs-sqr51.1%
add-sqr-sqrt51.7%
fma-undefine50.3%
associate-*r/46.3%
associate-*l/50.2%
div-inv50.2%
sub-neg50.2%
metadata-eval50.2%
distribute-neg-in50.2%
+-commutative50.2%
cancel-sign-sub-inv50.2%
div-inv50.2%
associate-*l/46.3%
sub-div52.0%
Applied egg-rr52.0%
Taylor expanded in x around inf 51.8%
sub-neg51.8%
metadata-eval51.8%
distribute-rgt-in51.8%
neg-mul-151.8%
sub-neg51.8%
div-sub46.1%
associate-*r/50.0%
sub-neg50.0%
neg-mul-150.0%
distribute-rgt-out55.8%
Simplified55.8%
if -1.1e8 < x < 2600Initial program 94.2%
fabs-sub94.2%
associate-*l/99.9%
associate-*r/96.7%
fma-neg96.7%
distribute-neg-frac96.7%
+-commutative96.7%
distribute-neg-in96.7%
unsub-neg96.7%
metadata-eval96.7%
Simplified96.7%
fma-undefine96.7%
associate-*r/99.9%
associate-*l/94.2%
div-inv94.2%
sub-neg94.2%
metadata-eval94.2%
distribute-neg-in94.2%
+-commutative94.2%
cancel-sign-sub-inv94.2%
div-inv94.2%
fabs-sub94.2%
add-sqr-sqrt43.7%
fabs-sqr43.7%
add-sqr-sqrt45.2%
associate-*l/46.3%
sub-div46.3%
Applied egg-rr46.3%
Taylor expanded in x around 0 44.3%
if 2600 < x Initial program 88.1%
fabs-sub88.1%
associate-*l/85.6%
associate-*r/92.6%
fma-neg95.5%
distribute-neg-frac95.5%
+-commutative95.5%
distribute-neg-in95.5%
unsub-neg95.5%
metadata-eval95.5%
Simplified95.5%
fma-undefine92.6%
associate-*r/85.6%
associate-*l/88.1%
div-inv88.1%
sub-neg88.1%
metadata-eval88.1%
distribute-neg-in88.1%
+-commutative88.1%
cancel-sign-sub-inv88.1%
div-inv88.1%
fabs-sub88.1%
add-sqr-sqrt38.0%
fabs-sqr38.0%
add-sqr-sqrt38.6%
sub-neg38.6%
distribute-rgt-neg-in38.6%
Applied egg-rr38.6%
Taylor expanded in x around -inf 42.4%
mul-1-neg42.4%
distribute-rgt-neg-in42.4%
div-sub42.4%
sub-neg42.4%
metadata-eval42.4%
Simplified42.4%
Final simplification47.0%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x -530000000.0) (* (/ x y_m) (+ -1.0 z)) (if (<= x 4.2) (/ (- 4.0 (* x z)) y_m) (/ (+ -1.0 z) (/ y_m (- x))))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= -530000000.0) {
tmp = (x / y_m) * (-1.0 + z);
} else if (x <= 4.2) {
tmp = (4.0 - (x * z)) / y_m;
} else {
tmp = (-1.0 + z) / (y_m / -x);
}
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 <= (-530000000.0d0)) then
tmp = (x / y_m) * ((-1.0d0) + z)
else if (x <= 4.2d0) then
tmp = (4.0d0 - (x * z)) / y_m
else
tmp = ((-1.0d0) + z) / (y_m / -x)
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 <= -530000000.0) {
tmp = (x / y_m) * (-1.0 + z);
} else if (x <= 4.2) {
tmp = (4.0 - (x * z)) / y_m;
} else {
tmp = (-1.0 + z) / (y_m / -x);
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= -530000000.0: tmp = (x / y_m) * (-1.0 + z) elif x <= 4.2: tmp = (4.0 - (x * z)) / y_m else: tmp = (-1.0 + z) / (y_m / -x) return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= -530000000.0) tmp = Float64(Float64(x / y_m) * Float64(-1.0 + z)); elseif (x <= 4.2) tmp = Float64(Float64(4.0 - Float64(x * z)) / y_m); else tmp = Float64(Float64(-1.0 + z) / Float64(y_m / Float64(-x))); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (x <= -530000000.0) tmp = (x / y_m) * (-1.0 + z); elseif (x <= 4.2) tmp = (4.0 - (x * z)) / y_m; else tmp = (-1.0 + z) / (y_m / -x); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[x, -530000000.0], N[(N[(x / y$95$m), $MachinePrecision] * N[(-1.0 + z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.2], N[(N[(4.0 - N[(x * z), $MachinePrecision]), $MachinePrecision] / y$95$m), $MachinePrecision], N[(N[(-1.0 + z), $MachinePrecision] / N[(y$95$m / (-x)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -530000000:\\
\;\;\;\;\frac{x}{y\_m} \cdot \left(-1 + z\right)\\
\mathbf{elif}\;x \leq 4.2:\\
\;\;\;\;\frac{4 - x \cdot z}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1 + z}{\frac{y\_m}{-x}}\\
\end{array}
\end{array}
if x < -5.3e8Initial program 88.5%
fabs-sub88.5%
associate-*l/79.3%
associate-*r/88.5%
fma-neg92.8%
distribute-neg-frac92.8%
+-commutative92.8%
distribute-neg-in92.8%
unsub-neg92.8%
metadata-eval92.8%
Simplified92.8%
add-sqr-sqrt51.1%
fabs-sqr51.1%
add-sqr-sqrt51.7%
fma-undefine50.3%
associate-*r/46.3%
associate-*l/50.2%
div-inv50.2%
sub-neg50.2%
metadata-eval50.2%
distribute-neg-in50.2%
+-commutative50.2%
cancel-sign-sub-inv50.2%
div-inv50.2%
associate-*l/46.3%
sub-div52.0%
Applied egg-rr52.0%
Taylor expanded in x around inf 51.8%
sub-neg51.8%
metadata-eval51.8%
distribute-rgt-in51.8%
neg-mul-151.8%
sub-neg51.8%
div-sub46.1%
associate-*r/50.0%
sub-neg50.0%
neg-mul-150.0%
distribute-rgt-out55.8%
Simplified55.8%
if -5.3e8 < x < 4.20000000000000018Initial program 94.1%
fabs-sub94.1%
associate-*l/99.9%
associate-*r/96.6%
fma-neg96.6%
distribute-neg-frac96.6%
+-commutative96.6%
distribute-neg-in96.6%
unsub-neg96.6%
metadata-eval96.6%
Simplified96.6%
fma-undefine96.6%
associate-*r/99.9%
associate-*l/94.1%
div-inv94.1%
sub-neg94.1%
metadata-eval94.1%
distribute-neg-in94.1%
+-commutative94.1%
cancel-sign-sub-inv94.1%
div-inv94.1%
fabs-sub94.1%
add-sqr-sqrt43.6%
fabs-sqr43.6%
add-sqr-sqrt45.1%
associate-*l/46.2%
sub-div46.2%
Applied egg-rr46.2%
Taylor expanded in x around 0 44.3%
if 4.20000000000000018 < x Initial program 88.5%
fabs-sub88.5%
associate-*l/86.0%
associate-*r/92.8%
fma-neg95.6%
distribute-neg-frac95.6%
+-commutative95.6%
distribute-neg-in95.6%
unsub-neg95.6%
metadata-eval95.6%
Simplified95.6%
add-sqr-sqrt54.0%
fabs-sqr54.0%
add-sqr-sqrt54.6%
fma-undefine53.1%
associate-*r/50.4%
associate-*l/50.3%
div-inv50.2%
sub-neg50.2%
metadata-eval50.2%
distribute-neg-in50.2%
+-commutative50.2%
cancel-sign-sub-inv50.2%
div-inv50.3%
associate-*l/50.4%
sub-div54.7%
Applied egg-rr54.7%
Taylor expanded in x around inf 54.0%
sub-neg54.0%
metadata-eval54.0%
distribute-rgt-in54.0%
neg-mul-154.0%
sub-neg54.0%
div-sub49.7%
associate-*r/49.5%
sub-neg49.5%
neg-mul-149.5%
distribute-rgt-out56.7%
Simplified56.7%
associate-*l/54.0%
associate-*r/56.6%
add-sqr-sqrt56.2%
sqrt-unprod81.1%
sqr-neg81.1%
sqrt-unprod42.1%
add-sqr-sqrt42.7%
distribute-rgt-neg-out42.7%
associate-*r/38.7%
*-commutative38.7%
associate-*r/42.7%
clear-num42.6%
un-div-inv42.6%
Applied egg-rr42.6%
Final simplification47.0%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x -110000000.0) (* (/ x y_m) (+ -1.0 z)) (if (<= x 0.036) (/ (- 4.0 (* x z)) y_m) (/ (- x (* x z)) y_m))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= -110000000.0) {
tmp = (x / y_m) * (-1.0 + z);
} else if (x <= 0.036) {
tmp = (4.0 - (x * z)) / y_m;
} else {
tmp = (x - (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 <= (-110000000.0d0)) then
tmp = (x / y_m) * ((-1.0d0) + z)
else if (x <= 0.036d0) then
tmp = (4.0d0 - (x * z)) / y_m
else
tmp = (x - (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 <= -110000000.0) {
tmp = (x / y_m) * (-1.0 + z);
} else if (x <= 0.036) {
tmp = (4.0 - (x * z)) / y_m;
} else {
tmp = (x - (x * z)) / y_m;
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= -110000000.0: tmp = (x / y_m) * (-1.0 + z) elif x <= 0.036: tmp = (4.0 - (x * z)) / y_m else: tmp = (x - (x * z)) / y_m return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= -110000000.0) tmp = Float64(Float64(x / y_m) * Float64(-1.0 + z)); elseif (x <= 0.036) tmp = Float64(Float64(4.0 - Float64(x * z)) / y_m); else tmp = Float64(Float64(x - 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 <= -110000000.0) tmp = (x / y_m) * (-1.0 + z); elseif (x <= 0.036) tmp = (4.0 - (x * z)) / y_m; else tmp = (x - (x * z)) / y_m; end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[x, -110000000.0], N[(N[(x / y$95$m), $MachinePrecision] * N[(-1.0 + z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 0.036], N[(N[(4.0 - N[(x * z), $MachinePrecision]), $MachinePrecision] / y$95$m), $MachinePrecision], N[(N[(x - N[(x * z), $MachinePrecision]), $MachinePrecision] / y$95$m), $MachinePrecision]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -110000000:\\
\;\;\;\;\frac{x}{y\_m} \cdot \left(-1 + z\right)\\
\mathbf{elif}\;x \leq 0.036:\\
\;\;\;\;\frac{4 - x \cdot z}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{x - x \cdot z}{y\_m}\\
\end{array}
\end{array}
if x < -1.1e8Initial program 88.5%
fabs-sub88.5%
associate-*l/79.3%
associate-*r/88.5%
fma-neg92.8%
distribute-neg-frac92.8%
+-commutative92.8%
distribute-neg-in92.8%
unsub-neg92.8%
metadata-eval92.8%
Simplified92.8%
add-sqr-sqrt51.1%
fabs-sqr51.1%
add-sqr-sqrt51.7%
fma-undefine50.3%
associate-*r/46.3%
associate-*l/50.2%
div-inv50.2%
sub-neg50.2%
metadata-eval50.2%
distribute-neg-in50.2%
+-commutative50.2%
cancel-sign-sub-inv50.2%
div-inv50.2%
associate-*l/46.3%
sub-div52.0%
Applied egg-rr52.0%
Taylor expanded in x around inf 51.8%
sub-neg51.8%
metadata-eval51.8%
distribute-rgt-in51.8%
neg-mul-151.8%
sub-neg51.8%
div-sub46.1%
associate-*r/50.0%
sub-neg50.0%
neg-mul-150.0%
distribute-rgt-out55.8%
Simplified55.8%
if -1.1e8 < x < 0.0359999999999999973Initial program 94.1%
fabs-sub94.1%
associate-*l/99.9%
associate-*r/96.6%
fma-neg96.6%
distribute-neg-frac96.6%
+-commutative96.6%
distribute-neg-in96.6%
unsub-neg96.6%
metadata-eval96.6%
Simplified96.6%
fma-undefine96.6%
associate-*r/99.9%
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-sqrt43.2%
fabs-sqr43.2%
add-sqr-sqrt44.7%
associate-*l/45.7%
sub-div45.7%
Applied egg-rr45.7%
Taylor expanded in x around 0 43.8%
if 0.0359999999999999973 < x Initial program 88.6%
fabs-sub88.6%
associate-*l/86.2%
associate-*r/92.9%
fma-neg95.7%
distribute-neg-frac95.7%
+-commutative95.7%
distribute-neg-in95.7%
unsub-neg95.7%
metadata-eval95.7%
Simplified95.7%
fma-undefine92.9%
associate-*r/86.2%
associate-*l/88.6%
div-inv88.5%
sub-neg88.5%
metadata-eval88.5%
distribute-neg-in88.5%
+-commutative88.5%
cancel-sign-sub-inv88.5%
div-inv88.6%
fabs-sub88.6%
add-sqr-sqrt39.2%
fabs-sqr39.2%
add-sqr-sqrt39.7%
associate-*l/37.2%
sub-div40.0%
Applied egg-rr40.0%
Taylor expanded in x around inf 39.5%
Final simplification45.9%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x -110000000.0) (* (/ x y_m) (+ -1.0 z)) (if (<= x 2000.0) (/ (- 4.0 (* x z)) y_m) (/ (+ x 4.0) y_m))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= -110000000.0) {
tmp = (x / y_m) * (-1.0 + z);
} else if (x <= 2000.0) {
tmp = (4.0 - (x * z)) / y_m;
} else {
tmp = (x + 4.0) / y_m;
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-110000000.0d0)) then
tmp = (x / y_m) * ((-1.0d0) + z)
else if (x <= 2000.0d0) then
tmp = (4.0d0 - (x * z)) / y_m
else
tmp = (x + 4.0d0) / y_m
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double tmp;
if (x <= -110000000.0) {
tmp = (x / y_m) * (-1.0 + z);
} else if (x <= 2000.0) {
tmp = (4.0 - (x * z)) / y_m;
} else {
tmp = (x + 4.0) / y_m;
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= -110000000.0: tmp = (x / y_m) * (-1.0 + z) elif x <= 2000.0: tmp = (4.0 - (x * z)) / y_m else: tmp = (x + 4.0) / y_m return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= -110000000.0) tmp = Float64(Float64(x / y_m) * Float64(-1.0 + z)); elseif (x <= 2000.0) tmp = Float64(Float64(4.0 - Float64(x * z)) / y_m); else tmp = Float64(Float64(x + 4.0) / y_m); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (x <= -110000000.0) tmp = (x / y_m) * (-1.0 + z); elseif (x <= 2000.0) tmp = (4.0 - (x * z)) / y_m; else tmp = (x + 4.0) / y_m; end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[x, -110000000.0], N[(N[(x / y$95$m), $MachinePrecision] * N[(-1.0 + z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2000.0], N[(N[(4.0 - N[(x * z), $MachinePrecision]), $MachinePrecision] / y$95$m), $MachinePrecision], N[(N[(x + 4.0), $MachinePrecision] / y$95$m), $MachinePrecision]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -110000000:\\
\;\;\;\;\frac{x}{y\_m} \cdot \left(-1 + z\right)\\
\mathbf{elif}\;x \leq 2000:\\
\;\;\;\;\frac{4 - x \cdot z}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + 4}{y\_m}\\
\end{array}
\end{array}
if x < -1.1e8Initial program 88.5%
fabs-sub88.5%
associate-*l/79.3%
associate-*r/88.5%
fma-neg92.8%
distribute-neg-frac92.8%
+-commutative92.8%
distribute-neg-in92.8%
unsub-neg92.8%
metadata-eval92.8%
Simplified92.8%
add-sqr-sqrt51.1%
fabs-sqr51.1%
add-sqr-sqrt51.7%
fma-undefine50.3%
associate-*r/46.3%
associate-*l/50.2%
div-inv50.2%
sub-neg50.2%
metadata-eval50.2%
distribute-neg-in50.2%
+-commutative50.2%
cancel-sign-sub-inv50.2%
div-inv50.2%
associate-*l/46.3%
sub-div52.0%
Applied egg-rr52.0%
Taylor expanded in x around inf 51.8%
sub-neg51.8%
metadata-eval51.8%
distribute-rgt-in51.8%
neg-mul-151.8%
sub-neg51.8%
div-sub46.1%
associate-*r/50.0%
sub-neg50.0%
neg-mul-150.0%
distribute-rgt-out55.8%
Simplified55.8%
if -1.1e8 < x < 2e3Initial program 94.1%
fabs-sub94.1%
associate-*l/99.9%
associate-*r/96.7%
fma-neg96.7%
distribute-neg-frac96.7%
+-commutative96.7%
distribute-neg-in96.7%
unsub-neg96.7%
metadata-eval96.7%
Simplified96.7%
fma-undefine96.7%
associate-*r/99.9%
associate-*l/94.1%
div-inv94.1%
sub-neg94.1%
metadata-eval94.1%
distribute-neg-in94.1%
+-commutative94.1%
cancel-sign-sub-inv94.1%
div-inv94.1%
fabs-sub94.1%
add-sqr-sqrt44.1%
fabs-sqr44.1%
add-sqr-sqrt45.6%
associate-*l/46.7%
sub-div46.7%
Applied egg-rr46.7%
Taylor expanded in x around 0 44.7%
if 2e3 < x Initial program 88.3%
fabs-sub88.3%
associate-*l/85.8%
associate-*r/92.7%
fma-neg95.6%
distribute-neg-frac95.6%
+-commutative95.6%
distribute-neg-in95.6%
unsub-neg95.6%
metadata-eval95.6%
Simplified95.6%
fma-undefine92.7%
associate-*r/85.8%
associate-*l/88.3%
div-inv88.2%
sub-neg88.2%
metadata-eval88.2%
distribute-neg-in88.2%
+-commutative88.2%
cancel-sign-sub-inv88.2%
div-inv88.3%
fabs-sub88.3%
add-sqr-sqrt37.5%
fabs-sqr37.5%
add-sqr-sqrt38.0%
associate-*l/35.3%
sub-div38.3%
Applied egg-rr38.3%
Taylor expanded in z around 0 31.0%
Final simplification44.0%
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)) (/ (- (+ x 4.0) (* x 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 {
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 <= (-4.0d0)) then
tmp = (x * (z / y_m)) - ((x + 4.0d0) / 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 <= -4.0) {
tmp = (x * (z / y_m)) - ((x + 4.0) / 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 <= -4.0: tmp = (x * (z / y_m)) - ((x + 4.0) / 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 <= -4.0) tmp = Float64(Float64(x * Float64(z / y_m)) - Float64(Float64(x + 4.0) / 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 <= -4.0) tmp = (x * (z / y_m)) - ((x + 4.0) / 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, -4.0], N[(N[(x * N[(z / y$95$m), $MachinePrecision]), $MachinePrecision] - N[(N[(x + 4.0), $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 -4:\\
\;\;\;\;x \cdot \frac{z}{y\_m} - \frac{x + 4}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(x + 4\right) - x \cdot z}{y\_m}\\
\end{array}
\end{array}
if x < -4Initial program 89.0%
fabs-sub89.0%
associate-*l/80.2%
associate-*r/89.0%
fma-neg93.1%
distribute-neg-frac93.1%
+-commutative93.1%
distribute-neg-in93.1%
unsub-neg93.1%
metadata-eval93.1%
Simplified93.1%
add-sqr-sqrt51.7%
fabs-sqr51.7%
add-sqr-sqrt52.4%
fma-undefine51.0%
associate-*r/47.2%
associate-*l/51.0%
div-inv50.9%
sub-neg50.9%
metadata-eval50.9%
distribute-neg-in50.9%
+-commutative50.9%
cancel-sign-sub-inv50.9%
div-inv51.0%
associate-*l/47.2%
associate-*r/51.0%
Applied egg-rr51.0%
if -4 < x Initial program 91.8%
fabs-sub91.8%
associate-*l/94.5%
associate-*r/95.1%
fma-neg96.2%
distribute-neg-frac96.2%
+-commutative96.2%
distribute-neg-in96.2%
unsub-neg96.2%
metadata-eval96.2%
Simplified96.2%
fma-undefine95.1%
associate-*r/94.5%
associate-*l/91.8%
div-inv91.8%
sub-neg91.8%
metadata-eval91.8%
distribute-neg-in91.8%
+-commutative91.8%
cancel-sign-sub-inv91.8%
div-inv91.8%
fabs-sub91.8%
add-sqr-sqrt41.8%
fabs-sqr41.8%
add-sqr-sqrt42.9%
associate-*l/42.6%
sub-div43.7%
Applied egg-rr43.7%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x -66000000000.0) (* (/ x y_m) (+ -1.0 z)) (/ (- (+ x 4.0) (* x z)) y_m)))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= -66000000000.0) {
tmp = (x / y_m) * (-1.0 + z);
} 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 <= (-66000000000.0d0)) then
tmp = (x / y_m) * ((-1.0d0) + z)
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 <= -66000000000.0) {
tmp = (x / y_m) * (-1.0 + z);
} 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 <= -66000000000.0: tmp = (x / y_m) * (-1.0 + z) 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 <= -66000000000.0) tmp = Float64(Float64(x / y_m) * Float64(-1.0 + z)); 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 <= -66000000000.0) tmp = (x / y_m) * (-1.0 + z); 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, -66000000000.0], N[(N[(x / y$95$m), $MachinePrecision] * N[(-1.0 + z), $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 -66000000000:\\
\;\;\;\;\frac{x}{y\_m} \cdot \left(-1 + z\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(x + 4\right) - x \cdot z}{y\_m}\\
\end{array}
\end{array}
if x < -6.6e10Initial program 88.5%
fabs-sub88.5%
associate-*l/79.3%
associate-*r/88.5%
fma-neg92.8%
distribute-neg-frac92.8%
+-commutative92.8%
distribute-neg-in92.8%
unsub-neg92.8%
metadata-eval92.8%
Simplified92.8%
add-sqr-sqrt51.1%
fabs-sqr51.1%
add-sqr-sqrt51.7%
fma-undefine50.3%
associate-*r/46.3%
associate-*l/50.2%
div-inv50.2%
sub-neg50.2%
metadata-eval50.2%
distribute-neg-in50.2%
+-commutative50.2%
cancel-sign-sub-inv50.2%
div-inv50.2%
associate-*l/46.3%
sub-div52.0%
Applied egg-rr52.0%
Taylor expanded in x around inf 51.8%
sub-neg51.8%
metadata-eval51.8%
distribute-rgt-in51.8%
neg-mul-151.8%
sub-neg51.8%
div-sub46.1%
associate-*r/50.0%
sub-neg50.0%
neg-mul-150.0%
distribute-rgt-out55.8%
Simplified55.8%
if -6.6e10 < x Initial program 92.0%
fabs-sub92.0%
associate-*l/94.6%
associate-*r/95.2%
fma-neg96.3%
distribute-neg-frac96.3%
+-commutative96.3%
distribute-neg-in96.3%
unsub-neg96.3%
metadata-eval96.3%
Simplified96.3%
fma-undefine95.2%
associate-*r/94.6%
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-sqrt41.6%
fabs-sqr41.6%
add-sqr-sqrt42.8%
associate-*l/42.5%
sub-div43.5%
Applied egg-rr43.5%
Final simplification46.9%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x -10.6) (/ 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.6) {
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.6d0)) 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.6) {
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.6: 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.6) 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.6) 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.6], 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.6:\\
\;\;\;\;\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.5999999999999996Initial program 89.0%
fabs-sub89.0%
associate-*l/80.2%
associate-*r/89.0%
fma-neg93.1%
distribute-neg-frac93.1%
+-commutative93.1%
distribute-neg-in93.1%
unsub-neg93.1%
metadata-eval93.1%
Simplified93.1%
add-sqr-sqrt51.7%
fabs-sqr51.7%
add-sqr-sqrt52.4%
fma-undefine51.0%
associate-*r/47.2%
associate-*l/51.0%
div-inv50.9%
sub-neg50.9%
metadata-eval50.9%
distribute-neg-in50.9%
+-commutative50.9%
cancel-sign-sub-inv50.9%
div-inv51.0%
associate-*l/47.2%
sub-div52.7%
Applied egg-rr52.7%
Taylor expanded in x around inf 51.6%
sub-neg51.6%
metadata-eval51.6%
distribute-rgt-in51.6%
neg-mul-151.6%
sub-neg51.6%
div-sub46.1%
associate-*r/49.9%
sub-neg49.9%
neg-mul-149.9%
distribute-rgt-out55.4%
Simplified55.4%
Taylor expanded in z around 0 32.3%
mul-1-neg32.3%
distribute-frac-neg32.3%
Simplified32.3%
if -10.5999999999999996 < x < 4Initial program 94.0%
fabs-sub94.0%
associate-*l/99.8%
associate-*r/96.6%
fma-neg96.6%
distribute-neg-frac96.6%
+-commutative96.6%
distribute-neg-in96.6%
unsub-neg96.6%
metadata-eval96.6%
Simplified96.6%
fma-undefine96.6%
associate-*r/99.8%
associate-*l/94.0%
div-inv93.9%
sub-neg93.9%
metadata-eval93.9%
distribute-neg-in93.9%
+-commutative93.9%
cancel-sign-sub-inv93.9%
div-inv94.0%
fabs-sub94.0%
add-sqr-sqrt43.9%
fabs-sqr43.9%
add-sqr-sqrt45.4%
associate-*l/46.5%
sub-div46.5%
Applied egg-rr46.5%
Taylor expanded in x around 0 34.8%
if 4 < x Initial program 88.5%
fabs-sub88.5%
associate-*l/86.0%
associate-*r/92.8%
fma-neg95.6%
distribute-neg-frac95.6%
+-commutative95.6%
distribute-neg-in95.6%
unsub-neg95.6%
metadata-eval95.6%
Simplified95.6%
fma-undefine92.8%
associate-*r/86.0%
associate-*l/88.5%
div-inv88.4%
sub-neg88.4%
metadata-eval88.4%
distribute-neg-in88.4%
+-commutative88.4%
cancel-sign-sub-inv88.4%
div-inv88.5%
fabs-sub88.5%
add-sqr-sqrt38.3%
fabs-sqr38.3%
add-sqr-sqrt38.9%
sub-neg38.9%
distribute-rgt-neg-in38.9%
Applied egg-rr38.9%
Taylor expanded in x around -inf 42.7%
mul-1-neg42.7%
distribute-rgt-neg-in42.7%
div-sub42.7%
sub-neg42.7%
metadata-eval42.7%
Simplified42.7%
Taylor expanded in z around 0 30.1%
Final simplification32.8%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x -3.9) (* (/ x y_m) (+ -1.0 z)) (/ (+ x 4.0) y_m)))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= -3.9) {
tmp = (x / y_m) * (-1.0 + z);
} else {
tmp = (x + 4.0) / y_m;
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-3.9d0)) then
tmp = (x / y_m) * ((-1.0d0) + z)
else
tmp = (x + 4.0d0) / y_m
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double tmp;
if (x <= -3.9) {
tmp = (x / y_m) * (-1.0 + z);
} else {
tmp = (x + 4.0) / y_m;
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= -3.9: tmp = (x / y_m) * (-1.0 + z) else: tmp = (x + 4.0) / y_m return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= -3.9) tmp = Float64(Float64(x / y_m) * Float64(-1.0 + z)); else tmp = Float64(Float64(x + 4.0) / y_m); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (x <= -3.9) tmp = (x / y_m) * (-1.0 + z); else tmp = (x + 4.0) / y_m; end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[x, -3.9], N[(N[(x / y$95$m), $MachinePrecision] * N[(-1.0 + z), $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.9:\\
\;\;\;\;\frac{x}{y\_m} \cdot \left(-1 + z\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x + 4}{y\_m}\\
\end{array}
\end{array}
if x < -3.89999999999999991Initial program 89.0%
fabs-sub89.0%
associate-*l/80.2%
associate-*r/89.0%
fma-neg93.1%
distribute-neg-frac93.1%
+-commutative93.1%
distribute-neg-in93.1%
unsub-neg93.1%
metadata-eval93.1%
Simplified93.1%
add-sqr-sqrt51.7%
fabs-sqr51.7%
add-sqr-sqrt52.4%
fma-undefine51.0%
associate-*r/47.2%
associate-*l/51.0%
div-inv50.9%
sub-neg50.9%
metadata-eval50.9%
distribute-neg-in50.9%
+-commutative50.9%
cancel-sign-sub-inv50.9%
div-inv51.0%
associate-*l/47.2%
sub-div52.7%
Applied egg-rr52.7%
Taylor expanded in x around inf 51.6%
sub-neg51.6%
metadata-eval51.6%
distribute-rgt-in51.6%
neg-mul-151.6%
sub-neg51.6%
div-sub46.1%
associate-*r/49.9%
sub-neg49.9%
neg-mul-149.9%
distribute-rgt-out55.4%
Simplified55.4%
if -3.89999999999999991 < x Initial program 91.8%
fabs-sub91.8%
associate-*l/94.5%
associate-*r/95.1%
fma-neg96.2%
distribute-neg-frac96.2%
+-commutative96.2%
distribute-neg-in96.2%
unsub-neg96.2%
metadata-eval96.2%
Simplified96.2%
fma-undefine95.1%
associate-*r/94.5%
associate-*l/91.8%
div-inv91.8%
sub-neg91.8%
metadata-eval91.8%
distribute-neg-in91.8%
+-commutative91.8%
cancel-sign-sub-inv91.8%
div-inv91.8%
fabs-sub91.8%
add-sqr-sqrt41.8%
fabs-sqr41.8%
add-sqr-sqrt42.9%
associate-*l/42.6%
sub-div43.7%
Applied egg-rr43.7%
Taylor expanded in z around 0 33.9%
Final simplification40.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 89.0%
fabs-sub89.0%
associate-*l/80.2%
associate-*r/89.0%
fma-neg93.1%
distribute-neg-frac93.1%
+-commutative93.1%
distribute-neg-in93.1%
unsub-neg93.1%
metadata-eval93.1%
Simplified93.1%
add-sqr-sqrt51.7%
fabs-sqr51.7%
add-sqr-sqrt52.4%
fma-undefine51.0%
associate-*r/47.2%
associate-*l/51.0%
div-inv50.9%
sub-neg50.9%
metadata-eval50.9%
distribute-neg-in50.9%
+-commutative50.9%
cancel-sign-sub-inv50.9%
div-inv51.0%
associate-*l/47.2%
sub-div52.7%
Applied egg-rr52.7%
Taylor expanded in z around 0 33.4%
associate-*r/33.4%
distribute-lft-in33.4%
metadata-eval33.4%
neg-mul-133.4%
sub-neg33.4%
Simplified33.4%
if -4 < x Initial program 91.8%
fabs-sub91.8%
associate-*l/94.5%
associate-*r/95.1%
fma-neg96.2%
distribute-neg-frac96.2%
+-commutative96.2%
distribute-neg-in96.2%
unsub-neg96.2%
metadata-eval96.2%
Simplified96.2%
fma-undefine95.1%
associate-*r/94.5%
associate-*l/91.8%
div-inv91.8%
sub-neg91.8%
metadata-eval91.8%
distribute-neg-in91.8%
+-commutative91.8%
cancel-sign-sub-inv91.8%
div-inv91.8%
fabs-sub91.8%
add-sqr-sqrt41.8%
fabs-sqr41.8%
add-sqr-sqrt42.9%
associate-*l/42.6%
sub-div43.7%
Applied egg-rr43.7%
Taylor expanded in z around 0 33.9%
Final simplification33.8%
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 89.0%
fabs-sub89.0%
associate-*l/80.2%
associate-*r/89.0%
fma-neg93.1%
distribute-neg-frac93.1%
+-commutative93.1%
distribute-neg-in93.1%
unsub-neg93.1%
metadata-eval93.1%
Simplified93.1%
add-sqr-sqrt51.7%
fabs-sqr51.7%
add-sqr-sqrt52.4%
fma-undefine51.0%
associate-*r/47.2%
associate-*l/51.0%
div-inv50.9%
sub-neg50.9%
metadata-eval50.9%
distribute-neg-in50.9%
+-commutative50.9%
cancel-sign-sub-inv50.9%
div-inv51.0%
associate-*l/47.2%
sub-div52.7%
Applied egg-rr52.7%
Taylor expanded in x around inf 51.6%
sub-neg51.6%
metadata-eval51.6%
distribute-rgt-in51.6%
neg-mul-151.6%
sub-neg51.6%
div-sub46.1%
associate-*r/49.9%
sub-neg49.9%
neg-mul-149.9%
distribute-rgt-out55.4%
Simplified55.4%
Taylor expanded in z around 0 32.3%
mul-1-neg32.3%
distribute-frac-neg32.3%
Simplified32.3%
if -4 < x Initial program 91.8%
fabs-sub91.8%
associate-*l/94.5%
associate-*r/95.1%
fma-neg96.2%
distribute-neg-frac96.2%
+-commutative96.2%
distribute-neg-in96.2%
unsub-neg96.2%
metadata-eval96.2%
Simplified96.2%
fma-undefine95.1%
associate-*r/94.5%
associate-*l/91.8%
div-inv91.8%
sub-neg91.8%
metadata-eval91.8%
distribute-neg-in91.8%
+-commutative91.8%
cancel-sign-sub-inv91.8%
div-inv91.8%
fabs-sub91.8%
add-sqr-sqrt41.8%
fabs-sqr41.8%
add-sqr-sqrt42.9%
associate-*l/42.6%
sub-div43.7%
Applied egg-rr43.7%
Taylor expanded in z around 0 33.9%
Final simplification33.5%
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 92.0%
fabs-sub92.0%
associate-*l/92.1%
associate-*r/93.6%
fma-neg95.2%
distribute-neg-frac95.2%
+-commutative95.2%
distribute-neg-in95.2%
unsub-neg95.2%
metadata-eval95.2%
Simplified95.2%
fma-undefine93.6%
associate-*r/92.1%
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-sqrt41.7%
fabs-sqr41.7%
add-sqr-sqrt42.8%
associate-*l/41.5%
sub-div43.6%
Applied egg-rr43.6%
Taylor expanded in x around 0 22.4%
if 4 < x Initial program 88.5%
fabs-sub88.5%
associate-*l/86.0%
associate-*r/92.8%
fma-neg95.6%
distribute-neg-frac95.6%
+-commutative95.6%
distribute-neg-in95.6%
unsub-neg95.6%
metadata-eval95.6%
Simplified95.6%
fma-undefine92.8%
associate-*r/86.0%
associate-*l/88.5%
div-inv88.4%
sub-neg88.4%
metadata-eval88.4%
distribute-neg-in88.4%
+-commutative88.4%
cancel-sign-sub-inv88.4%
div-inv88.5%
fabs-sub88.5%
add-sqr-sqrt38.3%
fabs-sqr38.3%
add-sqr-sqrt38.9%
sub-neg38.9%
distribute-rgt-neg-in38.9%
Applied egg-rr38.9%
Taylor expanded in x around -inf 42.7%
mul-1-neg42.7%
distribute-rgt-neg-in42.7%
div-sub42.7%
sub-neg42.7%
metadata-eval42.7%
Simplified42.7%
Taylor expanded in z around 0 30.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 91.0%
fabs-sub91.0%
associate-*l/90.4%
associate-*r/93.4%
fma-neg95.3%
distribute-neg-frac95.3%
+-commutative95.3%
distribute-neg-in95.3%
unsub-neg95.3%
metadata-eval95.3%
Simplified95.3%
fma-undefine93.4%
associate-*r/90.4%
associate-*l/91.0%
div-inv90.9%
sub-neg90.9%
metadata-eval90.9%
distribute-neg-in90.9%
+-commutative90.9%
cancel-sign-sub-inv90.9%
div-inv91.0%
fabs-sub91.0%
add-sqr-sqrt40.8%
fabs-sqr40.8%
add-sqr-sqrt41.7%
associate-*l/40.0%
sub-div42.4%
Applied egg-rr42.4%
Taylor expanded in x around 0 17.2%
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 91.0%
fabs-sub91.0%
associate-*l/90.4%
associate-*r/93.4%
fma-neg95.3%
distribute-neg-frac95.3%
+-commutative95.3%
distribute-neg-in95.3%
unsub-neg95.3%
metadata-eval95.3%
Simplified95.3%
add-sqr-sqrt52.5%
fabs-sqr52.5%
add-sqr-sqrt53.3%
fma-undefine52.6%
associate-*r/51.8%
associate-*l/50.7%
div-inv50.7%
sub-neg50.7%
metadata-eval50.7%
distribute-neg-in50.7%
+-commutative50.7%
cancel-sign-sub-inv50.7%
div-inv50.7%
associate-*l/51.8%
sub-div54.5%
Applied egg-rr54.5%
Taylor expanded in x around 0 18.5%
herbie shell --seed 2024149
(FPCore (x y z)
:name "fabs fraction 1"
:precision binary64
(fabs (- (/ (+ x 4.0) y) (* (/ x y) z))))