
(FPCore (x y z) :precision binary64 (fabs (- (/ (+ x 4.0) y) (* (/ x y) z))))
double code(double x, double y, double z) {
return fabs((((x + 4.0) / y) - ((x / y) * z)));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = abs((((x + 4.0d0) / y) - ((x / y) * z)))
end function
public static double code(double x, double y, double z) {
return Math.abs((((x + 4.0) / y) - ((x / y) * z)));
}
def code(x, y, z): return math.fabs((((x + 4.0) / y) - ((x / y) * z)))
function code(x, y, z) return abs(Float64(Float64(Float64(x + 4.0) / y) - Float64(Float64(x / y) * z))) end
function tmp = code(x, y, z) tmp = abs((((x + 4.0) / y) - ((x / y) * z))); end
code[x_, y_, z_] := N[Abs[N[(N[(N[(x + 4.0), $MachinePrecision] / y), $MachinePrecision] - N[(N[(x / y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right|
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (fabs (- (/ (+ x 4.0) y) (* (/ x y) z))))
double code(double x, double y, double z) {
return fabs((((x + 4.0) / y) - ((x / y) * z)));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = abs((((x + 4.0d0) / y) - ((x / y) * z)))
end function
public static double code(double x, double y, double z) {
return Math.abs((((x + 4.0) / y) - ((x / y) * z)));
}
def code(x, y, z): return math.fabs((((x + 4.0) / y) - ((x / y) * z)))
function code(x, y, z) return abs(Float64(Float64(Float64(x + 4.0) / y) - Float64(Float64(x / y) * z))) end
function tmp = code(x, y, z) tmp = abs((((x + 4.0) / y) - ((x / y) * z))); end
code[x_, y_, z_] := N[Abs[N[(N[(N[(x + 4.0), $MachinePrecision] / y), $MachinePrecision] - N[(N[(x / y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right|
\end{array}
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= y_m 5e-56) (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 <= 5e-56) {
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 <= 5e-56) 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, 5e-56], 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 5 \cdot 10^{-56}:\\
\;\;\;\;\left|\frac{-1}{y\_m} \cdot \mathsf{fma}\left(x, z, -4 - x\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\mathsf{fma}\left(x, \frac{z}{y\_m}, \frac{-4 - x}{y\_m}\right)\right|\\
\end{array}
\end{array}
if y < 4.99999999999999997e-56Initial program 93.0%
Simplified97.0%
if 4.99999999999999997e-56 < y Initial program 98.8%
fabs-sub98.8%
associate-*l/93.4%
associate-*r/99.9%
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) (* z (/ x y_m)))))
(if (<= t_0 1e+304)
(fabs t_0)
(fabs (* (/ -1.0 y_m) (* x (- (+ -1.0 z) (/ 4.0 x))))))))y_m = fabs(y);
double code(double x, double y_m, double z) {
double t_0 = ((x + 4.0) / y_m) - (z * (x / y_m));
double tmp;
if (t_0 <= 1e+304) {
tmp = fabs(t_0);
} else {
tmp = fabs(((-1.0 / y_m) * (x * ((-1.0 + z) - (4.0 / 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) :: t_0
real(8) :: tmp
t_0 = ((x + 4.0d0) / y_m) - (z * (x / y_m))
if (t_0 <= 1d+304) then
tmp = abs(t_0)
else
tmp = abs((((-1.0d0) / y_m) * (x * (((-1.0d0) + z) - (4.0d0 / x)))))
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 <= 1e+304) {
tmp = Math.abs(t_0);
} else {
tmp = Math.abs(((-1.0 / y_m) * (x * ((-1.0 + z) - (4.0 / x)))));
}
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 <= 1e+304: tmp = math.fabs(t_0) else: tmp = math.fabs(((-1.0 / y_m) * (x * ((-1.0 + z) - (4.0 / x))))) 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 <= 1e+304) tmp = abs(t_0); else tmp = abs(Float64(Float64(-1.0 / y_m) * Float64(x * Float64(Float64(-1.0 + z) - Float64(4.0 / x))))); 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 <= 1e+304) tmp = abs(t_0); else tmp = abs(((-1.0 / y_m) * (x * ((-1.0 + z) - (4.0 / x))))); 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, 1e+304], N[Abs[t$95$0], $MachinePrecision], 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]]]
\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 10^{+304}:\\
\;\;\;\;\left|t\_0\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{-1}{y\_m} \cdot \left(x \cdot \left(\left(-1 + z\right) - \frac{4}{x}\right)\right)\right|\\
\end{array}
\end{array}
if (-.f64 (/.f64 (+.f64 x #s(literal 4 binary64)) y) (*.f64 (/.f64 x y) z)) < 9.9999999999999994e303Initial program 98.6%
if 9.9999999999999994e303 < (-.f64 (/.f64 (+.f64 x #s(literal 4 binary64)) y) (*.f64 (/.f64 x y) z)) Initial program 74.3%
Simplified99.9%
Taylor expanded in x around inf 99.9%
associate--r+99.9%
sub-neg99.9%
remove-double-neg99.9%
neg-mul-199.9%
metadata-eval99.9%
metadata-eval99.9%
distribute-lft-in99.9%
+-commutative99.9%
distribute-lft-in99.9%
metadata-eval99.9%
neg-mul-199.9%
remove-double-neg99.9%
associate-*r/99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification98.8%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (let* ((t_0 (- (/ (+ x 4.0) y_m) (* z (/ x y_m))))) (if (<= t_0 INFINITY) (fabs t_0) (* x (/ (+ -1.0 z) y_m)))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double t_0 = ((x + 4.0) / y_m) - (z * (x / y_m));
double tmp;
if (t_0 <= ((double) INFINITY)) {
tmp = fabs(t_0);
} else {
tmp = x * ((-1.0 + z) / y_m);
}
return tmp;
}
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double t_0 = ((x + 4.0) / y_m) - (z * (x / y_m));
double tmp;
if (t_0 <= Double.POSITIVE_INFINITY) {
tmp = Math.abs(t_0);
} else {
tmp = x * ((-1.0 + z) / y_m);
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): t_0 = ((x + 4.0) / y_m) - (z * (x / y_m)) tmp = 0 if t_0 <= math.inf: tmp = math.fabs(t_0) else: tmp = x * ((-1.0 + z) / y_m) return tmp
y_m = abs(y) function code(x, y_m, z) t_0 = Float64(Float64(Float64(x + 4.0) / y_m) - Float64(z * Float64(x / y_m))) tmp = 0.0 if (t_0 <= Inf) tmp = abs(t_0); else tmp = Float64(x * Float64(Float64(-1.0 + 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) - (z * (x / y_m)); tmp = 0.0; if (t_0 <= Inf) tmp = abs(t_0); else tmp = x * ((-1.0 + z) / y_m); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision]
code[x_, y$95$m_, z_] := Block[{t$95$0 = N[(N[(N[(x + 4.0), $MachinePrecision] / y$95$m), $MachinePrecision] - N[(z * N[(x / y$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, Infinity], N[Abs[t$95$0], $MachinePrecision], N[(x * N[(N[(-1.0 + z), $MachinePrecision] / 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 \infty:\\
\;\;\;\;\left|t\_0\right|\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1 + z}{y\_m}\\
\end{array}
\end{array}
if (-.f64 (/.f64 (+.f64 x #s(literal 4 binary64)) y) (*.f64 (/.f64 x y) z)) < +inf.0Initial program 98.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/40.0%
associate-*r/40.0%
fma-neg80.0%
distribute-neg-frac80.0%
+-commutative80.0%
distribute-neg-in80.0%
unsub-neg80.0%
metadata-eval80.0%
Simplified80.0%
add-sqr-sqrt40.0%
fabs-sqr40.0%
add-sqr-sqrt40.0%
fma-undefine20.0%
associate-*r/20.0%
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/20.0%
sub-div50.0%
Applied egg-rr50.0%
Taylor expanded in x around inf 50.0%
associate-/l*50.0%
sub-neg50.0%
metadata-eval50.0%
+-commutative50.0%
Simplified50.0%
Final simplification96.8%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (or (<= x -9.2e-47) (not (<= x 2.35e-36))) (fabs (- (/ x y_m) (/ z (/ y_m x)))) (+ (* (/ -1.0 y_m) (* x z)) (/ 4.0 y_m))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if ((x <= -9.2e-47) || !(x <= 2.35e-36)) {
tmp = fabs(((x / y_m) - (z / (y_m / x))));
} else {
tmp = ((-1.0 / y_m) * (x * z)) + (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 <= (-9.2d-47)) .or. (.not. (x <= 2.35d-36))) then
tmp = abs(((x / y_m) - (z / (y_m / x))))
else
tmp = (((-1.0d0) / y_m) * (x * z)) + (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 <= -9.2e-47) || !(x <= 2.35e-36)) {
tmp = Math.abs(((x / y_m) - (z / (y_m / x))));
} else {
tmp = ((-1.0 / y_m) * (x * z)) + (4.0 / y_m);
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if (x <= -9.2e-47) or not (x <= 2.35e-36): tmp = math.fabs(((x / y_m) - (z / (y_m / x)))) else: tmp = ((-1.0 / y_m) * (x * z)) + (4.0 / y_m) return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if ((x <= -9.2e-47) || !(x <= 2.35e-36)) tmp = abs(Float64(Float64(x / y_m) - Float64(z / Float64(y_m / x)))); else tmp = Float64(Float64(Float64(-1.0 / y_m) * Float64(x * z)) + Float64(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 <= -9.2e-47) || ~((x <= 2.35e-36))) tmp = abs(((x / y_m) - (z / (y_m / x)))); else tmp = ((-1.0 / y_m) * (x * z)) + (4.0 / y_m); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[Or[LessEqual[x, -9.2e-47], N[Not[LessEqual[x, 2.35e-36]], $MachinePrecision]], N[Abs[N[(N[(x / y$95$m), $MachinePrecision] - N[(z / N[(y$95$m / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(N[(-1.0 / y$95$m), $MachinePrecision] * N[(x * z), $MachinePrecision]), $MachinePrecision] + N[(4.0 / y$95$m), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.2 \cdot 10^{-47} \lor \neg \left(x \leq 2.35 \cdot 10^{-36}\right):\\
\;\;\;\;\left|\frac{x}{y\_m} - \frac{z}{\frac{y\_m}{x}}\right|\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{y\_m} \cdot \left(x \cdot z\right) + \frac{4}{y\_m}\\
\end{array}
\end{array}
if x < -9.19999999999999928e-47 or 2.3500000000000001e-36 < x Initial program 92.8%
*-commutative92.8%
clear-num92.7%
un-div-inv92.7%
Applied egg-rr92.7%
Taylor expanded in x around inf 89.9%
if -9.19999999999999928e-47 < x < 2.3500000000000001e-36Initial program 97.5%
Simplified99.9%
add-sqr-sqrt53.5%
fabs-sqr53.5%
add-sqr-sqrt54.6%
fma-undefine54.6%
distribute-rgt-in54.6%
sub-neg54.6%
metadata-eval54.6%
distribute-neg-in54.6%
+-commutative54.6%
frac-2neg54.6%
metadata-eval54.6%
div-inv54.6%
frac-2neg54.6%
Applied egg-rr54.6%
Taylor expanded in x around 0 54.6%
Final simplification74.0%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x -2.55e-45) (* x (/ (+ -1.0 z) y_m)) (if (<= x 1.4e-5) (/ (- 4.0 (* x z)) y_m) (* x (- (/ 1.0 y_m) (/ z y_m))))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= -2.55e-45) {
tmp = x * ((-1.0 + z) / y_m);
} else if (x <= 1.4e-5) {
tmp = (4.0 - (x * z)) / y_m;
} else {
tmp = x * ((1.0 / y_m) - (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 <= (-2.55d-45)) then
tmp = x * (((-1.0d0) + z) / y_m)
else if (x <= 1.4d-5) then
tmp = (4.0d0 - (x * z)) / y_m
else
tmp = x * ((1.0d0 / y_m) - (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 <= -2.55e-45) {
tmp = x * ((-1.0 + z) / y_m);
} else if (x <= 1.4e-5) {
tmp = (4.0 - (x * z)) / y_m;
} else {
tmp = x * ((1.0 / y_m) - (z / y_m));
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= -2.55e-45: tmp = x * ((-1.0 + z) / y_m) elif x <= 1.4e-5: tmp = (4.0 - (x * z)) / y_m else: tmp = x * ((1.0 / y_m) - (z / y_m)) return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= -2.55e-45) tmp = Float64(x * Float64(Float64(-1.0 + z) / y_m)); elseif (x <= 1.4e-5) tmp = Float64(Float64(4.0 - Float64(x * z)) / y_m); else tmp = Float64(x * Float64(Float64(1.0 / y_m) - Float64(z / y_m))); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (x <= -2.55e-45) tmp = x * ((-1.0 + z) / y_m); elseif (x <= 1.4e-5) tmp = (4.0 - (x * z)) / y_m; else tmp = x * ((1.0 / y_m) - (z / y_m)); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[x, -2.55e-45], N[(x * N[(N[(-1.0 + z), $MachinePrecision] / y$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.4e-5], N[(N[(4.0 - N[(x * z), $MachinePrecision]), $MachinePrecision] / y$95$m), $MachinePrecision], N[(x * N[(N[(1.0 / y$95$m), $MachinePrecision] - N[(z / y$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.55 \cdot 10^{-45}:\\
\;\;\;\;x \cdot \frac{-1 + z}{y\_m}\\
\mathbf{elif}\;x \leq 1.4 \cdot 10^{-5}:\\
\;\;\;\;\frac{4 - x \cdot z}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{1}{y\_m} - \frac{z}{y\_m}\right)\\
\end{array}
\end{array}
if x < -2.5499999999999999e-45Initial program 92.6%
fabs-sub92.6%
associate-*l/84.6%
associate-*r/94.1%
fma-neg97.1%
distribute-neg-frac97.1%
+-commutative97.1%
distribute-neg-in97.1%
unsub-neg97.1%
metadata-eval97.1%
Simplified97.1%
add-sqr-sqrt48.2%
fabs-sqr48.2%
add-sqr-sqrt48.8%
fma-undefine47.3%
associate-*r/44.6%
associate-*l/45.8%
div-inv45.8%
sub-neg45.8%
metadata-eval45.8%
distribute-neg-in45.8%
+-commutative45.8%
cancel-sign-sub-inv45.8%
div-inv45.8%
associate-*l/44.6%
sub-div47.5%
Applied egg-rr47.5%
Taylor expanded in x around inf 44.6%
associate-/l*47.3%
sub-neg47.3%
metadata-eval47.3%
+-commutative47.3%
Simplified47.3%
if -2.5499999999999999e-45 < x < 1.39999999999999998e-5Initial program 97.6%
fabs-sub97.6%
associate-*l/99.9%
associate-*r/92.2%
fma-neg92.2%
distribute-neg-frac92.2%
+-commutative92.2%
distribute-neg-in92.2%
unsub-neg92.2%
metadata-eval92.2%
Simplified92.2%
fma-undefine92.2%
associate-*r/99.9%
associate-*l/97.6%
div-inv97.6%
sub-neg97.6%
metadata-eval97.6%
distribute-neg-in97.6%
+-commutative97.6%
cancel-sign-sub-inv97.6%
div-inv97.6%
fabs-sub97.6%
add-sqr-sqrt53.0%
fabs-sqr53.0%
add-sqr-sqrt54.1%
associate-*l/55.7%
sub-div55.7%
Applied egg-rr55.7%
Taylor expanded in x around 0 55.1%
if 1.39999999999999998e-5 < x Initial program 92.5%
Simplified95.6%
add-sqr-sqrt58.6%
fabs-sqr58.6%
add-sqr-sqrt58.9%
fma-undefine58.9%
distribute-rgt-in56.0%
sub-neg56.0%
metadata-eval56.0%
distribute-neg-in56.0%
+-commutative56.0%
frac-2neg56.0%
metadata-eval56.0%
div-inv56.1%
frac-2neg56.1%
Applied egg-rr56.1%
Taylor expanded in x around inf 59.6%
neg-mul-159.6%
+-commutative59.6%
sub-neg59.6%
Simplified59.6%
y_m = (fabs.f64 y)
(FPCore (x y_m z)
:precision binary64
(if (<= x -2.2e+68)
(/ (- x) y_m)
(if (<= x -2.55e-45)
(* z (/ 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 <= -2.2e+68) {
tmp = -x / y_m;
} else if (x <= -2.55e-45) {
tmp = z * (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 <= (-2.2d+68)) then
tmp = -x / y_m
else if (x <= (-2.55d-45)) then
tmp = z * (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 <= -2.2e+68) {
tmp = -x / y_m;
} else if (x <= -2.55e-45) {
tmp = z * (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 <= -2.2e+68: tmp = -x / y_m elif x <= -2.55e-45: tmp = z * (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 <= -2.2e+68) tmp = Float64(Float64(-x) / y_m); elseif (x <= -2.55e-45) tmp = Float64(z * Float64(x / y_m)); elseif (x <= 4.0) tmp = Float64(4.0 / y_m); else tmp = Float64(x / y_m); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (x <= -2.2e+68) tmp = -x / y_m; elseif (x <= -2.55e-45) tmp = z * (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, -2.2e+68], N[((-x) / y$95$m), $MachinePrecision], If[LessEqual[x, -2.55e-45], N[(z * N[(x / y$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.0], N[(4.0 / y$95$m), $MachinePrecision], N[(x / y$95$m), $MachinePrecision]]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.2 \cdot 10^{+68}:\\
\;\;\;\;\frac{-x}{y\_m}\\
\mathbf{elif}\;x \leq -2.55 \cdot 10^{-45}:\\
\;\;\;\;z \cdot \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 < -2.19999999999999987e68Initial program 89.7%
fabs-sub89.7%
associate-*l/80.6%
associate-*r/93.8%
fma-neg97.9%
distribute-neg-frac97.9%
+-commutative97.9%
distribute-neg-in97.9%
unsub-neg97.9%
metadata-eval97.9%
Simplified97.9%
add-sqr-sqrt50.8%
fabs-sqr50.8%
add-sqr-sqrt51.3%
fma-undefine49.2%
associate-*r/45.4%
associate-*l/47.2%
div-inv47.1%
sub-neg47.1%
metadata-eval47.1%
distribute-neg-in47.1%
+-commutative47.1%
cancel-sign-sub-inv47.1%
div-inv47.2%
associate-*l/45.4%
sub-div49.5%
Applied egg-rr49.5%
Taylor expanded in z around 0 32.5%
associate-*r/32.5%
neg-mul-132.5%
distribute-neg-in32.5%
metadata-eval32.5%
unsub-neg32.5%
Simplified32.5%
Taylor expanded in x around inf 32.5%
neg-mul-132.5%
Simplified32.5%
if -2.19999999999999987e68 < x < -2.5499999999999999e-45Initial program 99.8%
fabs-sub99.8%
associate-*l/95.0%
associate-*r/95.0%
fma-neg95.0%
distribute-neg-frac95.0%
+-commutative95.0%
distribute-neg-in95.0%
unsub-neg95.0%
metadata-eval95.0%
Simplified95.0%
add-sqr-sqrt41.6%
fabs-sqr41.6%
add-sqr-sqrt42.3%
fma-undefine42.3%
associate-*r/42.4%
associate-*l/42.3%
div-inv42.3%
sub-neg42.3%
metadata-eval42.3%
distribute-neg-in42.3%
+-commutative42.3%
cancel-sign-sub-inv42.3%
div-inv42.3%
associate-*l/42.4%
sub-div42.4%
Applied egg-rr42.4%
Taylor expanded in x around inf 32.0%
Taylor expanded in z around inf 33.2%
associate-*l/33.2%
*-commutative33.2%
Simplified33.2%
if -2.5499999999999999e-45 < x < 4Initial program 97.6%
fabs-sub97.6%
associate-*l/99.9%
associate-*r/92.3%
fma-neg92.3%
distribute-neg-frac92.3%
+-commutative92.3%
distribute-neg-in92.3%
unsub-neg92.3%
metadata-eval92.3%
Simplified92.3%
fma-undefine92.3%
associate-*r/99.9%
associate-*l/97.6%
div-inv97.6%
sub-neg97.6%
metadata-eval97.6%
distribute-neg-in97.6%
+-commutative97.6%
cancel-sign-sub-inv97.6%
div-inv97.6%
fabs-sub97.6%
add-sqr-sqrt53.4%
fabs-sqr53.4%
add-sqr-sqrt54.5%
associate-*l/56.0%
sub-div56.0%
Applied egg-rr56.0%
Taylor expanded in x around 0 42.2%
if 4 < x Initial program 92.4%
Simplified95.5%
add-sqr-sqrt58.0%
fabs-sqr58.0%
add-sqr-sqrt58.4%
fma-undefine58.4%
distribute-rgt-in55.4%
sub-neg55.4%
metadata-eval55.4%
distribute-neg-in55.4%
+-commutative55.4%
frac-2neg55.4%
metadata-eval55.4%
div-inv55.4%
frac-2neg55.4%
Applied egg-rr55.4%
Taylor expanded in z around 0 30.4%
*-lft-identity30.4%
metadata-eval30.4%
cancel-sign-sub-inv30.4%
associate-*r/30.4%
associate-*l/30.3%
metadata-eval30.3%
distribute-neg-frac30.3%
cancel-sign-sub30.3%
*-commutative30.3%
distribute-lft-in30.3%
associate-*l/30.4%
*-lft-identity30.4%
Simplified30.4%
Taylor expanded in x around inf 29.6%
y_m = (fabs.f64 y)
(FPCore (x y_m z)
:precision binary64
(if (<= x -3e+68)
(/ (- x) y_m)
(if (<= x -2.55e-45)
(* x (/ z y_m))
(if (<= x 4.0) (/ 4.0 y_m) (/ x y_m)))))y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= -3e+68) {
tmp = -x / y_m;
} else if (x <= -2.55e-45) {
tmp = x * (z / y_m);
} else if (x <= 4.0) {
tmp = 4.0 / y_m;
} else {
tmp = x / y_m;
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-3d+68)) then
tmp = -x / y_m
else if (x <= (-2.55d-45)) then
tmp = x * (z / y_m)
else if (x <= 4.0d0) then
tmp = 4.0d0 / y_m
else
tmp = x / y_m
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double tmp;
if (x <= -3e+68) {
tmp = -x / y_m;
} else if (x <= -2.55e-45) {
tmp = x * (z / y_m);
} else if (x <= 4.0) {
tmp = 4.0 / y_m;
} else {
tmp = x / y_m;
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= -3e+68: tmp = -x / y_m elif x <= -2.55e-45: tmp = x * (z / y_m) elif x <= 4.0: tmp = 4.0 / y_m else: tmp = x / y_m return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= -3e+68) tmp = Float64(Float64(-x) / y_m); elseif (x <= -2.55e-45) tmp = Float64(x * Float64(z / y_m)); elseif (x <= 4.0) tmp = Float64(4.0 / y_m); else tmp = Float64(x / y_m); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (x <= -3e+68) tmp = -x / y_m; elseif (x <= -2.55e-45) tmp = x * (z / y_m); elseif (x <= 4.0) tmp = 4.0 / y_m; else tmp = x / y_m; end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[x, -3e+68], N[((-x) / y$95$m), $MachinePrecision], If[LessEqual[x, -2.55e-45], N[(x * N[(z / y$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.0], N[(4.0 / y$95$m), $MachinePrecision], N[(x / y$95$m), $MachinePrecision]]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3 \cdot 10^{+68}:\\
\;\;\;\;\frac{-x}{y\_m}\\
\mathbf{elif}\;x \leq -2.55 \cdot 10^{-45}:\\
\;\;\;\;x \cdot \frac{z}{y\_m}\\
\mathbf{elif}\;x \leq 4:\\
\;\;\;\;\frac{4}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y\_m}\\
\end{array}
\end{array}
if x < -3.0000000000000002e68Initial program 89.7%
fabs-sub89.7%
associate-*l/80.6%
associate-*r/93.8%
fma-neg97.9%
distribute-neg-frac97.9%
+-commutative97.9%
distribute-neg-in97.9%
unsub-neg97.9%
metadata-eval97.9%
Simplified97.9%
add-sqr-sqrt50.8%
fabs-sqr50.8%
add-sqr-sqrt51.3%
fma-undefine49.2%
associate-*r/45.4%
associate-*l/47.2%
div-inv47.1%
sub-neg47.1%
metadata-eval47.1%
distribute-neg-in47.1%
+-commutative47.1%
cancel-sign-sub-inv47.1%
div-inv47.2%
associate-*l/45.4%
sub-div49.5%
Applied egg-rr49.5%
Taylor expanded in z around 0 32.5%
associate-*r/32.5%
neg-mul-132.5%
distribute-neg-in32.5%
metadata-eval32.5%
unsub-neg32.5%
Simplified32.5%
Taylor expanded in x around inf 32.5%
neg-mul-132.5%
Simplified32.5%
if -3.0000000000000002e68 < x < -2.5499999999999999e-45Initial program 99.8%
fabs-sub99.8%
associate-*l/95.0%
associate-*r/95.0%
fma-neg95.0%
distribute-neg-frac95.0%
+-commutative95.0%
distribute-neg-in95.0%
unsub-neg95.0%
metadata-eval95.0%
Simplified95.0%
add-sqr-sqrt41.6%
fabs-sqr41.6%
add-sqr-sqrt42.3%
fma-undefine42.3%
associate-*r/42.4%
associate-*l/42.3%
div-inv42.3%
sub-neg42.3%
metadata-eval42.3%
distribute-neg-in42.3%
+-commutative42.3%
cancel-sign-sub-inv42.3%
div-inv42.3%
associate-*l/42.4%
sub-div42.4%
Applied egg-rr42.4%
Taylor expanded in z around inf 33.2%
associate-*r/33.2%
Simplified33.2%
if -2.5499999999999999e-45 < x < 4Initial program 97.6%
fabs-sub97.6%
associate-*l/99.9%
associate-*r/92.3%
fma-neg92.3%
distribute-neg-frac92.3%
+-commutative92.3%
distribute-neg-in92.3%
unsub-neg92.3%
metadata-eval92.3%
Simplified92.3%
fma-undefine92.3%
associate-*r/99.9%
associate-*l/97.6%
div-inv97.6%
sub-neg97.6%
metadata-eval97.6%
distribute-neg-in97.6%
+-commutative97.6%
cancel-sign-sub-inv97.6%
div-inv97.6%
fabs-sub97.6%
add-sqr-sqrt53.4%
fabs-sqr53.4%
add-sqr-sqrt54.5%
associate-*l/56.0%
sub-div56.0%
Applied egg-rr56.0%
Taylor expanded in x around 0 42.2%
if 4 < x Initial program 92.4%
Simplified95.5%
add-sqr-sqrt58.0%
fabs-sqr58.0%
add-sqr-sqrt58.4%
fma-undefine58.4%
distribute-rgt-in55.4%
sub-neg55.4%
metadata-eval55.4%
distribute-neg-in55.4%
+-commutative55.4%
frac-2neg55.4%
metadata-eval55.4%
div-inv55.4%
frac-2neg55.4%
Applied egg-rr55.4%
Taylor expanded in z around 0 30.4%
*-lft-identity30.4%
metadata-eval30.4%
cancel-sign-sub-inv30.4%
associate-*r/30.4%
associate-*l/30.3%
metadata-eval30.3%
distribute-neg-frac30.3%
cancel-sign-sub30.3%
*-commutative30.3%
distribute-lft-in30.3%
associate-*l/30.4%
*-lft-identity30.4%
Simplified30.4%
Taylor expanded in x around inf 29.6%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x -2.55e-45) (* x (/ (+ -1.0 z) y_m)) (if (<= x 1.4e-5) (/ (- 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 <= -2.55e-45) {
tmp = x * ((-1.0 + z) / y_m);
} else if (x <= 1.4e-5) {
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 <= (-2.55d-45)) then
tmp = x * (((-1.0d0) + z) / y_m)
else if (x <= 1.4d-5) 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 <= -2.55e-45) {
tmp = x * ((-1.0 + z) / y_m);
} else if (x <= 1.4e-5) {
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 <= -2.55e-45: tmp = x * ((-1.0 + z) / y_m) elif x <= 1.4e-5: 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 <= -2.55e-45) tmp = Float64(x * Float64(Float64(-1.0 + z) / y_m)); elseif (x <= 1.4e-5) 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 <= -2.55e-45) tmp = x * ((-1.0 + z) / y_m); elseif (x <= 1.4e-5) 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, -2.55e-45], N[(x * N[(N[(-1.0 + z), $MachinePrecision] / y$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.4e-5], 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 -2.55 \cdot 10^{-45}:\\
\;\;\;\;x \cdot \frac{-1 + z}{y\_m}\\
\mathbf{elif}\;x \leq 1.4 \cdot 10^{-5}:\\
\;\;\;\;\frac{4 - x \cdot z}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{x - x \cdot z}{y\_m}\\
\end{array}
\end{array}
if x < -2.5499999999999999e-45Initial program 92.6%
fabs-sub92.6%
associate-*l/84.6%
associate-*r/94.1%
fma-neg97.1%
distribute-neg-frac97.1%
+-commutative97.1%
distribute-neg-in97.1%
unsub-neg97.1%
metadata-eval97.1%
Simplified97.1%
add-sqr-sqrt48.2%
fabs-sqr48.2%
add-sqr-sqrt48.8%
fma-undefine47.3%
associate-*r/44.6%
associate-*l/45.8%
div-inv45.8%
sub-neg45.8%
metadata-eval45.8%
distribute-neg-in45.8%
+-commutative45.8%
cancel-sign-sub-inv45.8%
div-inv45.8%
associate-*l/44.6%
sub-div47.5%
Applied egg-rr47.5%
Taylor expanded in x around inf 44.6%
associate-/l*47.3%
sub-neg47.3%
metadata-eval47.3%
+-commutative47.3%
Simplified47.3%
if -2.5499999999999999e-45 < x < 1.39999999999999998e-5Initial program 97.6%
fabs-sub97.6%
associate-*l/99.9%
associate-*r/92.2%
fma-neg92.2%
distribute-neg-frac92.2%
+-commutative92.2%
distribute-neg-in92.2%
unsub-neg92.2%
metadata-eval92.2%
Simplified92.2%
fma-undefine92.2%
associate-*r/99.9%
associate-*l/97.6%
div-inv97.6%
sub-neg97.6%
metadata-eval97.6%
distribute-neg-in97.6%
+-commutative97.6%
cancel-sign-sub-inv97.6%
div-inv97.6%
fabs-sub97.6%
add-sqr-sqrt53.0%
fabs-sqr53.0%
add-sqr-sqrt54.1%
associate-*l/55.7%
sub-div55.7%
Applied egg-rr55.7%
Taylor expanded in x around 0 55.1%
if 1.39999999999999998e-5 < x Initial program 92.5%
fabs-sub92.5%
associate-*l/91.3%
associate-*r/95.5%
fma-neg98.5%
distribute-neg-frac98.5%
+-commutative98.5%
distribute-neg-in98.5%
unsub-neg98.5%
metadata-eval98.5%
Simplified98.5%
fma-undefine95.5%
associate-*r/91.3%
associate-*l/92.5%
div-inv92.3%
sub-neg92.3%
metadata-eval92.3%
distribute-neg-in92.3%
+-commutative92.3%
cancel-sign-sub-inv92.3%
div-inv92.5%
fabs-sub92.5%
add-sqr-sqrt55.6%
fabs-sqr55.6%
add-sqr-sqrt56.0%
associate-*l/56.1%
sub-div59.1%
Applied egg-rr59.1%
Taylor expanded in x around inf 58.3%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x -2.55e-45) (* x (/ (+ -1.0 z) y_m)) (if (<= x 1.35e+117) (/ (- 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 <= -2.55e-45) {
tmp = x * ((-1.0 + z) / y_m);
} else if (x <= 1.35e+117) {
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 <= (-2.55d-45)) then
tmp = x * (((-1.0d0) + z) / y_m)
else if (x <= 1.35d+117) 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 <= -2.55e-45) {
tmp = x * ((-1.0 + z) / y_m);
} else if (x <= 1.35e+117) {
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 <= -2.55e-45: tmp = x * ((-1.0 + z) / y_m) elif x <= 1.35e+117: 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 <= -2.55e-45) tmp = Float64(x * Float64(Float64(-1.0 + z) / y_m)); elseif (x <= 1.35e+117) 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 <= -2.55e-45) tmp = x * ((-1.0 + z) / y_m); elseif (x <= 1.35e+117) 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, -2.55e-45], N[(x * N[(N[(-1.0 + z), $MachinePrecision] / y$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.35e+117], 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 -2.55 \cdot 10^{-45}:\\
\;\;\;\;x \cdot \frac{-1 + z}{y\_m}\\
\mathbf{elif}\;x \leq 1.35 \cdot 10^{+117}:\\
\;\;\;\;\frac{4 - x \cdot z}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + 4}{y\_m}\\
\end{array}
\end{array}
if x < -2.5499999999999999e-45Initial program 92.6%
fabs-sub92.6%
associate-*l/84.6%
associate-*r/94.1%
fma-neg97.1%
distribute-neg-frac97.1%
+-commutative97.1%
distribute-neg-in97.1%
unsub-neg97.1%
metadata-eval97.1%
Simplified97.1%
add-sqr-sqrt48.2%
fabs-sqr48.2%
add-sqr-sqrt48.8%
fma-undefine47.3%
associate-*r/44.6%
associate-*l/45.8%
div-inv45.8%
sub-neg45.8%
metadata-eval45.8%
distribute-neg-in45.8%
+-commutative45.8%
cancel-sign-sub-inv45.8%
div-inv45.8%
associate-*l/44.6%
sub-div47.5%
Applied egg-rr47.5%
Taylor expanded in x around inf 44.6%
associate-/l*47.3%
sub-neg47.3%
metadata-eval47.3%
+-commutative47.3%
Simplified47.3%
if -2.5499999999999999e-45 < x < 1.3500000000000001e117Initial program 97.3%
fabs-sub97.3%
associate-*l/99.2%
associate-*r/93.1%
fma-neg93.1%
distribute-neg-frac93.1%
+-commutative93.1%
distribute-neg-in93.1%
unsub-neg93.1%
metadata-eval93.1%
Simplified93.1%
fma-undefine93.1%
associate-*r/99.2%
associate-*l/97.3%
div-inv97.3%
sub-neg97.3%
metadata-eval97.3%
distribute-neg-in97.3%
+-commutative97.3%
cancel-sign-sub-inv97.3%
div-inv97.3%
fabs-sub97.3%
add-sqr-sqrt55.0%
fabs-sqr55.0%
add-sqr-sqrt56.0%
associate-*l/57.2%
sub-div57.2%
Applied egg-rr57.2%
Taylor expanded in x around 0 53.1%
if 1.3500000000000001e117 < x Initial program 89.4%
Simplified92.3%
add-sqr-sqrt55.3%
fabs-sqr55.3%
add-sqr-sqrt55.6%
fma-undefine55.6%
distribute-rgt-in50.3%
sub-neg50.3%
metadata-eval50.3%
distribute-neg-in50.3%
+-commutative50.3%
frac-2neg50.3%
metadata-eval50.3%
div-inv50.4%
frac-2neg50.4%
Applied egg-rr50.4%
Taylor expanded in z around 0 33.4%
*-lft-identity33.4%
metadata-eval33.4%
cancel-sign-sub-inv33.4%
associate-*r/33.4%
associate-*l/33.3%
metadata-eval33.3%
distribute-neg-frac33.3%
cancel-sign-sub33.3%
*-commutative33.3%
distribute-lft-in33.3%
associate-*l/33.4%
*-lft-identity33.4%
Simplified33.4%
Final simplification48.6%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x -2.4e+68) (/ (- x) y_m) (if (<= x -4.5e-46) (* z (/ 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 <= -2.4e+68) {
tmp = -x / y_m;
} else if (x <= -4.5e-46) {
tmp = z * (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 <= (-2.4d+68)) then
tmp = -x / y_m
else if (x <= (-4.5d-46)) then
tmp = z * (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 <= -2.4e+68) {
tmp = -x / y_m;
} else if (x <= -4.5e-46) {
tmp = z * (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 <= -2.4e+68: tmp = -x / y_m elif x <= -4.5e-46: tmp = z * (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 <= -2.4e+68) tmp = Float64(Float64(-x) / y_m); elseif (x <= -4.5e-46) tmp = Float64(z * Float64(x / y_m)); else tmp = Float64(Float64(x + 4.0) / y_m); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (x <= -2.4e+68) tmp = -x / y_m; elseif (x <= -4.5e-46) tmp = z * (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, -2.4e+68], N[((-x) / y$95$m), $MachinePrecision], If[LessEqual[x, -4.5e-46], N[(z * N[(x / y$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(x + 4.0), $MachinePrecision] / y$95$m), $MachinePrecision]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.4 \cdot 10^{+68}:\\
\;\;\;\;\frac{-x}{y\_m}\\
\mathbf{elif}\;x \leq -4.5 \cdot 10^{-46}:\\
\;\;\;\;z \cdot \frac{x}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + 4}{y\_m}\\
\end{array}
\end{array}
if x < -2.40000000000000008e68Initial program 89.7%
fabs-sub89.7%
associate-*l/80.6%
associate-*r/93.8%
fma-neg97.9%
distribute-neg-frac97.9%
+-commutative97.9%
distribute-neg-in97.9%
unsub-neg97.9%
metadata-eval97.9%
Simplified97.9%
add-sqr-sqrt50.8%
fabs-sqr50.8%
add-sqr-sqrt51.3%
fma-undefine49.2%
associate-*r/45.4%
associate-*l/47.2%
div-inv47.1%
sub-neg47.1%
metadata-eval47.1%
distribute-neg-in47.1%
+-commutative47.1%
cancel-sign-sub-inv47.1%
div-inv47.2%
associate-*l/45.4%
sub-div49.5%
Applied egg-rr49.5%
Taylor expanded in z around 0 32.5%
associate-*r/32.5%
neg-mul-132.5%
distribute-neg-in32.5%
metadata-eval32.5%
unsub-neg32.5%
Simplified32.5%
Taylor expanded in x around inf 32.5%
neg-mul-132.5%
Simplified32.5%
if -2.40000000000000008e68 < x < -4.50000000000000001e-46Initial program 99.8%
fabs-sub99.8%
associate-*l/95.0%
associate-*r/95.0%
fma-neg95.0%
distribute-neg-frac95.0%
+-commutative95.0%
distribute-neg-in95.0%
unsub-neg95.0%
metadata-eval95.0%
Simplified95.0%
add-sqr-sqrt41.6%
fabs-sqr41.6%
add-sqr-sqrt42.3%
fma-undefine42.3%
associate-*r/42.4%
associate-*l/42.3%
div-inv42.3%
sub-neg42.3%
metadata-eval42.3%
distribute-neg-in42.3%
+-commutative42.3%
cancel-sign-sub-inv42.3%
div-inv42.3%
associate-*l/42.4%
sub-div42.4%
Applied egg-rr42.4%
Taylor expanded in x around inf 32.0%
Taylor expanded in z around inf 33.2%
associate-*l/33.2%
*-commutative33.2%
Simplified33.2%
if -4.50000000000000001e-46 < x Initial program 95.7%
Simplified98.3%
add-sqr-sqrt56.0%
fabs-sqr56.0%
add-sqr-sqrt56.8%
fma-undefine56.8%
distribute-rgt-in55.8%
sub-neg55.8%
metadata-eval55.8%
distribute-neg-in55.8%
+-commutative55.8%
frac-2neg55.8%
metadata-eval55.8%
div-inv55.8%
frac-2neg55.8%
Applied egg-rr55.8%
Taylor expanded in z around 0 38.4%
*-lft-identity38.4%
metadata-eval38.4%
cancel-sign-sub-inv38.4%
associate-*r/38.4%
associate-*l/38.4%
metadata-eval38.4%
distribute-neg-frac38.4%
cancel-sign-sub38.4%
*-commutative38.4%
distribute-lft-in38.3%
associate-*l/38.4%
*-lft-identity38.4%
Simplified38.4%
Final simplification36.9%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x -2.55e-45) (* x (/ (+ -1.0 z) y_m)) (/ (- (+ x 4.0) (* x z)) y_m)))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= -2.55e-45) {
tmp = x * ((-1.0 + z) / y_m);
} else {
tmp = ((x + 4.0) - (x * z)) / y_m;
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-2.55d-45)) then
tmp = x * (((-1.0d0) + z) / y_m)
else
tmp = ((x + 4.0d0) - (x * z)) / y_m
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double tmp;
if (x <= -2.55e-45) {
tmp = x * ((-1.0 + z) / y_m);
} else {
tmp = ((x + 4.0) - (x * z)) / y_m;
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= -2.55e-45: tmp = x * ((-1.0 + z) / y_m) else: tmp = ((x + 4.0) - (x * z)) / y_m return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= -2.55e-45) tmp = Float64(x * Float64(Float64(-1.0 + z) / y_m)); else tmp = Float64(Float64(Float64(x + 4.0) - Float64(x * z)) / y_m); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (x <= -2.55e-45) tmp = x * ((-1.0 + z) / y_m); else tmp = ((x + 4.0) - (x * z)) / y_m; end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[x, -2.55e-45], N[(x * N[(N[(-1.0 + z), $MachinePrecision] / y$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x + 4.0), $MachinePrecision] - N[(x * z), $MachinePrecision]), $MachinePrecision] / y$95$m), $MachinePrecision]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.55 \cdot 10^{-45}:\\
\;\;\;\;x \cdot \frac{-1 + z}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(x + 4\right) - x \cdot z}{y\_m}\\
\end{array}
\end{array}
if x < -2.5499999999999999e-45Initial program 92.6%
fabs-sub92.6%
associate-*l/84.6%
associate-*r/94.1%
fma-neg97.1%
distribute-neg-frac97.1%
+-commutative97.1%
distribute-neg-in97.1%
unsub-neg97.1%
metadata-eval97.1%
Simplified97.1%
add-sqr-sqrt48.2%
fabs-sqr48.2%
add-sqr-sqrt48.8%
fma-undefine47.3%
associate-*r/44.6%
associate-*l/45.8%
div-inv45.8%
sub-neg45.8%
metadata-eval45.8%
distribute-neg-in45.8%
+-commutative45.8%
cancel-sign-sub-inv45.8%
div-inv45.8%
associate-*l/44.6%
sub-div47.5%
Applied egg-rr47.5%
Taylor expanded in x around inf 44.6%
associate-/l*47.3%
sub-neg47.3%
metadata-eval47.3%
+-commutative47.3%
Simplified47.3%
if -2.5499999999999999e-45 < x Initial program 95.7%
fabs-sub95.7%
associate-*l/96.8%
associate-*r/93.4%
fma-neg94.5%
distribute-neg-frac94.5%
+-commutative94.5%
distribute-neg-in94.5%
unsub-neg94.5%
metadata-eval94.5%
Simplified94.5%
fma-undefine93.4%
associate-*r/96.8%
associate-*l/95.7%
div-inv95.7%
sub-neg95.7%
metadata-eval95.7%
distribute-neg-in95.7%
+-commutative95.7%
cancel-sign-sub-inv95.7%
div-inv95.7%
fabs-sub95.7%
add-sqr-sqrt54.0%
fabs-sqr54.0%
add-sqr-sqrt54.8%
associate-*l/55.8%
sub-div56.9%
Applied egg-rr56.9%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x -10.5) (/ (- x) y_m) (if (<= x 4.0) (/ 4.0 y_m) (/ x y_m))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= -10.5) {
tmp = -x / y_m;
} else if (x <= 4.0) {
tmp = 4.0 / y_m;
} else {
tmp = x / y_m;
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-10.5d0)) then
tmp = -x / y_m
else if (x <= 4.0d0) then
tmp = 4.0d0 / y_m
else
tmp = x / y_m
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double tmp;
if (x <= -10.5) {
tmp = -x / y_m;
} else if (x <= 4.0) {
tmp = 4.0 / y_m;
} else {
tmp = x / y_m;
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= -10.5: tmp = -x / y_m elif x <= 4.0: tmp = 4.0 / y_m else: tmp = x / y_m return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= -10.5) tmp = Float64(Float64(-x) / y_m); elseif (x <= 4.0) tmp = Float64(4.0 / y_m); else tmp = Float64(x / y_m); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (x <= -10.5) tmp = -x / y_m; elseif (x <= 4.0) tmp = 4.0 / y_m; else tmp = x / y_m; end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[x, -10.5], N[((-x) / y$95$m), $MachinePrecision], If[LessEqual[x, 4.0], N[(4.0 / y$95$m), $MachinePrecision], N[(x / y$95$m), $MachinePrecision]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -10.5:\\
\;\;\;\;\frac{-x}{y\_m}\\
\mathbf{elif}\;x \leq 4:\\
\;\;\;\;\frac{4}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y\_m}\\
\end{array}
\end{array}
if x < -10.5Initial program 91.8%
fabs-sub91.8%
associate-*l/82.8%
associate-*r/95.0%
fma-neg98.2%
distribute-neg-frac98.2%
+-commutative98.2%
distribute-neg-in98.2%
unsub-neg98.2%
metadata-eval98.2%
Simplified98.2%
add-sqr-sqrt45.7%
fabs-sqr45.7%
add-sqr-sqrt46.2%
fma-undefine44.5%
associate-*r/41.5%
associate-*l/42.9%
div-inv42.8%
sub-neg42.8%
metadata-eval42.8%
distribute-neg-in42.8%
+-commutative42.8%
cancel-sign-sub-inv42.8%
div-inv42.9%
associate-*l/41.5%
sub-div44.7%
Applied egg-rr44.7%
Taylor expanded in z around 0 26.6%
associate-*r/26.6%
neg-mul-126.6%
distribute-neg-in26.6%
metadata-eval26.6%
unsub-neg26.6%
Simplified26.6%
Taylor expanded in x around inf 26.6%
neg-mul-126.6%
Simplified26.6%
if -10.5 < x < 4Initial program 97.7%
fabs-sub97.7%
associate-*l/99.9%
associate-*r/92.0%
fma-neg92.0%
distribute-neg-frac92.0%
+-commutative92.0%
distribute-neg-in92.0%
unsub-neg92.0%
metadata-eval92.0%
Simplified92.0%
fma-undefine92.0%
associate-*r/99.9%
associate-*l/97.7%
div-inv97.7%
sub-neg97.7%
metadata-eval97.7%
distribute-neg-in97.7%
+-commutative97.7%
cancel-sign-sub-inv97.7%
div-inv97.7%
fabs-sub97.7%
add-sqr-sqrt52.1%
fabs-sqr52.1%
add-sqr-sqrt53.1%
associate-*l/54.6%
sub-div54.6%
Applied egg-rr54.6%
Taylor expanded in x around 0 40.1%
if 4 < x Initial program 92.4%
Simplified95.5%
add-sqr-sqrt58.0%
fabs-sqr58.0%
add-sqr-sqrt58.4%
fma-undefine58.4%
distribute-rgt-in55.4%
sub-neg55.4%
metadata-eval55.4%
distribute-neg-in55.4%
+-commutative55.4%
frac-2neg55.4%
metadata-eval55.4%
div-inv55.4%
frac-2neg55.4%
Applied egg-rr55.4%
Taylor expanded in z around 0 30.4%
*-lft-identity30.4%
metadata-eval30.4%
cancel-sign-sub-inv30.4%
associate-*r/30.4%
associate-*l/30.3%
metadata-eval30.3%
distribute-neg-frac30.3%
cancel-sign-sub30.3%
*-commutative30.3%
distribute-lft-in30.3%
associate-*l/30.4%
*-lft-identity30.4%
Simplified30.4%
Taylor expanded in x around inf 29.6%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x -2.55e-45) (* x (/ (+ -1.0 z) y_m)) (/ (+ x 4.0) y_m)))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= -2.55e-45) {
tmp = x * ((-1.0 + z) / y_m);
} else {
tmp = (x + 4.0) / y_m;
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-2.55d-45)) then
tmp = x * (((-1.0d0) + z) / y_m)
else
tmp = (x + 4.0d0) / y_m
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double tmp;
if (x <= -2.55e-45) {
tmp = x * ((-1.0 + z) / y_m);
} else {
tmp = (x + 4.0) / y_m;
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= -2.55e-45: tmp = x * ((-1.0 + z) / y_m) else: tmp = (x + 4.0) / y_m return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= -2.55e-45) tmp = Float64(x * Float64(Float64(-1.0 + z) / y_m)); else tmp = Float64(Float64(x + 4.0) / y_m); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (x <= -2.55e-45) tmp = x * ((-1.0 + z) / y_m); else tmp = (x + 4.0) / y_m; end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[x, -2.55e-45], N[(x * N[(N[(-1.0 + z), $MachinePrecision] / y$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(x + 4.0), $MachinePrecision] / y$95$m), $MachinePrecision]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.55 \cdot 10^{-45}:\\
\;\;\;\;x \cdot \frac{-1 + z}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + 4}{y\_m}\\
\end{array}
\end{array}
if x < -2.5499999999999999e-45Initial program 92.6%
fabs-sub92.6%
associate-*l/84.6%
associate-*r/94.1%
fma-neg97.1%
distribute-neg-frac97.1%
+-commutative97.1%
distribute-neg-in97.1%
unsub-neg97.1%
metadata-eval97.1%
Simplified97.1%
add-sqr-sqrt48.2%
fabs-sqr48.2%
add-sqr-sqrt48.8%
fma-undefine47.3%
associate-*r/44.6%
associate-*l/45.8%
div-inv45.8%
sub-neg45.8%
metadata-eval45.8%
distribute-neg-in45.8%
+-commutative45.8%
cancel-sign-sub-inv45.8%
div-inv45.8%
associate-*l/44.6%
sub-div47.5%
Applied egg-rr47.5%
Taylor expanded in x around inf 44.6%
associate-/l*47.3%
sub-neg47.3%
metadata-eval47.3%
+-commutative47.3%
Simplified47.3%
if -2.5499999999999999e-45 < x Initial program 95.7%
Simplified98.3%
add-sqr-sqrt56.0%
fabs-sqr56.0%
add-sqr-sqrt56.8%
fma-undefine56.8%
distribute-rgt-in55.8%
sub-neg55.8%
metadata-eval55.8%
distribute-neg-in55.8%
+-commutative55.8%
frac-2neg55.8%
metadata-eval55.8%
div-inv55.8%
frac-2neg55.8%
Applied egg-rr55.8%
Taylor expanded in z around 0 38.4%
*-lft-identity38.4%
metadata-eval38.4%
cancel-sign-sub-inv38.4%
associate-*r/38.4%
associate-*l/38.4%
metadata-eval38.4%
distribute-neg-frac38.4%
cancel-sign-sub38.4%
*-commutative38.4%
distribute-lft-in38.3%
associate-*l/38.4%
*-lft-identity38.4%
Simplified38.4%
Final simplification40.7%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x 4.0) (/ 4.0 y_m) (/ x y_m)))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= 4.0) {
tmp = 4.0 / y_m;
} else {
tmp = x / y_m;
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 4.0d0) then
tmp = 4.0d0 / y_m
else
tmp = x / y_m
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double tmp;
if (x <= 4.0) {
tmp = 4.0 / y_m;
} else {
tmp = x / y_m;
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= 4.0: tmp = 4.0 / y_m else: tmp = x / y_m return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= 4.0) tmp = Float64(4.0 / y_m); else tmp = Float64(x / y_m); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (x <= 4.0) tmp = 4.0 / y_m; else tmp = x / y_m; end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[x, 4.0], N[(4.0 / y$95$m), $MachinePrecision], N[(x / y$95$m), $MachinePrecision]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq 4:\\
\;\;\;\;\frac{4}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y\_m}\\
\end{array}
\end{array}
if x < 4Initial program 95.8%
fabs-sub95.8%
associate-*l/94.4%
associate-*r/92.9%
fma-neg94.0%
distribute-neg-frac94.0%
+-commutative94.0%
distribute-neg-in94.0%
unsub-neg94.0%
metadata-eval94.0%
Simplified94.0%
fma-undefine92.9%
associate-*r/94.4%
associate-*l/95.8%
div-inv95.7%
sub-neg95.7%
metadata-eval95.7%
distribute-neg-in95.7%
+-commutative95.7%
cancel-sign-sub-inv95.7%
div-inv95.8%
fabs-sub95.8%
add-sqr-sqrt51.0%
fabs-sqr51.0%
add-sqr-sqrt51.9%
associate-*l/50.5%
sub-div51.0%
Applied egg-rr51.0%
Taylor expanded in x around 0 28.0%
if 4 < x Initial program 92.4%
Simplified95.5%
add-sqr-sqrt58.0%
fabs-sqr58.0%
add-sqr-sqrt58.4%
fma-undefine58.4%
distribute-rgt-in55.4%
sub-neg55.4%
metadata-eval55.4%
distribute-neg-in55.4%
+-commutative55.4%
frac-2neg55.4%
metadata-eval55.4%
div-inv55.4%
frac-2neg55.4%
Applied egg-rr55.4%
Taylor expanded in z around 0 30.4%
*-lft-identity30.4%
metadata-eval30.4%
cancel-sign-sub-inv30.4%
associate-*r/30.4%
associate-*l/30.3%
metadata-eval30.3%
distribute-neg-frac30.3%
cancel-sign-sub30.3%
*-commutative30.3%
distribute-lft-in30.3%
associate-*l/30.4%
*-lft-identity30.4%
Simplified30.4%
Taylor expanded in x around inf 29.6%
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 94.9%
fabs-sub94.9%
associate-*l/93.5%
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/93.5%
associate-*l/94.9%
div-inv94.8%
sub-neg94.8%
metadata-eval94.8%
distribute-neg-in94.8%
+-commutative94.8%
cancel-sign-sub-inv94.8%
div-inv94.9%
fabs-sub94.9%
add-sqr-sqrt52.1%
fabs-sqr52.1%
add-sqr-sqrt52.8%
associate-*l/51.8%
sub-div53.0%
Applied egg-rr53.0%
Taylor expanded in x around 0 21.6%
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 94.9%
fabs-sub94.9%
associate-*l/93.5%
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%
add-sqr-sqrt42.5%
fabs-sqr42.5%
add-sqr-sqrt43.4%
fma-undefine42.6%
associate-*r/42.9%
associate-*l/43.2%
div-inv43.2%
sub-neg43.2%
metadata-eval43.2%
distribute-neg-in43.2%
+-commutative43.2%
cancel-sign-sub-inv43.2%
div-inv43.2%
associate-*l/42.9%
sub-div44.1%
Applied egg-rr44.1%
Taylor expanded in x around 0 19.3%
herbie shell --seed 2024133
(FPCore (x y z)
:name "fabs fraction 1"
:precision binary64
(fabs (- (/ (+ x 4.0) y) (* (/ x y) z))))