
(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 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (fabs (- (/ (+ x 4.0) y) (* (/ x y) z))))
double code(double x, double y, double z) {
return fabs((((x + 4.0) / y) - ((x / y) * z)));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = abs((((x + 4.0d0) / y) - ((x / y) * z)))
end function
public static double code(double x, double y, double z) {
return Math.abs((((x + 4.0) / y) - ((x / y) * z)));
}
def code(x, y, z): return math.fabs((((x + 4.0) / y) - ((x / y) * z)))
function code(x, y, z) return abs(Float64(Float64(Float64(x + 4.0) / y) - Float64(Float64(x / y) * z))) end
function tmp = code(x, y, z) tmp = abs((((x + 4.0) / y) - ((x / y) * z))); end
code[x_, y_, z_] := N[Abs[N[(N[(N[(x + 4.0), $MachinePrecision] / y), $MachinePrecision] - N[(N[(x / y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right|
\end{array}
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= y_m 5e-47) (fabs (* (/ -1.0 y_m) (fma x z (- -4.0 x)))) (fabs (- (/ (+ x 4.0) y_m) (/ x (/ y_m z))))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (y_m <= 5e-47) {
tmp = fabs(((-1.0 / y_m) * fma(x, z, (-4.0 - x))));
} else {
tmp = fabs((((x + 4.0) / y_m) - (x / (y_m / z))));
}
return tmp;
}
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (y_m <= 5e-47) tmp = abs(Float64(Float64(-1.0 / y_m) * fma(x, z, Float64(-4.0 - x)))); else tmp = abs(Float64(Float64(Float64(x + 4.0) / y_m) - Float64(x / Float64(y_m / z)))); end return tmp end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[y$95$m, 5e-47], N[Abs[N[(N[(-1.0 / y$95$m), $MachinePrecision] * N[(x * z + N[(-4.0 - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(N[(x + 4.0), $MachinePrecision] / y$95$m), $MachinePrecision] - N[(x / N[(y$95$m / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;y\_m \leq 5 \cdot 10^{-47}:\\
\;\;\;\;\left|\frac{-1}{y\_m} \cdot \mathsf{fma}\left(x, z, -4 - x\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{x + 4}{y\_m} - \frac{x}{\frac{y\_m}{z}}\right|\\
\end{array}
\end{array}
if y < 5.00000000000000011e-47Initial program 90.2%
Simplified96.8%
if 5.00000000000000011e-47 < y Initial program 97.6%
associate-*l/90.9%
associate-*r/99.7%
clear-num99.7%
un-div-inv99.8%
Applied egg-rr99.8%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (let* ((t_0 (fabs (- (* z (/ x y_m)) (/ (+ x 4.0) y_m))))) (if (<= t_0 INFINITY) t_0 (/ x (- y_m)))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double t_0 = fabs(((z * (x / y_m)) - ((x + 4.0) / y_m)));
double tmp;
if (t_0 <= ((double) INFINITY)) {
tmp = t_0;
} else {
tmp = x / -y_m;
}
return tmp;
}
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double t_0 = Math.abs(((z * (x / y_m)) - ((x + 4.0) / y_m)));
double tmp;
if (t_0 <= Double.POSITIVE_INFINITY) {
tmp = t_0;
} else {
tmp = x / -y_m;
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): t_0 = math.fabs(((z * (x / y_m)) - ((x + 4.0) / y_m))) tmp = 0 if t_0 <= math.inf: tmp = t_0 else: tmp = x / -y_m return tmp
y_m = abs(y) function code(x, y_m, z) t_0 = abs(Float64(Float64(z * Float64(x / y_m)) - Float64(Float64(x + 4.0) / y_m))) tmp = 0.0 if (t_0 <= Inf) tmp = 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 = abs(((z * (x / y_m)) - ((x + 4.0) / y_m))); tmp = 0.0; if (t_0 <= Inf) tmp = t_0; else tmp = x / -y_m; end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision]
code[x_, y$95$m_, z_] := Block[{t$95$0 = N[Abs[N[(N[(z * N[(x / y$95$m), $MachinePrecision]), $MachinePrecision] - N[(N[(x + 4.0), $MachinePrecision] / y$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$0, Infinity], t$95$0, N[(x / (-y$95$m)), $MachinePrecision]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
t_0 := \left|z \cdot \frac{x}{y\_m} - \frac{x + 4}{y\_m}\right|\\
\mathbf{if}\;t\_0 \leq \infty:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{-y\_m}\\
\end{array}
\end{array}
if (fabs.f64 (-.f64 (/.f64 (+.f64 x #s(literal 4 binary64)) y) (*.f64 (/.f64 x y) z))) < +inf.0Initial program 98.8%
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/35.3%
associate-*r/35.3%
fmm-def82.4%
distribute-neg-frac82.4%
+-commutative82.4%
distribute-neg-in82.4%
unsub-neg82.4%
metadata-eval82.4%
Simplified82.4%
add-sqr-sqrt29.4%
fabs-sqr29.4%
add-sqr-sqrt29.4%
fma-undefine11.8%
associate-*r/11.8%
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/11.8%
sub-div52.9%
Applied egg-rr52.9%
Taylor expanded in z around 0 41.2%
associate-*r/41.2%
neg-mul-141.2%
distribute-neg-in41.2%
metadata-eval41.2%
sub-neg41.2%
Simplified41.2%
Taylor expanded in x around inf 41.2%
neg-mul-141.2%
Simplified41.2%
Final simplification95.0%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= y_m 2e-47) (fabs (* (/ -1.0 y_m) (* x (- (+ -1.0 z) (/ 4.0 x))))) (fabs (- (/ (+ x 4.0) y_m) (/ x (/ y_m z))))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (y_m <= 2e-47) {
tmp = fabs(((-1.0 / y_m) * (x * ((-1.0 + z) - (4.0 / x)))));
} else {
tmp = fabs((((x + 4.0) / y_m) - (x / (y_m / 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 (y_m <= 2d-47) then
tmp = abs((((-1.0d0) / y_m) * (x * (((-1.0d0) + z) - (4.0d0 / x)))))
else
tmp = abs((((x + 4.0d0) / y_m) - (x / (y_m / 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 (y_m <= 2e-47) {
tmp = Math.abs(((-1.0 / y_m) * (x * ((-1.0 + z) - (4.0 / x)))));
} else {
tmp = Math.abs((((x + 4.0) / y_m) - (x / (y_m / z))));
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if y_m <= 2e-47: tmp = math.fabs(((-1.0 / y_m) * (x * ((-1.0 + z) - (4.0 / x))))) else: tmp = math.fabs((((x + 4.0) / y_m) - (x / (y_m / z)))) return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (y_m <= 2e-47) tmp = abs(Float64(Float64(-1.0 / y_m) * Float64(x * Float64(Float64(-1.0 + z) - Float64(4.0 / x))))); else tmp = abs(Float64(Float64(Float64(x + 4.0) / y_m) - Float64(x / Float64(y_m / z)))); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (y_m <= 2e-47) tmp = abs(((-1.0 / y_m) * (x * ((-1.0 + z) - (4.0 / x))))); else tmp = abs((((x + 4.0) / y_m) - (x / (y_m / z)))); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[y$95$m, 2e-47], N[Abs[N[(N[(-1.0 / y$95$m), $MachinePrecision] * N[(x * N[(N[(-1.0 + z), $MachinePrecision] - N[(4.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(N[(x + 4.0), $MachinePrecision] / y$95$m), $MachinePrecision] - N[(x / N[(y$95$m / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;y\_m \leq 2 \cdot 10^{-47}:\\
\;\;\;\;\left|\frac{-1}{y\_m} \cdot \left(x \cdot \left(\left(-1 + z\right) - \frac{4}{x}\right)\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{x + 4}{y\_m} - \frac{x}{\frac{y\_m}{z}}\right|\\
\end{array}
\end{array}
if y < 1.9999999999999999e-47Initial program 90.2%
Simplified96.8%
Taylor expanded in x around inf 96.7%
associate--r+96.7%
sub-neg96.7%
remove-double-neg96.7%
neg-mul-196.7%
metadata-eval96.7%
metadata-eval96.7%
distribute-lft-in96.7%
+-commutative96.7%
distribute-lft-in96.7%
metadata-eval96.7%
neg-mul-196.7%
remove-double-neg96.7%
associate-*r/96.7%
metadata-eval96.7%
Simplified96.7%
if 1.9999999999999999e-47 < y Initial program 97.6%
associate-*l/90.9%
associate-*r/99.7%
clear-num99.7%
un-div-inv99.8%
Applied egg-rr99.8%
y_m = (fabs.f64 y)
(FPCore (x y_m z)
:precision binary64
(let* ((t_0 (* z (/ x y_m))) (t_1 (- (/ (+ x 4.0) y_m) t_0)))
(if (<= t_1 -2e-247)
(+ t_0 (/ (- -4.0 x) y_m))
(if (<= t_1 INFINITY) t_1 (/ x (- y_m))))))y_m = fabs(y);
double code(double x, double y_m, double z) {
double t_0 = z * (x / y_m);
double t_1 = ((x + 4.0) / y_m) - t_0;
double tmp;
if (t_1 <= -2e-247) {
tmp = t_0 + ((-4.0 - x) / y_m);
} else if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = x / -y_m;
}
return tmp;
}
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double t_0 = z * (x / y_m);
double t_1 = ((x + 4.0) / y_m) - t_0;
double tmp;
if (t_1 <= -2e-247) {
tmp = t_0 + ((-4.0 - x) / y_m);
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = x / -y_m;
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): t_0 = z * (x / y_m) t_1 = ((x + 4.0) / y_m) - t_0 tmp = 0 if t_1 <= -2e-247: tmp = t_0 + ((-4.0 - x) / y_m) elif t_1 <= math.inf: tmp = t_1 else: tmp = x / -y_m return tmp
y_m = abs(y) function code(x, y_m, z) t_0 = Float64(z * Float64(x / y_m)) t_1 = Float64(Float64(Float64(x + 4.0) / y_m) - t_0) tmp = 0.0 if (t_1 <= -2e-247) tmp = Float64(t_0 + Float64(Float64(-4.0 - x) / y_m)); elseif (t_1 <= Inf) tmp = t_1; 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 = z * (x / y_m); t_1 = ((x + 4.0) / y_m) - t_0; tmp = 0.0; if (t_1 <= -2e-247) tmp = t_0 + ((-4.0 - x) / y_m); elseif (t_1 <= Inf) tmp = t_1; else tmp = x / -y_m; end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision]
code[x_, y$95$m_, z_] := Block[{t$95$0 = N[(z * N[(x / y$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(x + 4.0), $MachinePrecision] / y$95$m), $MachinePrecision] - t$95$0), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-247], N[(t$95$0 + N[(N[(-4.0 - x), $MachinePrecision] / y$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], t$95$1, N[(x / (-y$95$m)), $MachinePrecision]]]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
t_0 := z \cdot \frac{x}{y\_m}\\
t_1 := \frac{x + 4}{y\_m} - t\_0\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-247}:\\
\;\;\;\;t\_0 + \frac{-4 - x}{y\_m}\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\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)) < -2e-247Initial program 98.4%
fabs-sub98.4%
associate-*l/95.7%
associate-*r/95.7%
fmm-def95.8%
distribute-neg-frac95.8%
+-commutative95.8%
distribute-neg-in95.8%
unsub-neg95.8%
metadata-eval95.8%
Simplified95.8%
Applied egg-rr98.4%
if -2e-247 < (-.f64 (/.f64 (+.f64 x #s(literal 4 binary64)) y) (*.f64 (/.f64 x y) z)) < +inf.0Initial program 99.2%
fabs-sub99.2%
associate-*l/94.1%
associate-*r/95.5%
fmm-def95.5%
distribute-neg-frac95.5%
+-commutative95.5%
distribute-neg-in95.5%
unsub-neg95.5%
metadata-eval95.5%
Simplified95.5%
fma-undefine95.5%
associate-*r/94.1%
associate-*l/99.2%
div-inv99.1%
sub-neg99.1%
metadata-eval99.1%
distribute-neg-in99.1%
+-commutative99.1%
cancel-sign-sub-inv99.1%
div-inv99.2%
fabs-sub99.2%
add-sqr-sqrt94.0%
fabs-sqr94.0%
add-sqr-sqrt94.8%
sub-neg94.8%
distribute-rgt-neg-in94.8%
Applied egg-rr94.8%
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/35.3%
associate-*r/35.3%
fmm-def82.4%
distribute-neg-frac82.4%
+-commutative82.4%
distribute-neg-in82.4%
unsub-neg82.4%
metadata-eval82.4%
Simplified82.4%
add-sqr-sqrt29.4%
fabs-sqr29.4%
add-sqr-sqrt29.4%
fma-undefine11.8%
associate-*r/11.8%
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/11.8%
sub-div52.9%
Applied egg-rr52.9%
Taylor expanded in z around 0 41.2%
associate-*r/41.2%
neg-mul-141.2%
distribute-neg-in41.2%
metadata-eval41.2%
sub-neg41.2%
Simplified41.2%
Taylor expanded in x around inf 41.2%
neg-mul-141.2%
Simplified41.2%
Final simplification92.8%
y_m = (fabs.f64 y)
(FPCore (x y_m z)
:precision binary64
(let* ((t_0 (/ (+ x 4.0) y_m)) (t_1 (- t_0 (* z (/ x y_m)))))
(if (<= t_1 -2e-247)
(- (* x (/ z y_m)) t_0)
(if (<= t_1 INFINITY) t_1 (/ x (- y_m))))))y_m = fabs(y);
double code(double x, double y_m, double z) {
double t_0 = (x + 4.0) / y_m;
double t_1 = t_0 - (z * (x / y_m));
double tmp;
if (t_1 <= -2e-247) {
tmp = (x * (z / y_m)) - t_0;
} else if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = x / -y_m;
}
return tmp;
}
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double t_0 = (x + 4.0) / y_m;
double t_1 = t_0 - (z * (x / y_m));
double tmp;
if (t_1 <= -2e-247) {
tmp = (x * (z / y_m)) - t_0;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = x / -y_m;
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): t_0 = (x + 4.0) / y_m t_1 = t_0 - (z * (x / y_m)) tmp = 0 if t_1 <= -2e-247: tmp = (x * (z / y_m)) - t_0 elif t_1 <= math.inf: tmp = t_1 else: tmp = x / -y_m return tmp
y_m = abs(y) function code(x, y_m, z) t_0 = Float64(Float64(x + 4.0) / y_m) t_1 = Float64(t_0 - Float64(z * Float64(x / y_m))) tmp = 0.0 if (t_1 <= -2e-247) tmp = Float64(Float64(x * Float64(z / y_m)) - t_0); elseif (t_1 <= Inf) tmp = t_1; 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; t_1 = t_0 - (z * (x / y_m)); tmp = 0.0; if (t_1 <= -2e-247) tmp = (x * (z / y_m)) - t_0; elseif (t_1 <= Inf) tmp = t_1; else tmp = x / -y_m; end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision]
code[x_, y$95$m_, z_] := Block[{t$95$0 = N[(N[(x + 4.0), $MachinePrecision] / y$95$m), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 - N[(z * N[(x / y$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-247], N[(N[(x * N[(z / y$95$m), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[t$95$1, Infinity], t$95$1, N[(x / (-y$95$m)), $MachinePrecision]]]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
t_0 := \frac{x + 4}{y\_m}\\
t_1 := t\_0 - z \cdot \frac{x}{y\_m}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-247}:\\
\;\;\;\;x \cdot \frac{z}{y\_m} - t\_0\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\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)) < -2e-247Initial program 98.4%
fabs-sub98.4%
associate-*l/95.7%
associate-*r/95.7%
fmm-def95.8%
distribute-neg-frac95.8%
+-commutative95.8%
distribute-neg-in95.8%
unsub-neg95.8%
metadata-eval95.8%
Simplified95.8%
add-sqr-sqrt95.1%
fabs-sqr95.1%
add-sqr-sqrt95.7%
fma-undefine95.6%
associate-*r/95.7%
associate-*l/98.4%
div-inv98.4%
sub-neg98.4%
metadata-eval98.4%
distribute-neg-in98.4%
+-commutative98.4%
cancel-sign-sub-inv98.4%
associate-*l/95.7%
associate-*r/95.6%
div-inv95.6%
Applied egg-rr95.6%
if -2e-247 < (-.f64 (/.f64 (+.f64 x #s(literal 4 binary64)) y) (*.f64 (/.f64 x y) z)) < +inf.0Initial program 99.2%
fabs-sub99.2%
associate-*l/94.1%
associate-*r/95.5%
fmm-def95.5%
distribute-neg-frac95.5%
+-commutative95.5%
distribute-neg-in95.5%
unsub-neg95.5%
metadata-eval95.5%
Simplified95.5%
fma-undefine95.5%
associate-*r/94.1%
associate-*l/99.2%
div-inv99.1%
sub-neg99.1%
metadata-eval99.1%
distribute-neg-in99.1%
+-commutative99.1%
cancel-sign-sub-inv99.1%
div-inv99.2%
fabs-sub99.2%
add-sqr-sqrt94.0%
fabs-sqr94.0%
add-sqr-sqrt94.8%
sub-neg94.8%
distribute-rgt-neg-in94.8%
Applied egg-rr94.8%
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/35.3%
associate-*r/35.3%
fmm-def82.4%
distribute-neg-frac82.4%
+-commutative82.4%
distribute-neg-in82.4%
unsub-neg82.4%
metadata-eval82.4%
Simplified82.4%
add-sqr-sqrt29.4%
fabs-sqr29.4%
add-sqr-sqrt29.4%
fma-undefine11.8%
associate-*r/11.8%
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/11.8%
sub-div52.9%
Applied egg-rr52.9%
Taylor expanded in z around 0 41.2%
associate-*r/41.2%
neg-mul-141.2%
distribute-neg-in41.2%
metadata-eval41.2%
sub-neg41.2%
Simplified41.2%
Taylor expanded in x around inf 41.2%
neg-mul-141.2%
Simplified41.2%
Final simplification91.6%
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 -2e-247)
(/ (- (* x z) (+ x 4.0)) y_m)
(if (<= t_0 5e+299) (/ (- 4.0 (* x z)) y_m) (* z (/ 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 <= -2e-247) {
tmp = ((x * z) - (x + 4.0)) / y_m;
} else if (t_0 <= 5e+299) {
tmp = (4.0 - (x * z)) / y_m;
} else {
tmp = z * (x / -y_m);
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = ((x + 4.0d0) / y_m) - (z * (x / y_m))
if (t_0 <= (-2d-247)) then
tmp = ((x * z) - (x + 4.0d0)) / y_m
else if (t_0 <= 5d+299) then
tmp = (4.0d0 - (x * z)) / y_m
else
tmp = z * (x / -y_m)
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double t_0 = ((x + 4.0) / y_m) - (z * (x / y_m));
double tmp;
if (t_0 <= -2e-247) {
tmp = ((x * z) - (x + 4.0)) / y_m;
} else if (t_0 <= 5e+299) {
tmp = (4.0 - (x * z)) / y_m;
} else {
tmp = z * (x / -y_m);
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): t_0 = ((x + 4.0) / y_m) - (z * (x / y_m)) tmp = 0 if t_0 <= -2e-247: tmp = ((x * z) - (x + 4.0)) / y_m elif t_0 <= 5e+299: tmp = (4.0 - (x * z)) / y_m else: tmp = z * (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 <= -2e-247) tmp = Float64(Float64(Float64(x * z) - Float64(x + 4.0)) / y_m); elseif (t_0 <= 5e+299) tmp = Float64(Float64(4.0 - Float64(x * z)) / y_m); else tmp = Float64(z * 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 <= -2e-247) tmp = ((x * z) - (x + 4.0)) / y_m; elseif (t_0 <= 5e+299) tmp = (4.0 - (x * z)) / y_m; else tmp = z * (x / -y_m); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision]
code[x_, y$95$m_, z_] := 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, -2e-247], N[(N[(N[(x * z), $MachinePrecision] - N[(x + 4.0), $MachinePrecision]), $MachinePrecision] / y$95$m), $MachinePrecision], If[LessEqual[t$95$0, 5e+299], N[(N[(4.0 - N[(x * z), $MachinePrecision]), $MachinePrecision] / y$95$m), $MachinePrecision], N[(z * N[(x / (-y$95$m)), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
t_0 := \frac{x + 4}{y\_m} - z \cdot \frac{x}{y\_m}\\
\mathbf{if}\;t\_0 \leq -2 \cdot 10^{-247}:\\
\;\;\;\;\frac{x \cdot z - \left(x + 4\right)}{y\_m}\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+299}:\\
\;\;\;\;\frac{4 - x \cdot z}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{x}{-y\_m}\\
\end{array}
\end{array}
if (-.f64 (/.f64 (+.f64 x #s(literal 4 binary64)) y) (*.f64 (/.f64 x y) z)) < -2e-247Initial program 98.4%
fabs-sub98.4%
associate-*l/95.7%
associate-*r/95.7%
fmm-def95.8%
distribute-neg-frac95.8%
+-commutative95.8%
distribute-neg-in95.8%
unsub-neg95.8%
metadata-eval95.8%
Simplified95.8%
add-sqr-sqrt95.1%
fabs-sqr95.1%
add-sqr-sqrt95.7%
fma-undefine95.6%
associate-*r/95.7%
associate-*l/98.4%
div-inv98.4%
sub-neg98.4%
metadata-eval98.4%
distribute-neg-in98.4%
+-commutative98.4%
cancel-sign-sub-inv98.4%
div-inv98.4%
associate-*l/95.7%
sub-div95.7%
Applied egg-rr95.7%
if -2e-247 < (-.f64 (/.f64 (+.f64 x #s(literal 4 binary64)) y) (*.f64 (/.f64 x y) z)) < 5.0000000000000003e299Initial program 98.9%
fabs-sub98.9%
associate-*l/93.3%
associate-*r/94.2%
fmm-def94.2%
distribute-neg-frac94.2%
+-commutative94.2%
distribute-neg-in94.2%
unsub-neg94.2%
metadata-eval94.2%
Simplified94.2%
fma-undefine94.2%
associate-*r/93.3%
associate-*l/98.9%
div-inv98.9%
sub-neg98.9%
metadata-eval98.9%
distribute-neg-in98.9%
+-commutative98.9%
cancel-sign-sub-inv98.9%
div-inv98.9%
fabs-sub98.9%
add-sqr-sqrt92.3%
fabs-sqr92.3%
add-sqr-sqrt93.3%
associate-*l/86.7%
sub-div86.7%
Applied egg-rr86.7%
Taylor expanded in x around 0 69.4%
if 5.0000000000000003e299 < (-.f64 (/.f64 (+.f64 x #s(literal 4 binary64)) y) (*.f64 (/.f64 x y) z)) Initial program 62.2%
fabs-sub62.2%
associate-*l/73.6%
associate-*r/75.6%
fmm-def93.3%
distribute-neg-frac93.3%
+-commutative93.3%
distribute-neg-in93.3%
unsub-neg93.3%
metadata-eval93.3%
Simplified93.3%
fma-undefine75.6%
associate-*r/73.6%
associate-*l/62.2%
div-inv62.2%
sub-neg62.2%
metadata-eval62.2%
distribute-neg-in62.2%
+-commutative62.2%
cancel-sign-sub-inv62.2%
div-inv62.2%
fabs-sub62.2%
add-sqr-sqrt62.2%
fabs-sqr62.2%
add-sqr-sqrt62.2%
sub-neg62.2%
distribute-rgt-neg-in62.2%
Applied egg-rr62.2%
Taylor expanded in x around inf 62.2%
Taylor expanded in z around inf 63.3%
mul-1-neg63.3%
associate-*l/75.7%
distribute-rgt-neg-in75.7%
Simplified75.7%
Final simplification82.0%
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 -2e-247)
(/ (* x (+ -1.0 z)) y_m)
(if (<= t_0 5e+299) (/ (- 4.0 (* x z)) y_m) (* z (/ 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 <= -2e-247) {
tmp = (x * (-1.0 + z)) / y_m;
} else if (t_0 <= 5e+299) {
tmp = (4.0 - (x * z)) / y_m;
} else {
tmp = z * (x / -y_m);
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = ((x + 4.0d0) / y_m) - (z * (x / y_m))
if (t_0 <= (-2d-247)) then
tmp = (x * ((-1.0d0) + z)) / y_m
else if (t_0 <= 5d+299) then
tmp = (4.0d0 - (x * z)) / y_m
else
tmp = z * (x / -y_m)
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double t_0 = ((x + 4.0) / y_m) - (z * (x / y_m));
double tmp;
if (t_0 <= -2e-247) {
tmp = (x * (-1.0 + z)) / y_m;
} else if (t_0 <= 5e+299) {
tmp = (4.0 - (x * z)) / y_m;
} else {
tmp = z * (x / -y_m);
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): t_0 = ((x + 4.0) / y_m) - (z * (x / y_m)) tmp = 0 if t_0 <= -2e-247: tmp = (x * (-1.0 + z)) / y_m elif t_0 <= 5e+299: tmp = (4.0 - (x * z)) / y_m else: tmp = z * (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 <= -2e-247) tmp = Float64(Float64(x * Float64(-1.0 + z)) / y_m); elseif (t_0 <= 5e+299) tmp = Float64(Float64(4.0 - Float64(x * z)) / y_m); else tmp = Float64(z * 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 <= -2e-247) tmp = (x * (-1.0 + z)) / y_m; elseif (t_0 <= 5e+299) tmp = (4.0 - (x * z)) / y_m; else tmp = z * (x / -y_m); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision]
code[x_, y$95$m_, z_] := 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, -2e-247], N[(N[(x * N[(-1.0 + z), $MachinePrecision]), $MachinePrecision] / y$95$m), $MachinePrecision], If[LessEqual[t$95$0, 5e+299], N[(N[(4.0 - N[(x * z), $MachinePrecision]), $MachinePrecision] / y$95$m), $MachinePrecision], N[(z * N[(x / (-y$95$m)), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
t_0 := \frac{x + 4}{y\_m} - z \cdot \frac{x}{y\_m}\\
\mathbf{if}\;t\_0 \leq -2 \cdot 10^{-247}:\\
\;\;\;\;\frac{x \cdot \left(-1 + z\right)}{y\_m}\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+299}:\\
\;\;\;\;\frac{4 - x \cdot z}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{x}{-y\_m}\\
\end{array}
\end{array}
if (-.f64 (/.f64 (+.f64 x #s(literal 4 binary64)) y) (*.f64 (/.f64 x y) z)) < -2e-247Initial program 98.4%
fabs-sub98.4%
associate-*l/95.7%
associate-*r/95.7%
fmm-def95.8%
distribute-neg-frac95.8%
+-commutative95.8%
distribute-neg-in95.8%
unsub-neg95.8%
metadata-eval95.8%
Simplified95.8%
add-sqr-sqrt95.1%
fabs-sqr95.1%
add-sqr-sqrt95.7%
fma-undefine95.6%
associate-*r/95.7%
associate-*l/98.4%
div-inv98.4%
sub-neg98.4%
metadata-eval98.4%
distribute-neg-in98.4%
+-commutative98.4%
cancel-sign-sub-inv98.4%
div-inv98.4%
associate-*l/95.7%
sub-div95.7%
Applied egg-rr95.7%
Taylor expanded in x around inf 62.2%
if -2e-247 < (-.f64 (/.f64 (+.f64 x #s(literal 4 binary64)) y) (*.f64 (/.f64 x y) z)) < 5.0000000000000003e299Initial program 98.9%
fabs-sub98.9%
associate-*l/93.3%
associate-*r/94.2%
fmm-def94.2%
distribute-neg-frac94.2%
+-commutative94.2%
distribute-neg-in94.2%
unsub-neg94.2%
metadata-eval94.2%
Simplified94.2%
fma-undefine94.2%
associate-*r/93.3%
associate-*l/98.9%
div-inv98.9%
sub-neg98.9%
metadata-eval98.9%
distribute-neg-in98.9%
+-commutative98.9%
cancel-sign-sub-inv98.9%
div-inv98.9%
fabs-sub98.9%
add-sqr-sqrt92.3%
fabs-sqr92.3%
add-sqr-sqrt93.3%
associate-*l/86.7%
sub-div86.7%
Applied egg-rr86.7%
Taylor expanded in x around 0 69.4%
if 5.0000000000000003e299 < (-.f64 (/.f64 (+.f64 x #s(literal 4 binary64)) y) (*.f64 (/.f64 x y) z)) Initial program 62.2%
fabs-sub62.2%
associate-*l/73.6%
associate-*r/75.6%
fmm-def93.3%
distribute-neg-frac93.3%
+-commutative93.3%
distribute-neg-in93.3%
unsub-neg93.3%
metadata-eval93.3%
Simplified93.3%
fma-undefine75.6%
associate-*r/73.6%
associate-*l/62.2%
div-inv62.2%
sub-neg62.2%
metadata-eval62.2%
distribute-neg-in62.2%
+-commutative62.2%
cancel-sign-sub-inv62.2%
div-inv62.2%
fabs-sub62.2%
add-sqr-sqrt62.2%
fabs-sqr62.2%
add-sqr-sqrt62.2%
sub-neg62.2%
distribute-rgt-neg-in62.2%
Applied egg-rr62.2%
Taylor expanded in x around inf 62.2%
Taylor expanded in z around inf 63.3%
mul-1-neg63.3%
associate-*l/75.7%
distribute-rgt-neg-in75.7%
Simplified75.7%
Final simplification67.4%
y_m = (fabs.f64 y)
(FPCore (x y_m z)
:precision binary64
(let* ((t_0 (/ (+ x 4.0) y_m)) (t_1 (- t_0 (* z (/ x y_m)))))
(if (<= t_1 -2e-247)
(/ (* x (+ -1.0 z)) y_m)
(if (<= t_1 5e+299) t_0 (* z (/ x (- y_m)))))))y_m = fabs(y);
double code(double x, double y_m, double z) {
double t_0 = (x + 4.0) / y_m;
double t_1 = t_0 - (z * (x / y_m));
double tmp;
if (t_1 <= -2e-247) {
tmp = (x * (-1.0 + z)) / y_m;
} else if (t_1 <= 5e+299) {
tmp = t_0;
} else {
tmp = z * (x / -y_m);
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (x + 4.0d0) / y_m
t_1 = t_0 - (z * (x / y_m))
if (t_1 <= (-2d-247)) then
tmp = (x * ((-1.0d0) + z)) / y_m
else if (t_1 <= 5d+299) then
tmp = t_0
else
tmp = z * (x / -y_m)
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double t_0 = (x + 4.0) / y_m;
double t_1 = t_0 - (z * (x / y_m));
double tmp;
if (t_1 <= -2e-247) {
tmp = (x * (-1.0 + z)) / y_m;
} else if (t_1 <= 5e+299) {
tmp = t_0;
} else {
tmp = z * (x / -y_m);
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): t_0 = (x + 4.0) / y_m t_1 = t_0 - (z * (x / y_m)) tmp = 0 if t_1 <= -2e-247: tmp = (x * (-1.0 + z)) / y_m elif t_1 <= 5e+299: tmp = t_0 else: tmp = z * (x / -y_m) return tmp
y_m = abs(y) function code(x, y_m, z) t_0 = Float64(Float64(x + 4.0) / y_m) t_1 = Float64(t_0 - Float64(z * Float64(x / y_m))) tmp = 0.0 if (t_1 <= -2e-247) tmp = Float64(Float64(x * Float64(-1.0 + z)) / y_m); elseif (t_1 <= 5e+299) tmp = t_0; else tmp = Float64(z * 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; t_1 = t_0 - (z * (x / y_m)); tmp = 0.0; if (t_1 <= -2e-247) tmp = (x * (-1.0 + z)) / y_m; elseif (t_1 <= 5e+299) tmp = t_0; else tmp = z * (x / -y_m); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision]
code[x_, y$95$m_, z_] := Block[{t$95$0 = N[(N[(x + 4.0), $MachinePrecision] / y$95$m), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 - N[(z * N[(x / y$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-247], N[(N[(x * N[(-1.0 + z), $MachinePrecision]), $MachinePrecision] / y$95$m), $MachinePrecision], If[LessEqual[t$95$1, 5e+299], t$95$0, N[(z * N[(x / (-y$95$m)), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
t_0 := \frac{x + 4}{y\_m}\\
t_1 := t\_0 - z \cdot \frac{x}{y\_m}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-247}:\\
\;\;\;\;\frac{x \cdot \left(-1 + z\right)}{y\_m}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+299}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{x}{-y\_m}\\
\end{array}
\end{array}
if (-.f64 (/.f64 (+.f64 x #s(literal 4 binary64)) y) (*.f64 (/.f64 x y) z)) < -2e-247Initial program 98.4%
fabs-sub98.4%
associate-*l/95.7%
associate-*r/95.7%
fmm-def95.8%
distribute-neg-frac95.8%
+-commutative95.8%
distribute-neg-in95.8%
unsub-neg95.8%
metadata-eval95.8%
Simplified95.8%
add-sqr-sqrt95.1%
fabs-sqr95.1%
add-sqr-sqrt95.7%
fma-undefine95.6%
associate-*r/95.7%
associate-*l/98.4%
div-inv98.4%
sub-neg98.4%
metadata-eval98.4%
distribute-neg-in98.4%
+-commutative98.4%
cancel-sign-sub-inv98.4%
div-inv98.4%
associate-*l/95.7%
sub-div95.7%
Applied egg-rr95.7%
Taylor expanded in x around inf 62.2%
if -2e-247 < (-.f64 (/.f64 (+.f64 x #s(literal 4 binary64)) y) (*.f64 (/.f64 x y) z)) < 5.0000000000000003e299Initial program 98.9%
fabs-sub98.9%
associate-*l/93.3%
associate-*r/94.2%
fmm-def94.2%
distribute-neg-frac94.2%
+-commutative94.2%
distribute-neg-in94.2%
unsub-neg94.2%
metadata-eval94.2%
Simplified94.2%
fma-undefine94.2%
associate-*r/93.3%
associate-*l/98.9%
div-inv98.9%
sub-neg98.9%
metadata-eval98.9%
distribute-neg-in98.9%
+-commutative98.9%
cancel-sign-sub-inv98.9%
div-inv98.9%
fabs-sub98.9%
add-sqr-sqrt92.3%
fabs-sqr92.3%
add-sqr-sqrt93.3%
associate-*l/86.7%
sub-div86.7%
Applied egg-rr86.7%
Taylor expanded in z around 0 63.2%
if 5.0000000000000003e299 < (-.f64 (/.f64 (+.f64 x #s(literal 4 binary64)) y) (*.f64 (/.f64 x y) z)) Initial program 62.2%
fabs-sub62.2%
associate-*l/73.6%
associate-*r/75.6%
fmm-def93.3%
distribute-neg-frac93.3%
+-commutative93.3%
distribute-neg-in93.3%
unsub-neg93.3%
metadata-eval93.3%
Simplified93.3%
fma-undefine75.6%
associate-*r/73.6%
associate-*l/62.2%
div-inv62.2%
sub-neg62.2%
metadata-eval62.2%
distribute-neg-in62.2%
+-commutative62.2%
cancel-sign-sub-inv62.2%
div-inv62.2%
fabs-sub62.2%
add-sqr-sqrt62.2%
fabs-sqr62.2%
add-sqr-sqrt62.2%
sub-neg62.2%
distribute-rgt-neg-in62.2%
Applied egg-rr62.2%
Taylor expanded in x around inf 62.2%
Taylor expanded in z around inf 63.3%
mul-1-neg63.3%
associate-*l/75.7%
distribute-rgt-neg-in75.7%
Simplified75.7%
Final simplification65.0%
y_m = (fabs.f64 y)
(FPCore (x y_m z)
:precision binary64
(let* ((t_0 (/ (+ x 4.0) y_m)) (t_1 (- t_0 (* z (/ x y_m)))))
(if (<= t_1 -2e-247)
(* x (/ z y_m))
(if (<= t_1 5e+299) t_0 (* z (/ x (- y_m)))))))y_m = fabs(y);
double code(double x, double y_m, double z) {
double t_0 = (x + 4.0) / y_m;
double t_1 = t_0 - (z * (x / y_m));
double tmp;
if (t_1 <= -2e-247) {
tmp = x * (z / y_m);
} else if (t_1 <= 5e+299) {
tmp = t_0;
} else {
tmp = z * (x / -y_m);
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (x + 4.0d0) / y_m
t_1 = t_0 - (z * (x / y_m))
if (t_1 <= (-2d-247)) then
tmp = x * (z / y_m)
else if (t_1 <= 5d+299) then
tmp = t_0
else
tmp = z * (x / -y_m)
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double t_0 = (x + 4.0) / y_m;
double t_1 = t_0 - (z * (x / y_m));
double tmp;
if (t_1 <= -2e-247) {
tmp = x * (z / y_m);
} else if (t_1 <= 5e+299) {
tmp = t_0;
} else {
tmp = z * (x / -y_m);
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): t_0 = (x + 4.0) / y_m t_1 = t_0 - (z * (x / y_m)) tmp = 0 if t_1 <= -2e-247: tmp = x * (z / y_m) elif t_1 <= 5e+299: tmp = t_0 else: tmp = z * (x / -y_m) return tmp
y_m = abs(y) function code(x, y_m, z) t_0 = Float64(Float64(x + 4.0) / y_m) t_1 = Float64(t_0 - Float64(z * Float64(x / y_m))) tmp = 0.0 if (t_1 <= -2e-247) tmp = Float64(x * Float64(z / y_m)); elseif (t_1 <= 5e+299) tmp = t_0; else tmp = Float64(z * 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; t_1 = t_0 - (z * (x / y_m)); tmp = 0.0; if (t_1 <= -2e-247) tmp = x * (z / y_m); elseif (t_1 <= 5e+299) tmp = t_0; else tmp = z * (x / -y_m); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision]
code[x_, y$95$m_, z_] := Block[{t$95$0 = N[(N[(x + 4.0), $MachinePrecision] / y$95$m), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 - N[(z * N[(x / y$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-247], N[(x * N[(z / y$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+299], t$95$0, N[(z * N[(x / (-y$95$m)), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
t_0 := \frac{x + 4}{y\_m}\\
t_1 := t\_0 - z \cdot \frac{x}{y\_m}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-247}:\\
\;\;\;\;x \cdot \frac{z}{y\_m}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+299}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{x}{-y\_m}\\
\end{array}
\end{array}
if (-.f64 (/.f64 (+.f64 x #s(literal 4 binary64)) y) (*.f64 (/.f64 x y) z)) < -2e-247Initial program 98.4%
fabs-sub98.4%
associate-*l/95.7%
associate-*r/95.7%
fmm-def95.8%
distribute-neg-frac95.8%
+-commutative95.8%
distribute-neg-in95.8%
unsub-neg95.8%
metadata-eval95.8%
Simplified95.8%
add-sqr-sqrt95.1%
fabs-sqr95.1%
add-sqr-sqrt95.7%
fma-undefine95.6%
associate-*r/95.7%
associate-*l/98.4%
div-inv98.4%
sub-neg98.4%
metadata-eval98.4%
distribute-neg-in98.4%
+-commutative98.4%
cancel-sign-sub-inv98.4%
div-inv98.4%
associate-*l/95.7%
sub-div95.7%
Applied egg-rr95.7%
Taylor expanded in z around inf 40.0%
associate-*r/42.5%
Simplified42.5%
if -2e-247 < (-.f64 (/.f64 (+.f64 x #s(literal 4 binary64)) y) (*.f64 (/.f64 x y) z)) < 5.0000000000000003e299Initial program 98.9%
fabs-sub98.9%
associate-*l/93.3%
associate-*r/94.2%
fmm-def94.2%
distribute-neg-frac94.2%
+-commutative94.2%
distribute-neg-in94.2%
unsub-neg94.2%
metadata-eval94.2%
Simplified94.2%
fma-undefine94.2%
associate-*r/93.3%
associate-*l/98.9%
div-inv98.9%
sub-neg98.9%
metadata-eval98.9%
distribute-neg-in98.9%
+-commutative98.9%
cancel-sign-sub-inv98.9%
div-inv98.9%
fabs-sub98.9%
add-sqr-sqrt92.3%
fabs-sqr92.3%
add-sqr-sqrt93.3%
associate-*l/86.7%
sub-div86.7%
Applied egg-rr86.7%
Taylor expanded in z around 0 63.2%
if 5.0000000000000003e299 < (-.f64 (/.f64 (+.f64 x #s(literal 4 binary64)) y) (*.f64 (/.f64 x y) z)) Initial program 62.2%
fabs-sub62.2%
associate-*l/73.6%
associate-*r/75.6%
fmm-def93.3%
distribute-neg-frac93.3%
+-commutative93.3%
distribute-neg-in93.3%
unsub-neg93.3%
metadata-eval93.3%
Simplified93.3%
fma-undefine75.6%
associate-*r/73.6%
associate-*l/62.2%
div-inv62.2%
sub-neg62.2%
metadata-eval62.2%
distribute-neg-in62.2%
+-commutative62.2%
cancel-sign-sub-inv62.2%
div-inv62.2%
fabs-sub62.2%
add-sqr-sqrt62.2%
fabs-sqr62.2%
add-sqr-sqrt62.2%
sub-neg62.2%
distribute-rgt-neg-in62.2%
Applied egg-rr62.2%
Taylor expanded in x around inf 62.2%
Taylor expanded in z around inf 63.3%
mul-1-neg63.3%
associate-*l/75.7%
distribute-rgt-neg-in75.7%
Simplified75.7%
Final simplification56.3%
y_m = (fabs.f64 y)
(FPCore (x y_m z)
:precision binary64
(let* ((t_0 (/ (+ x 4.0) y_m)) (t_1 (- t_0 (* z (/ x y_m)))))
(if (<= t_1 -2e-247)
(* x (/ z y_m))
(if (<= t_1 5e+299) t_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 t_1 = t_0 - (z * (x / y_m));
double tmp;
if (t_1 <= -2e-247) {
tmp = x * (z / y_m);
} else if (t_1 <= 5e+299) {
tmp = t_0;
} else {
tmp = 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) :: t_1
real(8) :: tmp
t_0 = (x + 4.0d0) / y_m
t_1 = t_0 - (z * (x / y_m))
if (t_1 <= (-2d-247)) then
tmp = x * (z / y_m)
else if (t_1 <= 5d+299) then
tmp = t_0
else
tmp = 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 t_1 = t_0 - (z * (x / y_m));
double tmp;
if (t_1 <= -2e-247) {
tmp = x * (z / y_m);
} else if (t_1 <= 5e+299) {
tmp = t_0;
} else {
tmp = x * (z / -y_m);
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): t_0 = (x + 4.0) / y_m t_1 = t_0 - (z * (x / y_m)) tmp = 0 if t_1 <= -2e-247: tmp = x * (z / y_m) elif t_1 <= 5e+299: tmp = t_0 else: tmp = 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) t_1 = Float64(t_0 - Float64(z * Float64(x / y_m))) tmp = 0.0 if (t_1 <= -2e-247) tmp = Float64(x * Float64(z / y_m)); elseif (t_1 <= 5e+299) tmp = t_0; else tmp = Float64(x * Float64(z / 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; t_1 = t_0 - (z * (x / y_m)); tmp = 0.0; if (t_1 <= -2e-247) tmp = x * (z / y_m); elseif (t_1 <= 5e+299) tmp = t_0; else tmp = 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]}, Block[{t$95$1 = N[(t$95$0 - N[(z * N[(x / y$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-247], N[(x * N[(z / y$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+299], t$95$0, N[(x * N[(z / (-y$95$m)), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
t_0 := \frac{x + 4}{y\_m}\\
t_1 := t\_0 - z \cdot \frac{x}{y\_m}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-247}:\\
\;\;\;\;x \cdot \frac{z}{y\_m}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+299}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{z}{-y\_m}\\
\end{array}
\end{array}
if (-.f64 (/.f64 (+.f64 x #s(literal 4 binary64)) y) (*.f64 (/.f64 x y) z)) < -2e-247Initial program 98.4%
fabs-sub98.4%
associate-*l/95.7%
associate-*r/95.7%
fmm-def95.8%
distribute-neg-frac95.8%
+-commutative95.8%
distribute-neg-in95.8%
unsub-neg95.8%
metadata-eval95.8%
Simplified95.8%
add-sqr-sqrt95.1%
fabs-sqr95.1%
add-sqr-sqrt95.7%
fma-undefine95.6%
associate-*r/95.7%
associate-*l/98.4%
div-inv98.4%
sub-neg98.4%
metadata-eval98.4%
distribute-neg-in98.4%
+-commutative98.4%
cancel-sign-sub-inv98.4%
div-inv98.4%
associate-*l/95.7%
sub-div95.7%
Applied egg-rr95.7%
Taylor expanded in z around inf 40.0%
associate-*r/42.5%
Simplified42.5%
if -2e-247 < (-.f64 (/.f64 (+.f64 x #s(literal 4 binary64)) y) (*.f64 (/.f64 x y) z)) < 5.0000000000000003e299Initial program 98.9%
fabs-sub98.9%
associate-*l/93.3%
associate-*r/94.2%
fmm-def94.2%
distribute-neg-frac94.2%
+-commutative94.2%
distribute-neg-in94.2%
unsub-neg94.2%
metadata-eval94.2%
Simplified94.2%
fma-undefine94.2%
associate-*r/93.3%
associate-*l/98.9%
div-inv98.9%
sub-neg98.9%
metadata-eval98.9%
distribute-neg-in98.9%
+-commutative98.9%
cancel-sign-sub-inv98.9%
div-inv98.9%
fabs-sub98.9%
add-sqr-sqrt92.3%
fabs-sqr92.3%
add-sqr-sqrt93.3%
associate-*l/86.7%
sub-div86.7%
Applied egg-rr86.7%
Taylor expanded in z around 0 63.2%
if 5.0000000000000003e299 < (-.f64 (/.f64 (+.f64 x #s(literal 4 binary64)) y) (*.f64 (/.f64 x y) z)) Initial program 62.2%
fabs-sub62.2%
associate-*l/73.6%
associate-*r/75.6%
fmm-def93.3%
distribute-neg-frac93.3%
+-commutative93.3%
distribute-neg-in93.3%
unsub-neg93.3%
metadata-eval93.3%
Simplified93.3%
fma-undefine75.6%
associate-*r/73.6%
associate-*l/62.2%
div-inv62.2%
sub-neg62.2%
metadata-eval62.2%
distribute-neg-in62.2%
+-commutative62.2%
cancel-sign-sub-inv62.2%
div-inv62.2%
fabs-sub62.2%
add-sqr-sqrt62.2%
fabs-sqr62.2%
add-sqr-sqrt62.2%
sub-neg62.2%
distribute-rgt-neg-in62.2%
Applied egg-rr62.2%
Taylor expanded in x around inf 62.2%
Taylor expanded in z around inf 63.3%
mul-1-neg63.3%
associate-*l/75.7%
distribute-rgt-neg-in75.7%
Simplified75.7%
Taylor expanded in x around 0 63.3%
mul-1-neg63.3%
associate-*r/65.3%
distribute-rgt-neg-in65.3%
distribute-neg-frac265.3%
Simplified65.3%
Final simplification54.5%
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-247)
(- (* x (/ z y_m)) 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 ((t_0 - (z * (x / y_m))) <= -2e-247) {
tmp = (x * (z / y_m)) - 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 ((t_0 - (z * (x / y_m))) <= (-2d-247)) then
tmp = (x * (z / y_m)) - 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 ((t_0 - (z * (x / y_m))) <= -2e-247) {
tmp = (x * (z / y_m)) - 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 (t_0 - (z * (x / y_m))) <= -2e-247: tmp = (x * (z / y_m)) - 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 (Float64(t_0 - Float64(z * Float64(x / y_m))) <= -2e-247) tmp = Float64(Float64(x * Float64(z / y_m)) - 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 ((t_0 - (z * (x / y_m))) <= -2e-247) tmp = (x * (z / y_m)) - 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[N[(t$95$0 - N[(z * N[(x / y$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -2e-247], N[(N[(x * N[(z / y$95$m), $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}\;t\_0 - z \cdot \frac{x}{y\_m} \leq -2 \cdot 10^{-247}:\\
\;\;\;\;x \cdot \frac{z}{y\_m} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(x + 4\right) - x \cdot z}{y\_m}\\
\end{array}
\end{array}
if (-.f64 (/.f64 (+.f64 x #s(literal 4 binary64)) y) (*.f64 (/.f64 x y) z)) < -2e-247Initial program 98.4%
fabs-sub98.4%
associate-*l/95.7%
associate-*r/95.7%
fmm-def95.8%
distribute-neg-frac95.8%
+-commutative95.8%
distribute-neg-in95.8%
unsub-neg95.8%
metadata-eval95.8%
Simplified95.8%
add-sqr-sqrt95.1%
fabs-sqr95.1%
add-sqr-sqrt95.7%
fma-undefine95.6%
associate-*r/95.7%
associate-*l/98.4%
div-inv98.4%
sub-neg98.4%
metadata-eval98.4%
distribute-neg-in98.4%
+-commutative98.4%
cancel-sign-sub-inv98.4%
associate-*l/95.7%
associate-*r/95.6%
div-inv95.6%
Applied egg-rr95.6%
if -2e-247 < (-.f64 (/.f64 (+.f64 x #s(literal 4 binary64)) y) (*.f64 (/.f64 x y) z)) Initial program 87.5%
fabs-sub87.5%
associate-*l/87.2%
associate-*r/88.4%
fmm-def93.9%
distribute-neg-frac93.9%
+-commutative93.9%
distribute-neg-in93.9%
unsub-neg93.9%
metadata-eval93.9%
Simplified93.9%
fma-undefine88.4%
associate-*r/87.2%
associate-*l/87.5%
div-inv87.4%
sub-neg87.4%
metadata-eval87.4%
distribute-neg-in87.4%
+-commutative87.4%
cancel-sign-sub-inv87.4%
div-inv87.5%
fabs-sub87.5%
add-sqr-sqrt82.9%
fabs-sqr82.9%
add-sqr-sqrt83.6%
associate-*l/81.2%
sub-div84.0%
Applied egg-rr84.0%
Final simplification89.1%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= (- (/ (+ x 4.0) y_m) (* z (/ x y_m))) -2e-247) (/ (- (* x z) (+ 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) / y_m) - (z * (x / y_m))) <= -2e-247) {
tmp = ((x * z) - (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) / y_m) - (z * (x / y_m))) <= (-2d-247)) then
tmp = ((x * z) - (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) / y_m) - (z * (x / y_m))) <= -2e-247) {
tmp = ((x * z) - (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) / y_m) - (z * (x / y_m))) <= -2e-247: tmp = ((x * z) - (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 (Float64(Float64(Float64(x + 4.0) / y_m) - Float64(z * Float64(x / y_m))) <= -2e-247) tmp = Float64(Float64(Float64(x * z) - 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) / y_m) - (z * (x / y_m))) <= -2e-247) tmp = ((x * z) - (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[N[(N[(N[(x + 4.0), $MachinePrecision] / y$95$m), $MachinePrecision] - N[(z * N[(x / y$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -2e-247], N[(N[(N[(x * z), $MachinePrecision] - N[(x + 4.0), $MachinePrecision]), $MachinePrecision] / y$95$m), $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}\;\frac{x + 4}{y\_m} - z \cdot \frac{x}{y\_m} \leq -2 \cdot 10^{-247}:\\
\;\;\;\;\frac{x \cdot z - \left(x + 4\right)}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(x + 4\right) - x \cdot z}{y\_m}\\
\end{array}
\end{array}
if (-.f64 (/.f64 (+.f64 x #s(literal 4 binary64)) y) (*.f64 (/.f64 x y) z)) < -2e-247Initial program 98.4%
fabs-sub98.4%
associate-*l/95.7%
associate-*r/95.7%
fmm-def95.8%
distribute-neg-frac95.8%
+-commutative95.8%
distribute-neg-in95.8%
unsub-neg95.8%
metadata-eval95.8%
Simplified95.8%
add-sqr-sqrt95.1%
fabs-sqr95.1%
add-sqr-sqrt95.7%
fma-undefine95.6%
associate-*r/95.7%
associate-*l/98.4%
div-inv98.4%
sub-neg98.4%
metadata-eval98.4%
distribute-neg-in98.4%
+-commutative98.4%
cancel-sign-sub-inv98.4%
div-inv98.4%
associate-*l/95.7%
sub-div95.7%
Applied egg-rr95.7%
if -2e-247 < (-.f64 (/.f64 (+.f64 x #s(literal 4 binary64)) y) (*.f64 (/.f64 x y) z)) Initial program 87.5%
fabs-sub87.5%
associate-*l/87.2%
associate-*r/88.4%
fmm-def93.9%
distribute-neg-frac93.9%
+-commutative93.9%
distribute-neg-in93.9%
unsub-neg93.9%
metadata-eval93.9%
Simplified93.9%
fma-undefine88.4%
associate-*r/87.2%
associate-*l/87.5%
div-inv87.4%
sub-neg87.4%
metadata-eval87.4%
distribute-neg-in87.4%
+-commutative87.4%
cancel-sign-sub-inv87.4%
div-inv87.5%
fabs-sub87.5%
add-sqr-sqrt82.9%
fabs-sqr82.9%
add-sqr-sqrt83.6%
associate-*l/81.2%
sub-div84.0%
Applied egg-rr84.0%
Final simplification89.1%
y_m = (fabs.f64 y)
(FPCore (x y_m z)
:precision binary64
(if (<= x -1.5)
(/ x (- y_m))
(if (<= x 2.55e-46)
(/ 4.0 y_m)
(if (<= x 7.9e+39) (/ (* x z) y_m) (/ x y_m)))))y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= -1.5) {
tmp = x / -y_m;
} else if (x <= 2.55e-46) {
tmp = 4.0 / y_m;
} else if (x <= 7.9e+39) {
tmp = (x * z) / y_m;
} else {
tmp = x / y_m;
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-1.5d0)) then
tmp = x / -y_m
else if (x <= 2.55d-46) then
tmp = 4.0d0 / y_m
else if (x <= 7.9d+39) then
tmp = (x * z) / y_m
else
tmp = x / y_m
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double tmp;
if (x <= -1.5) {
tmp = x / -y_m;
} else if (x <= 2.55e-46) {
tmp = 4.0 / y_m;
} else if (x <= 7.9e+39) {
tmp = (x * z) / y_m;
} else {
tmp = x / y_m;
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= -1.5: tmp = x / -y_m elif x <= 2.55e-46: tmp = 4.0 / y_m elif x <= 7.9e+39: tmp = (x * z) / y_m else: tmp = x / y_m return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= -1.5) tmp = Float64(x / Float64(-y_m)); elseif (x <= 2.55e-46) tmp = Float64(4.0 / y_m); elseif (x <= 7.9e+39) tmp = Float64(Float64(x * z) / y_m); else tmp = Float64(x / y_m); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (x <= -1.5) tmp = x / -y_m; elseif (x <= 2.55e-46) tmp = 4.0 / y_m; elseif (x <= 7.9e+39) tmp = (x * z) / y_m; else tmp = x / y_m; end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[x, -1.5], N[(x / (-y$95$m)), $MachinePrecision], If[LessEqual[x, 2.55e-46], N[(4.0 / y$95$m), $MachinePrecision], If[LessEqual[x, 7.9e+39], N[(N[(x * z), $MachinePrecision] / y$95$m), $MachinePrecision], N[(x / y$95$m), $MachinePrecision]]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.5:\\
\;\;\;\;\frac{x}{-y\_m}\\
\mathbf{elif}\;x \leq 2.55 \cdot 10^{-46}:\\
\;\;\;\;\frac{4}{y\_m}\\
\mathbf{elif}\;x \leq 7.9 \cdot 10^{+39}:\\
\;\;\;\;\frac{x \cdot z}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y\_m}\\
\end{array}
\end{array}
if x < -1.5Initial program 85.8%
fabs-sub85.8%
associate-*l/79.7%
associate-*r/91.4%
fmm-def97.0%
distribute-neg-frac97.0%
+-commutative97.0%
distribute-neg-in97.0%
unsub-neg97.0%
metadata-eval97.0%
Simplified97.0%
add-sqr-sqrt33.6%
fabs-sqr33.6%
add-sqr-sqrt34.2%
fma-undefine31.4%
associate-*r/28.8%
associate-*l/31.4%
div-inv31.4%
sub-neg31.4%
metadata-eval31.4%
distribute-neg-in31.4%
+-commutative31.4%
cancel-sign-sub-inv31.4%
div-inv31.4%
associate-*l/28.8%
sub-div31.6%
Applied egg-rr31.6%
Taylor expanded in z around 0 28.5%
associate-*r/28.5%
neg-mul-128.5%
distribute-neg-in28.5%
metadata-eval28.5%
sub-neg28.5%
Simplified28.5%
Taylor expanded in x around inf 28.2%
neg-mul-128.2%
Simplified28.2%
if -1.5 < x < 2.5499999999999999e-46Initial program 97.8%
fabs-sub97.8%
associate-*l/99.9%
associate-*r/91.2%
fmm-def91.2%
distribute-neg-frac91.2%
+-commutative91.2%
distribute-neg-in91.2%
unsub-neg91.2%
metadata-eval91.2%
Simplified91.2%
fma-undefine91.2%
associate-*r/99.9%
associate-*l/97.8%
div-inv97.8%
sub-neg97.8%
metadata-eval97.8%
distribute-neg-in97.8%
+-commutative97.8%
cancel-sign-sub-inv97.8%
div-inv97.8%
fabs-sub97.8%
add-sqr-sqrt49.3%
fabs-sqr49.3%
add-sqr-sqrt50.7%
associate-*l/50.7%
sub-div50.7%
Applied egg-rr50.7%
Taylor expanded in x around 0 38.8%
if 2.5499999999999999e-46 < x < 7.90000000000000045e39Initial program 93.9%
fabs-sub93.9%
associate-*l/94.0%
associate-*r/94.0%
fmm-def94.0%
distribute-neg-frac94.0%
+-commutative94.0%
distribute-neg-in94.0%
unsub-neg94.0%
metadata-eval94.0%
Simplified94.0%
add-sqr-sqrt40.7%
fabs-sqr40.7%
add-sqr-sqrt41.5%
fma-undefine41.5%
associate-*r/41.5%
associate-*l/41.4%
div-inv41.4%
sub-neg41.4%
metadata-eval41.4%
distribute-neg-in41.4%
+-commutative41.4%
cancel-sign-sub-inv41.4%
div-inv41.4%
associate-*l/41.5%
sub-div47.4%
Applied egg-rr47.4%
Taylor expanded in z around inf 41.8%
if 7.90000000000000045e39 < x Initial program 88.1%
fabs-sub88.1%
associate-*l/84.8%
associate-*r/92.0%
fmm-def99.8%
distribute-neg-frac99.8%
+-commutative99.8%
distribute-neg-in99.8%
unsub-neg99.8%
metadata-eval99.8%
Simplified99.8%
fma-undefine92.0%
associate-*r/84.8%
associate-*l/88.1%
div-inv87.9%
sub-neg87.9%
metadata-eval87.9%
distribute-neg-in87.9%
+-commutative87.9%
cancel-sign-sub-inv87.9%
div-inv88.1%
fabs-sub88.1%
add-sqr-sqrt27.3%
fabs-sqr27.3%
add-sqr-sqrt27.8%
sub-neg27.8%
distribute-rgt-neg-in27.8%
Applied egg-rr27.8%
Taylor expanded in x around inf 27.8%
Taylor expanded in z around 0 23.5%
Final simplification33.0%
y_m = (fabs.f64 y)
(FPCore (x y_m z)
:precision binary64
(if (<= x -1.55)
(/ x (- y_m))
(if (<= x 2.55e-46)
(/ 4.0 y_m)
(if (<= x 4.5e+39) (* x (/ z y_m)) (/ x y_m)))))y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= -1.55) {
tmp = x / -y_m;
} else if (x <= 2.55e-46) {
tmp = 4.0 / y_m;
} else if (x <= 4.5e+39) {
tmp = x * (z / y_m);
} else {
tmp = x / y_m;
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-1.55d0)) then
tmp = x / -y_m
else if (x <= 2.55d-46) then
tmp = 4.0d0 / y_m
else if (x <= 4.5d+39) then
tmp = x * (z / y_m)
else
tmp = x / y_m
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double tmp;
if (x <= -1.55) {
tmp = x / -y_m;
} else if (x <= 2.55e-46) {
tmp = 4.0 / y_m;
} else if (x <= 4.5e+39) {
tmp = x * (z / y_m);
} else {
tmp = x / y_m;
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= -1.55: tmp = x / -y_m elif x <= 2.55e-46: tmp = 4.0 / y_m elif x <= 4.5e+39: tmp = x * (z / y_m) else: tmp = x / y_m return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= -1.55) tmp = Float64(x / Float64(-y_m)); elseif (x <= 2.55e-46) tmp = Float64(4.0 / y_m); elseif (x <= 4.5e+39) tmp = Float64(x * Float64(z / y_m)); else tmp = Float64(x / y_m); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (x <= -1.55) tmp = x / -y_m; elseif (x <= 2.55e-46) tmp = 4.0 / y_m; elseif (x <= 4.5e+39) tmp = x * (z / y_m); else tmp = x / y_m; end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[x, -1.55], N[(x / (-y$95$m)), $MachinePrecision], If[LessEqual[x, 2.55e-46], N[(4.0 / y$95$m), $MachinePrecision], If[LessEqual[x, 4.5e+39], N[(x * N[(z / y$95$m), $MachinePrecision]), $MachinePrecision], N[(x / y$95$m), $MachinePrecision]]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.55:\\
\;\;\;\;\frac{x}{-y\_m}\\
\mathbf{elif}\;x \leq 2.55 \cdot 10^{-46}:\\
\;\;\;\;\frac{4}{y\_m}\\
\mathbf{elif}\;x \leq 4.5 \cdot 10^{+39}:\\
\;\;\;\;x \cdot \frac{z}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y\_m}\\
\end{array}
\end{array}
if x < -1.55000000000000004Initial program 85.8%
fabs-sub85.8%
associate-*l/79.7%
associate-*r/91.4%
fmm-def97.0%
distribute-neg-frac97.0%
+-commutative97.0%
distribute-neg-in97.0%
unsub-neg97.0%
metadata-eval97.0%
Simplified97.0%
add-sqr-sqrt33.6%
fabs-sqr33.6%
add-sqr-sqrt34.2%
fma-undefine31.4%
associate-*r/28.8%
associate-*l/31.4%
div-inv31.4%
sub-neg31.4%
metadata-eval31.4%
distribute-neg-in31.4%
+-commutative31.4%
cancel-sign-sub-inv31.4%
div-inv31.4%
associate-*l/28.8%
sub-div31.6%
Applied egg-rr31.6%
Taylor expanded in z around 0 28.5%
associate-*r/28.5%
neg-mul-128.5%
distribute-neg-in28.5%
metadata-eval28.5%
sub-neg28.5%
Simplified28.5%
Taylor expanded in x around inf 28.2%
neg-mul-128.2%
Simplified28.2%
if -1.55000000000000004 < x < 2.5499999999999999e-46Initial program 97.8%
fabs-sub97.8%
associate-*l/99.9%
associate-*r/91.2%
fmm-def91.2%
distribute-neg-frac91.2%
+-commutative91.2%
distribute-neg-in91.2%
unsub-neg91.2%
metadata-eval91.2%
Simplified91.2%
fma-undefine91.2%
associate-*r/99.9%
associate-*l/97.8%
div-inv97.8%
sub-neg97.8%
metadata-eval97.8%
distribute-neg-in97.8%
+-commutative97.8%
cancel-sign-sub-inv97.8%
div-inv97.8%
fabs-sub97.8%
add-sqr-sqrt49.3%
fabs-sqr49.3%
add-sqr-sqrt50.7%
associate-*l/50.7%
sub-div50.7%
Applied egg-rr50.7%
Taylor expanded in x around 0 38.8%
if 2.5499999999999999e-46 < x < 4.49999999999999996e39Initial program 93.9%
fabs-sub93.9%
associate-*l/94.0%
associate-*r/94.0%
fmm-def94.0%
distribute-neg-frac94.0%
+-commutative94.0%
distribute-neg-in94.0%
unsub-neg94.0%
metadata-eval94.0%
Simplified94.0%
add-sqr-sqrt40.7%
fabs-sqr40.7%
add-sqr-sqrt41.5%
fma-undefine41.5%
associate-*r/41.5%
associate-*l/41.4%
div-inv41.4%
sub-neg41.4%
metadata-eval41.4%
distribute-neg-in41.4%
+-commutative41.4%
cancel-sign-sub-inv41.4%
div-inv41.4%
associate-*l/41.5%
sub-div47.4%
Applied egg-rr47.4%
Taylor expanded in z around inf 41.8%
associate-*r/41.8%
Simplified41.8%
if 4.49999999999999996e39 < x Initial program 88.1%
fabs-sub88.1%
associate-*l/84.8%
associate-*r/92.0%
fmm-def99.8%
distribute-neg-frac99.8%
+-commutative99.8%
distribute-neg-in99.8%
unsub-neg99.8%
metadata-eval99.8%
Simplified99.8%
fma-undefine92.0%
associate-*r/84.8%
associate-*l/88.1%
div-inv87.9%
sub-neg87.9%
metadata-eval87.9%
distribute-neg-in87.9%
+-commutative87.9%
cancel-sign-sub-inv87.9%
div-inv88.1%
fabs-sub88.1%
add-sqr-sqrt27.3%
fabs-sqr27.3%
add-sqr-sqrt27.8%
sub-neg27.8%
distribute-rgt-neg-in27.8%
Applied egg-rr27.8%
Taylor expanded in x around inf 27.8%
Taylor expanded in z around 0 23.5%
Final simplification33.0%
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-247) (* x (/ z y_m)) t_0)))
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-247) {
tmp = x * (z / y_m);
} else {
tmp = t_0;
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = (x + 4.0d0) / y_m
if ((t_0 - (z * (x / y_m))) <= (-2d-247)) then
tmp = x * (z / y_m)
else
tmp = t_0
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double t_0 = (x + 4.0) / y_m;
double tmp;
if ((t_0 - (z * (x / y_m))) <= -2e-247) {
tmp = x * (z / y_m);
} else {
tmp = t_0;
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): t_0 = (x + 4.0) / y_m tmp = 0 if (t_0 - (z * (x / y_m))) <= -2e-247: tmp = x * (z / y_m) else: tmp = t_0 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-247) tmp = Float64(x * Float64(z / y_m)); else tmp = t_0; 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 ((t_0 - (z * (x / y_m))) <= -2e-247) tmp = x * (z / y_m); else tmp = t_0; 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[N[(t$95$0 - N[(z * N[(x / y$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -2e-247], N[(x * N[(z / y$95$m), $MachinePrecision]), $MachinePrecision], t$95$0]]
\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^{-247}:\\
\;\;\;\;x \cdot \frac{z}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if (-.f64 (/.f64 (+.f64 x #s(literal 4 binary64)) y) (*.f64 (/.f64 x y) z)) < -2e-247Initial program 98.4%
fabs-sub98.4%
associate-*l/95.7%
associate-*r/95.7%
fmm-def95.8%
distribute-neg-frac95.8%
+-commutative95.8%
distribute-neg-in95.8%
unsub-neg95.8%
metadata-eval95.8%
Simplified95.8%
add-sqr-sqrt95.1%
fabs-sqr95.1%
add-sqr-sqrt95.7%
fma-undefine95.6%
associate-*r/95.7%
associate-*l/98.4%
div-inv98.4%
sub-neg98.4%
metadata-eval98.4%
distribute-neg-in98.4%
+-commutative98.4%
cancel-sign-sub-inv98.4%
div-inv98.4%
associate-*l/95.7%
sub-div95.7%
Applied egg-rr95.7%
Taylor expanded in z around inf 40.0%
associate-*r/42.5%
Simplified42.5%
if -2e-247 < (-.f64 (/.f64 (+.f64 x #s(literal 4 binary64)) y) (*.f64 (/.f64 x y) z)) Initial program 87.5%
fabs-sub87.5%
associate-*l/87.2%
associate-*r/88.4%
fmm-def93.9%
distribute-neg-frac93.9%
+-commutative93.9%
distribute-neg-in93.9%
unsub-neg93.9%
metadata-eval93.9%
Simplified93.9%
fma-undefine88.4%
associate-*r/87.2%
associate-*l/87.5%
div-inv87.4%
sub-neg87.4%
metadata-eval87.4%
distribute-neg-in87.4%
+-commutative87.4%
cancel-sign-sub-inv87.4%
div-inv87.5%
fabs-sub87.5%
add-sqr-sqrt82.9%
fabs-sqr82.9%
add-sqr-sqrt83.6%
associate-*l/81.2%
sub-div84.0%
Applied egg-rr84.0%
Taylor expanded in z around 0 56.4%
Final simplification50.3%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x -1.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 <= -1.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 <= (-1.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 <= -1.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 <= -1.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 <= -1.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 <= -1.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, -1.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 -1.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 < -1.6000000000000001Initial program 85.8%
fabs-sub85.8%
associate-*l/79.7%
associate-*r/91.4%
fmm-def97.0%
distribute-neg-frac97.0%
+-commutative97.0%
distribute-neg-in97.0%
unsub-neg97.0%
metadata-eval97.0%
Simplified97.0%
add-sqr-sqrt33.6%
fabs-sqr33.6%
add-sqr-sqrt34.2%
fma-undefine31.4%
associate-*r/28.8%
associate-*l/31.4%
div-inv31.4%
sub-neg31.4%
metadata-eval31.4%
distribute-neg-in31.4%
+-commutative31.4%
cancel-sign-sub-inv31.4%
div-inv31.4%
associate-*l/28.8%
sub-div31.6%
Applied egg-rr31.6%
Taylor expanded in z around 0 28.5%
associate-*r/28.5%
neg-mul-128.5%
distribute-neg-in28.5%
metadata-eval28.5%
sub-neg28.5%
Simplified28.5%
Taylor expanded in x around inf 28.2%
neg-mul-128.2%
Simplified28.2%
if -1.6000000000000001 < x < 4Initial program 97.9%
fabs-sub97.9%
associate-*l/99.9%
associate-*r/92.0%
fmm-def92.1%
distribute-neg-frac92.1%
+-commutative92.1%
distribute-neg-in92.1%
unsub-neg92.1%
metadata-eval92.1%
Simplified92.1%
fma-undefine92.0%
associate-*r/99.9%
associate-*l/97.9%
div-inv97.9%
sub-neg97.9%
metadata-eval97.9%
distribute-neg-in97.9%
+-commutative97.9%
cancel-sign-sub-inv97.9%
div-inv97.9%
fabs-sub97.9%
add-sqr-sqrt50.9%
fabs-sqr50.9%
add-sqr-sqrt52.2%
associate-*l/52.2%
sub-div52.2%
Applied egg-rr52.2%
Taylor expanded in x around 0 36.3%
if 4 < x Initial program 87.3%
fabs-sub87.3%
associate-*l/84.4%
associate-*r/90.9%
fmm-def98.0%
distribute-neg-frac98.0%
+-commutative98.0%
distribute-neg-in98.0%
unsub-neg98.0%
metadata-eval98.0%
Simplified98.0%
fma-undefine90.9%
associate-*r/84.4%
associate-*l/87.3%
div-inv87.2%
sub-neg87.2%
metadata-eval87.2%
distribute-neg-in87.2%
+-commutative87.2%
cancel-sign-sub-inv87.2%
div-inv87.3%
fabs-sub87.3%
add-sqr-sqrt26.6%
fabs-sqr26.6%
add-sqr-sqrt27.2%
sub-neg27.2%
distribute-rgt-neg-in27.2%
Applied egg-rr27.2%
Taylor expanded in x around inf 27.2%
Taylor expanded in z around 0 23.4%
Final simplification31.2%
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.6%
fabs-sub93.6%
associate-*l/92.7%
associate-*r/91.8%
fmm-def93.8%
distribute-neg-frac93.8%
+-commutative93.8%
distribute-neg-in93.8%
unsub-neg93.8%
metadata-eval93.8%
Simplified93.8%
fma-undefine91.8%
associate-*r/92.7%
associate-*l/93.6%
div-inv93.6%
sub-neg93.6%
metadata-eval93.6%
distribute-neg-in93.6%
+-commutative93.6%
cancel-sign-sub-inv93.6%
div-inv93.6%
fabs-sub93.6%
add-sqr-sqrt52.2%
fabs-sqr52.2%
add-sqr-sqrt53.2%
associate-*l/52.0%
sub-div54.0%
Applied egg-rr54.0%
Taylor expanded in x around 0 24.5%
if 4 < x Initial program 87.3%
fabs-sub87.3%
associate-*l/84.4%
associate-*r/90.9%
fmm-def98.0%
distribute-neg-frac98.0%
+-commutative98.0%
distribute-neg-in98.0%
unsub-neg98.0%
metadata-eval98.0%
Simplified98.0%
fma-undefine90.9%
associate-*r/84.4%
associate-*l/87.3%
div-inv87.2%
sub-neg87.2%
metadata-eval87.2%
distribute-neg-in87.2%
+-commutative87.2%
cancel-sign-sub-inv87.2%
div-inv87.3%
fabs-sub87.3%
add-sqr-sqrt26.6%
fabs-sqr26.6%
add-sqr-sqrt27.2%
sub-neg27.2%
distribute-rgt-neg-in27.2%
Applied egg-rr27.2%
Taylor expanded in x around inf 27.2%
Taylor expanded in z around 0 23.4%
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 92.3%
fabs-sub92.3%
associate-*l/90.9%
associate-*r/91.6%
fmm-def94.7%
distribute-neg-frac94.7%
+-commutative94.7%
distribute-neg-in94.7%
unsub-neg94.7%
metadata-eval94.7%
Simplified94.7%
fma-undefine91.6%
associate-*r/90.9%
associate-*l/92.3%
div-inv92.2%
sub-neg92.2%
metadata-eval92.2%
distribute-neg-in92.2%
+-commutative92.2%
cancel-sign-sub-inv92.2%
div-inv92.3%
fabs-sub92.3%
add-sqr-sqrt46.6%
fabs-sqr46.6%
add-sqr-sqrt47.5%
associate-*l/46.2%
sub-div47.8%
Applied egg-rr47.8%
Taylor expanded in x around 0 19.7%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (/ -4.0 y_m))
y_m = fabs(y);
double code(double x, double y_m, double z) {
return -4.0 / y_m;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
code = (-4.0d0) / y_m
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
return -4.0 / y_m;
}
y_m = math.fabs(y) def code(x, y_m, z): return -4.0 / y_m
y_m = abs(y) function code(x, y_m, z) return Float64(-4.0 / y_m) end
y_m = abs(y); function tmp = code(x, y_m, z) tmp = -4.0 / y_m; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := N[(-4.0 / y$95$m), $MachinePrecision]
\begin{array}{l}
y_m = \left|y\right|
\\
\frac{-4}{y\_m}
\end{array}
Initial program 92.3%
fabs-sub92.3%
associate-*l/90.9%
associate-*r/91.6%
fmm-def94.7%
distribute-neg-frac94.7%
+-commutative94.7%
distribute-neg-in94.7%
unsub-neg94.7%
metadata-eval94.7%
Simplified94.7%
add-sqr-sqrt46.3%
fabs-sqr46.3%
add-sqr-sqrt47.3%
fma-undefine46.1%
associate-*r/46.0%
associate-*l/46.1%
div-inv46.0%
sub-neg46.0%
metadata-eval46.0%
distribute-neg-in46.0%
+-commutative46.0%
cancel-sign-sub-inv46.0%
div-inv46.1%
associate-*l/46.0%
sub-div48.8%
Applied egg-rr48.8%
Taylor expanded in x around 0 19.4%
herbie shell --seed 2024191
(FPCore (x y z)
:name "fabs fraction 1"
:precision binary64
(fabs (- (/ (+ x 4.0) y) (* (/ x y) z))))