
(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 3.5e-85) (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 <= 3.5e-85) {
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 <= 3.5e-85) 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, 3.5e-85], N[Abs[N[(N[(-1.0 / y$95$m), $MachinePrecision] * N[(x * z + N[(-4.0 - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(x * N[(z / y$95$m), $MachinePrecision] + N[(N[(-4.0 - x), $MachinePrecision] / y$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;y\_m \leq 3.5 \cdot 10^{-85}:\\
\;\;\;\;\left|\frac{-1}{y\_m} \cdot \mathsf{fma}\left(x, z, -4 - x\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\mathsf{fma}\left(x, \frac{z}{y\_m}, \frac{-4 - x}{y\_m}\right)\right|\\
\end{array}
\end{array}
if y < 3.49999999999999978e-85Initial program 86.5%
Simplified97.7%
if 3.49999999999999978e-85 < y Initial program 98.8%
fabs-sub98.8%
associate-*l/94.1%
associate-*r/99.8%
fma-neg99.8%
distribute-neg-frac99.8%
+-commutative99.8%
distribute-neg-in99.8%
unsub-neg99.8%
metadata-eval99.8%
Simplified99.8%
y_m = (fabs.f64 y)
(FPCore (x y_m z)
:precision binary64
(let* ((t_0 (fabs (- (/ (+ x 4.0) y_m) (* z (/ x y_m))))))
(if (or (<= t_0 50000000.0) (not (<= t_0 5e+298)))
(fabs (* (/ -1.0 y_m) (fma x z (- -4.0 x))))
t_0)))y_m = fabs(y);
double code(double x, double y_m, double z) {
double t_0 = fabs((((x + 4.0) / y_m) - (z * (x / y_m))));
double tmp;
if ((t_0 <= 50000000.0) || !(t_0 <= 5e+298)) {
tmp = fabs(((-1.0 / y_m) * fma(x, z, (-4.0 - x))));
} else {
tmp = t_0;
}
return tmp;
}
y_m = abs(y) function code(x, y_m, z) t_0 = abs(Float64(Float64(Float64(x + 4.0) / y_m) - Float64(z * Float64(x / y_m)))) tmp = 0.0 if ((t_0 <= 50000000.0) || !(t_0 <= 5e+298)) tmp = abs(Float64(Float64(-1.0 / y_m) * fma(x, z, Float64(-4.0 - x)))); else tmp = t_0; end return tmp end
y_m = N[Abs[y], $MachinePrecision]
code[x_, y$95$m_, z_] := Block[{t$95$0 = N[Abs[N[(N[(N[(x + 4.0), $MachinePrecision] / y$95$m), $MachinePrecision] - N[(z * N[(x / y$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[t$95$0, 50000000.0], N[Not[LessEqual[t$95$0, 5e+298]], $MachinePrecision]], N[Abs[N[(N[(-1.0 / y$95$m), $MachinePrecision] * N[(x * z + N[(-4.0 - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$0]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
t_0 := \left|\frac{x + 4}{y\_m} - z \cdot \frac{x}{y\_m}\right|\\
\mathbf{if}\;t\_0 \leq 50000000 \lor \neg \left(t\_0 \leq 5 \cdot 10^{+298}\right):\\
\;\;\;\;\left|\frac{-1}{y\_m} \cdot \mathsf{fma}\left(x, z, -4 - x\right)\right|\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if (fabs.f64 (-.f64 (/.f64 (+.f64 x #s(literal 4 binary64)) y) (*.f64 (/.f64 x y) z))) < 5e7 or 5.0000000000000003e298 < (fabs.f64 (-.f64 (/.f64 (+.f64 x #s(literal 4 binary64)) y) (*.f64 (/.f64 x y) z))) Initial program 81.6%
Simplified99.9%
if 5e7 < (fabs.f64 (-.f64 (/.f64 (+.f64 x #s(literal 4 binary64)) y) (*.f64 (/.f64 x y) z))) < 5.0000000000000003e298Initial program 99.8%
Final simplification99.9%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (let* ((t_0 (fabs (- (/ (+ x 4.0) y_m) (* z (/ x y_m)))))) (if (<= t_0 INFINITY) t_0 (/ x (- y_m)))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double t_0 = fabs((((x + 4.0) / y_m) - (z * (x / y_m))));
double tmp;
if (t_0 <= ((double) INFINITY)) {
tmp = t_0;
} else {
tmp = 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((((x + 4.0) / y_m) - (z * (x / 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((((x + 4.0) / y_m) - (z * (x / 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(Float64(x + 4.0) / y_m) - Float64(z * Float64(x / y_m)))) tmp = 0.0 if (t_0 <= Inf) tmp = t_0; else tmp = Float64(x / Float64(-y_m)); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) t_0 = abs((((x + 4.0) / y_m) - (z * (x / y_m)))); tmp = 0.0; if (t_0 <= Inf) tmp = t_0; else tmp = 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[(N[(x + 4.0), $MachinePrecision] / y$95$m), $MachinePrecision] - N[(z * N[(x / y$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$0, Infinity], t$95$0, N[(x / (-y$95$m)), $MachinePrecision]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
t_0 := \left|\frac{x + 4}{y\_m} - z \cdot \frac{x}{y\_m}\right|\\
\mathbf{if}\;t\_0 \leq \infty:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{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 97.7%
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/42.1%
associate-*r/42.1%
fma-neg57.9%
distribute-neg-frac57.9%
+-commutative57.9%
distribute-neg-in57.9%
unsub-neg57.9%
metadata-eval57.9%
Simplified57.9%
add-sqr-sqrt31.6%
fabs-sqr31.6%
add-sqr-sqrt31.6%
fma-undefine21.1%
associate-*r/21.1%
associate-*l/0.0%
div-inv0.0%
sub-neg0.0%
metadata-eval0.0%
distribute-neg-in0.0%
+-commutative0.0%
cancel-sign-sub-inv0.0%
div-inv0.0%
associate-*l/21.1%
sub-div36.8%
Applied egg-rr36.8%
Taylor expanded in x around inf 36.8%
associate-/l*36.8%
sub-neg36.8%
metadata-eval36.8%
Simplified36.8%
Taylor expanded in z around 0 63.2%
neg-mul-163.2%
distribute-neg-frac63.2%
Simplified63.2%
Final simplification95.1%
y_m = (fabs.f64 y)
(FPCore (x y_m z)
:precision binary64
(if (<= x -1.55e+78)
(* (/ x y_m) (+ -1.0 z))
(if (<= x 1.22e-9)
(* (/ 1.0 y_m) (- 4.0 (* x z)))
(/ x (/ y_m (- 1.0 z))))))y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= -1.55e+78) {
tmp = (x / y_m) * (-1.0 + z);
} else if (x <= 1.22e-9) {
tmp = (1.0 / y_m) * (4.0 - (x * z));
} else {
tmp = x / (y_m / (1.0 - z));
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-1.55d+78)) then
tmp = (x / y_m) * ((-1.0d0) + z)
else if (x <= 1.22d-9) then
tmp = (1.0d0 / y_m) * (4.0d0 - (x * z))
else
tmp = x / (y_m / (1.0d0 - z))
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double tmp;
if (x <= -1.55e+78) {
tmp = (x / y_m) * (-1.0 + z);
} else if (x <= 1.22e-9) {
tmp = (1.0 / y_m) * (4.0 - (x * z));
} else {
tmp = x / (y_m / (1.0 - z));
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= -1.55e+78: tmp = (x / y_m) * (-1.0 + z) elif x <= 1.22e-9: tmp = (1.0 / y_m) * (4.0 - (x * z)) else: tmp = x / (y_m / (1.0 - z)) return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= -1.55e+78) tmp = Float64(Float64(x / y_m) * Float64(-1.0 + z)); elseif (x <= 1.22e-9) tmp = Float64(Float64(1.0 / y_m) * Float64(4.0 - Float64(x * z))); else tmp = Float64(x / Float64(y_m / Float64(1.0 - z))); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (x <= -1.55e+78) tmp = (x / y_m) * (-1.0 + z); elseif (x <= 1.22e-9) tmp = (1.0 / y_m) * (4.0 - (x * z)); else tmp = x / (y_m / (1.0 - z)); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[x, -1.55e+78], N[(N[(x / y$95$m), $MachinePrecision] * N[(-1.0 + z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.22e-9], N[(N[(1.0 / y$95$m), $MachinePrecision] * N[(4.0 - N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y$95$m / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.55 \cdot 10^{+78}:\\
\;\;\;\;\frac{x}{y\_m} \cdot \left(-1 + z\right)\\
\mathbf{elif}\;x \leq 1.22 \cdot 10^{-9}:\\
\;\;\;\;\frac{1}{y\_m} \cdot \left(4 - x \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{y\_m}{1 - z}}\\
\end{array}
\end{array}
if x < -1.55e78Initial program 83.3%
fabs-sub83.3%
associate-*l/90.0%
associate-*r/91.5%
fma-neg94.8%
distribute-neg-frac94.8%
+-commutative94.8%
distribute-neg-in94.8%
unsub-neg94.8%
metadata-eval94.8%
Simplified94.8%
add-sqr-sqrt41.5%
fabs-sqr41.5%
add-sqr-sqrt41.9%
fma-undefine40.2%
associate-*r/40.3%
associate-*l/36.9%
div-inv36.8%
sub-neg36.8%
metadata-eval36.8%
distribute-neg-in36.8%
+-commutative36.8%
cancel-sign-sub-inv36.8%
div-inv36.9%
associate-*l/40.3%
sub-div42.0%
Applied egg-rr42.0%
Taylor expanded in x around inf 41.9%
associate-/l*41.8%
sub-neg41.8%
metadata-eval41.8%
Simplified41.8%
Taylor expanded in x around 0 41.9%
sub-neg41.9%
metadata-eval41.9%
*-rgt-identity41.9%
times-frac41.9%
/-rgt-identity41.9%
Simplified41.9%
if -1.55e78 < x < 1.2199999999999999e-9Initial program 95.5%
fabs-sub95.5%
associate-*l/99.1%
associate-*r/94.5%
fma-neg94.5%
distribute-neg-frac94.5%
+-commutative94.5%
distribute-neg-in94.5%
unsub-neg94.5%
metadata-eval94.5%
Simplified94.5%
fma-undefine94.5%
associate-*r/99.1%
associate-*l/95.5%
div-inv95.4%
sub-neg95.4%
metadata-eval95.4%
distribute-neg-in95.4%
+-commutative95.4%
cancel-sign-sub-inv95.4%
div-inv95.5%
fabs-sub95.5%
add-sqr-sqrt49.0%
fabs-sqr49.0%
add-sqr-sqrt50.4%
associate-*l/51.3%
sub-div52.0%
Applied egg-rr52.0%
clear-num52.0%
associate-/r/52.0%
Applied egg-rr52.0%
Taylor expanded in x around 0 50.1%
if 1.2199999999999999e-9 < x Initial program 85.9%
fabs-sub85.9%
associate-*l/78.1%
associate-*r/91.0%
fma-neg92.8%
distribute-neg-frac92.8%
+-commutative92.8%
distribute-neg-in92.8%
unsub-neg92.8%
metadata-eval92.8%
Simplified92.8%
fma-undefine91.0%
associate-*r/78.1%
associate-*l/85.9%
div-inv85.7%
sub-neg85.7%
metadata-eval85.7%
distribute-neg-in85.7%
+-commutative85.7%
cancel-sign-sub-inv85.7%
div-inv85.9%
fabs-sub85.9%
add-sqr-sqrt38.3%
fabs-sqr38.3%
add-sqr-sqrt38.9%
sub-neg38.9%
distribute-rgt-neg-in38.9%
Applied egg-rr38.9%
Taylor expanded in x around -inf 44.8%
mul-1-neg44.8%
div-sub44.8%
associate-/l*38.4%
sub-neg38.4%
metadata-eval38.4%
distribute-rgt-in38.4%
neg-mul-138.4%
sub-neg38.4%
*-lft-identity38.4%
sub-neg38.4%
distribute-rgt-in38.4%
*-rgt-identity38.4%
remove-double-neg38.4%
*-commutative38.4%
mul-1-neg38.4%
associate-*r*38.4%
neg-mul-138.4%
distribute-rgt-neg-in38.4%
mul-1-neg38.4%
distribute-lft-in38.4%
+-commutative38.4%
distribute-lft-neg-in38.4%
Simplified44.8%
clear-num44.8%
un-div-inv44.8%
Applied egg-rr44.8%
Final simplification47.0%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x -1.55e+78) (* (/ x y_m) (+ -1.0 z)) (if (<= x 3.6) (/ (- 4.0 (* x z)) y_m) (/ x (/ y_m (- 1.0 z))))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= -1.55e+78) {
tmp = (x / y_m) * (-1.0 + z);
} else if (x <= 3.6) {
tmp = (4.0 - (x * z)) / y_m;
} else {
tmp = x / (y_m / (1.0 - z));
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-1.55d+78)) then
tmp = (x / y_m) * ((-1.0d0) + z)
else if (x <= 3.6d0) then
tmp = (4.0d0 - (x * z)) / y_m
else
tmp = x / (y_m / (1.0d0 - z))
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double tmp;
if (x <= -1.55e+78) {
tmp = (x / y_m) * (-1.0 + z);
} else if (x <= 3.6) {
tmp = (4.0 - (x * z)) / y_m;
} else {
tmp = x / (y_m / (1.0 - z));
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= -1.55e+78: tmp = (x / y_m) * (-1.0 + z) elif x <= 3.6: tmp = (4.0 - (x * z)) / y_m else: tmp = x / (y_m / (1.0 - z)) return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= -1.55e+78) tmp = Float64(Float64(x / y_m) * Float64(-1.0 + z)); elseif (x <= 3.6) tmp = Float64(Float64(4.0 - Float64(x * z)) / y_m); else tmp = Float64(x / Float64(y_m / Float64(1.0 - z))); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (x <= -1.55e+78) tmp = (x / y_m) * (-1.0 + z); elseif (x <= 3.6) tmp = (4.0 - (x * z)) / y_m; else tmp = x / (y_m / (1.0 - z)); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[x, -1.55e+78], N[(N[(x / y$95$m), $MachinePrecision] * N[(-1.0 + z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.6], N[(N[(4.0 - N[(x * z), $MachinePrecision]), $MachinePrecision] / y$95$m), $MachinePrecision], N[(x / N[(y$95$m / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.55 \cdot 10^{+78}:\\
\;\;\;\;\frac{x}{y\_m} \cdot \left(-1 + z\right)\\
\mathbf{elif}\;x \leq 3.6:\\
\;\;\;\;\frac{4 - x \cdot z}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{y\_m}{1 - z}}\\
\end{array}
\end{array}
if x < -1.55e78Initial program 83.3%
fabs-sub83.3%
associate-*l/90.0%
associate-*r/91.5%
fma-neg94.8%
distribute-neg-frac94.8%
+-commutative94.8%
distribute-neg-in94.8%
unsub-neg94.8%
metadata-eval94.8%
Simplified94.8%
add-sqr-sqrt41.5%
fabs-sqr41.5%
add-sqr-sqrt41.9%
fma-undefine40.2%
associate-*r/40.3%
associate-*l/36.9%
div-inv36.8%
sub-neg36.8%
metadata-eval36.8%
distribute-neg-in36.8%
+-commutative36.8%
cancel-sign-sub-inv36.8%
div-inv36.9%
associate-*l/40.3%
sub-div42.0%
Applied egg-rr42.0%
Taylor expanded in x around inf 41.9%
associate-/l*41.8%
sub-neg41.8%
metadata-eval41.8%
Simplified41.8%
Taylor expanded in x around 0 41.9%
sub-neg41.9%
metadata-eval41.9%
*-rgt-identity41.9%
times-frac41.9%
/-rgt-identity41.9%
Simplified41.9%
if -1.55e78 < x < 3.60000000000000009Initial program 95.5%
fabs-sub95.5%
associate-*l/99.1%
associate-*r/94.6%
fma-neg94.6%
distribute-neg-frac94.6%
+-commutative94.6%
distribute-neg-in94.6%
unsub-neg94.6%
metadata-eval94.6%
Simplified94.6%
fma-undefine94.6%
associate-*r/99.1%
associate-*l/95.5%
div-inv95.5%
sub-neg95.5%
metadata-eval95.5%
distribute-neg-in95.5%
+-commutative95.5%
cancel-sign-sub-inv95.5%
div-inv95.5%
fabs-sub95.5%
add-sqr-sqrt49.3%
fabs-sqr49.3%
add-sqr-sqrt50.8%
associate-*l/51.6%
sub-div52.3%
Applied egg-rr52.3%
Taylor expanded in x around 0 50.5%
if 3.60000000000000009 < x Initial program 85.1%
fabs-sub85.1%
associate-*l/76.9%
associate-*r/90.5%
fma-neg92.4%
distribute-neg-frac92.4%
+-commutative92.4%
distribute-neg-in92.4%
unsub-neg92.4%
metadata-eval92.4%
Simplified92.4%
fma-undefine90.5%
associate-*r/76.9%
associate-*l/85.1%
div-inv85.0%
sub-neg85.0%
metadata-eval85.0%
distribute-neg-in85.0%
+-commutative85.0%
cancel-sign-sub-inv85.0%
div-inv85.1%
fabs-sub85.1%
add-sqr-sqrt36.8%
fabs-sqr36.8%
add-sqr-sqrt37.3%
sub-neg37.3%
distribute-rgt-neg-in37.3%
Applied egg-rr37.3%
Taylor expanded in x around -inf 43.4%
mul-1-neg43.4%
div-sub43.4%
associate-/l*36.7%
sub-neg36.7%
metadata-eval36.7%
distribute-rgt-in36.7%
neg-mul-136.7%
sub-neg36.7%
*-lft-identity36.7%
sub-neg36.7%
distribute-rgt-in36.7%
*-rgt-identity36.7%
remove-double-neg36.7%
*-commutative36.7%
mul-1-neg36.7%
associate-*r*36.7%
neg-mul-136.7%
distribute-rgt-neg-in36.7%
mul-1-neg36.7%
distribute-lft-in36.7%
+-commutative36.7%
distribute-lft-neg-in36.7%
Simplified43.4%
clear-num43.4%
un-div-inv43.5%
Applied egg-rr43.5%
Final simplification47.0%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x -1.2e+14) (* (/ x y_m) (+ -1.0 z)) (if (<= x 1.02e-61) (/ (+ x 4.0) y_m) (/ x (/ y_m (- 1.0 z))))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= -1.2e+14) {
tmp = (x / y_m) * (-1.0 + z);
} else if (x <= 1.02e-61) {
tmp = (x + 4.0) / y_m;
} else {
tmp = x / (y_m / (1.0 - z));
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-1.2d+14)) then
tmp = (x / y_m) * ((-1.0d0) + z)
else if (x <= 1.02d-61) then
tmp = (x + 4.0d0) / y_m
else
tmp = x / (y_m / (1.0d0 - z))
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double tmp;
if (x <= -1.2e+14) {
tmp = (x / y_m) * (-1.0 + z);
} else if (x <= 1.02e-61) {
tmp = (x + 4.0) / y_m;
} else {
tmp = x / (y_m / (1.0 - z));
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= -1.2e+14: tmp = (x / y_m) * (-1.0 + z) elif x <= 1.02e-61: tmp = (x + 4.0) / y_m else: tmp = x / (y_m / (1.0 - z)) return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= -1.2e+14) tmp = Float64(Float64(x / y_m) * Float64(-1.0 + z)); elseif (x <= 1.02e-61) tmp = Float64(Float64(x + 4.0) / y_m); else tmp = Float64(x / Float64(y_m / Float64(1.0 - z))); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (x <= -1.2e+14) tmp = (x / y_m) * (-1.0 + z); elseif (x <= 1.02e-61) tmp = (x + 4.0) / y_m; else tmp = x / (y_m / (1.0 - z)); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[x, -1.2e+14], N[(N[(x / y$95$m), $MachinePrecision] * N[(-1.0 + z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.02e-61], N[(N[(x + 4.0), $MachinePrecision] / y$95$m), $MachinePrecision], N[(x / N[(y$95$m / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.2 \cdot 10^{+14}:\\
\;\;\;\;\frac{x}{y\_m} \cdot \left(-1 + z\right)\\
\mathbf{elif}\;x \leq 1.02 \cdot 10^{-61}:\\
\;\;\;\;\frac{x + 4}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{y\_m}{1 - z}}\\
\end{array}
\end{array}
if x < -1.2e14Initial program 84.6%
fabs-sub84.6%
associate-*l/90.2%
associate-*r/91.5%
fma-neg94.3%
distribute-neg-frac94.3%
+-commutative94.3%
distribute-neg-in94.3%
unsub-neg94.3%
metadata-eval94.3%
Simplified94.3%
add-sqr-sqrt45.6%
fabs-sqr45.6%
add-sqr-sqrt46.0%
fma-undefine44.6%
associate-*r/44.7%
associate-*l/41.9%
div-inv41.8%
sub-neg41.8%
metadata-eval41.8%
distribute-neg-in41.8%
+-commutative41.8%
cancel-sign-sub-inv41.8%
div-inv41.9%
associate-*l/44.7%
sub-div46.1%
Applied egg-rr46.1%
Taylor expanded in x around inf 46.0%
associate-/l*46.0%
sub-neg46.0%
metadata-eval46.0%
Simplified46.0%
Taylor expanded in x around 0 46.0%
sub-neg46.0%
metadata-eval46.0%
*-rgt-identity46.0%
times-frac46.1%
/-rgt-identity46.1%
Simplified46.1%
if -1.2e14 < x < 1.02e-61Initial program 97.0%
fabs-sub97.0%
associate-*l/99.9%
associate-*r/94.2%
fma-neg94.2%
distribute-neg-frac94.2%
+-commutative94.2%
distribute-neg-in94.2%
unsub-neg94.2%
metadata-eval94.2%
Simplified94.2%
fma-undefine94.2%
associate-*r/99.9%
associate-*l/97.0%
div-inv97.0%
sub-neg97.0%
metadata-eval97.0%
distribute-neg-in97.0%
+-commutative97.0%
cancel-sign-sub-inv97.0%
div-inv97.0%
fabs-sub97.0%
add-sqr-sqrt51.5%
fabs-sqr51.5%
add-sqr-sqrt52.9%
associate-*l/54.0%
sub-div54.0%
Applied egg-rr54.0%
Taylor expanded in z around 0 44.1%
if 1.02e-61 < x Initial program 85.9%
fabs-sub85.9%
associate-*l/82.3%
associate-*r/92.7%
fma-neg94.2%
distribute-neg-frac94.2%
+-commutative94.2%
distribute-neg-in94.2%
unsub-neg94.2%
metadata-eval94.2%
Simplified94.2%
fma-undefine92.7%
associate-*r/82.3%
associate-*l/85.9%
div-inv85.8%
sub-neg85.8%
metadata-eval85.8%
distribute-neg-in85.8%
+-commutative85.8%
cancel-sign-sub-inv85.8%
div-inv85.9%
fabs-sub85.9%
add-sqr-sqrt40.5%
fabs-sqr40.5%
add-sqr-sqrt41.2%
sub-neg41.2%
distribute-rgt-neg-in41.2%
Applied egg-rr41.2%
Taylor expanded in x around -inf 44.0%
mul-1-neg44.0%
div-sub44.0%
associate-/l*38.9%
sub-neg38.9%
metadata-eval38.9%
distribute-rgt-in38.9%
neg-mul-138.9%
sub-neg38.9%
*-lft-identity38.9%
sub-neg38.9%
distribute-rgt-in38.9%
*-rgt-identity38.9%
remove-double-neg38.9%
*-commutative38.9%
mul-1-neg38.9%
associate-*r*38.9%
neg-mul-138.9%
distribute-rgt-neg-in38.9%
mul-1-neg38.9%
distribute-lft-in38.9%
+-commutative38.9%
distribute-lft-neg-in38.9%
Simplified44.0%
clear-num43.9%
un-div-inv44.0%
Applied egg-rr44.0%
Final simplification44.6%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x -1.2e+14) (* (/ x y_m) (+ -1.0 z)) (if (<= x 1.05e-61) (/ (+ x 4.0) y_m) (* x (/ (- 1.0 z) y_m)))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= -1.2e+14) {
tmp = (x / y_m) * (-1.0 + z);
} else if (x <= 1.05e-61) {
tmp = (x + 4.0) / y_m;
} else {
tmp = x * ((1.0 - z) / y_m);
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-1.2d+14)) then
tmp = (x / y_m) * ((-1.0d0) + z)
else if (x <= 1.05d-61) then
tmp = (x + 4.0d0) / y_m
else
tmp = x * ((1.0d0 - z) / y_m)
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double tmp;
if (x <= -1.2e+14) {
tmp = (x / y_m) * (-1.0 + z);
} else if (x <= 1.05e-61) {
tmp = (x + 4.0) / y_m;
} else {
tmp = x * ((1.0 - z) / y_m);
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= -1.2e+14: tmp = (x / y_m) * (-1.0 + z) elif x <= 1.05e-61: tmp = (x + 4.0) / y_m else: tmp = x * ((1.0 - z) / y_m) return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= -1.2e+14) tmp = Float64(Float64(x / y_m) * Float64(-1.0 + z)); elseif (x <= 1.05e-61) tmp = Float64(Float64(x + 4.0) / y_m); else tmp = Float64(x * Float64(Float64(1.0 - z) / y_m)); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (x <= -1.2e+14) tmp = (x / y_m) * (-1.0 + z); elseif (x <= 1.05e-61) tmp = (x + 4.0) / y_m; else tmp = x * ((1.0 - z) / y_m); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[x, -1.2e+14], N[(N[(x / y$95$m), $MachinePrecision] * N[(-1.0 + z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.05e-61], N[(N[(x + 4.0), $MachinePrecision] / y$95$m), $MachinePrecision], N[(x * N[(N[(1.0 - z), $MachinePrecision] / y$95$m), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.2 \cdot 10^{+14}:\\
\;\;\;\;\frac{x}{y\_m} \cdot \left(-1 + z\right)\\
\mathbf{elif}\;x \leq 1.05 \cdot 10^{-61}:\\
\;\;\;\;\frac{x + 4}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{1 - z}{y\_m}\\
\end{array}
\end{array}
if x < -1.2e14Initial program 84.6%
fabs-sub84.6%
associate-*l/90.2%
associate-*r/91.5%
fma-neg94.3%
distribute-neg-frac94.3%
+-commutative94.3%
distribute-neg-in94.3%
unsub-neg94.3%
metadata-eval94.3%
Simplified94.3%
add-sqr-sqrt45.6%
fabs-sqr45.6%
add-sqr-sqrt46.0%
fma-undefine44.6%
associate-*r/44.7%
associate-*l/41.9%
div-inv41.8%
sub-neg41.8%
metadata-eval41.8%
distribute-neg-in41.8%
+-commutative41.8%
cancel-sign-sub-inv41.8%
div-inv41.9%
associate-*l/44.7%
sub-div46.1%
Applied egg-rr46.1%
Taylor expanded in x around inf 46.0%
associate-/l*46.0%
sub-neg46.0%
metadata-eval46.0%
Simplified46.0%
Taylor expanded in x around 0 46.0%
sub-neg46.0%
metadata-eval46.0%
*-rgt-identity46.0%
times-frac46.1%
/-rgt-identity46.1%
Simplified46.1%
if -1.2e14 < x < 1.05e-61Initial program 97.0%
fabs-sub97.0%
associate-*l/99.9%
associate-*r/94.2%
fma-neg94.2%
distribute-neg-frac94.2%
+-commutative94.2%
distribute-neg-in94.2%
unsub-neg94.2%
metadata-eval94.2%
Simplified94.2%
fma-undefine94.2%
associate-*r/99.9%
associate-*l/97.0%
div-inv97.0%
sub-neg97.0%
metadata-eval97.0%
distribute-neg-in97.0%
+-commutative97.0%
cancel-sign-sub-inv97.0%
div-inv97.0%
fabs-sub97.0%
add-sqr-sqrt51.5%
fabs-sqr51.5%
add-sqr-sqrt52.9%
associate-*l/54.0%
sub-div54.0%
Applied egg-rr54.0%
Taylor expanded in z around 0 44.1%
if 1.05e-61 < x Initial program 85.9%
fabs-sub85.9%
associate-*l/82.3%
associate-*r/92.7%
fma-neg94.2%
distribute-neg-frac94.2%
+-commutative94.2%
distribute-neg-in94.2%
unsub-neg94.2%
metadata-eval94.2%
Simplified94.2%
fma-undefine92.7%
associate-*r/82.3%
associate-*l/85.9%
div-inv85.8%
sub-neg85.8%
metadata-eval85.8%
distribute-neg-in85.8%
+-commutative85.8%
cancel-sign-sub-inv85.8%
div-inv85.9%
fabs-sub85.9%
add-sqr-sqrt40.5%
fabs-sqr40.5%
add-sqr-sqrt41.2%
sub-neg41.2%
distribute-rgt-neg-in41.2%
Applied egg-rr41.2%
Taylor expanded in x around -inf 44.0%
mul-1-neg44.0%
div-sub44.0%
associate-/l*38.9%
sub-neg38.9%
metadata-eval38.9%
distribute-rgt-in38.9%
neg-mul-138.9%
sub-neg38.9%
*-lft-identity38.9%
sub-neg38.9%
distribute-rgt-in38.9%
*-rgt-identity38.9%
remove-double-neg38.9%
*-commutative38.9%
mul-1-neg38.9%
associate-*r*38.9%
neg-mul-138.9%
distribute-rgt-neg-in38.9%
mul-1-neg38.9%
distribute-lft-in38.9%
+-commutative38.9%
distribute-lft-neg-in38.9%
Simplified44.0%
Final simplification44.6%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x -1.2e+14) (* x (/ (+ -1.0 z) y_m)) (if (<= x 1.05e-61) (/ (+ x 4.0) y_m) (* x (/ (- 1.0 z) y_m)))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= -1.2e+14) {
tmp = x * ((-1.0 + z) / y_m);
} else if (x <= 1.05e-61) {
tmp = (x + 4.0) / y_m;
} else {
tmp = x * ((1.0 - z) / y_m);
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-1.2d+14)) then
tmp = x * (((-1.0d0) + z) / y_m)
else if (x <= 1.05d-61) then
tmp = (x + 4.0d0) / y_m
else
tmp = x * ((1.0d0 - z) / y_m)
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double tmp;
if (x <= -1.2e+14) {
tmp = x * ((-1.0 + z) / y_m);
} else if (x <= 1.05e-61) {
tmp = (x + 4.0) / y_m;
} else {
tmp = x * ((1.0 - z) / y_m);
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= -1.2e+14: tmp = x * ((-1.0 + z) / y_m) elif x <= 1.05e-61: tmp = (x + 4.0) / y_m else: tmp = x * ((1.0 - z) / y_m) return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= -1.2e+14) tmp = Float64(x * Float64(Float64(-1.0 + z) / y_m)); elseif (x <= 1.05e-61) tmp = Float64(Float64(x + 4.0) / y_m); else tmp = Float64(x * Float64(Float64(1.0 - z) / y_m)); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (x <= -1.2e+14) tmp = x * ((-1.0 + z) / y_m); elseif (x <= 1.05e-61) tmp = (x + 4.0) / y_m; else tmp = x * ((1.0 - z) / y_m); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[x, -1.2e+14], N[(x * N[(N[(-1.0 + z), $MachinePrecision] / y$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.05e-61], N[(N[(x + 4.0), $MachinePrecision] / y$95$m), $MachinePrecision], N[(x * N[(N[(1.0 - z), $MachinePrecision] / y$95$m), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.2 \cdot 10^{+14}:\\
\;\;\;\;x \cdot \frac{-1 + z}{y\_m}\\
\mathbf{elif}\;x \leq 1.05 \cdot 10^{-61}:\\
\;\;\;\;\frac{x + 4}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{1 - z}{y\_m}\\
\end{array}
\end{array}
if x < -1.2e14Initial program 84.6%
fabs-sub84.6%
associate-*l/90.2%
associate-*r/91.5%
fma-neg94.3%
distribute-neg-frac94.3%
+-commutative94.3%
distribute-neg-in94.3%
unsub-neg94.3%
metadata-eval94.3%
Simplified94.3%
add-sqr-sqrt45.6%
fabs-sqr45.6%
add-sqr-sqrt46.0%
fma-undefine44.6%
associate-*r/44.7%
associate-*l/41.9%
div-inv41.8%
sub-neg41.8%
metadata-eval41.8%
distribute-neg-in41.8%
+-commutative41.8%
cancel-sign-sub-inv41.8%
div-inv41.9%
associate-*l/44.7%
sub-div46.1%
Applied egg-rr46.1%
Taylor expanded in x around inf 46.0%
associate-/l*46.0%
sub-neg46.0%
metadata-eval46.0%
Simplified46.0%
if -1.2e14 < x < 1.05e-61Initial program 97.0%
fabs-sub97.0%
associate-*l/99.9%
associate-*r/94.2%
fma-neg94.2%
distribute-neg-frac94.2%
+-commutative94.2%
distribute-neg-in94.2%
unsub-neg94.2%
metadata-eval94.2%
Simplified94.2%
fma-undefine94.2%
associate-*r/99.9%
associate-*l/97.0%
div-inv97.0%
sub-neg97.0%
metadata-eval97.0%
distribute-neg-in97.0%
+-commutative97.0%
cancel-sign-sub-inv97.0%
div-inv97.0%
fabs-sub97.0%
add-sqr-sqrt51.5%
fabs-sqr51.5%
add-sqr-sqrt52.9%
associate-*l/54.0%
sub-div54.0%
Applied egg-rr54.0%
Taylor expanded in z around 0 44.1%
if 1.05e-61 < x Initial program 85.9%
fabs-sub85.9%
associate-*l/82.3%
associate-*r/92.7%
fma-neg94.2%
distribute-neg-frac94.2%
+-commutative94.2%
distribute-neg-in94.2%
unsub-neg94.2%
metadata-eval94.2%
Simplified94.2%
fma-undefine92.7%
associate-*r/82.3%
associate-*l/85.9%
div-inv85.8%
sub-neg85.8%
metadata-eval85.8%
distribute-neg-in85.8%
+-commutative85.8%
cancel-sign-sub-inv85.8%
div-inv85.9%
fabs-sub85.9%
add-sqr-sqrt40.5%
fabs-sqr40.5%
add-sqr-sqrt41.2%
sub-neg41.2%
distribute-rgt-neg-in41.2%
Applied egg-rr41.2%
Taylor expanded in x around -inf 44.0%
mul-1-neg44.0%
div-sub44.0%
associate-/l*38.9%
sub-neg38.9%
metadata-eval38.9%
distribute-rgt-in38.9%
neg-mul-138.9%
sub-neg38.9%
*-lft-identity38.9%
sub-neg38.9%
distribute-rgt-in38.9%
*-rgt-identity38.9%
remove-double-neg38.9%
*-commutative38.9%
mul-1-neg38.9%
associate-*r*38.9%
neg-mul-138.9%
distribute-rgt-neg-in38.9%
mul-1-neg38.9%
distribute-lft-in38.9%
+-commutative38.9%
distribute-lft-neg-in38.9%
Simplified44.0%
Final simplification44.6%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x -1.2e+14) (* (/ x y_m) (+ -1.0 z)) (- (/ (+ x 4.0) y_m) (* x (/ z y_m)))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= -1.2e+14) {
tmp = (x / y_m) * (-1.0 + z);
} else {
tmp = ((x + 4.0) / y_m) - (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 <= (-1.2d+14)) then
tmp = (x / y_m) * ((-1.0d0) + z)
else
tmp = ((x + 4.0d0) / y_m) - (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 <= -1.2e+14) {
tmp = (x / y_m) * (-1.0 + z);
} else {
tmp = ((x + 4.0) / y_m) - (x * (z / y_m));
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= -1.2e+14: tmp = (x / y_m) * (-1.0 + z) else: tmp = ((x + 4.0) / y_m) - (x * (z / y_m)) return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= -1.2e+14) tmp = Float64(Float64(x / y_m) * Float64(-1.0 + z)); else tmp = Float64(Float64(Float64(x + 4.0) / y_m) - Float64(x * 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 <= -1.2e+14) tmp = (x / y_m) * (-1.0 + z); else tmp = ((x + 4.0) / y_m) - (x * (z / y_m)); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[x, -1.2e+14], N[(N[(x / y$95$m), $MachinePrecision] * N[(-1.0 + z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x + 4.0), $MachinePrecision] / y$95$m), $MachinePrecision] - N[(x * N[(z / y$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.2 \cdot 10^{+14}:\\
\;\;\;\;\frac{x}{y\_m} \cdot \left(-1 + z\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x + 4}{y\_m} - x \cdot \frac{z}{y\_m}\\
\end{array}
\end{array}
if x < -1.2e14Initial program 84.6%
fabs-sub84.6%
associate-*l/90.2%
associate-*r/91.5%
fma-neg94.3%
distribute-neg-frac94.3%
+-commutative94.3%
distribute-neg-in94.3%
unsub-neg94.3%
metadata-eval94.3%
Simplified94.3%
add-sqr-sqrt45.6%
fabs-sqr45.6%
add-sqr-sqrt46.0%
fma-undefine44.6%
associate-*r/44.7%
associate-*l/41.9%
div-inv41.8%
sub-neg41.8%
metadata-eval41.8%
distribute-neg-in41.8%
+-commutative41.8%
cancel-sign-sub-inv41.8%
div-inv41.9%
associate-*l/44.7%
sub-div46.1%
Applied egg-rr46.1%
Taylor expanded in x around inf 46.0%
associate-/l*46.0%
sub-neg46.0%
metadata-eval46.0%
Simplified46.0%
Taylor expanded in x around 0 46.0%
sub-neg46.0%
metadata-eval46.0%
*-rgt-identity46.0%
times-frac46.1%
/-rgt-identity46.1%
Simplified46.1%
if -1.2e14 < x Initial program 92.8%
fabs-sub92.8%
associate-*l/93.1%
associate-*r/93.7%
fma-neg94.2%
distribute-neg-frac94.2%
+-commutative94.2%
distribute-neg-in94.2%
unsub-neg94.2%
metadata-eval94.2%
Simplified94.2%
fma-undefine93.7%
associate-*r/93.1%
associate-*l/92.8%
div-inv92.7%
sub-neg92.7%
metadata-eval92.7%
distribute-neg-in92.7%
+-commutative92.7%
cancel-sign-sub-inv92.7%
div-inv92.8%
fabs-sub92.8%
add-sqr-sqrt47.2%
fabs-sqr47.2%
add-sqr-sqrt48.4%
associate-*l/47.6%
associate-*r/47.7%
Applied egg-rr47.7%
Final simplification47.3%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x -1.55e+78) (* (/ x y_m) (+ -1.0 z)) (/ (- (+ x 4.0) (* x z)) y_m)))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= -1.55e+78) {
tmp = (x / y_m) * (-1.0 + z);
} else {
tmp = ((x + 4.0) - (x * z)) / y_m;
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-1.55d+78)) then
tmp = (x / y_m) * ((-1.0d0) + z)
else
tmp = ((x + 4.0d0) - (x * z)) / y_m
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double tmp;
if (x <= -1.55e+78) {
tmp = (x / y_m) * (-1.0 + z);
} else {
tmp = ((x + 4.0) - (x * z)) / y_m;
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= -1.55e+78: tmp = (x / y_m) * (-1.0 + z) else: tmp = ((x + 4.0) - (x * z)) / y_m return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= -1.55e+78) tmp = Float64(Float64(x / y_m) * Float64(-1.0 + z)); else tmp = Float64(Float64(Float64(x + 4.0) - Float64(x * z)) / y_m); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (x <= -1.55e+78) tmp = (x / y_m) * (-1.0 + z); else tmp = ((x + 4.0) - (x * z)) / y_m; end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[x, -1.55e+78], N[(N[(x / y$95$m), $MachinePrecision] * N[(-1.0 + z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x + 4.0), $MachinePrecision] - N[(x * z), $MachinePrecision]), $MachinePrecision] / y$95$m), $MachinePrecision]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.55 \cdot 10^{+78}:\\
\;\;\;\;\frac{x}{y\_m} \cdot \left(-1 + z\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(x + 4\right) - x \cdot z}{y\_m}\\
\end{array}
\end{array}
if x < -1.55e78Initial program 83.3%
fabs-sub83.3%
associate-*l/90.0%
associate-*r/91.5%
fma-neg94.8%
distribute-neg-frac94.8%
+-commutative94.8%
distribute-neg-in94.8%
unsub-neg94.8%
metadata-eval94.8%
Simplified94.8%
add-sqr-sqrt41.5%
fabs-sqr41.5%
add-sqr-sqrt41.9%
fma-undefine40.2%
associate-*r/40.3%
associate-*l/36.9%
div-inv36.8%
sub-neg36.8%
metadata-eval36.8%
distribute-neg-in36.8%
+-commutative36.8%
cancel-sign-sub-inv36.8%
div-inv36.9%
associate-*l/40.3%
sub-div42.0%
Applied egg-rr42.0%
Taylor expanded in x around inf 41.9%
associate-/l*41.8%
sub-neg41.8%
metadata-eval41.8%
Simplified41.8%
Taylor expanded in x around 0 41.9%
sub-neg41.9%
metadata-eval41.9%
*-rgt-identity41.9%
times-frac41.9%
/-rgt-identity41.9%
Simplified41.9%
if -1.55e78 < x Initial program 92.7%
fabs-sub92.7%
associate-*l/93.0%
associate-*r/93.5%
fma-neg94.0%
distribute-neg-frac94.0%
+-commutative94.0%
distribute-neg-in94.0%
unsub-neg94.0%
metadata-eval94.0%
Simplified94.0%
fma-undefine93.5%
associate-*r/93.0%
associate-*l/92.7%
div-inv92.6%
sub-neg92.6%
metadata-eval92.6%
distribute-neg-in92.6%
+-commutative92.6%
cancel-sign-sub-inv92.6%
div-inv92.7%
fabs-sub92.7%
add-sqr-sqrt45.9%
fabs-sqr45.9%
add-sqr-sqrt47.0%
associate-*l/46.3%
sub-div48.4%
Applied egg-rr48.4%
Final simplification46.9%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x -10.2) (/ 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.2) {
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.2d0)) 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.2) {
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.2: 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.2) tmp = Float64(x / Float64(-y_m)); elseif (x <= 4.0) tmp = Float64(4.0 / y_m); else tmp = Float64(x / y_m); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (x <= -10.2) 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.2], 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.2:\\
\;\;\;\;\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.199999999999999Initial program 84.8%
fabs-sub84.8%
associate-*l/90.3%
associate-*r/91.6%
fma-neg94.3%
distribute-neg-frac94.3%
+-commutative94.3%
distribute-neg-in94.3%
unsub-neg94.3%
metadata-eval94.3%
Simplified94.3%
add-sqr-sqrt46.4%
fabs-sqr46.4%
add-sqr-sqrt46.8%
fma-undefine45.4%
associate-*r/45.4%
associate-*l/42.7%
div-inv42.6%
sub-neg42.6%
metadata-eval42.6%
distribute-neg-in42.6%
+-commutative42.6%
cancel-sign-sub-inv42.6%
div-inv42.7%
associate-*l/45.4%
sub-div46.8%
Applied egg-rr46.8%
Taylor expanded in x around inf 46.8%
associate-/l*46.7%
sub-neg46.7%
metadata-eval46.7%
Simplified46.7%
Taylor expanded in z around 0 31.9%
neg-mul-131.9%
distribute-neg-frac31.9%
Simplified31.9%
if -10.199999999999999 < x < 4Initial program 95.9%
fabs-sub95.9%
associate-*l/99.8%
associate-*r/94.9%
fma-neg94.9%
distribute-neg-frac94.9%
+-commutative94.9%
distribute-neg-in94.9%
unsub-neg94.9%
metadata-eval94.9%
Simplified94.9%
fma-undefine94.9%
associate-*r/99.8%
associate-*l/95.9%
div-inv95.9%
sub-neg95.9%
metadata-eval95.9%
distribute-neg-in95.9%
+-commutative95.9%
cancel-sign-sub-inv95.9%
div-inv95.9%
fabs-sub95.9%
add-sqr-sqrt52.0%
fabs-sqr52.0%
add-sqr-sqrt53.4%
associate-*l/54.4%
sub-div54.4%
Applied egg-rr54.4%
Taylor expanded in x around 0 39.3%
if 4 < x Initial program 85.1%
fabs-sub85.1%
associate-*l/76.9%
associate-*r/90.5%
fma-neg92.4%
distribute-neg-frac92.4%
+-commutative92.4%
distribute-neg-in92.4%
unsub-neg92.4%
metadata-eval92.4%
Simplified92.4%
fma-undefine90.5%
associate-*r/76.9%
associate-*l/85.1%
div-inv85.0%
sub-neg85.0%
metadata-eval85.0%
distribute-neg-in85.0%
+-commutative85.0%
cancel-sign-sub-inv85.0%
div-inv85.1%
fabs-sub85.1%
add-sqr-sqrt36.8%
fabs-sqr36.8%
add-sqr-sqrt37.3%
sub-neg37.3%
distribute-rgt-neg-in37.3%
Applied egg-rr37.3%
Taylor expanded in x around -inf 43.4%
mul-1-neg43.4%
div-sub43.4%
associate-/l*36.7%
sub-neg36.7%
metadata-eval36.7%
distribute-rgt-in36.7%
neg-mul-136.7%
sub-neg36.7%
*-lft-identity36.7%
sub-neg36.7%
distribute-rgt-in36.7%
*-rgt-identity36.7%
remove-double-neg36.7%
*-commutative36.7%
mul-1-neg36.7%
associate-*r*36.7%
neg-mul-136.7%
distribute-rgt-neg-in36.7%
mul-1-neg36.7%
distribute-lft-in36.7%
+-commutative36.7%
distribute-lft-neg-in36.7%
Simplified43.4%
Taylor expanded in z around 0 24.2%
Final simplification34.0%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x -1.2e+14) (* 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 <= -1.2e+14) {
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 <= (-1.2d+14)) 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 <= -1.2e+14) {
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 <= -1.2e+14: 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 <= -1.2e+14) 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 <= -1.2e+14) 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, -1.2e+14], 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 -1.2 \cdot 10^{+14}:\\
\;\;\;\;x \cdot \frac{-1 + z}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + 4}{y\_m}\\
\end{array}
\end{array}
if x < -1.2e14Initial program 84.6%
fabs-sub84.6%
associate-*l/90.2%
associate-*r/91.5%
fma-neg94.3%
distribute-neg-frac94.3%
+-commutative94.3%
distribute-neg-in94.3%
unsub-neg94.3%
metadata-eval94.3%
Simplified94.3%
add-sqr-sqrt45.6%
fabs-sqr45.6%
add-sqr-sqrt46.0%
fma-undefine44.6%
associate-*r/44.7%
associate-*l/41.9%
div-inv41.8%
sub-neg41.8%
metadata-eval41.8%
distribute-neg-in41.8%
+-commutative41.8%
cancel-sign-sub-inv41.8%
div-inv41.9%
associate-*l/44.7%
sub-div46.1%
Applied egg-rr46.1%
Taylor expanded in x around inf 46.0%
associate-/l*46.0%
sub-neg46.0%
metadata-eval46.0%
Simplified46.0%
if -1.2e14 < x Initial program 92.8%
fabs-sub92.8%
associate-*l/93.1%
associate-*r/93.7%
fma-neg94.2%
distribute-neg-frac94.2%
+-commutative94.2%
distribute-neg-in94.2%
unsub-neg94.2%
metadata-eval94.2%
Simplified94.2%
fma-undefine93.7%
associate-*r/93.1%
associate-*l/92.8%
div-inv92.7%
sub-neg92.7%
metadata-eval92.7%
distribute-neg-in92.7%
+-commutative92.7%
cancel-sign-sub-inv92.7%
div-inv92.8%
fabs-sub92.8%
add-sqr-sqrt47.2%
fabs-sqr47.2%
add-sqr-sqrt48.4%
associate-*l/47.6%
sub-div49.3%
Applied egg-rr49.3%
Taylor expanded in z around 0 35.4%
Final simplification38.4%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x -4.0) (/ x (- y_m)) (/ (+ x 4.0) y_m)))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= -4.0) {
tmp = x / -y_m;
} else {
tmp = (x + 4.0) / y_m;
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-4.0d0)) then
tmp = x / -y_m
else
tmp = (x + 4.0d0) / y_m
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double tmp;
if (x <= -4.0) {
tmp = x / -y_m;
} else {
tmp = (x + 4.0) / y_m;
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= -4.0: tmp = x / -y_m else: tmp = (x + 4.0) / y_m return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= -4.0) tmp = Float64(x / Float64(-y_m)); else tmp = Float64(Float64(x + 4.0) / y_m); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (x <= -4.0) tmp = x / -y_m; else tmp = (x + 4.0) / y_m; end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[x, -4.0], N[(x / (-y$95$m)), $MachinePrecision], N[(N[(x + 4.0), $MachinePrecision] / y$95$m), $MachinePrecision]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4:\\
\;\;\;\;\frac{x}{-y\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + 4}{y\_m}\\
\end{array}
\end{array}
if x < -4Initial program 84.8%
fabs-sub84.8%
associate-*l/90.3%
associate-*r/91.6%
fma-neg94.3%
distribute-neg-frac94.3%
+-commutative94.3%
distribute-neg-in94.3%
unsub-neg94.3%
metadata-eval94.3%
Simplified94.3%
add-sqr-sqrt46.4%
fabs-sqr46.4%
add-sqr-sqrt46.8%
fma-undefine45.4%
associate-*r/45.4%
associate-*l/42.7%
div-inv42.6%
sub-neg42.6%
metadata-eval42.6%
distribute-neg-in42.6%
+-commutative42.6%
cancel-sign-sub-inv42.6%
div-inv42.7%
associate-*l/45.4%
sub-div46.8%
Applied egg-rr46.8%
Taylor expanded in x around inf 46.8%
associate-/l*46.7%
sub-neg46.7%
metadata-eval46.7%
Simplified46.7%
Taylor expanded in z around 0 31.9%
neg-mul-131.9%
distribute-neg-frac31.9%
Simplified31.9%
if -4 < x Initial program 92.7%
fabs-sub92.7%
associate-*l/93.1%
associate-*r/93.6%
fma-neg94.2%
distribute-neg-frac94.2%
+-commutative94.2%
distribute-neg-in94.2%
unsub-neg94.2%
metadata-eval94.2%
Simplified94.2%
fma-undefine93.6%
associate-*r/93.1%
associate-*l/92.7%
div-inv92.7%
sub-neg92.7%
metadata-eval92.7%
distribute-neg-in92.7%
+-commutative92.7%
cancel-sign-sub-inv92.7%
div-inv92.7%
fabs-sub92.7%
add-sqr-sqrt47.5%
fabs-sqr47.5%
add-sqr-sqrt48.7%
associate-*l/47.9%
sub-div49.5%
Applied egg-rr49.5%
Taylor expanded in z around 0 35.6%
Final simplification34.5%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x 4.0) (/ 4.0 y_m) (/ x y_m)))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= 4.0) {
tmp = 4.0 / y_m;
} else {
tmp = x / y_m;
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 4.0d0) then
tmp = 4.0d0 / y_m
else
tmp = x / y_m
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double tmp;
if (x <= 4.0) {
tmp = 4.0 / y_m;
} else {
tmp = x / y_m;
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= 4.0: tmp = 4.0 / y_m else: tmp = x / y_m return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= 4.0) tmp = Float64(4.0 / y_m); else tmp = Float64(x / y_m); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (x <= 4.0) tmp = 4.0 / y_m; else tmp = x / y_m; end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[x, 4.0], N[(4.0 / y$95$m), $MachinePrecision], N[(x / y$95$m), $MachinePrecision]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq 4:\\
\;\;\;\;\frac{4}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y\_m}\\
\end{array}
\end{array}
if x < 4Initial program 91.9%
fabs-sub91.9%
associate-*l/96.4%
associate-*r/93.7%
fma-neg94.7%
distribute-neg-frac94.7%
+-commutative94.7%
distribute-neg-in94.7%
unsub-neg94.7%
metadata-eval94.7%
Simplified94.7%
fma-undefine93.7%
associate-*r/96.4%
associate-*l/91.9%
div-inv91.8%
sub-neg91.8%
metadata-eval91.8%
distribute-neg-in91.8%
+-commutative91.8%
cancel-sign-sub-inv91.8%
div-inv91.9%
fabs-sub91.9%
add-sqr-sqrt48.5%
fabs-sqr48.5%
add-sqr-sqrt49.6%
associate-*l/51.2%
sub-div53.7%
Applied egg-rr53.7%
Taylor expanded in x around 0 26.1%
if 4 < x Initial program 85.1%
fabs-sub85.1%
associate-*l/76.9%
associate-*r/90.5%
fma-neg92.4%
distribute-neg-frac92.4%
+-commutative92.4%
distribute-neg-in92.4%
unsub-neg92.4%
metadata-eval92.4%
Simplified92.4%
fma-undefine90.5%
associate-*r/76.9%
associate-*l/85.1%
div-inv85.0%
sub-neg85.0%
metadata-eval85.0%
distribute-neg-in85.0%
+-commutative85.0%
cancel-sign-sub-inv85.0%
div-inv85.1%
fabs-sub85.1%
add-sqr-sqrt36.8%
fabs-sqr36.8%
add-sqr-sqrt37.3%
sub-neg37.3%
distribute-rgt-neg-in37.3%
Applied egg-rr37.3%
Taylor expanded in x around -inf 43.4%
mul-1-neg43.4%
div-sub43.4%
associate-/l*36.7%
sub-neg36.7%
metadata-eval36.7%
distribute-rgt-in36.7%
neg-mul-136.7%
sub-neg36.7%
*-lft-identity36.7%
sub-neg36.7%
distribute-rgt-in36.7%
*-rgt-identity36.7%
remove-double-neg36.7%
*-commutative36.7%
mul-1-neg36.7%
associate-*r*36.7%
neg-mul-136.7%
distribute-rgt-neg-in36.7%
mul-1-neg36.7%
distribute-lft-in36.7%
+-commutative36.7%
distribute-lft-neg-in36.7%
Simplified43.4%
Taylor expanded in z around 0 24.2%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (/ 4.0 y_m))
y_m = fabs(y);
double code(double x, double y_m, double z) {
return 4.0 / y_m;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
code = 4.0d0 / y_m
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
return 4.0 / y_m;
}
y_m = math.fabs(y) def code(x, y_m, z): return 4.0 / y_m
y_m = abs(y) function code(x, y_m, z) return Float64(4.0 / y_m) end
y_m = abs(y); function tmp = code(x, y_m, z) tmp = 4.0 / y_m; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := N[(4.0 / y$95$m), $MachinePrecision]
\begin{array}{l}
y_m = \left|y\right|
\\
\frac{4}{y\_m}
\end{array}
Initial program 90.5%
fabs-sub90.5%
associate-*l/92.3%
associate-*r/93.0%
fma-neg94.2%
distribute-neg-frac94.2%
+-commutative94.2%
distribute-neg-in94.2%
unsub-neg94.2%
metadata-eval94.2%
Simplified94.2%
fma-undefine93.0%
associate-*r/92.3%
associate-*l/90.5%
div-inv90.4%
sub-neg90.4%
metadata-eval90.4%
distribute-neg-in90.4%
+-commutative90.4%
cancel-sign-sub-inv90.4%
div-inv90.5%
fabs-sub90.5%
add-sqr-sqrt46.0%
fabs-sqr46.0%
add-sqr-sqrt47.0%
associate-*l/47.2%
sub-div50.4%
Applied egg-rr50.4%
Taylor expanded in x around 0 21.1%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (/ -4.0 y_m))
y_m = fabs(y);
double code(double x, double y_m, double z) {
return -4.0 / y_m;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
code = (-4.0d0) / y_m
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
return -4.0 / y_m;
}
y_m = math.fabs(y) def code(x, y_m, z): return -4.0 / y_m
y_m = abs(y) function code(x, y_m, z) return Float64(-4.0 / y_m) end
y_m = abs(y); function tmp = code(x, y_m, z) tmp = -4.0 / y_m; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := N[(-4.0 / y$95$m), $MachinePrecision]
\begin{array}{l}
y_m = \left|y\right|
\\
\frac{-4}{y\_m}
\end{array}
Initial program 90.5%
fabs-sub90.5%
associate-*l/92.3%
associate-*r/93.0%
fma-neg94.2%
distribute-neg-frac94.2%
+-commutative94.2%
distribute-neg-in94.2%
unsub-neg94.2%
metadata-eval94.2%
Simplified94.2%
add-sqr-sqrt46.6%
fabs-sqr46.6%
add-sqr-sqrt47.5%
fma-undefine46.7%
associate-*r/46.4%
associate-*l/44.8%
div-inv44.8%
sub-neg44.8%
metadata-eval44.8%
distribute-neg-in44.8%
+-commutative44.8%
cancel-sign-sub-inv44.8%
div-inv44.8%
associate-*l/46.4%
sub-div47.5%
Applied egg-rr47.5%
Taylor expanded in x around 0 20.0%
herbie shell --seed 2024129
(FPCore (x y z)
:name "fabs fraction 1"
:precision binary64
(fabs (- (/ (+ x 4.0) y) (* (/ x y) z))))