
(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 23 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (fabs (- (/ (+ x 4.0) y) (* (/ x y) z))))
double code(double x, double y, double z) {
return fabs((((x + 4.0) / y) - ((x / y) * z)));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = abs((((x + 4.0d0) / y) - ((x / y) * z)))
end function
public static double code(double x, double y, double z) {
return Math.abs((((x + 4.0) / y) - ((x / y) * z)));
}
def code(x, y, z): return math.fabs((((x + 4.0) / y) - ((x / y) * z)))
function code(x, y, z) return abs(Float64(Float64(Float64(x + 4.0) / y) - Float64(Float64(x / y) * z))) end
function tmp = code(x, y, z) tmp = abs((((x + 4.0) / y) - ((x / y) * z))); end
code[x_, y_, z_] := N[Abs[N[(N[(N[(x + 4.0), $MachinePrecision] / y), $MachinePrecision] - N[(N[(x / y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right|
\end{array}
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= y_m 4e-99) (fabs (/ (- (+ x 4.0) (* x z)) y_m)) (fabs (fma x (/ z y_m) (/ (- -4.0 x) y_m)))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (y_m <= 4e-99) {
tmp = fabs((((x + 4.0) - (x * z)) / y_m));
} else {
tmp = fabs(fma(x, (z / y_m), ((-4.0 - x) / y_m)));
}
return tmp;
}
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (y_m <= 4e-99) tmp = abs(Float64(Float64(Float64(x + 4.0) - Float64(x * z)) / y_m)); else tmp = abs(fma(x, Float64(z / y_m), Float64(Float64(-4.0 - x) / y_m))); end return tmp end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[y$95$m, 4e-99], N[Abs[N[(N[(N[(x + 4.0), $MachinePrecision] - N[(x * z), $MachinePrecision]), $MachinePrecision] / y$95$m), $MachinePrecision]], $MachinePrecision], N[Abs[N[(x * N[(z / y$95$m), $MachinePrecision] + N[(N[(-4.0 - x), $MachinePrecision] / y$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;y\_m \leq 4 \cdot 10^{-99}:\\
\;\;\;\;\left|\frac{\left(x + 4\right) - x \cdot z}{y\_m}\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.0000000000000001e-99Initial program 88.7%
associate-*l/89.2%
sub-div95.6%
Applied egg-rr95.6%
if 4.0000000000000001e-99 < y Initial program 97.4%
fabs-sub97.4%
associate-*l/91.2%
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%
Final simplification97.0%
y_m = (fabs.f64 y)
(FPCore (x y_m z)
:precision binary64
(let* ((t_0 (- (/ (+ x 4.0) y_m) (* z (/ x y_m)))))
(if (<= t_0 2e+301)
(fabs t_0)
(fabs (* (fma x z (- -4.0 x)) (/ 1.0 y_m))))))y_m = fabs(y);
double code(double x, double y_m, double z) {
double t_0 = ((x + 4.0) / y_m) - (z * (x / y_m));
double tmp;
if (t_0 <= 2e+301) {
tmp = fabs(t_0);
} else {
tmp = fabs((fma(x, z, (-4.0 - x)) * (1.0 / y_m)));
}
return tmp;
}
y_m = abs(y) function code(x, y_m, z) t_0 = Float64(Float64(Float64(x + 4.0) / y_m) - Float64(z * Float64(x / y_m))) tmp = 0.0 if (t_0 <= 2e+301) tmp = abs(t_0); else tmp = abs(Float64(fma(x, z, Float64(-4.0 - x)) * Float64(1.0 / y_m))); end return tmp end
y_m = N[Abs[y], $MachinePrecision]
code[x_, y$95$m_, z_] := Block[{t$95$0 = N[(N[(N[(x + 4.0), $MachinePrecision] / y$95$m), $MachinePrecision] - N[(z * N[(x / y$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 2e+301], N[Abs[t$95$0], $MachinePrecision], N[Abs[N[(N[(x * z + N[(-4.0 - x), $MachinePrecision]), $MachinePrecision] * N[(1.0 / y$95$m), $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 2 \cdot 10^{+301}:\\
\;\;\;\;\left|t\_0\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\mathsf{fma}\left(x, z, -4 - x\right) \cdot \frac{1}{y\_m}\right|\\
\end{array}
\end{array}
if (-.f64 (/.f64 (+.f64 x #s(literal 4 binary64)) y) (*.f64 (/.f64 x y) z)) < 2.00000000000000011e301Initial program 98.0%
if 2.00000000000000011e301 < (-.f64 (/.f64 (+.f64 x #s(literal 4 binary64)) y) (*.f64 (/.f64 x y) z)) Initial program 46.9%
Simplified97.3%
Final simplification97.9%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= y_m 4e-99) (fabs (/ (- (+ x 4.0) (* x z)) y_m)) (fabs (- (/ (+ x 4.0) y_m) (* z (/ x y_m))))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (y_m <= 4e-99) {
tmp = fabs((((x + 4.0) - (x * z)) / y_m));
} else {
tmp = fabs((((x + 4.0) / y_m) - (z * (x / y_m))));
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (y_m <= 4d-99) then
tmp = abs((((x + 4.0d0) - (x * z)) / y_m))
else
tmp = abs((((x + 4.0d0) / y_m) - (z * (x / y_m))))
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double tmp;
if (y_m <= 4e-99) {
tmp = Math.abs((((x + 4.0) - (x * z)) / y_m));
} else {
tmp = Math.abs((((x + 4.0) / y_m) - (z * (x / y_m))));
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if y_m <= 4e-99: tmp = math.fabs((((x + 4.0) - (x * z)) / y_m)) else: tmp = math.fabs((((x + 4.0) / y_m) - (z * (x / y_m)))) return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (y_m <= 4e-99) tmp = abs(Float64(Float64(Float64(x + 4.0) - Float64(x * z)) / y_m)); else tmp = abs(Float64(Float64(Float64(x + 4.0) / y_m) - Float64(z * Float64(x / y_m)))); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (y_m <= 4e-99) tmp = abs((((x + 4.0) - (x * z)) / y_m)); else tmp = abs((((x + 4.0) / y_m) - (z * (x / y_m)))); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[y$95$m, 4e-99], N[Abs[N[(N[(N[(x + 4.0), $MachinePrecision] - N[(x * z), $MachinePrecision]), $MachinePrecision] / y$95$m), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(N[(x + 4.0), $MachinePrecision] / y$95$m), $MachinePrecision] - N[(z * N[(x / y$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;y\_m \leq 4 \cdot 10^{-99}:\\
\;\;\;\;\left|\frac{\left(x + 4\right) - x \cdot z}{y\_m}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{x + 4}{y\_m} - z \cdot \frac{x}{y\_m}\right|\\
\end{array}
\end{array}
if y < 4.0000000000000001e-99Initial program 88.7%
associate-*l/89.2%
sub-div95.6%
Applied egg-rr95.6%
if 4.0000000000000001e-99 < y Initial program 97.4%
Final simplification96.2%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= y_m 4e-99) (fabs (/ (- (+ x 4.0) (* x z)) y_m)) (fabs (- (/ (+ x 4.0) y_m) (/ x (/ y_m z))))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (y_m <= 4e-99) {
tmp = fabs((((x + 4.0) - (x * z)) / y_m));
} else {
tmp = fabs((((x + 4.0) / y_m) - (x / (y_m / z))));
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (y_m <= 4d-99) then
tmp = abs((((x + 4.0d0) - (x * z)) / y_m))
else
tmp = abs((((x + 4.0d0) / y_m) - (x / (y_m / z))))
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double tmp;
if (y_m <= 4e-99) {
tmp = Math.abs((((x + 4.0) - (x * z)) / y_m));
} else {
tmp = Math.abs((((x + 4.0) / y_m) - (x / (y_m / z))));
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if y_m <= 4e-99: tmp = math.fabs((((x + 4.0) - (x * z)) / y_m)) else: tmp = math.fabs((((x + 4.0) / y_m) - (x / (y_m / z)))) return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (y_m <= 4e-99) tmp = abs(Float64(Float64(Float64(x + 4.0) - Float64(x * z)) / y_m)); else tmp = abs(Float64(Float64(Float64(x + 4.0) / y_m) - Float64(x / Float64(y_m / z)))); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (y_m <= 4e-99) tmp = abs((((x + 4.0) - (x * z)) / y_m)); else tmp = abs((((x + 4.0) / y_m) - (x / (y_m / z)))); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[y$95$m, 4e-99], N[Abs[N[(N[(N[(x + 4.0), $MachinePrecision] - N[(x * z), $MachinePrecision]), $MachinePrecision] / y$95$m), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(N[(x + 4.0), $MachinePrecision] / y$95$m), $MachinePrecision] - N[(x / N[(y$95$m / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;y\_m \leq 4 \cdot 10^{-99}:\\
\;\;\;\;\left|\frac{\left(x + 4\right) - x \cdot z}{y\_m}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{x + 4}{y\_m} - \frac{x}{\frac{y\_m}{z}}\right|\\
\end{array}
\end{array}
if y < 4.0000000000000001e-99Initial program 88.7%
associate-*l/89.2%
sub-div95.6%
Applied egg-rr95.6%
if 4.0000000000000001e-99 < y Initial program 97.4%
associate-*l/91.2%
associate-*r/99.9%
clear-num99.8%
un-div-inv99.9%
Applied egg-rr99.9%
Final simplification97.0%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= y_m 4e-24) (fabs (/ (- (+ x 4.0) (* x z)) y_m)) (fabs (- (/ z (/ y_m x)) (/ (+ x 4.0) y_m)))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (y_m <= 4e-24) {
tmp = fabs((((x + 4.0) - (x * z)) / y_m));
} else {
tmp = fabs(((z / (y_m / x)) - ((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 (y_m <= 4d-24) then
tmp = abs((((x + 4.0d0) - (x * z)) / y_m))
else
tmp = abs(((z / (y_m / x)) - ((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 (y_m <= 4e-24) {
tmp = Math.abs((((x + 4.0) - (x * z)) / y_m));
} else {
tmp = Math.abs(((z / (y_m / x)) - ((x + 4.0) / y_m)));
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if y_m <= 4e-24: tmp = math.fabs((((x + 4.0) - (x * z)) / y_m)) else: tmp = math.fabs(((z / (y_m / x)) - ((x + 4.0) / y_m))) return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (y_m <= 4e-24) tmp = abs(Float64(Float64(Float64(x + 4.0) - Float64(x * z)) / y_m)); else tmp = abs(Float64(Float64(z / Float64(y_m / x)) - 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 (y_m <= 4e-24) tmp = abs((((x + 4.0) - (x * z)) / y_m)); else tmp = abs(((z / (y_m / x)) - ((x + 4.0) / y_m))); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[y$95$m, 4e-24], N[Abs[N[(N[(N[(x + 4.0), $MachinePrecision] - N[(x * z), $MachinePrecision]), $MachinePrecision] / y$95$m), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(z / N[(y$95$m / x), $MachinePrecision]), $MachinePrecision] - N[(N[(x + 4.0), $MachinePrecision] / y$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;y\_m \leq 4 \cdot 10^{-24}:\\
\;\;\;\;\left|\frac{\left(x + 4\right) - x \cdot z}{y\_m}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{z}{\frac{y\_m}{x}} - \frac{x + 4}{y\_m}\right|\\
\end{array}
\end{array}
if y < 3.99999999999999969e-24Initial program 89.8%
associate-*l/90.2%
sub-div96.0%
Applied egg-rr96.0%
if 3.99999999999999969e-24 < y Initial program 96.7%
Taylor expanded in x around 0 88.7%
associate-*r/99.8%
*-commutative99.8%
associate-/r/95.7%
Simplified95.7%
Final simplification95.9%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x -6.9e+49) (fabs (* (/ x y_m) (- 1.0 z))) (fabs (+ (/ x y_m) (* 4.0 (/ 1.0 y_m))))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= -6.9e+49) {
tmp = fabs(((x / y_m) * (1.0 - z)));
} else {
tmp = fabs(((x / y_m) + (4.0 * (1.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 <= (-6.9d+49)) then
tmp = abs(((x / y_m) * (1.0d0 - z)))
else
tmp = abs(((x / y_m) + (4.0d0 * (1.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 <= -6.9e+49) {
tmp = Math.abs(((x / y_m) * (1.0 - z)));
} else {
tmp = Math.abs(((x / y_m) + (4.0 * (1.0 / y_m))));
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= -6.9e+49: tmp = math.fabs(((x / y_m) * (1.0 - z))) else: tmp = math.fabs(((x / y_m) + (4.0 * (1.0 / y_m)))) return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= -6.9e+49) tmp = abs(Float64(Float64(x / y_m) * Float64(1.0 - z))); else tmp = abs(Float64(Float64(x / y_m) + Float64(4.0 * Float64(1.0 / y_m)))); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (x <= -6.9e+49) tmp = abs(((x / y_m) * (1.0 - z))); else tmp = abs(((x / y_m) + (4.0 * (1.0 / y_m)))); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[x, -6.9e+49], N[Abs[N[(N[(x / y$95$m), $MachinePrecision] * N[(1.0 - z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(x / y$95$m), $MachinePrecision] + N[(4.0 * N[(1.0 / y$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.9 \cdot 10^{+49}:\\
\;\;\;\;\left|\frac{x}{y\_m} \cdot \left(1 - z\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{x}{y\_m} + 4 \cdot \frac{1}{y\_m}\right|\\
\end{array}
\end{array}
if x < -6.9000000000000003e49Initial program 90.3%
Simplified80.5%
Taylor expanded in x around inf 80.6%
mul-1-neg80.6%
*-commutative80.6%
associate-/l*99.9%
distribute-lft-neg-in99.9%
neg-sub099.9%
associate-+l-99.9%
neg-sub099.9%
+-commutative99.9%
unsub-neg99.9%
Simplified99.9%
if -6.9000000000000003e49 < x Initial program 91.9%
Taylor expanded in z around 0 72.3%
Final simplification77.9%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x 1.35e-89) (fabs (/ (- -4.0 x) y_m)) (fabs (- (* z (/ x y_m)) (/ x y_m)))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= 1.35e-89) {
tmp = fabs(((-4.0 - x) / y_m));
} else {
tmp = fabs(((z * (x / y_m)) - (x / y_m)));
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 1.35d-89) then
tmp = abs((((-4.0d0) - x) / y_m))
else
tmp = abs(((z * (x / y_m)) - (x / y_m)))
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double tmp;
if (x <= 1.35e-89) {
tmp = Math.abs(((-4.0 - x) / y_m));
} else {
tmp = Math.abs(((z * (x / y_m)) - (x / y_m)));
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= 1.35e-89: tmp = math.fabs(((-4.0 - x) / y_m)) else: tmp = math.fabs(((z * (x / y_m)) - (x / y_m))) return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= 1.35e-89) tmp = abs(Float64(Float64(-4.0 - x) / y_m)); else tmp = abs(Float64(Float64(z * Float64(x / y_m)) - Float64(x / y_m))); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (x <= 1.35e-89) tmp = abs(((-4.0 - x) / y_m)); else tmp = abs(((z * (x / y_m)) - (x / y_m))); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[x, 1.35e-89], N[Abs[N[(N[(-4.0 - x), $MachinePrecision] / y$95$m), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(z * N[(x / y$95$m), $MachinePrecision]), $MachinePrecision] - N[(x / y$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.35 \cdot 10^{-89}:\\
\;\;\;\;\left|\frac{-4 - x}{y\_m}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|z \cdot \frac{x}{y\_m} - \frac{x}{y\_m}\right|\\
\end{array}
\end{array}
if x < 1.34999999999999994e-89Initial program 94.5%
Simplified93.9%
Taylor expanded in z around 0 77.5%
+-commutative77.5%
rem-square-sqrt41.6%
fabs-sqr41.6%
rem-square-sqrt77.5%
fabs-neg77.5%
distribute-neg-frac77.5%
distribute-neg-in77.5%
metadata-eval77.5%
+-commutative77.5%
sub-neg77.5%
rem-square-sqrt35.4%
fabs-sqr35.4%
rem-square-sqrt77.5%
Simplified77.5%
if 1.34999999999999994e-89 < x Initial program 86.2%
Taylor expanded in x around inf 75.3%
Final simplification76.7%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x 1.42e-89) (fabs (/ (- -4.0 x) y_m)) (fabs (- (/ x y_m) (/ z (/ y_m x))))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= 1.42e-89) {
tmp = fabs(((-4.0 - x) / y_m));
} else {
tmp = fabs(((x / y_m) - (z / (y_m / x))));
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 1.42d-89) then
tmp = abs((((-4.0d0) - x) / y_m))
else
tmp = abs(((x / y_m) - (z / (y_m / x))))
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double tmp;
if (x <= 1.42e-89) {
tmp = Math.abs(((-4.0 - x) / y_m));
} else {
tmp = Math.abs(((x / y_m) - (z / (y_m / x))));
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= 1.42e-89: tmp = math.fabs(((-4.0 - x) / y_m)) else: tmp = math.fabs(((x / y_m) - (z / (y_m / x)))) return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= 1.42e-89) tmp = abs(Float64(Float64(-4.0 - x) / y_m)); else tmp = abs(Float64(Float64(x / y_m) - Float64(z / Float64(y_m / x)))); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (x <= 1.42e-89) tmp = abs(((-4.0 - x) / y_m)); else tmp = abs(((x / y_m) - (z / (y_m / x)))); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[x, 1.42e-89], N[Abs[N[(N[(-4.0 - x), $MachinePrecision] / y$95$m), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(x / y$95$m), $MachinePrecision] - N[(z / N[(y$95$m / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.42 \cdot 10^{-89}:\\
\;\;\;\;\left|\frac{-4 - x}{y\_m}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{x}{y\_m} - \frac{z}{\frac{y\_m}{x}}\right|\\
\end{array}
\end{array}
if x < 1.42e-89Initial program 94.5%
Simplified93.9%
Taylor expanded in z around 0 77.5%
+-commutative77.5%
rem-square-sqrt41.6%
fabs-sqr41.6%
rem-square-sqrt77.5%
fabs-neg77.5%
distribute-neg-frac77.5%
distribute-neg-in77.5%
metadata-eval77.5%
+-commutative77.5%
sub-neg77.5%
rem-square-sqrt35.4%
fabs-sqr35.4%
rem-square-sqrt77.5%
Simplified77.5%
if 1.42e-89 < x Initial program 86.2%
Taylor expanded in x around 0 85.6%
associate-*r/90.8%
*-commutative90.8%
associate-/r/85.3%
Simplified85.3%
Taylor expanded in x around inf 74.4%
Final simplification76.4%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x 5.6e-90) (fabs (/ (- -4.0 x) y_m)) (fabs (/ 1.0 (/ y_m (* x (- 1.0 z)))))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= 5.6e-90) {
tmp = fabs(((-4.0 - x) / y_m));
} else {
tmp = fabs((1.0 / (y_m / (x * (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 <= 5.6d-90) then
tmp = abs((((-4.0d0) - x) / y_m))
else
tmp = abs((1.0d0 / (y_m / (x * (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 <= 5.6e-90) {
tmp = Math.abs(((-4.0 - x) / y_m));
} else {
tmp = Math.abs((1.0 / (y_m / (x * (1.0 - z)))));
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= 5.6e-90: tmp = math.fabs(((-4.0 - x) / y_m)) else: tmp = math.fabs((1.0 / (y_m / (x * (1.0 - z))))) return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= 5.6e-90) tmp = abs(Float64(Float64(-4.0 - x) / y_m)); else tmp = abs(Float64(1.0 / Float64(y_m / Float64(x * 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 <= 5.6e-90) tmp = abs(((-4.0 - x) / y_m)); else tmp = abs((1.0 / (y_m / (x * (1.0 - z))))); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[x, 5.6e-90], N[Abs[N[(N[(-4.0 - x), $MachinePrecision] / y$95$m), $MachinePrecision]], $MachinePrecision], N[Abs[N[(1.0 / N[(y$95$m / N[(x * N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq 5.6 \cdot 10^{-90}:\\
\;\;\;\;\left|\frac{-4 - x}{y\_m}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{1}{\frac{y\_m}{x \cdot \left(1 - z\right)}}\right|\\
\end{array}
\end{array}
if x < 5.5999999999999998e-90Initial program 95.0%
Simplified93.8%
Taylor expanded in z around 0 77.9%
+-commutative77.9%
rem-square-sqrt41.9%
fabs-sqr41.9%
rem-square-sqrt77.9%
fabs-neg77.9%
distribute-neg-frac77.9%
distribute-neg-in77.9%
metadata-eval77.9%
+-commutative77.9%
sub-neg77.9%
rem-square-sqrt35.5%
fabs-sqr35.5%
rem-square-sqrt77.9%
Simplified77.9%
if 5.5999999999999998e-90 < x Initial program 85.3%
Simplified94.5%
Taylor expanded in x around inf 83.8%
mul-1-neg83.8%
*-commutative83.8%
associate-/l*87.8%
distribute-lft-neg-in87.8%
neg-sub087.8%
associate-+l-87.8%
neg-sub087.8%
+-commutative87.8%
unsub-neg87.8%
Simplified87.8%
associate-*r/83.8%
clear-num83.7%
*-commutative83.7%
Applied egg-rr83.7%
Final simplification80.0%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= z 4.5e+17) (fabs (/ (- -4.0 x) y_m)) (fabs (* (/ x y_m) (- 1.0 z)))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (z <= 4.5e+17) {
tmp = fabs(((-4.0 - x) / y_m));
} else {
tmp = fabs(((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 (z <= 4.5d+17) then
tmp = abs((((-4.0d0) - x) / y_m))
else
tmp = abs(((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 (z <= 4.5e+17) {
tmp = Math.abs(((-4.0 - x) / y_m));
} else {
tmp = Math.abs(((x / y_m) * (1.0 - z)));
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if z <= 4.5e+17: tmp = math.fabs(((-4.0 - x) / y_m)) else: tmp = math.fabs(((x / y_m) * (1.0 - z))) return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (z <= 4.5e+17) tmp = abs(Float64(Float64(-4.0 - x) / y_m)); else tmp = abs(Float64(Float64(x / y_m) * Float64(1.0 - z))); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (z <= 4.5e+17) tmp = abs(((-4.0 - x) / y_m)); else tmp = abs(((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[z, 4.5e+17], N[Abs[N[(N[(-4.0 - x), $MachinePrecision] / y$95$m), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(x / y$95$m), $MachinePrecision] * N[(1.0 - z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;z \leq 4.5 \cdot 10^{+17}:\\
\;\;\;\;\left|\frac{-4 - x}{y\_m}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{x}{y\_m} \cdot \left(1 - z\right)\right|\\
\end{array}
\end{array}
if z < 4.5e17Initial program 93.9%
Simplified95.4%
Taylor expanded in z around 0 76.6%
+-commutative76.6%
rem-square-sqrt41.4%
fabs-sqr41.4%
rem-square-sqrt76.6%
fabs-neg76.6%
distribute-neg-frac76.6%
distribute-neg-in76.6%
metadata-eval76.6%
+-commutative76.6%
sub-neg76.6%
rem-square-sqrt34.8%
fabs-sqr34.8%
rem-square-sqrt76.6%
Simplified76.6%
if 4.5e17 < z Initial program 81.6%
Simplified88.4%
Taylor expanded in x around inf 66.2%
mul-1-neg66.2%
*-commutative66.2%
associate-/l*75.7%
distribute-lft-neg-in75.7%
neg-sub075.7%
associate-+l-75.7%
neg-sub075.7%
+-commutative75.7%
unsub-neg75.7%
Simplified75.7%
Final simplification76.4%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= z 2.05e+19) (fabs (/ (- -4.0 x) y_m)) (fabs (* (* x z) (/ 1.0 y_m)))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (z <= 2.05e+19) {
tmp = fabs(((-4.0 - x) / y_m));
} else {
tmp = fabs(((x * z) * (1.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 (z <= 2.05d+19) then
tmp = abs((((-4.0d0) - x) / y_m))
else
tmp = abs(((x * z) * (1.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 (z <= 2.05e+19) {
tmp = Math.abs(((-4.0 - x) / y_m));
} else {
tmp = Math.abs(((x * z) * (1.0 / y_m)));
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if z <= 2.05e+19: tmp = math.fabs(((-4.0 - x) / y_m)) else: tmp = math.fabs(((x * z) * (1.0 / y_m))) return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (z <= 2.05e+19) tmp = abs(Float64(Float64(-4.0 - x) / y_m)); else tmp = abs(Float64(Float64(x * z) * Float64(1.0 / y_m))); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (z <= 2.05e+19) tmp = abs(((-4.0 - x) / y_m)); else tmp = abs(((x * z) * (1.0 / y_m))); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[z, 2.05e+19], N[Abs[N[(N[(-4.0 - x), $MachinePrecision] / y$95$m), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(x * z), $MachinePrecision] * N[(1.0 / y$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;z \leq 2.05 \cdot 10^{+19}:\\
\;\;\;\;\left|\frac{-4 - x}{y\_m}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\left(x \cdot z\right) \cdot \frac{1}{y\_m}\right|\\
\end{array}
\end{array}
if z < 2.05e19Initial program 93.9%
Simplified95.4%
Taylor expanded in z around 0 76.6%
+-commutative76.6%
rem-square-sqrt41.4%
fabs-sqr41.4%
rem-square-sqrt76.6%
fabs-neg76.6%
distribute-neg-frac76.6%
distribute-neg-in76.6%
metadata-eval76.6%
+-commutative76.6%
sub-neg76.6%
rem-square-sqrt34.8%
fabs-sqr34.8%
rem-square-sqrt76.6%
Simplified76.6%
if 2.05e19 < z Initial program 81.6%
Simplified88.4%
Taylor expanded in z around inf 66.2%
associate-*r/66.2%
neg-mul-166.2%
distribute-rgt-neg-in66.2%
Simplified66.2%
clear-num66.2%
associate-/r/66.3%
add-sqr-sqrt0.0%
sqrt-unprod58.4%
sqr-neg58.4%
sqrt-unprod66.2%
add-sqr-sqrt66.3%
Applied egg-rr66.3%
Final simplification74.6%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x -6.9e+49) (fabs (* (/ x y_m) (- 1.0 z))) (fabs (- (/ -4.0 y_m) (/ x y_m)))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= -6.9e+49) {
tmp = fabs(((x / y_m) * (1.0 - z)));
} else {
tmp = fabs(((-4.0 / y_m) - (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 <= (-6.9d+49)) then
tmp = abs(((x / y_m) * (1.0d0 - z)))
else
tmp = abs((((-4.0d0) / y_m) - (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 <= -6.9e+49) {
tmp = Math.abs(((x / y_m) * (1.0 - z)));
} else {
tmp = Math.abs(((-4.0 / y_m) - (x / y_m)));
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= -6.9e+49: tmp = math.fabs(((x / y_m) * (1.0 - z))) else: tmp = math.fabs(((-4.0 / y_m) - (x / y_m))) return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= -6.9e+49) tmp = abs(Float64(Float64(x / y_m) * Float64(1.0 - z))); else tmp = abs(Float64(Float64(-4.0 / y_m) - 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 <= -6.9e+49) tmp = abs(((x / y_m) * (1.0 - z))); else tmp = abs(((-4.0 / y_m) - (x / y_m))); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[x, -6.9e+49], N[Abs[N[(N[(x / y$95$m), $MachinePrecision] * N[(1.0 - z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(-4.0 / y$95$m), $MachinePrecision] - N[(x / y$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.9 \cdot 10^{+49}:\\
\;\;\;\;\left|\frac{x}{y\_m} \cdot \left(1 - z\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{-4}{y\_m} - \frac{x}{y\_m}\right|\\
\end{array}
\end{array}
if x < -6.9000000000000003e49Initial program 90.3%
Simplified80.5%
Taylor expanded in x around inf 80.6%
mul-1-neg80.6%
*-commutative80.6%
associate-/l*99.9%
distribute-lft-neg-in99.9%
neg-sub099.9%
associate-+l-99.9%
neg-sub099.9%
+-commutative99.9%
unsub-neg99.9%
Simplified99.9%
if -6.9000000000000003e49 < x Initial program 91.9%
Simplified97.5%
Taylor expanded in z around 0 72.3%
+-commutative72.3%
rem-square-sqrt39.8%
fabs-sqr39.8%
rem-square-sqrt72.3%
fabs-neg72.3%
distribute-neg-frac72.3%
distribute-neg-in72.3%
metadata-eval72.3%
+-commutative72.3%
sub-neg72.3%
rem-square-sqrt32.1%
fabs-sqr32.1%
rem-square-sqrt72.3%
Simplified72.3%
div-sub72.3%
Applied egg-rr72.3%
Final simplification77.9%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x 4.6e-65) (fabs (/ 4.0 y_m)) (fabs (* z (/ x y_m)))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= 4.6e-65) {
tmp = fabs((4.0 / y_m));
} else {
tmp = fabs((z * (x / y_m)));
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 4.6d-65) then
tmp = abs((4.0d0 / y_m))
else
tmp = abs((z * (x / y_m)))
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double tmp;
if (x <= 4.6e-65) {
tmp = Math.abs((4.0 / y_m));
} else {
tmp = Math.abs((z * (x / y_m)));
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= 4.6e-65: tmp = math.fabs((4.0 / y_m)) else: tmp = math.fabs((z * (x / y_m))) return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= 4.6e-65) tmp = abs(Float64(4.0 / y_m)); else tmp = abs(Float64(z * 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.6e-65) tmp = abs((4.0 / y_m)); else tmp = abs((z * (x / y_m))); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[x, 4.6e-65], N[Abs[N[(4.0 / y$95$m), $MachinePrecision]], $MachinePrecision], N[Abs[N[(z * N[(x / y$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq 4.6 \cdot 10^{-65}:\\
\;\;\;\;\left|\frac{4}{y\_m}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|z \cdot \frac{x}{y\_m}\right|\\
\end{array}
\end{array}
if x < 4.5999999999999999e-65Initial program 94.6%
Simplified94.0%
Taylor expanded in x around 0 54.9%
if 4.5999999999999999e-65 < x Initial program 85.5%
Simplified94.2%
Taylor expanded in z around inf 56.2%
associate-*r/56.2%
neg-mul-156.2%
distribute-rgt-neg-in56.2%
Simplified56.2%
*-commutative56.2%
associate-/l*70.3%
add-sqr-sqrt38.2%
sqrt-unprod53.4%
sqr-neg53.4%
sqrt-unprod32.0%
add-sqr-sqrt70.3%
Applied egg-rr70.3%
Final simplification60.0%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x 5.6e-90) (fabs (/ 4.0 y_m)) (fabs (* x (/ z y_m)))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= 5.6e-90) {
tmp = fabs((4.0 / y_m));
} else {
tmp = fabs((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 <= 5.6d-90) then
tmp = abs((4.0d0 / y_m))
else
tmp = abs((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 <= 5.6e-90) {
tmp = Math.abs((4.0 / y_m));
} else {
tmp = Math.abs((x * (z / y_m)));
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= 5.6e-90: tmp = math.fabs((4.0 / y_m)) else: tmp = math.fabs((x * (z / y_m))) return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= 5.6e-90) tmp = abs(Float64(4.0 / y_m)); else tmp = abs(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 <= 5.6e-90) tmp = abs((4.0 / y_m)); else tmp = abs((x * (z / y_m))); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[x, 5.6e-90], N[Abs[N[(4.0 / y$95$m), $MachinePrecision]], $MachinePrecision], N[Abs[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 5.6 \cdot 10^{-90}:\\
\;\;\;\;\left|\frac{4}{y\_m}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|x \cdot \frac{z}{y\_m}\right|\\
\end{array}
\end{array}
if x < 5.5999999999999998e-90Initial program 95.0%
Simplified93.8%
Taylor expanded in x around 0 55.2%
if 5.5999999999999998e-90 < x Initial program 85.3%
Simplified94.5%
Taylor expanded in z around inf 56.5%
associate-*r/56.5%
neg-mul-156.5%
distribute-rgt-neg-in56.5%
Simplified56.5%
distribute-rgt-neg-out56.5%
distribute-frac-neg56.5%
distribute-frac-neg256.5%
associate-*r/61.7%
*-commutative61.7%
add-sqr-sqrt28.2%
sqrt-unprod47.1%
sqr-neg47.1%
sqrt-unprod33.4%
add-sqr-sqrt61.7%
Applied egg-rr61.7%
Final simplification57.5%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x 5.6e-90) (fabs (/ 4.0 y_m)) (fabs (/ x (/ y_m z)))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= 5.6e-90) {
tmp = fabs((4.0 / y_m));
} else {
tmp = fabs((x / (y_m / z)));
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 5.6d-90) then
tmp = abs((4.0d0 / y_m))
else
tmp = abs((x / (y_m / z)))
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double tmp;
if (x <= 5.6e-90) {
tmp = Math.abs((4.0 / y_m));
} else {
tmp = Math.abs((x / (y_m / z)));
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= 5.6e-90: tmp = math.fabs((4.0 / y_m)) else: tmp = math.fabs((x / (y_m / z))) return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= 5.6e-90) tmp = abs(Float64(4.0 / y_m)); else tmp = abs(Float64(x / Float64(y_m / z))); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (x <= 5.6e-90) tmp = abs((4.0 / y_m)); else tmp = abs((x / (y_m / z))); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[x, 5.6e-90], N[Abs[N[(4.0 / y$95$m), $MachinePrecision]], $MachinePrecision], N[Abs[N[(x / N[(y$95$m / z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq 5.6 \cdot 10^{-90}:\\
\;\;\;\;\left|\frac{4}{y\_m}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{x}{\frac{y\_m}{z}}\right|\\
\end{array}
\end{array}
if x < 5.5999999999999998e-90Initial program 95.0%
Simplified93.8%
Taylor expanded in x around 0 55.2%
if 5.5999999999999998e-90 < x Initial program 85.3%
Simplified94.5%
Taylor expanded in z around inf 56.5%
mul-1-neg56.5%
distribute-frac-neg256.5%
associate-/l*61.7%
Simplified61.7%
clear-num61.6%
un-div-inv61.7%
add-sqr-sqrt28.2%
sqrt-unprod47.1%
sqr-neg47.1%
sqrt-unprod33.4%
add-sqr-sqrt61.7%
Applied egg-rr61.7%
Final simplification57.5%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x 1.4e-63) (fabs (/ 4.0 y_m)) (fabs (/ z (/ y_m x)))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= 1.4e-63) {
tmp = fabs((4.0 / y_m));
} else {
tmp = fabs((z / (y_m / x)));
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 1.4d-63) then
tmp = abs((4.0d0 / y_m))
else
tmp = abs((z / (y_m / x)))
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double tmp;
if (x <= 1.4e-63) {
tmp = Math.abs((4.0 / y_m));
} else {
tmp = Math.abs((z / (y_m / x)));
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= 1.4e-63: tmp = math.fabs((4.0 / y_m)) else: tmp = math.fabs((z / (y_m / x))) return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= 1.4e-63) tmp = abs(Float64(4.0 / y_m)); else tmp = abs(Float64(z / Float64(y_m / x))); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (x <= 1.4e-63) tmp = abs((4.0 / y_m)); else tmp = abs((z / (y_m / x))); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[x, 1.4e-63], N[Abs[N[(4.0 / y$95$m), $MachinePrecision]], $MachinePrecision], N[Abs[N[(z / N[(y$95$m / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.4 \cdot 10^{-63}:\\
\;\;\;\;\left|\frac{4}{y\_m}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{z}{\frac{y\_m}{x}}\right|\\
\end{array}
\end{array}
if x < 1.4000000000000001e-63Initial program 94.6%
Simplified94.0%
Taylor expanded in x around 0 54.9%
if 1.4000000000000001e-63 < x Initial program 85.5%
Simplified94.2%
Taylor expanded in z around inf 56.2%
associate-*r/56.2%
neg-mul-156.2%
distribute-rgt-neg-in56.2%
Simplified56.2%
distribute-rgt-neg-out56.2%
distribute-frac-neg56.2%
distribute-frac-neg256.2%
associate-*r/61.7%
*-commutative61.7%
add-sqr-sqrt27.5%
sqrt-unprod48.4%
sqr-neg48.4%
sqrt-unprod34.1%
add-sqr-sqrt61.7%
Applied egg-rr61.7%
associate-/r/67.1%
Applied egg-rr67.1%
Final simplification59.0%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= z -4.3e+70) (fabs (/ x (/ y_m z))) (fabs (/ (- -4.0 x) y_m))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (z <= -4.3e+70) {
tmp = fabs((x / (y_m / z)));
} else {
tmp = fabs(((-4.0 - 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 (z <= (-4.3d+70)) then
tmp = abs((x / (y_m / z)))
else
tmp = abs((((-4.0d0) - 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 (z <= -4.3e+70) {
tmp = Math.abs((x / (y_m / z)));
} else {
tmp = Math.abs(((-4.0 - x) / y_m));
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if z <= -4.3e+70: tmp = math.fabs((x / (y_m / z))) else: tmp = math.fabs(((-4.0 - x) / y_m)) return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (z <= -4.3e+70) tmp = abs(Float64(x / Float64(y_m / z))); else tmp = abs(Float64(Float64(-4.0 - x) / y_m)); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (z <= -4.3e+70) tmp = abs((x / (y_m / z))); else tmp = abs(((-4.0 - x) / y_m)); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[z, -4.3e+70], N[Abs[N[(x / N[(y$95$m / z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(-4.0 - x), $MachinePrecision] / y$95$m), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.3 \cdot 10^{+70}:\\
\;\;\;\;\left|\frac{x}{\frac{y\_m}{z}}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{-4 - x}{y\_m}\right|\\
\end{array}
\end{array}
if z < -4.3000000000000001e70Initial program 93.6%
Simplified84.8%
Taylor expanded in z around inf 71.5%
mul-1-neg71.5%
distribute-frac-neg271.5%
associate-/l*84.6%
Simplified84.6%
clear-num84.4%
un-div-inv84.7%
add-sqr-sqrt42.1%
sqrt-unprod51.4%
sqr-neg51.4%
sqrt-unprod42.4%
add-sqr-sqrt84.7%
Applied egg-rr84.7%
if -4.3000000000000001e70 < z Initial program 91.0%
Simplified96.6%
Taylor expanded in z around 0 80.7%
+-commutative80.7%
rem-square-sqrt44.0%
fabs-sqr44.0%
rem-square-sqrt80.7%
fabs-neg80.7%
distribute-neg-frac80.7%
distribute-neg-in80.7%
metadata-eval80.7%
+-commutative80.7%
sub-neg80.7%
rem-square-sqrt36.2%
fabs-sqr36.2%
rem-square-sqrt80.7%
Simplified80.7%
Final simplification81.5%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= z 1.7e+19) (fabs (/ (- -4.0 x) y_m)) (fabs (* x (/ z y_m)))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (z <= 1.7e+19) {
tmp = fabs(((-4.0 - x) / y_m));
} else {
tmp = fabs((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 (z <= 1.7d+19) then
tmp = abs((((-4.0d0) - x) / y_m))
else
tmp = abs((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 (z <= 1.7e+19) {
tmp = Math.abs(((-4.0 - x) / y_m));
} else {
tmp = Math.abs((x * (z / y_m)));
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if z <= 1.7e+19: tmp = math.fabs(((-4.0 - x) / y_m)) else: tmp = math.fabs((x * (z / y_m))) return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (z <= 1.7e+19) tmp = abs(Float64(Float64(-4.0 - x) / y_m)); else tmp = abs(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 (z <= 1.7e+19) tmp = abs(((-4.0 - x) / y_m)); else tmp = abs((x * (z / y_m))); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[z, 1.7e+19], N[Abs[N[(N[(-4.0 - x), $MachinePrecision] / y$95$m), $MachinePrecision]], $MachinePrecision], N[Abs[N[(x * N[(z / y$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;z \leq 1.7 \cdot 10^{+19}:\\
\;\;\;\;\left|\frac{-4 - x}{y\_m}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|x \cdot \frac{z}{y\_m}\right|\\
\end{array}
\end{array}
if z < 1.7e19Initial program 93.9%
Simplified95.4%
Taylor expanded in z around 0 76.6%
+-commutative76.6%
rem-square-sqrt41.4%
fabs-sqr41.4%
rem-square-sqrt76.6%
fabs-neg76.6%
distribute-neg-frac76.6%
distribute-neg-in76.6%
metadata-eval76.6%
+-commutative76.6%
sub-neg76.6%
rem-square-sqrt34.8%
fabs-sqr34.8%
rem-square-sqrt76.6%
Simplified76.6%
if 1.7e19 < z Initial program 81.6%
Simplified88.4%
Taylor expanded in z around inf 66.2%
mul-1-neg66.2%
distribute-frac-neg266.2%
associate-/l*77.5%
Simplified77.5%
Final simplification76.8%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= z 6.2e+18) (fabs (/ (- -4.0 x) y_m)) (fabs (* z (/ x y_m)))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (z <= 6.2e+18) {
tmp = fabs(((-4.0 - x) / y_m));
} else {
tmp = fabs((z * (x / y_m)));
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (z <= 6.2d+18) then
tmp = abs((((-4.0d0) - x) / y_m))
else
tmp = abs((z * (x / y_m)))
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double tmp;
if (z <= 6.2e+18) {
tmp = Math.abs(((-4.0 - x) / y_m));
} else {
tmp = Math.abs((z * (x / y_m)));
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if z <= 6.2e+18: tmp = math.fabs(((-4.0 - x) / y_m)) else: tmp = math.fabs((z * (x / y_m))) return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (z <= 6.2e+18) tmp = abs(Float64(Float64(-4.0 - x) / y_m)); else tmp = abs(Float64(z * Float64(x / y_m))); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (z <= 6.2e+18) tmp = abs(((-4.0 - x) / y_m)); else tmp = abs((z * (x / y_m))); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[z, 6.2e+18], N[Abs[N[(N[(-4.0 - x), $MachinePrecision] / y$95$m), $MachinePrecision]], $MachinePrecision], N[Abs[N[(z * N[(x / y$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;z \leq 6.2 \cdot 10^{+18}:\\
\;\;\;\;\left|\frac{-4 - x}{y\_m}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|z \cdot \frac{x}{y\_m}\right|\\
\end{array}
\end{array}
if z < 6.2e18Initial program 93.9%
Simplified95.4%
Taylor expanded in z around 0 76.6%
+-commutative76.6%
rem-square-sqrt41.4%
fabs-sqr41.4%
rem-square-sqrt76.6%
fabs-neg76.6%
distribute-neg-frac76.6%
distribute-neg-in76.6%
metadata-eval76.6%
+-commutative76.6%
sub-neg76.6%
rem-square-sqrt34.8%
fabs-sqr34.8%
rem-square-sqrt76.6%
Simplified76.6%
if 6.2e18 < z Initial program 81.6%
Simplified88.4%
Taylor expanded in z around inf 66.2%
associate-*r/66.2%
neg-mul-166.2%
distribute-lft-neg-in66.2%
*-commutative66.2%
associate-*r/75.7%
Simplified75.7%
Final simplification76.4%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= z 1e+19) (fabs (/ (- -4.0 x) y_m)) (fabs (/ (* x z) y_m))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (z <= 1e+19) {
tmp = fabs(((-4.0 - x) / y_m));
} else {
tmp = fabs(((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 (z <= 1d+19) then
tmp = abs((((-4.0d0) - x) / y_m))
else
tmp = abs(((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 (z <= 1e+19) {
tmp = Math.abs(((-4.0 - x) / y_m));
} else {
tmp = Math.abs(((x * z) / y_m));
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if z <= 1e+19: tmp = math.fabs(((-4.0 - x) / y_m)) else: tmp = math.fabs(((x * z) / y_m)) return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (z <= 1e+19) tmp = abs(Float64(Float64(-4.0 - x) / y_m)); else tmp = abs(Float64(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 (z <= 1e+19) tmp = abs(((-4.0 - x) / y_m)); else tmp = abs(((x * z) / y_m)); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[z, 1e+19], N[Abs[N[(N[(-4.0 - x), $MachinePrecision] / y$95$m), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(x * z), $MachinePrecision] / y$95$m), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;z \leq 10^{+19}:\\
\;\;\;\;\left|\frac{-4 - x}{y\_m}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{x \cdot z}{y\_m}\right|\\
\end{array}
\end{array}
if z < 1e19Initial program 93.9%
Simplified95.4%
Taylor expanded in z around 0 76.6%
+-commutative76.6%
rem-square-sqrt41.4%
fabs-sqr41.4%
rem-square-sqrt76.6%
fabs-neg76.6%
distribute-neg-frac76.6%
distribute-neg-in76.6%
metadata-eval76.6%
+-commutative76.6%
sub-neg76.6%
rem-square-sqrt34.8%
fabs-sqr34.8%
rem-square-sqrt76.6%
Simplified76.6%
if 1e19 < z Initial program 81.6%
Simplified88.4%
Taylor expanded in z around inf 66.2%
associate-*r/66.2%
neg-mul-166.2%
distribute-rgt-neg-in66.2%
Simplified66.2%
Final simplification74.6%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (fabs (/ (- (+ x 4.0) (* x z)) y_m)))
y_m = fabs(y);
double code(double x, double y_m, double z) {
return fabs((((x + 4.0) - (x * z)) / 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 = abs((((x + 4.0d0) - (x * z)) / y_m))
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
return Math.abs((((x + 4.0) - (x * z)) / y_m));
}
y_m = math.fabs(y) def code(x, y_m, z): return math.fabs((((x + 4.0) - (x * z)) / y_m))
y_m = abs(y) function code(x, y_m, z) return abs(Float64(Float64(Float64(x + 4.0) - Float64(x * z)) / y_m)) end
y_m = abs(y); function tmp = code(x, y_m, z) tmp = abs((((x + 4.0) - (x * z)) / y_m)); end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := N[Abs[N[(N[(N[(x + 4.0), $MachinePrecision] - N[(x * z), $MachinePrecision]), $MachinePrecision] / y$95$m), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
y_m = \left|y\right|
\\
\left|\frac{\left(x + 4\right) - x \cdot z}{y\_m}\right|
\end{array}
Initial program 91.6%
associate-*l/89.9%
sub-div94.1%
Applied egg-rr94.1%
Final simplification94.1%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x 4.0) (fabs (/ 4.0 y_m)) (fabs (/ x y_m))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= 4.0) {
tmp = fabs((4.0 / y_m));
} else {
tmp = fabs((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 = abs((4.0d0 / y_m))
else
tmp = abs((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 = Math.abs((4.0 / y_m));
} else {
tmp = Math.abs((x / y_m));
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= 4.0: tmp = math.fabs((4.0 / y_m)) else: tmp = math.fabs((x / y_m)) return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= 4.0) tmp = abs(Float64(4.0 / y_m)); else tmp = abs(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 = abs((4.0 / y_m)); else tmp = abs((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[Abs[N[(4.0 / y$95$m), $MachinePrecision]], $MachinePrecision], N[Abs[N[(x / y$95$m), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq 4:\\
\;\;\;\;\left|\frac{4}{y\_m}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{x}{y\_m}\right|\\
\end{array}
\end{array}
if x < 4Initial program 95.0%
Simplified94.5%
Taylor expanded in x around 0 53.7%
if 4 < x Initial program 82.2%
Taylor expanded in z around 0 58.4%
Taylor expanded in x around inf 57.3%
Final simplification54.7%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (fabs (/ 4.0 y_m)))
y_m = fabs(y);
double code(double x, double y_m, double z) {
return fabs((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 = abs((4.0d0 / y_m))
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
return Math.abs((4.0 / y_m));
}
y_m = math.fabs(y) def code(x, y_m, z): return math.fabs((4.0 / y_m))
y_m = abs(y) function code(x, y_m, z) return abs(Float64(4.0 / y_m)) end
y_m = abs(y); function tmp = code(x, y_m, z) tmp = abs((4.0 / y_m)); end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := N[Abs[N[(4.0 / y$95$m), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
y_m = \left|y\right|
\\
\left|\frac{4}{y\_m}\right|
\end{array}
Initial program 91.6%
Simplified94.1%
Taylor expanded in x around 0 40.8%
Final simplification40.8%
herbie shell --seed 2024066
(FPCore (x y z)
:name "fabs fraction 1"
:precision binary64
(fabs (- (/ (+ x 4.0) y) (* (/ x y) z))))