
(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 13 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 1e-25) (fabs (/ (- (+ 4.0 x) (* x z)) y_m)) (fabs (- (/ (+ 4.0 x) y_m) (/ x (/ y_m z))))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (y_m <= 1e-25) {
tmp = fabs((((4.0 + x) - (x * z)) / y_m));
} else {
tmp = fabs((((4.0 + x) / 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 <= 1d-25) then
tmp = abs((((4.0d0 + x) - (x * z)) / y_m))
else
tmp = abs((((4.0d0 + x) / 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 <= 1e-25) {
tmp = Math.abs((((4.0 + x) - (x * z)) / y_m));
} else {
tmp = Math.abs((((4.0 + x) / y_m) - (x / (y_m / z))));
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if y_m <= 1e-25: tmp = math.fabs((((4.0 + x) - (x * z)) / y_m)) else: tmp = math.fabs((((4.0 + x) / y_m) - (x / (y_m / z)))) return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (y_m <= 1e-25) tmp = abs(Float64(Float64(Float64(4.0 + x) - Float64(x * z)) / y_m)); else tmp = abs(Float64(Float64(Float64(4.0 + x) / 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 <= 1e-25) tmp = abs((((4.0 + x) - (x * z)) / y_m)); else tmp = abs((((4.0 + x) / 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, 1e-25], N[Abs[N[(N[(N[(4.0 + x), $MachinePrecision] - N[(x * z), $MachinePrecision]), $MachinePrecision] / y$95$m), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(N[(4.0 + x), $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 10^{-25}:\\
\;\;\;\;\left|\frac{\left(4 + x\right) - x \cdot z}{y_m}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{4 + x}{y_m} - \frac{x}{\frac{y_m}{z}}\right|\\
\end{array}
\end{array}
y_m = (fabs.f64 y)
(FPCore (x y_m z)
:precision binary64
(let* ((t_0 (fabs (/ x y_m))) (t_1 (fabs (* z (/ x y_m)))))
(if (<= x -1.75e+249)
t_0
(if (<= x -5.5e+106)
t_1
(if (<= x -2.3e+90)
t_0
(if (<= x -1.08e-58)
t_1
(if (<= x 4.0) (fabs (/ 4.0 y_m)) (if (<= x 2.8e+73) t_0 t_1))))))))y_m = fabs(y);
double code(double x, double y_m, double z) {
double t_0 = fabs((x / y_m));
double t_1 = fabs((z * (x / y_m)));
double tmp;
if (x <= -1.75e+249) {
tmp = t_0;
} else if (x <= -5.5e+106) {
tmp = t_1;
} else if (x <= -2.3e+90) {
tmp = t_0;
} else if (x <= -1.08e-58) {
tmp = t_1;
} else if (x <= 4.0) {
tmp = fabs((4.0 / y_m));
} else if (x <= 2.8e+73) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = abs((x / y_m))
t_1 = abs((z * (x / y_m)))
if (x <= (-1.75d+249)) then
tmp = t_0
else if (x <= (-5.5d+106)) then
tmp = t_1
else if (x <= (-2.3d+90)) then
tmp = t_0
else if (x <= (-1.08d-58)) then
tmp = t_1
else if (x <= 4.0d0) then
tmp = abs((4.0d0 / y_m))
else if (x <= 2.8d+73) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double t_0 = Math.abs((x / y_m));
double t_1 = Math.abs((z * (x / y_m)));
double tmp;
if (x <= -1.75e+249) {
tmp = t_0;
} else if (x <= -5.5e+106) {
tmp = t_1;
} else if (x <= -2.3e+90) {
tmp = t_0;
} else if (x <= -1.08e-58) {
tmp = t_1;
} else if (x <= 4.0) {
tmp = Math.abs((4.0 / y_m));
} else if (x <= 2.8e+73) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): t_0 = math.fabs((x / y_m)) t_1 = math.fabs((z * (x / y_m))) tmp = 0 if x <= -1.75e+249: tmp = t_0 elif x <= -5.5e+106: tmp = t_1 elif x <= -2.3e+90: tmp = t_0 elif x <= -1.08e-58: tmp = t_1 elif x <= 4.0: tmp = math.fabs((4.0 / y_m)) elif x <= 2.8e+73: tmp = t_0 else: tmp = t_1 return tmp
y_m = abs(y) function code(x, y_m, z) t_0 = abs(Float64(x / y_m)) t_1 = abs(Float64(z * Float64(x / y_m))) tmp = 0.0 if (x <= -1.75e+249) tmp = t_0; elseif (x <= -5.5e+106) tmp = t_1; elseif (x <= -2.3e+90) tmp = t_0; elseif (x <= -1.08e-58) tmp = t_1; elseif (x <= 4.0) tmp = abs(Float64(4.0 / y_m)); elseif (x <= 2.8e+73) tmp = t_0; else tmp = t_1; end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) t_0 = abs((x / y_m)); t_1 = abs((z * (x / y_m))); tmp = 0.0; if (x <= -1.75e+249) tmp = t_0; elseif (x <= -5.5e+106) tmp = t_1; elseif (x <= -2.3e+90) tmp = t_0; elseif (x <= -1.08e-58) tmp = t_1; elseif (x <= 4.0) tmp = abs((4.0 / y_m)); elseif (x <= 2.8e+73) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision]
code[x_, y$95$m_, z_] := Block[{t$95$0 = N[Abs[N[(x / y$95$m), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Abs[N[(z * N[(x / y$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x, -1.75e+249], t$95$0, If[LessEqual[x, -5.5e+106], t$95$1, If[LessEqual[x, -2.3e+90], t$95$0, If[LessEqual[x, -1.08e-58], t$95$1, If[LessEqual[x, 4.0], N[Abs[N[(4.0 / y$95$m), $MachinePrecision]], $MachinePrecision], If[LessEqual[x, 2.8e+73], t$95$0, t$95$1]]]]]]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
t_0 := \left|\frac{x}{y_m}\right|\\
t_1 := \left|z \cdot \frac{x}{y_m}\right|\\
\mathbf{if}\;x \leq -1.75 \cdot 10^{+249}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -5.5 \cdot 10^{+106}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -2.3 \cdot 10^{+90}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -1.08 \cdot 10^{-58}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 4:\\
\;\;\;\;\left|\frac{4}{y_m}\right|\\
\mathbf{elif}\;x \leq 2.8 \cdot 10^{+73}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
y_m = (fabs.f64 y)
(FPCore (x y_m z)
:precision binary64
(let* ((t_0 (fabs (/ x y_m))) (t_1 (fabs (/ z (/ y_m x)))))
(if (<= x -3.3e+249)
t_0
(if (<= x -8.5e+107)
t_1
(if (<= x -5.1e+91)
t_0
(if (<= x -2.95e-64)
t_1
(if (<= x 4.0)
(fabs (/ 4.0 y_m))
(if (<= x 1.42e+57) t_0 t_1))))))))y_m = fabs(y);
double code(double x, double y_m, double z) {
double t_0 = fabs((x / y_m));
double t_1 = fabs((z / (y_m / x)));
double tmp;
if (x <= -3.3e+249) {
tmp = t_0;
} else if (x <= -8.5e+107) {
tmp = t_1;
} else if (x <= -5.1e+91) {
tmp = t_0;
} else if (x <= -2.95e-64) {
tmp = t_1;
} else if (x <= 4.0) {
tmp = fabs((4.0 / y_m));
} else if (x <= 1.42e+57) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = abs((x / y_m))
t_1 = abs((z / (y_m / x)))
if (x <= (-3.3d+249)) then
tmp = t_0
else if (x <= (-8.5d+107)) then
tmp = t_1
else if (x <= (-5.1d+91)) then
tmp = t_0
else if (x <= (-2.95d-64)) then
tmp = t_1
else if (x <= 4.0d0) then
tmp = abs((4.0d0 / y_m))
else if (x <= 1.42d+57) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double t_0 = Math.abs((x / y_m));
double t_1 = Math.abs((z / (y_m / x)));
double tmp;
if (x <= -3.3e+249) {
tmp = t_0;
} else if (x <= -8.5e+107) {
tmp = t_1;
} else if (x <= -5.1e+91) {
tmp = t_0;
} else if (x <= -2.95e-64) {
tmp = t_1;
} else if (x <= 4.0) {
tmp = Math.abs((4.0 / y_m));
} else if (x <= 1.42e+57) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): t_0 = math.fabs((x / y_m)) t_1 = math.fabs((z / (y_m / x))) tmp = 0 if x <= -3.3e+249: tmp = t_0 elif x <= -8.5e+107: tmp = t_1 elif x <= -5.1e+91: tmp = t_0 elif x <= -2.95e-64: tmp = t_1 elif x <= 4.0: tmp = math.fabs((4.0 / y_m)) elif x <= 1.42e+57: tmp = t_0 else: tmp = t_1 return tmp
y_m = abs(y) function code(x, y_m, z) t_0 = abs(Float64(x / y_m)) t_1 = abs(Float64(z / Float64(y_m / x))) tmp = 0.0 if (x <= -3.3e+249) tmp = t_0; elseif (x <= -8.5e+107) tmp = t_1; elseif (x <= -5.1e+91) tmp = t_0; elseif (x <= -2.95e-64) tmp = t_1; elseif (x <= 4.0) tmp = abs(Float64(4.0 / y_m)); elseif (x <= 1.42e+57) tmp = t_0; else tmp = t_1; end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) t_0 = abs((x / y_m)); t_1 = abs((z / (y_m / x))); tmp = 0.0; if (x <= -3.3e+249) tmp = t_0; elseif (x <= -8.5e+107) tmp = t_1; elseif (x <= -5.1e+91) tmp = t_0; elseif (x <= -2.95e-64) tmp = t_1; elseif (x <= 4.0) tmp = abs((4.0 / y_m)); elseif (x <= 1.42e+57) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision]
code[x_, y$95$m_, z_] := Block[{t$95$0 = N[Abs[N[(x / y$95$m), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Abs[N[(z / N[(y$95$m / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x, -3.3e+249], t$95$0, If[LessEqual[x, -8.5e+107], t$95$1, If[LessEqual[x, -5.1e+91], t$95$0, If[LessEqual[x, -2.95e-64], t$95$1, If[LessEqual[x, 4.0], N[Abs[N[(4.0 / y$95$m), $MachinePrecision]], $MachinePrecision], If[LessEqual[x, 1.42e+57], t$95$0, t$95$1]]]]]]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
t_0 := \left|\frac{x}{y_m}\right|\\
t_1 := \left|\frac{z}{\frac{y_m}{x}}\right|\\
\mathbf{if}\;x \leq -3.3 \cdot 10^{+249}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -8.5 \cdot 10^{+107}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -5.1 \cdot 10^{+91}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -2.95 \cdot 10^{-64}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 4:\\
\;\;\;\;\left|\frac{4}{y_m}\right|\\
\mathbf{elif}\;x \leq 1.42 \cdot 10^{+57}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (or (<= z -1.15) (not (<= z 7.6e-18))) (fabs (/ z (/ y_m (- (/ 4.0 z) x)))) (fabs (+ (/ x y_m) (/ 4.0 y_m)))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if ((z <= -1.15) || !(z <= 7.6e-18)) {
tmp = fabs((z / (y_m / ((4.0 / z) - x))));
} else {
tmp = fabs(((x / y_m) + (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 ((z <= (-1.15d0)) .or. (.not. (z <= 7.6d-18))) then
tmp = abs((z / (y_m / ((4.0d0 / z) - x))))
else
tmp = abs(((x / y_m) + (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 ((z <= -1.15) || !(z <= 7.6e-18)) {
tmp = Math.abs((z / (y_m / ((4.0 / z) - x))));
} else {
tmp = Math.abs(((x / y_m) + (4.0 / y_m)));
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if (z <= -1.15) or not (z <= 7.6e-18): tmp = math.fabs((z / (y_m / ((4.0 / z) - x)))) else: tmp = math.fabs(((x / y_m) + (4.0 / y_m))) return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if ((z <= -1.15) || !(z <= 7.6e-18)) tmp = abs(Float64(z / Float64(y_m / Float64(Float64(4.0 / z) - x)))); else tmp = abs(Float64(Float64(x / y_m) + Float64(4.0 / y_m))); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if ((z <= -1.15) || ~((z <= 7.6e-18))) tmp = abs((z / (y_m / ((4.0 / z) - x)))); else tmp = abs(((x / y_m) + (4.0 / y_m))); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[Or[LessEqual[z, -1.15], N[Not[LessEqual[z, 7.6e-18]], $MachinePrecision]], N[Abs[N[(z / N[(y$95$m / N[(N[(4.0 / z), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(x / y$95$m), $MachinePrecision] + N[(4.0 / y$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \lor \neg \left(z \leq 7.6 \cdot 10^{-18}\right):\\
\;\;\;\;\left|\frac{z}{\frac{y_m}{\frac{4}{z} - x}}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{x}{y_m} + \frac{4}{y_m}\right|\\
\end{array}
\end{array}
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= y_m 2e-65) (fabs (/ (- (+ 4.0 x) (* x z)) y_m)) (fabs (- (/ (+ 4.0 x) y_m) (* z (/ x y_m))))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (y_m <= 2e-65) {
tmp = fabs((((4.0 + x) - (x * z)) / y_m));
} else {
tmp = fabs((((4.0 + x) / 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 <= 2d-65) then
tmp = abs((((4.0d0 + x) - (x * z)) / y_m))
else
tmp = abs((((4.0d0 + x) / 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 <= 2e-65) {
tmp = Math.abs((((4.0 + x) - (x * z)) / y_m));
} else {
tmp = Math.abs((((4.0 + x) / y_m) - (z * (x / y_m))));
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if y_m <= 2e-65: tmp = math.fabs((((4.0 + x) - (x * z)) / y_m)) else: tmp = math.fabs((((4.0 + x) / y_m) - (z * (x / y_m)))) return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (y_m <= 2e-65) tmp = abs(Float64(Float64(Float64(4.0 + x) - Float64(x * z)) / y_m)); else tmp = abs(Float64(Float64(Float64(4.0 + x) / 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 <= 2e-65) tmp = abs((((4.0 + x) - (x * z)) / y_m)); else tmp = abs((((4.0 + x) / 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, 2e-65], N[Abs[N[(N[(N[(4.0 + x), $MachinePrecision] - N[(x * z), $MachinePrecision]), $MachinePrecision] / y$95$m), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(N[(4.0 + x), $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 2 \cdot 10^{-65}:\\
\;\;\;\;\left|\frac{\left(4 + x\right) - x \cdot z}{y_m}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{4 + x}{y_m} - z \cdot \frac{x}{y_m}\right|\\
\end{array}
\end{array}
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (or (<= x -6.4e-57) (not (<= x 6.2e-7))) (fabs (* x (/ (- 1.0 z) y_m))) (fabs (/ (- -4.0 x) y_m))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if ((x <= -6.4e-57) || !(x <= 6.2e-7)) {
tmp = fabs((x * ((1.0 - z) / y_m)));
} 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 ((x <= (-6.4d-57)) .or. (.not. (x <= 6.2d-7))) then
tmp = abs((x * ((1.0d0 - z) / y_m)))
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 ((x <= -6.4e-57) || !(x <= 6.2e-7)) {
tmp = Math.abs((x * ((1.0 - z) / y_m)));
} 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 (x <= -6.4e-57) or not (x <= 6.2e-7): tmp = math.fabs((x * ((1.0 - z) / y_m))) 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 ((x <= -6.4e-57) || !(x <= 6.2e-7)) tmp = abs(Float64(x * Float64(Float64(1.0 - z) / y_m))); 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 ((x <= -6.4e-57) || ~((x <= 6.2e-7))) tmp = abs((x * ((1.0 - z) / y_m))); 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[Or[LessEqual[x, -6.4e-57], N[Not[LessEqual[x, 6.2e-7]], $MachinePrecision]], N[Abs[N[(x * N[(N[(1.0 - z), $MachinePrecision] / y$95$m), $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}\;x \leq -6.4 \cdot 10^{-57} \lor \neg \left(x \leq 6.2 \cdot 10^{-7}\right):\\
\;\;\;\;\left|x \cdot \frac{1 - z}{y_m}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{-4 - x}{y_m}\right|\\
\end{array}
\end{array}
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (or (<= x -1.24e-57) (not (<= x 6.8e-9))) (fabs (* (/ x y_m) (- 1.0 z))) (fabs (/ (- -4.0 x) y_m))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if ((x <= -1.24e-57) || !(x <= 6.8e-9)) {
tmp = fabs(((x / y_m) * (1.0 - 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 ((x <= (-1.24d-57)) .or. (.not. (x <= 6.8d-9))) then
tmp = abs(((x / y_m) * (1.0d0 - 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 ((x <= -1.24e-57) || !(x <= 6.8e-9)) {
tmp = Math.abs(((x / y_m) * (1.0 - 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 (x <= -1.24e-57) or not (x <= 6.8e-9): tmp = math.fabs(((x / y_m) * (1.0 - 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 ((x <= -1.24e-57) || !(x <= 6.8e-9)) tmp = abs(Float64(Float64(x / y_m) * Float64(1.0 - 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 ((x <= -1.24e-57) || ~((x <= 6.8e-9))) tmp = abs(((x / y_m) * (1.0 - 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[Or[LessEqual[x, -1.24e-57], N[Not[LessEqual[x, 6.8e-9]], $MachinePrecision]], N[Abs[N[(N[(x / y$95$m), $MachinePrecision] * N[(1.0 - 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}\;x \leq -1.24 \cdot 10^{-57} \lor \neg \left(x \leq 6.8 \cdot 10^{-9}\right):\\
\;\;\;\;\left|\frac{x}{y_m} \cdot \left(1 - z\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{-4 - x}{y_m}\right|\\
\end{array}
\end{array}
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (or (<= x -1.2e-63) (not (<= x 0.125))) (fabs (* (/ x y_m) (- 1.0 z))) (fabs (+ (/ x y_m) (/ 4.0 y_m)))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if ((x <= -1.2e-63) || !(x <= 0.125)) {
tmp = fabs(((x / y_m) * (1.0 - z)));
} else {
tmp = fabs(((x / y_m) + (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-63)) .or. (.not. (x <= 0.125d0))) then
tmp = abs(((x / y_m) * (1.0d0 - z)))
else
tmp = abs(((x / y_m) + (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-63) || !(x <= 0.125)) {
tmp = Math.abs(((x / y_m) * (1.0 - z)));
} else {
tmp = Math.abs(((x / y_m) + (4.0 / y_m)));
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if (x <= -1.2e-63) or not (x <= 0.125): tmp = math.fabs(((x / y_m) * (1.0 - z))) else: tmp = math.fabs(((x / y_m) + (4.0 / y_m))) return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if ((x <= -1.2e-63) || !(x <= 0.125)) tmp = abs(Float64(Float64(x / y_m) * Float64(1.0 - z))); else tmp = abs(Float64(Float64(x / y_m) + Float64(4.0 / y_m))); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if ((x <= -1.2e-63) || ~((x <= 0.125))) tmp = abs(((x / y_m) * (1.0 - z))); else tmp = abs(((x / y_m) + (4.0 / y_m))); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[Or[LessEqual[x, -1.2e-63], N[Not[LessEqual[x, 0.125]], $MachinePrecision]], 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 / 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^{-63} \lor \neg \left(x \leq 0.125\right):\\
\;\;\;\;\left|\frac{x}{y_m} \cdot \left(1 - z\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{x}{y_m} + \frac{4}{y_m}\right|\\
\end{array}
\end{array}
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x 5e+16) (fabs (/ (- (+ 4.0 x) (* x z)) y_m)) (fabs (* x (/ (- 1.0 z) y_m)))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= 5e+16) {
tmp = fabs((((4.0 + x) - (x * z)) / y_m));
} else {
tmp = fabs((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 <= 5d+16) then
tmp = abs((((4.0d0 + x) - (x * z)) / y_m))
else
tmp = abs((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 <= 5e+16) {
tmp = Math.abs((((4.0 + x) - (x * z)) / y_m));
} else {
tmp = Math.abs((x * ((1.0 - z) / y_m)));
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= 5e+16: tmp = math.fabs((((4.0 + x) - (x * z)) / y_m)) else: tmp = math.fabs((x * ((1.0 - z) / y_m))) return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= 5e+16) tmp = abs(Float64(Float64(Float64(4.0 + x) - Float64(x * z)) / y_m)); else tmp = abs(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 <= 5e+16) tmp = abs((((4.0 + x) - (x * z)) / y_m)); else tmp = abs((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, 5e+16], N[Abs[N[(N[(N[(4.0 + x), $MachinePrecision] - N[(x * z), $MachinePrecision]), $MachinePrecision] / y$95$m), $MachinePrecision]], $MachinePrecision], N[Abs[N[(x * N[(N[(1.0 - z), $MachinePrecision] / y$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq 5 \cdot 10^{+16}:\\
\;\;\;\;\left|\frac{\left(4 + x\right) - x \cdot z}{y_m}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|x \cdot \frac{1 - z}{y_m}\right|\\
\end{array}
\end{array}
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= z -1.15e+55) (fabs (/ x (/ y_m z))) (if (<= z 4.3e+133) (fabs (/ (- -4.0 x) y_m)) (fabs (/ z (/ y_m x))))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (z <= -1.15e+55) {
tmp = fabs((x / (y_m / z)));
} else if (z <= 4.3e+133) {
tmp = fabs(((-4.0 - x) / 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 (z <= (-1.15d+55)) then
tmp = abs((x / (y_m / z)))
else if (z <= 4.3d+133) then
tmp = abs((((-4.0d0) - x) / 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 (z <= -1.15e+55) {
tmp = Math.abs((x / (y_m / z)));
} else if (z <= 4.3e+133) {
tmp = Math.abs(((-4.0 - x) / 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 z <= -1.15e+55: tmp = math.fabs((x / (y_m / z))) elif z <= 4.3e+133: tmp = math.fabs(((-4.0 - x) / 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 (z <= -1.15e+55) tmp = abs(Float64(x / Float64(y_m / z))); elseif (z <= 4.3e+133) tmp = abs(Float64(Float64(-4.0 - x) / 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 (z <= -1.15e+55) tmp = abs((x / (y_m / z))); elseif (z <= 4.3e+133) tmp = abs(((-4.0 - x) / 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[z, -1.15e+55], N[Abs[N[(x / N[(y$95$m / z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[z, 4.3e+133], N[Abs[N[(N[(-4.0 - x), $MachinePrecision] / 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}\;z \leq -1.15 \cdot 10^{+55}:\\
\;\;\;\;\left|\frac{x}{\frac{y_m}{z}}\right|\\
\mathbf{elif}\;z \leq 4.3 \cdot 10^{+133}:\\
\;\;\;\;\left|\frac{-4 - x}{y_m}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{z}{\frac{y_m}{x}}\right|\\
\end{array}
\end{array}
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= z -1.96e+55) (fabs (/ x (/ y_m z))) (if (<= z 4e+145) (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.96e+55) {
tmp = fabs((x / (y_m / z)));
} else if (z <= 4e+145) {
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.96d+55)) then
tmp = abs((x / (y_m / z)))
else if (z <= 4d+145) 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.96e+55) {
tmp = Math.abs((x / (y_m / z)));
} else if (z <= 4e+145) {
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.96e+55: tmp = math.fabs((x / (y_m / z))) elif z <= 4e+145: 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.96e+55) tmp = abs(Float64(x / Float64(y_m / z))); elseif (z <= 4e+145) 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 <= -1.96e+55) tmp = abs((x / (y_m / z))); elseif (z <= 4e+145) 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.96e+55], N[Abs[N[(x / N[(y$95$m / z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[z, 4e+145], 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 -1.96 \cdot 10^{+55}:\\
\;\;\;\;\left|\frac{x}{\frac{y_m}{z}}\right|\\
\mathbf{elif}\;z \leq 4 \cdot 10^{+145}:\\
\;\;\;\;\left|\frac{-4 - x}{y_m}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{x \cdot z}{y_m}\right|\\
\end{array}
\end{array}
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (or (<= x -1.55) (not (<= x 4.0))) (fabs (/ x y_m)) (fabs (/ 4.0 y_m))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if ((x <= -1.55) || !(x <= 4.0)) {
tmp = fabs((x / y_m));
} else {
tmp = fabs((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.55d0)) .or. (.not. (x <= 4.0d0))) then
tmp = abs((x / y_m))
else
tmp = abs((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.55) || !(x <= 4.0)) {
tmp = Math.abs((x / y_m));
} else {
tmp = Math.abs((4.0 / y_m));
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if (x <= -1.55) or not (x <= 4.0): tmp = math.fabs((x / y_m)) else: tmp = math.fabs((4.0 / y_m)) return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if ((x <= -1.55) || !(x <= 4.0)) tmp = abs(Float64(x / y_m)); else tmp = abs(Float64(4.0 / y_m)); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if ((x <= -1.55) || ~((x <= 4.0))) tmp = abs((x / y_m)); else tmp = abs((4.0 / y_m)); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[Or[LessEqual[x, -1.55], N[Not[LessEqual[x, 4.0]], $MachinePrecision]], N[Abs[N[(x / y$95$m), $MachinePrecision]], $MachinePrecision], N[Abs[N[(4.0 / y$95$m), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.55 \lor \neg \left(x \leq 4\right):\\
\;\;\;\;\left|\frac{x}{y_m}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{4}{y_m}\right|\\
\end{array}
\end{array}
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}
herbie shell --seed 2024003
(FPCore (x y z)
:name "fabs fraction 1"
:precision binary64
(fabs (- (/ (+ x 4.0) y) (* (/ x y) z))))