
(FPCore (x y z t) :precision binary64 (/ (* x 2.0) (- (* y z) (* t z))))
double code(double x, double y, double z, double t) {
return (x * 2.0) / ((y * z) - (t * z));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x * 2.0d0) / ((y * z) - (t * z))
end function
public static double code(double x, double y, double z, double t) {
return (x * 2.0) / ((y * z) - (t * z));
}
def code(x, y, z, t): return (x * 2.0) / ((y * z) - (t * z))
function code(x, y, z, t) return Float64(Float64(x * 2.0) / Float64(Float64(y * z) - Float64(t * z))) end
function tmp = code(x, y, z, t) tmp = (x * 2.0) / ((y * z) - (t * z)); end
code[x_, y_, z_, t_] := N[(N[(x * 2.0), $MachinePrecision] / N[(N[(y * z), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot 2}{y \cdot z - t \cdot z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 12 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (/ (* x 2.0) (- (* y z) (* t z))))
double code(double x, double y, double z, double t) {
return (x * 2.0) / ((y * z) - (t * z));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x * 2.0d0) / ((y * z) - (t * z))
end function
public static double code(double x, double y, double z, double t) {
return (x * 2.0) / ((y * z) - (t * z));
}
def code(x, y, z, t): return (x * 2.0) / ((y * z) - (t * z))
function code(x, y, z, t) return Float64(Float64(x * 2.0) / Float64(Float64(y * z) - Float64(t * z))) end
function tmp = code(x, y, z, t) tmp = (x * 2.0) / ((y * z) - (t * z)); end
code[x_, y_, z_, t_] := N[(N[(x * 2.0), $MachinePrecision] / N[(N[(y * z), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot 2}{y \cdot z - t \cdot z}
\end{array}
z_m = (fabs.f64 z)
z_s = (copysign.f64 1 z)
(FPCore (z_s x y z_m t)
:precision binary64
(*
z_s
(if (<= z_m 2.5e+104)
(/ (* x 2.0) (* z_m (- y t)))
(/ (/ x z_m) (* (- y t) 0.5)))))z_m = fabs(z);
z_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m, double t) {
double tmp;
if (z_m <= 2.5e+104) {
tmp = (x * 2.0) / (z_m * (y - t));
} else {
tmp = (x / z_m) / ((y - t) * 0.5);
}
return z_s * tmp;
}
z_m = abs(z)
z_s = copysign(1.0d0, z)
real(8) function code(z_s, x, y, z_m, t)
real(8), intent (in) :: z_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z_m
real(8), intent (in) :: t
real(8) :: tmp
if (z_m <= 2.5d+104) then
tmp = (x * 2.0d0) / (z_m * (y - t))
else
tmp = (x / z_m) / ((y - t) * 0.5d0)
end if
code = z_s * tmp
end function
z_m = Math.abs(z);
z_s = Math.copySign(1.0, z);
public static double code(double z_s, double x, double y, double z_m, double t) {
double tmp;
if (z_m <= 2.5e+104) {
tmp = (x * 2.0) / (z_m * (y - t));
} else {
tmp = (x / z_m) / ((y - t) * 0.5);
}
return z_s * tmp;
}
z_m = math.fabs(z) z_s = math.copysign(1.0, z) def code(z_s, x, y, z_m, t): tmp = 0 if z_m <= 2.5e+104: tmp = (x * 2.0) / (z_m * (y - t)) else: tmp = (x / z_m) / ((y - t) * 0.5) return z_s * tmp
z_m = abs(z) z_s = copysign(1.0, z) function code(z_s, x, y, z_m, t) tmp = 0.0 if (z_m <= 2.5e+104) tmp = Float64(Float64(x * 2.0) / Float64(z_m * Float64(y - t))); else tmp = Float64(Float64(x / z_m) / Float64(Float64(y - t) * 0.5)); end return Float64(z_s * tmp) end
z_m = abs(z); z_s = sign(z) * abs(1.0); function tmp_2 = code(z_s, x, y, z_m, t) tmp = 0.0; if (z_m <= 2.5e+104) tmp = (x * 2.0) / (z_m * (y - t)); else tmp = (x / z_m) / ((y - t) * 0.5); end tmp_2 = z_s * tmp; end
z_m = N[Abs[z], $MachinePrecision]
z_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_, t_] := N[(z$95$s * If[LessEqual[z$95$m, 2.5e+104], N[(N[(x * 2.0), $MachinePrecision] / N[(z$95$m * N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / z$95$m), $MachinePrecision] / N[(N[(y - t), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
z_m = \left|z\right|
\\
z_s = \mathsf{copysign}\left(1, z\right)
\\
z_s \cdot \begin{array}{l}
\mathbf{if}\;z_m \leq 2.5 \cdot 10^{+104}:\\
\;\;\;\;\frac{x \cdot 2}{z_m \cdot \left(y - t\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{z_m}}{\left(y - t\right) \cdot 0.5}\\
\end{array}
\end{array}
z_m = (fabs.f64 z)
z_s = (copysign.f64 1 z)
(FPCore (z_s x y z_m t)
:precision binary64
(*
z_s
(if (<= y -1.8e+68)
(* (/ x z_m) (/ 2.0 y))
(if (<= y -5.5e+32)
(* -2.0 (/ x (* z_m t)))
(if (or (<= y -1.8e-46) (not (<= y 7.6e-28)))
(* x (/ (/ 2.0 y) z_m))
(* (/ x z_m) (/ -2.0 t)))))))z_m = fabs(z);
z_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m, double t) {
double tmp;
if (y <= -1.8e+68) {
tmp = (x / z_m) * (2.0 / y);
} else if (y <= -5.5e+32) {
tmp = -2.0 * (x / (z_m * t));
} else if ((y <= -1.8e-46) || !(y <= 7.6e-28)) {
tmp = x * ((2.0 / y) / z_m);
} else {
tmp = (x / z_m) * (-2.0 / t);
}
return z_s * tmp;
}
z_m = abs(z)
z_s = copysign(1.0d0, z)
real(8) function code(z_s, x, y, z_m, t)
real(8), intent (in) :: z_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z_m
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.8d+68)) then
tmp = (x / z_m) * (2.0d0 / y)
else if (y <= (-5.5d+32)) then
tmp = (-2.0d0) * (x / (z_m * t))
else if ((y <= (-1.8d-46)) .or. (.not. (y <= 7.6d-28))) then
tmp = x * ((2.0d0 / y) / z_m)
else
tmp = (x / z_m) * ((-2.0d0) / t)
end if
code = z_s * tmp
end function
z_m = Math.abs(z);
z_s = Math.copySign(1.0, z);
public static double code(double z_s, double x, double y, double z_m, double t) {
double tmp;
if (y <= -1.8e+68) {
tmp = (x / z_m) * (2.0 / y);
} else if (y <= -5.5e+32) {
tmp = -2.0 * (x / (z_m * t));
} else if ((y <= -1.8e-46) || !(y <= 7.6e-28)) {
tmp = x * ((2.0 / y) / z_m);
} else {
tmp = (x / z_m) * (-2.0 / t);
}
return z_s * tmp;
}
z_m = math.fabs(z) z_s = math.copysign(1.0, z) def code(z_s, x, y, z_m, t): tmp = 0 if y <= -1.8e+68: tmp = (x / z_m) * (2.0 / y) elif y <= -5.5e+32: tmp = -2.0 * (x / (z_m * t)) elif (y <= -1.8e-46) or not (y <= 7.6e-28): tmp = x * ((2.0 / y) / z_m) else: tmp = (x / z_m) * (-2.0 / t) return z_s * tmp
z_m = abs(z) z_s = copysign(1.0, z) function code(z_s, x, y, z_m, t) tmp = 0.0 if (y <= -1.8e+68) tmp = Float64(Float64(x / z_m) * Float64(2.0 / y)); elseif (y <= -5.5e+32) tmp = Float64(-2.0 * Float64(x / Float64(z_m * t))); elseif ((y <= -1.8e-46) || !(y <= 7.6e-28)) tmp = Float64(x * Float64(Float64(2.0 / y) / z_m)); else tmp = Float64(Float64(x / z_m) * Float64(-2.0 / t)); end return Float64(z_s * tmp) end
z_m = abs(z); z_s = sign(z) * abs(1.0); function tmp_2 = code(z_s, x, y, z_m, t) tmp = 0.0; if (y <= -1.8e+68) tmp = (x / z_m) * (2.0 / y); elseif (y <= -5.5e+32) tmp = -2.0 * (x / (z_m * t)); elseif ((y <= -1.8e-46) || ~((y <= 7.6e-28))) tmp = x * ((2.0 / y) / z_m); else tmp = (x / z_m) * (-2.0 / t); end tmp_2 = z_s * tmp; end
z_m = N[Abs[z], $MachinePrecision]
z_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_, t_] := N[(z$95$s * If[LessEqual[y, -1.8e+68], N[(N[(x / z$95$m), $MachinePrecision] * N[(2.0 / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -5.5e+32], N[(-2.0 * N[(x / N[(z$95$m * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -1.8e-46], N[Not[LessEqual[y, 7.6e-28]], $MachinePrecision]], N[(x * N[(N[(2.0 / y), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(x / z$95$m), $MachinePrecision] * N[(-2.0 / t), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]
\begin{array}{l}
z_m = \left|z\right|
\\
z_s = \mathsf{copysign}\left(1, z\right)
\\
z_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -1.8 \cdot 10^{+68}:\\
\;\;\;\;\frac{x}{z_m} \cdot \frac{2}{y}\\
\mathbf{elif}\;y \leq -5.5 \cdot 10^{+32}:\\
\;\;\;\;-2 \cdot \frac{x}{z_m \cdot t}\\
\mathbf{elif}\;y \leq -1.8 \cdot 10^{-46} \lor \neg \left(y \leq 7.6 \cdot 10^{-28}\right):\\
\;\;\;\;x \cdot \frac{\frac{2}{y}}{z_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z_m} \cdot \frac{-2}{t}\\
\end{array}
\end{array}
z_m = (fabs.f64 z)
z_s = (copysign.f64 1 z)
(FPCore (z_s x y z_m t)
:precision binary64
(*
z_s
(if (<= y -1.8e+68)
(* (/ x z_m) (/ 2.0 y))
(if (<= y -4.9e+36)
(* -2.0 (/ x (* z_m t)))
(if (or (<= y -2.4e-48) (not (<= y 3.1e-24)))
(* x (/ (/ 2.0 y) z_m))
(/ -2.0 (* t (/ z_m x))))))))z_m = fabs(z);
z_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m, double t) {
double tmp;
if (y <= -1.8e+68) {
tmp = (x / z_m) * (2.0 / y);
} else if (y <= -4.9e+36) {
tmp = -2.0 * (x / (z_m * t));
} else if ((y <= -2.4e-48) || !(y <= 3.1e-24)) {
tmp = x * ((2.0 / y) / z_m);
} else {
tmp = -2.0 / (t * (z_m / x));
}
return z_s * tmp;
}
z_m = abs(z)
z_s = copysign(1.0d0, z)
real(8) function code(z_s, x, y, z_m, t)
real(8), intent (in) :: z_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z_m
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.8d+68)) then
tmp = (x / z_m) * (2.0d0 / y)
else if (y <= (-4.9d+36)) then
tmp = (-2.0d0) * (x / (z_m * t))
else if ((y <= (-2.4d-48)) .or. (.not. (y <= 3.1d-24))) then
tmp = x * ((2.0d0 / y) / z_m)
else
tmp = (-2.0d0) / (t * (z_m / x))
end if
code = z_s * tmp
end function
z_m = Math.abs(z);
z_s = Math.copySign(1.0, z);
public static double code(double z_s, double x, double y, double z_m, double t) {
double tmp;
if (y <= -1.8e+68) {
tmp = (x / z_m) * (2.0 / y);
} else if (y <= -4.9e+36) {
tmp = -2.0 * (x / (z_m * t));
} else if ((y <= -2.4e-48) || !(y <= 3.1e-24)) {
tmp = x * ((2.0 / y) / z_m);
} else {
tmp = -2.0 / (t * (z_m / x));
}
return z_s * tmp;
}
z_m = math.fabs(z) z_s = math.copysign(1.0, z) def code(z_s, x, y, z_m, t): tmp = 0 if y <= -1.8e+68: tmp = (x / z_m) * (2.0 / y) elif y <= -4.9e+36: tmp = -2.0 * (x / (z_m * t)) elif (y <= -2.4e-48) or not (y <= 3.1e-24): tmp = x * ((2.0 / y) / z_m) else: tmp = -2.0 / (t * (z_m / x)) return z_s * tmp
z_m = abs(z) z_s = copysign(1.0, z) function code(z_s, x, y, z_m, t) tmp = 0.0 if (y <= -1.8e+68) tmp = Float64(Float64(x / z_m) * Float64(2.0 / y)); elseif (y <= -4.9e+36) tmp = Float64(-2.0 * Float64(x / Float64(z_m * t))); elseif ((y <= -2.4e-48) || !(y <= 3.1e-24)) tmp = Float64(x * Float64(Float64(2.0 / y) / z_m)); else tmp = Float64(-2.0 / Float64(t * Float64(z_m / x))); end return Float64(z_s * tmp) end
z_m = abs(z); z_s = sign(z) * abs(1.0); function tmp_2 = code(z_s, x, y, z_m, t) tmp = 0.0; if (y <= -1.8e+68) tmp = (x / z_m) * (2.0 / y); elseif (y <= -4.9e+36) tmp = -2.0 * (x / (z_m * t)); elseif ((y <= -2.4e-48) || ~((y <= 3.1e-24))) tmp = x * ((2.0 / y) / z_m); else tmp = -2.0 / (t * (z_m / x)); end tmp_2 = z_s * tmp; end
z_m = N[Abs[z], $MachinePrecision]
z_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_, t_] := N[(z$95$s * If[LessEqual[y, -1.8e+68], N[(N[(x / z$95$m), $MachinePrecision] * N[(2.0 / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -4.9e+36], N[(-2.0 * N[(x / N[(z$95$m * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -2.4e-48], N[Not[LessEqual[y, 3.1e-24]], $MachinePrecision]], N[(x * N[(N[(2.0 / y), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision], N[(-2.0 / N[(t * N[(z$95$m / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]
\begin{array}{l}
z_m = \left|z\right|
\\
z_s = \mathsf{copysign}\left(1, z\right)
\\
z_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -1.8 \cdot 10^{+68}:\\
\;\;\;\;\frac{x}{z_m} \cdot \frac{2}{y}\\
\mathbf{elif}\;y \leq -4.9 \cdot 10^{+36}:\\
\;\;\;\;-2 \cdot \frac{x}{z_m \cdot t}\\
\mathbf{elif}\;y \leq -2.4 \cdot 10^{-48} \lor \neg \left(y \leq 3.1 \cdot 10^{-24}\right):\\
\;\;\;\;x \cdot \frac{\frac{2}{y}}{z_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{-2}{t \cdot \frac{z_m}{x}}\\
\end{array}
\end{array}
z_m = (fabs.f64 z)
z_s = (copysign.f64 1 z)
(FPCore (z_s x y z_m t)
:precision binary64
(let* ((t_1 (/ 2.0 (* y (/ z_m x)))))
(*
z_s
(if (<= y -2.1e+68)
t_1
(if (<= y -2.8e+36)
(* -2.0 (/ x (* z_m t)))
(if (<= y -1.22e-55)
t_1
(if (<= y 2.8e-28)
(/ -2.0 (* t (/ z_m x)))
(* x (/ (/ 2.0 y) z_m)))))))))z_m = fabs(z);
z_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m, double t) {
double t_1 = 2.0 / (y * (z_m / x));
double tmp;
if (y <= -2.1e+68) {
tmp = t_1;
} else if (y <= -2.8e+36) {
tmp = -2.0 * (x / (z_m * t));
} else if (y <= -1.22e-55) {
tmp = t_1;
} else if (y <= 2.8e-28) {
tmp = -2.0 / (t * (z_m / x));
} else {
tmp = x * ((2.0 / y) / z_m);
}
return z_s * tmp;
}
z_m = abs(z)
z_s = copysign(1.0d0, z)
real(8) function code(z_s, x, y, z_m, t)
real(8), intent (in) :: z_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z_m
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = 2.0d0 / (y * (z_m / x))
if (y <= (-2.1d+68)) then
tmp = t_1
else if (y <= (-2.8d+36)) then
tmp = (-2.0d0) * (x / (z_m * t))
else if (y <= (-1.22d-55)) then
tmp = t_1
else if (y <= 2.8d-28) then
tmp = (-2.0d0) / (t * (z_m / x))
else
tmp = x * ((2.0d0 / y) / z_m)
end if
code = z_s * tmp
end function
z_m = Math.abs(z);
z_s = Math.copySign(1.0, z);
public static double code(double z_s, double x, double y, double z_m, double t) {
double t_1 = 2.0 / (y * (z_m / x));
double tmp;
if (y <= -2.1e+68) {
tmp = t_1;
} else if (y <= -2.8e+36) {
tmp = -2.0 * (x / (z_m * t));
} else if (y <= -1.22e-55) {
tmp = t_1;
} else if (y <= 2.8e-28) {
tmp = -2.0 / (t * (z_m / x));
} else {
tmp = x * ((2.0 / y) / z_m);
}
return z_s * tmp;
}
z_m = math.fabs(z) z_s = math.copysign(1.0, z) def code(z_s, x, y, z_m, t): t_1 = 2.0 / (y * (z_m / x)) tmp = 0 if y <= -2.1e+68: tmp = t_1 elif y <= -2.8e+36: tmp = -2.0 * (x / (z_m * t)) elif y <= -1.22e-55: tmp = t_1 elif y <= 2.8e-28: tmp = -2.0 / (t * (z_m / x)) else: tmp = x * ((2.0 / y) / z_m) return z_s * tmp
z_m = abs(z) z_s = copysign(1.0, z) function code(z_s, x, y, z_m, t) t_1 = Float64(2.0 / Float64(y * Float64(z_m / x))) tmp = 0.0 if (y <= -2.1e+68) tmp = t_1; elseif (y <= -2.8e+36) tmp = Float64(-2.0 * Float64(x / Float64(z_m * t))); elseif (y <= -1.22e-55) tmp = t_1; elseif (y <= 2.8e-28) tmp = Float64(-2.0 / Float64(t * Float64(z_m / x))); else tmp = Float64(x * Float64(Float64(2.0 / y) / z_m)); end return Float64(z_s * tmp) end
z_m = abs(z); z_s = sign(z) * abs(1.0); function tmp_2 = code(z_s, x, y, z_m, t) t_1 = 2.0 / (y * (z_m / x)); tmp = 0.0; if (y <= -2.1e+68) tmp = t_1; elseif (y <= -2.8e+36) tmp = -2.0 * (x / (z_m * t)); elseif (y <= -1.22e-55) tmp = t_1; elseif (y <= 2.8e-28) tmp = -2.0 / (t * (z_m / x)); else tmp = x * ((2.0 / y) / z_m); end tmp_2 = z_s * tmp; end
z_m = N[Abs[z], $MachinePrecision]
z_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_, t_] := Block[{t$95$1 = N[(2.0 / N[(y * N[(z$95$m / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(z$95$s * If[LessEqual[y, -2.1e+68], t$95$1, If[LessEqual[y, -2.8e+36], N[(-2.0 * N[(x / N[(z$95$m * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.22e-55], t$95$1, If[LessEqual[y, 2.8e-28], N[(-2.0 / N[(t * N[(z$95$m / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(2.0 / y), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]]]]]), $MachinePrecision]]
\begin{array}{l}
z_m = \left|z\right|
\\
z_s = \mathsf{copysign}\left(1, z\right)
\\
\begin{array}{l}
t_1 := \frac{2}{y \cdot \frac{z_m}{x}}\\
z_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -2.1 \cdot 10^{+68}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -2.8 \cdot 10^{+36}:\\
\;\;\;\;-2 \cdot \frac{x}{z_m \cdot t}\\
\mathbf{elif}\;y \leq -1.22 \cdot 10^{-55}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{-28}:\\
\;\;\;\;\frac{-2}{t \cdot \frac{z_m}{x}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{\frac{2}{y}}{z_m}\\
\end{array}
\end{array}
\end{array}
z_m = (fabs.f64 z)
z_s = (copysign.f64 1 z)
(FPCore (z_s x y z_m t)
:precision binary64
(let* ((t_1 (/ 2.0 (* y (/ z_m x)))))
(*
z_s
(if (<= y -1.8e+68)
t_1
(if (<= y -4.5e+36)
(* -2.0 (/ x (* z_m t)))
(if (<= y -2.05e-51)
t_1
(if (<= y 7.6e-28)
(/ (/ -2.0 t) (/ z_m x))
(* x (/ (/ 2.0 y) z_m)))))))))z_m = fabs(z);
z_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m, double t) {
double t_1 = 2.0 / (y * (z_m / x));
double tmp;
if (y <= -1.8e+68) {
tmp = t_1;
} else if (y <= -4.5e+36) {
tmp = -2.0 * (x / (z_m * t));
} else if (y <= -2.05e-51) {
tmp = t_1;
} else if (y <= 7.6e-28) {
tmp = (-2.0 / t) / (z_m / x);
} else {
tmp = x * ((2.0 / y) / z_m);
}
return z_s * tmp;
}
z_m = abs(z)
z_s = copysign(1.0d0, z)
real(8) function code(z_s, x, y, z_m, t)
real(8), intent (in) :: z_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z_m
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = 2.0d0 / (y * (z_m / x))
if (y <= (-1.8d+68)) then
tmp = t_1
else if (y <= (-4.5d+36)) then
tmp = (-2.0d0) * (x / (z_m * t))
else if (y <= (-2.05d-51)) then
tmp = t_1
else if (y <= 7.6d-28) then
tmp = ((-2.0d0) / t) / (z_m / x)
else
tmp = x * ((2.0d0 / y) / z_m)
end if
code = z_s * tmp
end function
z_m = Math.abs(z);
z_s = Math.copySign(1.0, z);
public static double code(double z_s, double x, double y, double z_m, double t) {
double t_1 = 2.0 / (y * (z_m / x));
double tmp;
if (y <= -1.8e+68) {
tmp = t_1;
} else if (y <= -4.5e+36) {
tmp = -2.0 * (x / (z_m * t));
} else if (y <= -2.05e-51) {
tmp = t_1;
} else if (y <= 7.6e-28) {
tmp = (-2.0 / t) / (z_m / x);
} else {
tmp = x * ((2.0 / y) / z_m);
}
return z_s * tmp;
}
z_m = math.fabs(z) z_s = math.copysign(1.0, z) def code(z_s, x, y, z_m, t): t_1 = 2.0 / (y * (z_m / x)) tmp = 0 if y <= -1.8e+68: tmp = t_1 elif y <= -4.5e+36: tmp = -2.0 * (x / (z_m * t)) elif y <= -2.05e-51: tmp = t_1 elif y <= 7.6e-28: tmp = (-2.0 / t) / (z_m / x) else: tmp = x * ((2.0 / y) / z_m) return z_s * tmp
z_m = abs(z) z_s = copysign(1.0, z) function code(z_s, x, y, z_m, t) t_1 = Float64(2.0 / Float64(y * Float64(z_m / x))) tmp = 0.0 if (y <= -1.8e+68) tmp = t_1; elseif (y <= -4.5e+36) tmp = Float64(-2.0 * Float64(x / Float64(z_m * t))); elseif (y <= -2.05e-51) tmp = t_1; elseif (y <= 7.6e-28) tmp = Float64(Float64(-2.0 / t) / Float64(z_m / x)); else tmp = Float64(x * Float64(Float64(2.0 / y) / z_m)); end return Float64(z_s * tmp) end
z_m = abs(z); z_s = sign(z) * abs(1.0); function tmp_2 = code(z_s, x, y, z_m, t) t_1 = 2.0 / (y * (z_m / x)); tmp = 0.0; if (y <= -1.8e+68) tmp = t_1; elseif (y <= -4.5e+36) tmp = -2.0 * (x / (z_m * t)); elseif (y <= -2.05e-51) tmp = t_1; elseif (y <= 7.6e-28) tmp = (-2.0 / t) / (z_m / x); else tmp = x * ((2.0 / y) / z_m); end tmp_2 = z_s * tmp; end
z_m = N[Abs[z], $MachinePrecision]
z_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_, t_] := Block[{t$95$1 = N[(2.0 / N[(y * N[(z$95$m / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(z$95$s * If[LessEqual[y, -1.8e+68], t$95$1, If[LessEqual[y, -4.5e+36], N[(-2.0 * N[(x / N[(z$95$m * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.05e-51], t$95$1, If[LessEqual[y, 7.6e-28], N[(N[(-2.0 / t), $MachinePrecision] / N[(z$95$m / x), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(2.0 / y), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]]]]]), $MachinePrecision]]
\begin{array}{l}
z_m = \left|z\right|
\\
z_s = \mathsf{copysign}\left(1, z\right)
\\
\begin{array}{l}
t_1 := \frac{2}{y \cdot \frac{z_m}{x}}\\
z_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -1.8 \cdot 10^{+68}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -4.5 \cdot 10^{+36}:\\
\;\;\;\;-2 \cdot \frac{x}{z_m \cdot t}\\
\mathbf{elif}\;y \leq -2.05 \cdot 10^{-51}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 7.6 \cdot 10^{-28}:\\
\;\;\;\;\frac{\frac{-2}{t}}{\frac{z_m}{x}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{\frac{2}{y}}{z_m}\\
\end{array}
\end{array}
\end{array}
z_m = (fabs.f64 z)
z_s = (copysign.f64 1 z)
(FPCore (z_s x y z_m t)
:precision binary64
(let* ((t_1 (/ 2.0 (* y (/ z_m x)))))
(*
z_s
(if (<= y -1.8e+68)
t_1
(if (<= y -5.5e+34)
(/ (/ x z_m) (* t -0.5))
(if (<= y -9e-48)
t_1
(if (<= y 1.05e-30)
(/ (/ -2.0 t) (/ z_m x))
(* x (/ (/ 2.0 y) z_m)))))))))z_m = fabs(z);
z_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m, double t) {
double t_1 = 2.0 / (y * (z_m / x));
double tmp;
if (y <= -1.8e+68) {
tmp = t_1;
} else if (y <= -5.5e+34) {
tmp = (x / z_m) / (t * -0.5);
} else if (y <= -9e-48) {
tmp = t_1;
} else if (y <= 1.05e-30) {
tmp = (-2.0 / t) / (z_m / x);
} else {
tmp = x * ((2.0 / y) / z_m);
}
return z_s * tmp;
}
z_m = abs(z)
z_s = copysign(1.0d0, z)
real(8) function code(z_s, x, y, z_m, t)
real(8), intent (in) :: z_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z_m
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = 2.0d0 / (y * (z_m / x))
if (y <= (-1.8d+68)) then
tmp = t_1
else if (y <= (-5.5d+34)) then
tmp = (x / z_m) / (t * (-0.5d0))
else if (y <= (-9d-48)) then
tmp = t_1
else if (y <= 1.05d-30) then
tmp = ((-2.0d0) / t) / (z_m / x)
else
tmp = x * ((2.0d0 / y) / z_m)
end if
code = z_s * tmp
end function
z_m = Math.abs(z);
z_s = Math.copySign(1.0, z);
public static double code(double z_s, double x, double y, double z_m, double t) {
double t_1 = 2.0 / (y * (z_m / x));
double tmp;
if (y <= -1.8e+68) {
tmp = t_1;
} else if (y <= -5.5e+34) {
tmp = (x / z_m) / (t * -0.5);
} else if (y <= -9e-48) {
tmp = t_1;
} else if (y <= 1.05e-30) {
tmp = (-2.0 / t) / (z_m / x);
} else {
tmp = x * ((2.0 / y) / z_m);
}
return z_s * tmp;
}
z_m = math.fabs(z) z_s = math.copysign(1.0, z) def code(z_s, x, y, z_m, t): t_1 = 2.0 / (y * (z_m / x)) tmp = 0 if y <= -1.8e+68: tmp = t_1 elif y <= -5.5e+34: tmp = (x / z_m) / (t * -0.5) elif y <= -9e-48: tmp = t_1 elif y <= 1.05e-30: tmp = (-2.0 / t) / (z_m / x) else: tmp = x * ((2.0 / y) / z_m) return z_s * tmp
z_m = abs(z) z_s = copysign(1.0, z) function code(z_s, x, y, z_m, t) t_1 = Float64(2.0 / Float64(y * Float64(z_m / x))) tmp = 0.0 if (y <= -1.8e+68) tmp = t_1; elseif (y <= -5.5e+34) tmp = Float64(Float64(x / z_m) / Float64(t * -0.5)); elseif (y <= -9e-48) tmp = t_1; elseif (y <= 1.05e-30) tmp = Float64(Float64(-2.0 / t) / Float64(z_m / x)); else tmp = Float64(x * Float64(Float64(2.0 / y) / z_m)); end return Float64(z_s * tmp) end
z_m = abs(z); z_s = sign(z) * abs(1.0); function tmp_2 = code(z_s, x, y, z_m, t) t_1 = 2.0 / (y * (z_m / x)); tmp = 0.0; if (y <= -1.8e+68) tmp = t_1; elseif (y <= -5.5e+34) tmp = (x / z_m) / (t * -0.5); elseif (y <= -9e-48) tmp = t_1; elseif (y <= 1.05e-30) tmp = (-2.0 / t) / (z_m / x); else tmp = x * ((2.0 / y) / z_m); end tmp_2 = z_s * tmp; end
z_m = N[Abs[z], $MachinePrecision]
z_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_, t_] := Block[{t$95$1 = N[(2.0 / N[(y * N[(z$95$m / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(z$95$s * If[LessEqual[y, -1.8e+68], t$95$1, If[LessEqual[y, -5.5e+34], N[(N[(x / z$95$m), $MachinePrecision] / N[(t * -0.5), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -9e-48], t$95$1, If[LessEqual[y, 1.05e-30], N[(N[(-2.0 / t), $MachinePrecision] / N[(z$95$m / x), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(2.0 / y), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]]]]]), $MachinePrecision]]
\begin{array}{l}
z_m = \left|z\right|
\\
z_s = \mathsf{copysign}\left(1, z\right)
\\
\begin{array}{l}
t_1 := \frac{2}{y \cdot \frac{z_m}{x}}\\
z_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -1.8 \cdot 10^{+68}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -5.5 \cdot 10^{+34}:\\
\;\;\;\;\frac{\frac{x}{z_m}}{t \cdot -0.5}\\
\mathbf{elif}\;y \leq -9 \cdot 10^{-48}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.05 \cdot 10^{-30}:\\
\;\;\;\;\frac{\frac{-2}{t}}{\frac{z_m}{x}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{\frac{2}{y}}{z_m}\\
\end{array}
\end{array}
\end{array}
z_m = (fabs.f64 z)
z_s = (copysign.f64 1 z)
(FPCore (z_s x y z_m t)
:precision binary64
(*
z_s
(if (<= y -1.95e+77)
(/ (/ (* x 2.0) z_m) y)
(if (<= y -5e+36)
(/ (/ x z_m) (* t -0.5))
(if (<= y -8e-52)
(/ 2.0 (* y (/ z_m x)))
(if (<= y 1.45e-27)
(/ (/ -2.0 t) (/ z_m x))
(* x (/ (/ 2.0 y) z_m))))))))z_m = fabs(z);
z_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m, double t) {
double tmp;
if (y <= -1.95e+77) {
tmp = ((x * 2.0) / z_m) / y;
} else if (y <= -5e+36) {
tmp = (x / z_m) / (t * -0.5);
} else if (y <= -8e-52) {
tmp = 2.0 / (y * (z_m / x));
} else if (y <= 1.45e-27) {
tmp = (-2.0 / t) / (z_m / x);
} else {
tmp = x * ((2.0 / y) / z_m);
}
return z_s * tmp;
}
z_m = abs(z)
z_s = copysign(1.0d0, z)
real(8) function code(z_s, x, y, z_m, t)
real(8), intent (in) :: z_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z_m
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.95d+77)) then
tmp = ((x * 2.0d0) / z_m) / y
else if (y <= (-5d+36)) then
tmp = (x / z_m) / (t * (-0.5d0))
else if (y <= (-8d-52)) then
tmp = 2.0d0 / (y * (z_m / x))
else if (y <= 1.45d-27) then
tmp = ((-2.0d0) / t) / (z_m / x)
else
tmp = x * ((2.0d0 / y) / z_m)
end if
code = z_s * tmp
end function
z_m = Math.abs(z);
z_s = Math.copySign(1.0, z);
public static double code(double z_s, double x, double y, double z_m, double t) {
double tmp;
if (y <= -1.95e+77) {
tmp = ((x * 2.0) / z_m) / y;
} else if (y <= -5e+36) {
tmp = (x / z_m) / (t * -0.5);
} else if (y <= -8e-52) {
tmp = 2.0 / (y * (z_m / x));
} else if (y <= 1.45e-27) {
tmp = (-2.0 / t) / (z_m / x);
} else {
tmp = x * ((2.0 / y) / z_m);
}
return z_s * tmp;
}
z_m = math.fabs(z) z_s = math.copysign(1.0, z) def code(z_s, x, y, z_m, t): tmp = 0 if y <= -1.95e+77: tmp = ((x * 2.0) / z_m) / y elif y <= -5e+36: tmp = (x / z_m) / (t * -0.5) elif y <= -8e-52: tmp = 2.0 / (y * (z_m / x)) elif y <= 1.45e-27: tmp = (-2.0 / t) / (z_m / x) else: tmp = x * ((2.0 / y) / z_m) return z_s * tmp
z_m = abs(z) z_s = copysign(1.0, z) function code(z_s, x, y, z_m, t) tmp = 0.0 if (y <= -1.95e+77) tmp = Float64(Float64(Float64(x * 2.0) / z_m) / y); elseif (y <= -5e+36) tmp = Float64(Float64(x / z_m) / Float64(t * -0.5)); elseif (y <= -8e-52) tmp = Float64(2.0 / Float64(y * Float64(z_m / x))); elseif (y <= 1.45e-27) tmp = Float64(Float64(-2.0 / t) / Float64(z_m / x)); else tmp = Float64(x * Float64(Float64(2.0 / y) / z_m)); end return Float64(z_s * tmp) end
z_m = abs(z); z_s = sign(z) * abs(1.0); function tmp_2 = code(z_s, x, y, z_m, t) tmp = 0.0; if (y <= -1.95e+77) tmp = ((x * 2.0) / z_m) / y; elseif (y <= -5e+36) tmp = (x / z_m) / (t * -0.5); elseif (y <= -8e-52) tmp = 2.0 / (y * (z_m / x)); elseif (y <= 1.45e-27) tmp = (-2.0 / t) / (z_m / x); else tmp = x * ((2.0 / y) / z_m); end tmp_2 = z_s * tmp; end
z_m = N[Abs[z], $MachinePrecision]
z_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_, t_] := N[(z$95$s * If[LessEqual[y, -1.95e+77], N[(N[(N[(x * 2.0), $MachinePrecision] / z$95$m), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, -5e+36], N[(N[(x / z$95$m), $MachinePrecision] / N[(t * -0.5), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -8e-52], N[(2.0 / N[(y * N[(z$95$m / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.45e-27], N[(N[(-2.0 / t), $MachinePrecision] / N[(z$95$m / x), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(2.0 / y), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]]]]]), $MachinePrecision]
\begin{array}{l}
z_m = \left|z\right|
\\
z_s = \mathsf{copysign}\left(1, z\right)
\\
z_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -1.95 \cdot 10^{+77}:\\
\;\;\;\;\frac{\frac{x \cdot 2}{z_m}}{y}\\
\mathbf{elif}\;y \leq -5 \cdot 10^{+36}:\\
\;\;\;\;\frac{\frac{x}{z_m}}{t \cdot -0.5}\\
\mathbf{elif}\;y \leq -8 \cdot 10^{-52}:\\
\;\;\;\;\frac{2}{y \cdot \frac{z_m}{x}}\\
\mathbf{elif}\;y \leq 1.45 \cdot 10^{-27}:\\
\;\;\;\;\frac{\frac{-2}{t}}{\frac{z_m}{x}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{\frac{2}{y}}{z_m}\\
\end{array}
\end{array}
z_m = (fabs.f64 z)
z_s = (copysign.f64 1 z)
(FPCore (z_s x y z_m t)
:precision binary64
(*
z_s
(if (or (<= t -1.4e-128) (not (<= t 2.32e+52)))
(* -2.0 (/ x (* z_m t)))
(* x (/ (/ 2.0 y) z_m)))))z_m = fabs(z);
z_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m, double t) {
double tmp;
if ((t <= -1.4e-128) || !(t <= 2.32e+52)) {
tmp = -2.0 * (x / (z_m * t));
} else {
tmp = x * ((2.0 / y) / z_m);
}
return z_s * tmp;
}
z_m = abs(z)
z_s = copysign(1.0d0, z)
real(8) function code(z_s, x, y, z_m, t)
real(8), intent (in) :: z_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z_m
real(8), intent (in) :: t
real(8) :: tmp
if ((t <= (-1.4d-128)) .or. (.not. (t <= 2.32d+52))) then
tmp = (-2.0d0) * (x / (z_m * t))
else
tmp = x * ((2.0d0 / y) / z_m)
end if
code = z_s * tmp
end function
z_m = Math.abs(z);
z_s = Math.copySign(1.0, z);
public static double code(double z_s, double x, double y, double z_m, double t) {
double tmp;
if ((t <= -1.4e-128) || !(t <= 2.32e+52)) {
tmp = -2.0 * (x / (z_m * t));
} else {
tmp = x * ((2.0 / y) / z_m);
}
return z_s * tmp;
}
z_m = math.fabs(z) z_s = math.copysign(1.0, z) def code(z_s, x, y, z_m, t): tmp = 0 if (t <= -1.4e-128) or not (t <= 2.32e+52): tmp = -2.0 * (x / (z_m * t)) else: tmp = x * ((2.0 / y) / z_m) return z_s * tmp
z_m = abs(z) z_s = copysign(1.0, z) function code(z_s, x, y, z_m, t) tmp = 0.0 if ((t <= -1.4e-128) || !(t <= 2.32e+52)) tmp = Float64(-2.0 * Float64(x / Float64(z_m * t))); else tmp = Float64(x * Float64(Float64(2.0 / y) / z_m)); end return Float64(z_s * tmp) end
z_m = abs(z); z_s = sign(z) * abs(1.0); function tmp_2 = code(z_s, x, y, z_m, t) tmp = 0.0; if ((t <= -1.4e-128) || ~((t <= 2.32e+52))) tmp = -2.0 * (x / (z_m * t)); else tmp = x * ((2.0 / y) / z_m); end tmp_2 = z_s * tmp; end
z_m = N[Abs[z], $MachinePrecision]
z_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_, t_] := N[(z$95$s * If[Or[LessEqual[t, -1.4e-128], N[Not[LessEqual[t, 2.32e+52]], $MachinePrecision]], N[(-2.0 * N[(x / N[(z$95$m * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(2.0 / y), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
z_m = \left|z\right|
\\
z_s = \mathsf{copysign}\left(1, z\right)
\\
z_s \cdot \begin{array}{l}
\mathbf{if}\;t \leq -1.4 \cdot 10^{-128} \lor \neg \left(t \leq 2.32 \cdot 10^{+52}\right):\\
\;\;\;\;-2 \cdot \frac{x}{z_m \cdot t}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{\frac{2}{y}}{z_m}\\
\end{array}
\end{array}
z_m = (fabs.f64 z) z_s = (copysign.f64 1 z) (FPCore (z_s x y z_m t) :precision binary64 (let* ((t_1 (/ 2.0 (- y t)))) (* z_s (if (<= z_m 1.24e+104) (* x (/ t_1 z_m)) (* (/ x z_m) t_1)))))
z_m = fabs(z);
z_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m, double t) {
double t_1 = 2.0 / (y - t);
double tmp;
if (z_m <= 1.24e+104) {
tmp = x * (t_1 / z_m);
} else {
tmp = (x / z_m) * t_1;
}
return z_s * tmp;
}
z_m = abs(z)
z_s = copysign(1.0d0, z)
real(8) function code(z_s, x, y, z_m, t)
real(8), intent (in) :: z_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z_m
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = 2.0d0 / (y - t)
if (z_m <= 1.24d+104) then
tmp = x * (t_1 / z_m)
else
tmp = (x / z_m) * t_1
end if
code = z_s * tmp
end function
z_m = Math.abs(z);
z_s = Math.copySign(1.0, z);
public static double code(double z_s, double x, double y, double z_m, double t) {
double t_1 = 2.0 / (y - t);
double tmp;
if (z_m <= 1.24e+104) {
tmp = x * (t_1 / z_m);
} else {
tmp = (x / z_m) * t_1;
}
return z_s * tmp;
}
z_m = math.fabs(z) z_s = math.copysign(1.0, z) def code(z_s, x, y, z_m, t): t_1 = 2.0 / (y - t) tmp = 0 if z_m <= 1.24e+104: tmp = x * (t_1 / z_m) else: tmp = (x / z_m) * t_1 return z_s * tmp
z_m = abs(z) z_s = copysign(1.0, z) function code(z_s, x, y, z_m, t) t_1 = Float64(2.0 / Float64(y - t)) tmp = 0.0 if (z_m <= 1.24e+104) tmp = Float64(x * Float64(t_1 / z_m)); else tmp = Float64(Float64(x / z_m) * t_1); end return Float64(z_s * tmp) end
z_m = abs(z); z_s = sign(z) * abs(1.0); function tmp_2 = code(z_s, x, y, z_m, t) t_1 = 2.0 / (y - t); tmp = 0.0; if (z_m <= 1.24e+104) tmp = x * (t_1 / z_m); else tmp = (x / z_m) * t_1; end tmp_2 = z_s * tmp; end
z_m = N[Abs[z], $MachinePrecision]
z_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_, t_] := Block[{t$95$1 = N[(2.0 / N[(y - t), $MachinePrecision]), $MachinePrecision]}, N[(z$95$s * If[LessEqual[z$95$m, 1.24e+104], N[(x * N[(t$95$1 / z$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(x / z$95$m), $MachinePrecision] * t$95$1), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
z_m = \left|z\right|
\\
z_s = \mathsf{copysign}\left(1, z\right)
\\
\begin{array}{l}
t_1 := \frac{2}{y - t}\\
z_s \cdot \begin{array}{l}
\mathbf{if}\;z_m \leq 1.24 \cdot 10^{+104}:\\
\;\;\;\;x \cdot \frac{t_1}{z_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z_m} \cdot t_1\\
\end{array}
\end{array}
\end{array}
z_m = (fabs.f64 z)
z_s = (copysign.f64 1 z)
(FPCore (z_s x y z_m t)
:precision binary64
(*
z_s
(if (<= z_m 4.2e+103)
(/ (* x 2.0) (* z_m (- y t)))
(* (/ x z_m) (/ 2.0 (- y t))))))z_m = fabs(z);
z_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m, double t) {
double tmp;
if (z_m <= 4.2e+103) {
tmp = (x * 2.0) / (z_m * (y - t));
} else {
tmp = (x / z_m) * (2.0 / (y - t));
}
return z_s * tmp;
}
z_m = abs(z)
z_s = copysign(1.0d0, z)
real(8) function code(z_s, x, y, z_m, t)
real(8), intent (in) :: z_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z_m
real(8), intent (in) :: t
real(8) :: tmp
if (z_m <= 4.2d+103) then
tmp = (x * 2.0d0) / (z_m * (y - t))
else
tmp = (x / z_m) * (2.0d0 / (y - t))
end if
code = z_s * tmp
end function
z_m = Math.abs(z);
z_s = Math.copySign(1.0, z);
public static double code(double z_s, double x, double y, double z_m, double t) {
double tmp;
if (z_m <= 4.2e+103) {
tmp = (x * 2.0) / (z_m * (y - t));
} else {
tmp = (x / z_m) * (2.0 / (y - t));
}
return z_s * tmp;
}
z_m = math.fabs(z) z_s = math.copysign(1.0, z) def code(z_s, x, y, z_m, t): tmp = 0 if z_m <= 4.2e+103: tmp = (x * 2.0) / (z_m * (y - t)) else: tmp = (x / z_m) * (2.0 / (y - t)) return z_s * tmp
z_m = abs(z) z_s = copysign(1.0, z) function code(z_s, x, y, z_m, t) tmp = 0.0 if (z_m <= 4.2e+103) tmp = Float64(Float64(x * 2.0) / Float64(z_m * Float64(y - t))); else tmp = Float64(Float64(x / z_m) * Float64(2.0 / Float64(y - t))); end return Float64(z_s * tmp) end
z_m = abs(z); z_s = sign(z) * abs(1.0); function tmp_2 = code(z_s, x, y, z_m, t) tmp = 0.0; if (z_m <= 4.2e+103) tmp = (x * 2.0) / (z_m * (y - t)); else tmp = (x / z_m) * (2.0 / (y - t)); end tmp_2 = z_s * tmp; end
z_m = N[Abs[z], $MachinePrecision]
z_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_, t_] := N[(z$95$s * If[LessEqual[z$95$m, 4.2e+103], N[(N[(x * 2.0), $MachinePrecision] / N[(z$95$m * N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / z$95$m), $MachinePrecision] * N[(2.0 / N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
z_m = \left|z\right|
\\
z_s = \mathsf{copysign}\left(1, z\right)
\\
z_s \cdot \begin{array}{l}
\mathbf{if}\;z_m \leq 4.2 \cdot 10^{+103}:\\
\;\;\;\;\frac{x \cdot 2}{z_m \cdot \left(y - t\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z_m} \cdot \frac{2}{y - t}\\
\end{array}
\end{array}
z_m = (fabs.f64 z) z_s = (copysign.f64 1 z) (FPCore (z_s x y z_m t) :precision binary64 (* z_s (* x (/ (/ 2.0 (- y t)) z_m))))
z_m = fabs(z);
z_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m, double t) {
return z_s * (x * ((2.0 / (y - t)) / z_m));
}
z_m = abs(z)
z_s = copysign(1.0d0, z)
real(8) function code(z_s, x, y, z_m, t)
real(8), intent (in) :: z_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z_m
real(8), intent (in) :: t
code = z_s * (x * ((2.0d0 / (y - t)) / z_m))
end function
z_m = Math.abs(z);
z_s = Math.copySign(1.0, z);
public static double code(double z_s, double x, double y, double z_m, double t) {
return z_s * (x * ((2.0 / (y - t)) / z_m));
}
z_m = math.fabs(z) z_s = math.copysign(1.0, z) def code(z_s, x, y, z_m, t): return z_s * (x * ((2.0 / (y - t)) / z_m))
z_m = abs(z) z_s = copysign(1.0, z) function code(z_s, x, y, z_m, t) return Float64(z_s * Float64(x * Float64(Float64(2.0 / Float64(y - t)) / z_m))) end
z_m = abs(z); z_s = sign(z) * abs(1.0); function tmp = code(z_s, x, y, z_m, t) tmp = z_s * (x * ((2.0 / (y - t)) / z_m)); end
z_m = N[Abs[z], $MachinePrecision]
z_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_, t_] := N[(z$95$s * N[(x * N[(N[(2.0 / N[(y - t), $MachinePrecision]), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
z_m = \left|z\right|
\\
z_s = \mathsf{copysign}\left(1, z\right)
\\
z_s \cdot \left(x \cdot \frac{\frac{2}{y - t}}{z_m}\right)
\end{array}
z_m = (fabs.f64 z) z_s = (copysign.f64 1 z) (FPCore (z_s x y z_m t) :precision binary64 (* z_s (* -2.0 (/ x (* z_m t)))))
z_m = fabs(z);
z_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m, double t) {
return z_s * (-2.0 * (x / (z_m * t)));
}
z_m = abs(z)
z_s = copysign(1.0d0, z)
real(8) function code(z_s, x, y, z_m, t)
real(8), intent (in) :: z_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z_m
real(8), intent (in) :: t
code = z_s * ((-2.0d0) * (x / (z_m * t)))
end function
z_m = Math.abs(z);
z_s = Math.copySign(1.0, z);
public static double code(double z_s, double x, double y, double z_m, double t) {
return z_s * (-2.0 * (x / (z_m * t)));
}
z_m = math.fabs(z) z_s = math.copysign(1.0, z) def code(z_s, x, y, z_m, t): return z_s * (-2.0 * (x / (z_m * t)))
z_m = abs(z) z_s = copysign(1.0, z) function code(z_s, x, y, z_m, t) return Float64(z_s * Float64(-2.0 * Float64(x / Float64(z_m * t)))) end
z_m = abs(z); z_s = sign(z) * abs(1.0); function tmp = code(z_s, x, y, z_m, t) tmp = z_s * (-2.0 * (x / (z_m * t))); end
z_m = N[Abs[z], $MachinePrecision]
z_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_, t_] := N[(z$95$s * N[(-2.0 * N[(x / N[(z$95$m * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
z_m = \left|z\right|
\\
z_s = \mathsf{copysign}\left(1, z\right)
\\
z_s \cdot \left(-2 \cdot \frac{x}{z_m \cdot t}\right)
\end{array}
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (/ x (* (- y t) z)) 2.0))
(t_2 (/ (* x 2.0) (- (* y z) (* t z)))))
(if (< t_2 -2.559141628295061e-13)
t_1
(if (< t_2 1.045027827330126e-269) (/ (* (/ x z) 2.0) (- y t)) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = (x / ((y - t) * z)) * 2.0;
double t_2 = (x * 2.0) / ((y * z) - (t * z));
double tmp;
if (t_2 < -2.559141628295061e-13) {
tmp = t_1;
} else if (t_2 < 1.045027827330126e-269) {
tmp = ((x / z) * 2.0) / (y - t);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (x / ((y - t) * z)) * 2.0d0
t_2 = (x * 2.0d0) / ((y * z) - (t * z))
if (t_2 < (-2.559141628295061d-13)) then
tmp = t_1
else if (t_2 < 1.045027827330126d-269) then
tmp = ((x / z) * 2.0d0) / (y - t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x / ((y - t) * z)) * 2.0;
double t_2 = (x * 2.0) / ((y * z) - (t * z));
double tmp;
if (t_2 < -2.559141628295061e-13) {
tmp = t_1;
} else if (t_2 < 1.045027827330126e-269) {
tmp = ((x / z) * 2.0) / (y - t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x / ((y - t) * z)) * 2.0 t_2 = (x * 2.0) / ((y * z) - (t * z)) tmp = 0 if t_2 < -2.559141628295061e-13: tmp = t_1 elif t_2 < 1.045027827330126e-269: tmp = ((x / z) * 2.0) / (y - t) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x / Float64(Float64(y - t) * z)) * 2.0) t_2 = Float64(Float64(x * 2.0) / Float64(Float64(y * z) - Float64(t * z))) tmp = 0.0 if (t_2 < -2.559141628295061e-13) tmp = t_1; elseif (t_2 < 1.045027827330126e-269) tmp = Float64(Float64(Float64(x / z) * 2.0) / Float64(y - t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x / ((y - t) * z)) * 2.0; t_2 = (x * 2.0) / ((y * z) - (t * z)); tmp = 0.0; if (t_2 < -2.559141628295061e-13) tmp = t_1; elseif (t_2 < 1.045027827330126e-269) tmp = ((x / z) * 2.0) / (y - t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / N[(N[(y - t), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * 2.0), $MachinePrecision] / N[(N[(y * z), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$2, -2.559141628295061e-13], t$95$1, If[Less[t$95$2, 1.045027827330126e-269], N[(N[(N[(x / z), $MachinePrecision] * 2.0), $MachinePrecision] / N[(y - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\left(y - t\right) \cdot z} \cdot 2\\
t_2 := \frac{x \cdot 2}{y \cdot z - t \cdot z}\\
\mathbf{if}\;t_2 < -2.559141628295061 \cdot 10^{-13}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_2 < 1.045027827330126 \cdot 10^{-269}:\\
\;\;\;\;\frac{\frac{x}{z} \cdot 2}{y - t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
herbie shell --seed 2023347
(FPCore (x y z t)
:name "Linear.Projection:infinitePerspective from linear-1.19.1.3, A"
:precision binary64
:herbie-target
(if (< (/ (* x 2.0) (- (* y z) (* t z))) -2.559141628295061e-13) (* (/ x (* (- y t) z)) 2.0) (if (< (/ (* x 2.0) (- (* y z) (* t z))) 1.045027827330126e-269) (/ (* (/ x z) 2.0) (- y t)) (* (/ x (* (- y t) z)) 2.0)))
(/ (* x 2.0) (- (* y z) (* t z))))