
(FPCore (x y z t) :precision binary64 (* (- (* x y) (* z y)) t))
double code(double x, double y, double z, double t) {
return ((x * y) - (z * y)) * t;
}
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 * y) - (z * y)) * t
end function
public static double code(double x, double y, double z, double t) {
return ((x * y) - (z * y)) * t;
}
def code(x, y, z, t): return ((x * y) - (z * y)) * t
function code(x, y, z, t) return Float64(Float64(Float64(x * y) - Float64(z * y)) * t) end
function tmp = code(x, y, z, t) tmp = ((x * y) - (z * y)) * t; end
code[x_, y_, z_, t_] := N[(N[(N[(x * y), $MachinePrecision] - N[(z * y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot y - z \cdot y\right) \cdot t
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 9 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (* (- (* x y) (* z y)) t))
double code(double x, double y, double z, double t) {
return ((x * y) - (z * y)) * t;
}
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 * y) - (z * y)) * t
end function
public static double code(double x, double y, double z, double t) {
return ((x * y) - (z * y)) * t;
}
def code(x, y, z, t): return ((x * y) - (z * y)) * t
function code(x, y, z, t) return Float64(Float64(Float64(x * y) - Float64(z * y)) * t) end
function tmp = code(x, y, z, t) tmp = ((x * y) - (z * y)) * t; end
code[x_, y_, z_, t_] := N[(N[(N[(x * y), $MachinePrecision] - N[(z * y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot y - z \cdot y\right) \cdot t
\end{array}
y_m = (fabs.f64 y)
y_s = (copysign.f64 1 y)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
NOTE: x, y_m, z, and t_m should be sorted in increasing order before calling this function.
(FPCore (t_s y_s x y_m z t_m)
:precision binary64
(let* ((t_2 (- (* x y_m) (* y_m z))))
(*
t_s
(*
y_s
(if (or (<= t_2 -1e-118) (not (<= t_2 2e-173)))
(* (fma y_m x (* y_m (- z))) t_m)
(* (- x z) (* y_m t_m)))))))y_m = fabs(y);
y_s = copysign(1.0, y);
t_m = fabs(t);
t_s = copysign(1.0, t);
assert(x < y_m && y_m < z && z < t_m);
double code(double t_s, double y_s, double x, double y_m, double z, double t_m) {
double t_2 = (x * y_m) - (y_m * z);
double tmp;
if ((t_2 <= -1e-118) || !(t_2 <= 2e-173)) {
tmp = fma(y_m, x, (y_m * -z)) * t_m;
} else {
tmp = (x - z) * (y_m * t_m);
}
return t_s * (y_s * tmp);
}
y_m = abs(y) y_s = copysign(1.0, y) t_m = abs(t) t_s = copysign(1.0, t) x, y_m, z, t_m = sort([x, y_m, z, t_m]) function code(t_s, y_s, x, y_m, z, t_m) t_2 = Float64(Float64(x * y_m) - Float64(y_m * z)) tmp = 0.0 if ((t_2 <= -1e-118) || !(t_2 <= 2e-173)) tmp = Float64(fma(y_m, x, Float64(y_m * Float64(-z))) * t_m); else tmp = Float64(Float64(x - z) * Float64(y_m * t_m)); end return Float64(t_s * Float64(y_s * tmp)) end
y_m = N[Abs[y], $MachinePrecision]
y_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y_m, z, and t_m should be sorted in increasing order before calling this function.
code[t$95$s_, y$95$s_, x_, y$95$m_, z_, t$95$m_] := Block[{t$95$2 = N[(N[(x * y$95$m), $MachinePrecision] - N[(y$95$m * z), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * N[(y$95$s * If[Or[LessEqual[t$95$2, -1e-118], N[Not[LessEqual[t$95$2, 2e-173]], $MachinePrecision]], N[(N[(y$95$m * x + N[(y$95$m * (-z)), $MachinePrecision]), $MachinePrecision] * t$95$m), $MachinePrecision], N[(N[(x - z), $MachinePrecision] * N[(y$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
y_m = \left|y\right|
\\
y_s = \mathsf{copysign}\left(1, y\right)
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
[x, y_m, z, t_m] = \mathsf{sort}([x, y_m, z, t_m])\\
\\
\begin{array}{l}
t_2 := x \cdot y_m - y_m \cdot z\\
t_s \cdot \left(y_s \cdot \begin{array}{l}
\mathbf{if}\;t_2 \leq -1 \cdot 10^{-118} \lor \neg \left(t_2 \leq 2 \cdot 10^{-173}\right):\\
\;\;\;\;\mathsf{fma}\left(y_m, x, y_m \cdot \left(-z\right)\right) \cdot t_m\\
\mathbf{else}:\\
\;\;\;\;\left(x - z\right) \cdot \left(y_m \cdot t_m\right)\\
\end{array}\right)
\end{array}
\end{array}
y_m = (fabs.f64 y)
y_s = (copysign.f64 1 y)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
NOTE: x, y_m, z, and t_m should be sorted in increasing order before calling this function.
(FPCore (t_s y_s x y_m z t_m)
:precision binary64
(let* ((t_2 (- (* x y_m) (* y_m z))))
(*
t_s
(*
y_s
(if (or (<= t_2 -1e-118) (not (<= t_2 2e-173)))
(* t_m (* y_m (- x z)))
(* (- x z) (* y_m t_m)))))))y_m = fabs(y);
y_s = copysign(1.0, y);
t_m = fabs(t);
t_s = copysign(1.0, t);
assert(x < y_m && y_m < z && z < t_m);
double code(double t_s, double y_s, double x, double y_m, double z, double t_m) {
double t_2 = (x * y_m) - (y_m * z);
double tmp;
if ((t_2 <= -1e-118) || !(t_2 <= 2e-173)) {
tmp = t_m * (y_m * (x - z));
} else {
tmp = (x - z) * (y_m * t_m);
}
return t_s * (y_s * tmp);
}
y_m = abs(y)
y_s = copysign(1.0d0, y)
t_m = abs(t)
t_s = copysign(1.0d0, t)
NOTE: x, y_m, z, and t_m should be sorted in increasing order before calling this function.
real(8) function code(t_s, y_s, x, y_m, z, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: y_s
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8), intent (in) :: t_m
real(8) :: t_2
real(8) :: tmp
t_2 = (x * y_m) - (y_m * z)
if ((t_2 <= (-1d-118)) .or. (.not. (t_2 <= 2d-173))) then
tmp = t_m * (y_m * (x - z))
else
tmp = (x - z) * (y_m * t_m)
end if
code = t_s * (y_s * tmp)
end function
y_m = Math.abs(y);
y_s = Math.copySign(1.0, y);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
assert x < y_m && y_m < z && z < t_m;
public static double code(double t_s, double y_s, double x, double y_m, double z, double t_m) {
double t_2 = (x * y_m) - (y_m * z);
double tmp;
if ((t_2 <= -1e-118) || !(t_2 <= 2e-173)) {
tmp = t_m * (y_m * (x - z));
} else {
tmp = (x - z) * (y_m * t_m);
}
return t_s * (y_s * tmp);
}
y_m = math.fabs(y) y_s = math.copysign(1.0, y) t_m = math.fabs(t) t_s = math.copysign(1.0, t) [x, y_m, z, t_m] = sort([x, y_m, z, t_m]) def code(t_s, y_s, x, y_m, z, t_m): t_2 = (x * y_m) - (y_m * z) tmp = 0 if (t_2 <= -1e-118) or not (t_2 <= 2e-173): tmp = t_m * (y_m * (x - z)) else: tmp = (x - z) * (y_m * t_m) return t_s * (y_s * tmp)
y_m = abs(y) y_s = copysign(1.0, y) t_m = abs(t) t_s = copysign(1.0, t) x, y_m, z, t_m = sort([x, y_m, z, t_m]) function code(t_s, y_s, x, y_m, z, t_m) t_2 = Float64(Float64(x * y_m) - Float64(y_m * z)) tmp = 0.0 if ((t_2 <= -1e-118) || !(t_2 <= 2e-173)) tmp = Float64(t_m * Float64(y_m * Float64(x - z))); else tmp = Float64(Float64(x - z) * Float64(y_m * t_m)); end return Float64(t_s * Float64(y_s * tmp)) end
y_m = abs(y);
y_s = sign(y) * abs(1.0);
t_m = abs(t);
t_s = sign(t) * abs(1.0);
x, y_m, z, t_m = num2cell(sort([x, y_m, z, t_m])){:}
function tmp_2 = code(t_s, y_s, x, y_m, z, t_m)
t_2 = (x * y_m) - (y_m * z);
tmp = 0.0;
if ((t_2 <= -1e-118) || ~((t_2 <= 2e-173)))
tmp = t_m * (y_m * (x - z));
else
tmp = (x - z) * (y_m * t_m);
end
tmp_2 = t_s * (y_s * tmp);
end
y_m = N[Abs[y], $MachinePrecision]
y_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y_m, z, and t_m should be sorted in increasing order before calling this function.
code[t$95$s_, y$95$s_, x_, y$95$m_, z_, t$95$m_] := Block[{t$95$2 = N[(N[(x * y$95$m), $MachinePrecision] - N[(y$95$m * z), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * N[(y$95$s * If[Or[LessEqual[t$95$2, -1e-118], N[Not[LessEqual[t$95$2, 2e-173]], $MachinePrecision]], N[(t$95$m * N[(y$95$m * N[(x - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x - z), $MachinePrecision] * N[(y$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
y_m = \left|y\right|
\\
y_s = \mathsf{copysign}\left(1, y\right)
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
[x, y_m, z, t_m] = \mathsf{sort}([x, y_m, z, t_m])\\
\\
\begin{array}{l}
t_2 := x \cdot y_m - y_m \cdot z\\
t_s \cdot \left(y_s \cdot \begin{array}{l}
\mathbf{if}\;t_2 \leq -1 \cdot 10^{-118} \lor \neg \left(t_2 \leq 2 \cdot 10^{-173}\right):\\
\;\;\;\;t_m \cdot \left(y_m \cdot \left(x - z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x - z\right) \cdot \left(y_m \cdot t_m\right)\\
\end{array}\right)
\end{array}
\end{array}
y_m = (fabs.f64 y)
y_s = (copysign.f64 1 y)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
NOTE: x, y_m, z, and t_m should be sorted in increasing order before calling this function.
(FPCore (t_s y_s x y_m z t_m)
:precision binary64
(*
t_s
(*
y_s
(if (or (<= z -2.2e+125) (not (<= z 1.22e+98)))
(* (* y_m z) (- t_m))
(* y_m (* t_m (- x z)))))))y_m = fabs(y);
y_s = copysign(1.0, y);
t_m = fabs(t);
t_s = copysign(1.0, t);
assert(x < y_m && y_m < z && z < t_m);
double code(double t_s, double y_s, double x, double y_m, double z, double t_m) {
double tmp;
if ((z <= -2.2e+125) || !(z <= 1.22e+98)) {
tmp = (y_m * z) * -t_m;
} else {
tmp = y_m * (t_m * (x - z));
}
return t_s * (y_s * tmp);
}
y_m = abs(y)
y_s = copysign(1.0d0, y)
t_m = abs(t)
t_s = copysign(1.0d0, t)
NOTE: x, y_m, z, and t_m should be sorted in increasing order before calling this function.
real(8) function code(t_s, y_s, x, y_m, z, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: y_s
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8), intent (in) :: t_m
real(8) :: tmp
if ((z <= (-2.2d+125)) .or. (.not. (z <= 1.22d+98))) then
tmp = (y_m * z) * -t_m
else
tmp = y_m * (t_m * (x - z))
end if
code = t_s * (y_s * tmp)
end function
y_m = Math.abs(y);
y_s = Math.copySign(1.0, y);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
assert x < y_m && y_m < z && z < t_m;
public static double code(double t_s, double y_s, double x, double y_m, double z, double t_m) {
double tmp;
if ((z <= -2.2e+125) || !(z <= 1.22e+98)) {
tmp = (y_m * z) * -t_m;
} else {
tmp = y_m * (t_m * (x - z));
}
return t_s * (y_s * tmp);
}
y_m = math.fabs(y) y_s = math.copysign(1.0, y) t_m = math.fabs(t) t_s = math.copysign(1.0, t) [x, y_m, z, t_m] = sort([x, y_m, z, t_m]) def code(t_s, y_s, x, y_m, z, t_m): tmp = 0 if (z <= -2.2e+125) or not (z <= 1.22e+98): tmp = (y_m * z) * -t_m else: tmp = y_m * (t_m * (x - z)) return t_s * (y_s * tmp)
y_m = abs(y) y_s = copysign(1.0, y) t_m = abs(t) t_s = copysign(1.0, t) x, y_m, z, t_m = sort([x, y_m, z, t_m]) function code(t_s, y_s, x, y_m, z, t_m) tmp = 0.0 if ((z <= -2.2e+125) || !(z <= 1.22e+98)) tmp = Float64(Float64(y_m * z) * Float64(-t_m)); else tmp = Float64(y_m * Float64(t_m * Float64(x - z))); end return Float64(t_s * Float64(y_s * tmp)) end
y_m = abs(y);
y_s = sign(y) * abs(1.0);
t_m = abs(t);
t_s = sign(t) * abs(1.0);
x, y_m, z, t_m = num2cell(sort([x, y_m, z, t_m])){:}
function tmp_2 = code(t_s, y_s, x, y_m, z, t_m)
tmp = 0.0;
if ((z <= -2.2e+125) || ~((z <= 1.22e+98)))
tmp = (y_m * z) * -t_m;
else
tmp = y_m * (t_m * (x - z));
end
tmp_2 = t_s * (y_s * tmp);
end
y_m = N[Abs[y], $MachinePrecision]
y_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y_m, z, and t_m should be sorted in increasing order before calling this function.
code[t$95$s_, y$95$s_, x_, y$95$m_, z_, t$95$m_] := N[(t$95$s * N[(y$95$s * If[Or[LessEqual[z, -2.2e+125], N[Not[LessEqual[z, 1.22e+98]], $MachinePrecision]], N[(N[(y$95$m * z), $MachinePrecision] * (-t$95$m)), $MachinePrecision], N[(y$95$m * N[(t$95$m * N[(x - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
y_m = \left|y\right|
\\
y_s = \mathsf{copysign}\left(1, y\right)
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
[x, y_m, z, t_m] = \mathsf{sort}([x, y_m, z, t_m])\\
\\
t_s \cdot \left(y_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -2.2 \cdot 10^{+125} \lor \neg \left(z \leq 1.22 \cdot 10^{+98}\right):\\
\;\;\;\;\left(y_m \cdot z\right) \cdot \left(-t_m\right)\\
\mathbf{else}:\\
\;\;\;\;y_m \cdot \left(t_m \cdot \left(x - z\right)\right)\\
\end{array}\right)
\end{array}
y_m = (fabs.f64 y)
y_s = (copysign.f64 1 y)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
NOTE: x, y_m, z, and t_m should be sorted in increasing order before calling this function.
(FPCore (t_s y_s x y_m z t_m)
:precision binary64
(*
t_s
(*
y_s
(if (or (<= x -1.4e-50) (not (<= x 1.45e-24)))
(* (* x y_m) t_m)
(* y_m (* z (- t_m)))))))y_m = fabs(y);
y_s = copysign(1.0, y);
t_m = fabs(t);
t_s = copysign(1.0, t);
assert(x < y_m && y_m < z && z < t_m);
double code(double t_s, double y_s, double x, double y_m, double z, double t_m) {
double tmp;
if ((x <= -1.4e-50) || !(x <= 1.45e-24)) {
tmp = (x * y_m) * t_m;
} else {
tmp = y_m * (z * -t_m);
}
return t_s * (y_s * tmp);
}
y_m = abs(y)
y_s = copysign(1.0d0, y)
t_m = abs(t)
t_s = copysign(1.0d0, t)
NOTE: x, y_m, z, and t_m should be sorted in increasing order before calling this function.
real(8) function code(t_s, y_s, x, y_m, z, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: y_s
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8), intent (in) :: t_m
real(8) :: tmp
if ((x <= (-1.4d-50)) .or. (.not. (x <= 1.45d-24))) then
tmp = (x * y_m) * t_m
else
tmp = y_m * (z * -t_m)
end if
code = t_s * (y_s * tmp)
end function
y_m = Math.abs(y);
y_s = Math.copySign(1.0, y);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
assert x < y_m && y_m < z && z < t_m;
public static double code(double t_s, double y_s, double x, double y_m, double z, double t_m) {
double tmp;
if ((x <= -1.4e-50) || !(x <= 1.45e-24)) {
tmp = (x * y_m) * t_m;
} else {
tmp = y_m * (z * -t_m);
}
return t_s * (y_s * tmp);
}
y_m = math.fabs(y) y_s = math.copysign(1.0, y) t_m = math.fabs(t) t_s = math.copysign(1.0, t) [x, y_m, z, t_m] = sort([x, y_m, z, t_m]) def code(t_s, y_s, x, y_m, z, t_m): tmp = 0 if (x <= -1.4e-50) or not (x <= 1.45e-24): tmp = (x * y_m) * t_m else: tmp = y_m * (z * -t_m) return t_s * (y_s * tmp)
y_m = abs(y) y_s = copysign(1.0, y) t_m = abs(t) t_s = copysign(1.0, t) x, y_m, z, t_m = sort([x, y_m, z, t_m]) function code(t_s, y_s, x, y_m, z, t_m) tmp = 0.0 if ((x <= -1.4e-50) || !(x <= 1.45e-24)) tmp = Float64(Float64(x * y_m) * t_m); else tmp = Float64(y_m * Float64(z * Float64(-t_m))); end return Float64(t_s * Float64(y_s * tmp)) end
y_m = abs(y);
y_s = sign(y) * abs(1.0);
t_m = abs(t);
t_s = sign(t) * abs(1.0);
x, y_m, z, t_m = num2cell(sort([x, y_m, z, t_m])){:}
function tmp_2 = code(t_s, y_s, x, y_m, z, t_m)
tmp = 0.0;
if ((x <= -1.4e-50) || ~((x <= 1.45e-24)))
tmp = (x * y_m) * t_m;
else
tmp = y_m * (z * -t_m);
end
tmp_2 = t_s * (y_s * tmp);
end
y_m = N[Abs[y], $MachinePrecision]
y_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y_m, z, and t_m should be sorted in increasing order before calling this function.
code[t$95$s_, y$95$s_, x_, y$95$m_, z_, t$95$m_] := N[(t$95$s * N[(y$95$s * If[Or[LessEqual[x, -1.4e-50], N[Not[LessEqual[x, 1.45e-24]], $MachinePrecision]], N[(N[(x * y$95$m), $MachinePrecision] * t$95$m), $MachinePrecision], N[(y$95$m * N[(z * (-t$95$m)), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
y_m = \left|y\right|
\\
y_s = \mathsf{copysign}\left(1, y\right)
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
[x, y_m, z, t_m] = \mathsf{sort}([x, y_m, z, t_m])\\
\\
t_s \cdot \left(y_s \cdot \begin{array}{l}
\mathbf{if}\;x \leq -1.4 \cdot 10^{-50} \lor \neg \left(x \leq 1.45 \cdot 10^{-24}\right):\\
\;\;\;\;\left(x \cdot y_m\right) \cdot t_m\\
\mathbf{else}:\\
\;\;\;\;y_m \cdot \left(z \cdot \left(-t_m\right)\right)\\
\end{array}\right)
\end{array}
y_m = (fabs.f64 y)
y_s = (copysign.f64 1 y)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
NOTE: x, y_m, z, and t_m should be sorted in increasing order before calling this function.
(FPCore (t_s y_s x y_m z t_m)
:precision binary64
(*
t_s
(*
y_s
(if (or (<= z -9.0) (not (<= z 3e-29)))
(* z (* y_m (- t_m)))
(* y_m (* x t_m))))))y_m = fabs(y);
y_s = copysign(1.0, y);
t_m = fabs(t);
t_s = copysign(1.0, t);
assert(x < y_m && y_m < z && z < t_m);
double code(double t_s, double y_s, double x, double y_m, double z, double t_m) {
double tmp;
if ((z <= -9.0) || !(z <= 3e-29)) {
tmp = z * (y_m * -t_m);
} else {
tmp = y_m * (x * t_m);
}
return t_s * (y_s * tmp);
}
y_m = abs(y)
y_s = copysign(1.0d0, y)
t_m = abs(t)
t_s = copysign(1.0d0, t)
NOTE: x, y_m, z, and t_m should be sorted in increasing order before calling this function.
real(8) function code(t_s, y_s, x, y_m, z, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: y_s
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8), intent (in) :: t_m
real(8) :: tmp
if ((z <= (-9.0d0)) .or. (.not. (z <= 3d-29))) then
tmp = z * (y_m * -t_m)
else
tmp = y_m * (x * t_m)
end if
code = t_s * (y_s * tmp)
end function
y_m = Math.abs(y);
y_s = Math.copySign(1.0, y);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
assert x < y_m && y_m < z && z < t_m;
public static double code(double t_s, double y_s, double x, double y_m, double z, double t_m) {
double tmp;
if ((z <= -9.0) || !(z <= 3e-29)) {
tmp = z * (y_m * -t_m);
} else {
tmp = y_m * (x * t_m);
}
return t_s * (y_s * tmp);
}
y_m = math.fabs(y) y_s = math.copysign(1.0, y) t_m = math.fabs(t) t_s = math.copysign(1.0, t) [x, y_m, z, t_m] = sort([x, y_m, z, t_m]) def code(t_s, y_s, x, y_m, z, t_m): tmp = 0 if (z <= -9.0) or not (z <= 3e-29): tmp = z * (y_m * -t_m) else: tmp = y_m * (x * t_m) return t_s * (y_s * tmp)
y_m = abs(y) y_s = copysign(1.0, y) t_m = abs(t) t_s = copysign(1.0, t) x, y_m, z, t_m = sort([x, y_m, z, t_m]) function code(t_s, y_s, x, y_m, z, t_m) tmp = 0.0 if ((z <= -9.0) || !(z <= 3e-29)) tmp = Float64(z * Float64(y_m * Float64(-t_m))); else tmp = Float64(y_m * Float64(x * t_m)); end return Float64(t_s * Float64(y_s * tmp)) end
y_m = abs(y);
y_s = sign(y) * abs(1.0);
t_m = abs(t);
t_s = sign(t) * abs(1.0);
x, y_m, z, t_m = num2cell(sort([x, y_m, z, t_m])){:}
function tmp_2 = code(t_s, y_s, x, y_m, z, t_m)
tmp = 0.0;
if ((z <= -9.0) || ~((z <= 3e-29)))
tmp = z * (y_m * -t_m);
else
tmp = y_m * (x * t_m);
end
tmp_2 = t_s * (y_s * tmp);
end
y_m = N[Abs[y], $MachinePrecision]
y_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y_m, z, and t_m should be sorted in increasing order before calling this function.
code[t$95$s_, y$95$s_, x_, y$95$m_, z_, t$95$m_] := N[(t$95$s * N[(y$95$s * If[Or[LessEqual[z, -9.0], N[Not[LessEqual[z, 3e-29]], $MachinePrecision]], N[(z * N[(y$95$m * (-t$95$m)), $MachinePrecision]), $MachinePrecision], N[(y$95$m * N[(x * t$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
y_m = \left|y\right|
\\
y_s = \mathsf{copysign}\left(1, y\right)
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
[x, y_m, z, t_m] = \mathsf{sort}([x, y_m, z, t_m])\\
\\
t_s \cdot \left(y_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -9 \lor \neg \left(z \leq 3 \cdot 10^{-29}\right):\\
\;\;\;\;z \cdot \left(y_m \cdot \left(-t_m\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y_m \cdot \left(x \cdot t_m\right)\\
\end{array}\right)
\end{array}
y_m = (fabs.f64 y)
y_s = (copysign.f64 1 y)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
NOTE: x, y_m, z, and t_m should be sorted in increasing order before calling this function.
(FPCore (t_s y_s x y_m z t_m)
:precision binary64
(*
t_s
(*
y_s
(if (or (<= z -0.22) (not (<= z 3.6e-31)))
(* (* y_m z) (- t_m))
(* y_m (* x t_m))))))y_m = fabs(y);
y_s = copysign(1.0, y);
t_m = fabs(t);
t_s = copysign(1.0, t);
assert(x < y_m && y_m < z && z < t_m);
double code(double t_s, double y_s, double x, double y_m, double z, double t_m) {
double tmp;
if ((z <= -0.22) || !(z <= 3.6e-31)) {
tmp = (y_m * z) * -t_m;
} else {
tmp = y_m * (x * t_m);
}
return t_s * (y_s * tmp);
}
y_m = abs(y)
y_s = copysign(1.0d0, y)
t_m = abs(t)
t_s = copysign(1.0d0, t)
NOTE: x, y_m, z, and t_m should be sorted in increasing order before calling this function.
real(8) function code(t_s, y_s, x, y_m, z, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: y_s
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8), intent (in) :: t_m
real(8) :: tmp
if ((z <= (-0.22d0)) .or. (.not. (z <= 3.6d-31))) then
tmp = (y_m * z) * -t_m
else
tmp = y_m * (x * t_m)
end if
code = t_s * (y_s * tmp)
end function
y_m = Math.abs(y);
y_s = Math.copySign(1.0, y);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
assert x < y_m && y_m < z && z < t_m;
public static double code(double t_s, double y_s, double x, double y_m, double z, double t_m) {
double tmp;
if ((z <= -0.22) || !(z <= 3.6e-31)) {
tmp = (y_m * z) * -t_m;
} else {
tmp = y_m * (x * t_m);
}
return t_s * (y_s * tmp);
}
y_m = math.fabs(y) y_s = math.copysign(1.0, y) t_m = math.fabs(t) t_s = math.copysign(1.0, t) [x, y_m, z, t_m] = sort([x, y_m, z, t_m]) def code(t_s, y_s, x, y_m, z, t_m): tmp = 0 if (z <= -0.22) or not (z <= 3.6e-31): tmp = (y_m * z) * -t_m else: tmp = y_m * (x * t_m) return t_s * (y_s * tmp)
y_m = abs(y) y_s = copysign(1.0, y) t_m = abs(t) t_s = copysign(1.0, t) x, y_m, z, t_m = sort([x, y_m, z, t_m]) function code(t_s, y_s, x, y_m, z, t_m) tmp = 0.0 if ((z <= -0.22) || !(z <= 3.6e-31)) tmp = Float64(Float64(y_m * z) * Float64(-t_m)); else tmp = Float64(y_m * Float64(x * t_m)); end return Float64(t_s * Float64(y_s * tmp)) end
y_m = abs(y);
y_s = sign(y) * abs(1.0);
t_m = abs(t);
t_s = sign(t) * abs(1.0);
x, y_m, z, t_m = num2cell(sort([x, y_m, z, t_m])){:}
function tmp_2 = code(t_s, y_s, x, y_m, z, t_m)
tmp = 0.0;
if ((z <= -0.22) || ~((z <= 3.6e-31)))
tmp = (y_m * z) * -t_m;
else
tmp = y_m * (x * t_m);
end
tmp_2 = t_s * (y_s * tmp);
end
y_m = N[Abs[y], $MachinePrecision]
y_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y_m, z, and t_m should be sorted in increasing order before calling this function.
code[t$95$s_, y$95$s_, x_, y$95$m_, z_, t$95$m_] := N[(t$95$s * N[(y$95$s * If[Or[LessEqual[z, -0.22], N[Not[LessEqual[z, 3.6e-31]], $MachinePrecision]], N[(N[(y$95$m * z), $MachinePrecision] * (-t$95$m)), $MachinePrecision], N[(y$95$m * N[(x * t$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
y_m = \left|y\right|
\\
y_s = \mathsf{copysign}\left(1, y\right)
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
[x, y_m, z, t_m] = \mathsf{sort}([x, y_m, z, t_m])\\
\\
t_s \cdot \left(y_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -0.22 \lor \neg \left(z \leq 3.6 \cdot 10^{-31}\right):\\
\;\;\;\;\left(y_m \cdot z\right) \cdot \left(-t_m\right)\\
\mathbf{else}:\\
\;\;\;\;y_m \cdot \left(x \cdot t_m\right)\\
\end{array}\right)
\end{array}
y_m = (fabs.f64 y) y_s = (copysign.f64 1 y) t_m = (fabs.f64 t) t_s = (copysign.f64 1 t) NOTE: x, y_m, z, and t_m should be sorted in increasing order before calling this function. (FPCore (t_s y_s x y_m z t_m) :precision binary64 (* t_s (* y_s (if (<= t_m 1.9e-69) (* y_m (* t_m (- x z))) (* (- x z) (* y_m t_m))))))
y_m = fabs(y);
y_s = copysign(1.0, y);
t_m = fabs(t);
t_s = copysign(1.0, t);
assert(x < y_m && y_m < z && z < t_m);
double code(double t_s, double y_s, double x, double y_m, double z, double t_m) {
double tmp;
if (t_m <= 1.9e-69) {
tmp = y_m * (t_m * (x - z));
} else {
tmp = (x - z) * (y_m * t_m);
}
return t_s * (y_s * tmp);
}
y_m = abs(y)
y_s = copysign(1.0d0, y)
t_m = abs(t)
t_s = copysign(1.0d0, t)
NOTE: x, y_m, z, and t_m should be sorted in increasing order before calling this function.
real(8) function code(t_s, y_s, x, y_m, z, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: y_s
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8), intent (in) :: t_m
real(8) :: tmp
if (t_m <= 1.9d-69) then
tmp = y_m * (t_m * (x - z))
else
tmp = (x - z) * (y_m * t_m)
end if
code = t_s * (y_s * tmp)
end function
y_m = Math.abs(y);
y_s = Math.copySign(1.0, y);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
assert x < y_m && y_m < z && z < t_m;
public static double code(double t_s, double y_s, double x, double y_m, double z, double t_m) {
double tmp;
if (t_m <= 1.9e-69) {
tmp = y_m * (t_m * (x - z));
} else {
tmp = (x - z) * (y_m * t_m);
}
return t_s * (y_s * tmp);
}
y_m = math.fabs(y) y_s = math.copysign(1.0, y) t_m = math.fabs(t) t_s = math.copysign(1.0, t) [x, y_m, z, t_m] = sort([x, y_m, z, t_m]) def code(t_s, y_s, x, y_m, z, t_m): tmp = 0 if t_m <= 1.9e-69: tmp = y_m * (t_m * (x - z)) else: tmp = (x - z) * (y_m * t_m) return t_s * (y_s * tmp)
y_m = abs(y) y_s = copysign(1.0, y) t_m = abs(t) t_s = copysign(1.0, t) x, y_m, z, t_m = sort([x, y_m, z, t_m]) function code(t_s, y_s, x, y_m, z, t_m) tmp = 0.0 if (t_m <= 1.9e-69) tmp = Float64(y_m * Float64(t_m * Float64(x - z))); else tmp = Float64(Float64(x - z) * Float64(y_m * t_m)); end return Float64(t_s * Float64(y_s * tmp)) end
y_m = abs(y);
y_s = sign(y) * abs(1.0);
t_m = abs(t);
t_s = sign(t) * abs(1.0);
x, y_m, z, t_m = num2cell(sort([x, y_m, z, t_m])){:}
function tmp_2 = code(t_s, y_s, x, y_m, z, t_m)
tmp = 0.0;
if (t_m <= 1.9e-69)
tmp = y_m * (t_m * (x - z));
else
tmp = (x - z) * (y_m * t_m);
end
tmp_2 = t_s * (y_s * tmp);
end
y_m = N[Abs[y], $MachinePrecision]
y_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y_m, z, and t_m should be sorted in increasing order before calling this function.
code[t$95$s_, y$95$s_, x_, y$95$m_, z_, t$95$m_] := N[(t$95$s * N[(y$95$s * If[LessEqual[t$95$m, 1.9e-69], N[(y$95$m * N[(t$95$m * N[(x - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x - z), $MachinePrecision] * N[(y$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
y_m = \left|y\right|
\\
y_s = \mathsf{copysign}\left(1, y\right)
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
[x, y_m, z, t_m] = \mathsf{sort}([x, y_m, z, t_m])\\
\\
t_s \cdot \left(y_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 1.9 \cdot 10^{-69}:\\
\;\;\;\;y_m \cdot \left(t_m \cdot \left(x - z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x - z\right) \cdot \left(y_m \cdot t_m\right)\\
\end{array}\right)
\end{array}
y_m = (fabs.f64 y) y_s = (copysign.f64 1 y) t_m = (fabs.f64 t) t_s = (copysign.f64 1 t) NOTE: x, y_m, z, and t_m should be sorted in increasing order before calling this function. (FPCore (t_s y_s x y_m z t_m) :precision binary64 (* t_s (* y_s (if (<= x 1.35e+137) (* y_m (* x t_m)) (* (* x y_m) t_m)))))
y_m = fabs(y);
y_s = copysign(1.0, y);
t_m = fabs(t);
t_s = copysign(1.0, t);
assert(x < y_m && y_m < z && z < t_m);
double code(double t_s, double y_s, double x, double y_m, double z, double t_m) {
double tmp;
if (x <= 1.35e+137) {
tmp = y_m * (x * t_m);
} else {
tmp = (x * y_m) * t_m;
}
return t_s * (y_s * tmp);
}
y_m = abs(y)
y_s = copysign(1.0d0, y)
t_m = abs(t)
t_s = copysign(1.0d0, t)
NOTE: x, y_m, z, and t_m should be sorted in increasing order before calling this function.
real(8) function code(t_s, y_s, x, y_m, z, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: y_s
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8), intent (in) :: t_m
real(8) :: tmp
if (x <= 1.35d+137) then
tmp = y_m * (x * t_m)
else
tmp = (x * y_m) * t_m
end if
code = t_s * (y_s * tmp)
end function
y_m = Math.abs(y);
y_s = Math.copySign(1.0, y);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
assert x < y_m && y_m < z && z < t_m;
public static double code(double t_s, double y_s, double x, double y_m, double z, double t_m) {
double tmp;
if (x <= 1.35e+137) {
tmp = y_m * (x * t_m);
} else {
tmp = (x * y_m) * t_m;
}
return t_s * (y_s * tmp);
}
y_m = math.fabs(y) y_s = math.copysign(1.0, y) t_m = math.fabs(t) t_s = math.copysign(1.0, t) [x, y_m, z, t_m] = sort([x, y_m, z, t_m]) def code(t_s, y_s, x, y_m, z, t_m): tmp = 0 if x <= 1.35e+137: tmp = y_m * (x * t_m) else: tmp = (x * y_m) * t_m return t_s * (y_s * tmp)
y_m = abs(y) y_s = copysign(1.0, y) t_m = abs(t) t_s = copysign(1.0, t) x, y_m, z, t_m = sort([x, y_m, z, t_m]) function code(t_s, y_s, x, y_m, z, t_m) tmp = 0.0 if (x <= 1.35e+137) tmp = Float64(y_m * Float64(x * t_m)); else tmp = Float64(Float64(x * y_m) * t_m); end return Float64(t_s * Float64(y_s * tmp)) end
y_m = abs(y);
y_s = sign(y) * abs(1.0);
t_m = abs(t);
t_s = sign(t) * abs(1.0);
x, y_m, z, t_m = num2cell(sort([x, y_m, z, t_m])){:}
function tmp_2 = code(t_s, y_s, x, y_m, z, t_m)
tmp = 0.0;
if (x <= 1.35e+137)
tmp = y_m * (x * t_m);
else
tmp = (x * y_m) * t_m;
end
tmp_2 = t_s * (y_s * tmp);
end
y_m = N[Abs[y], $MachinePrecision]
y_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y_m, z, and t_m should be sorted in increasing order before calling this function.
code[t$95$s_, y$95$s_, x_, y$95$m_, z_, t$95$m_] := N[(t$95$s * N[(y$95$s * If[LessEqual[x, 1.35e+137], N[(y$95$m * N[(x * t$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(x * y$95$m), $MachinePrecision] * t$95$m), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
y_m = \left|y\right|
\\
y_s = \mathsf{copysign}\left(1, y\right)
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
[x, y_m, z, t_m] = \mathsf{sort}([x, y_m, z, t_m])\\
\\
t_s \cdot \left(y_s \cdot \begin{array}{l}
\mathbf{if}\;x \leq 1.35 \cdot 10^{+137}:\\
\;\;\;\;y_m \cdot \left(x \cdot t_m\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot y_m\right) \cdot t_m\\
\end{array}\right)
\end{array}
y_m = (fabs.f64 y) y_s = (copysign.f64 1 y) t_m = (fabs.f64 t) t_s = (copysign.f64 1 t) NOTE: x, y_m, z, and t_m should be sorted in increasing order before calling this function. (FPCore (t_s y_s x y_m z t_m) :precision binary64 (* t_s (* y_s (* y_m (* x t_m)))))
y_m = fabs(y);
y_s = copysign(1.0, y);
t_m = fabs(t);
t_s = copysign(1.0, t);
assert(x < y_m && y_m < z && z < t_m);
double code(double t_s, double y_s, double x, double y_m, double z, double t_m) {
return t_s * (y_s * (y_m * (x * t_m)));
}
y_m = abs(y)
y_s = copysign(1.0d0, y)
t_m = abs(t)
t_s = copysign(1.0d0, t)
NOTE: x, y_m, z, and t_m should be sorted in increasing order before calling this function.
real(8) function code(t_s, y_s, x, y_m, z, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: y_s
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8), intent (in) :: t_m
code = t_s * (y_s * (y_m * (x * t_m)))
end function
y_m = Math.abs(y);
y_s = Math.copySign(1.0, y);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
assert x < y_m && y_m < z && z < t_m;
public static double code(double t_s, double y_s, double x, double y_m, double z, double t_m) {
return t_s * (y_s * (y_m * (x * t_m)));
}
y_m = math.fabs(y) y_s = math.copysign(1.0, y) t_m = math.fabs(t) t_s = math.copysign(1.0, t) [x, y_m, z, t_m] = sort([x, y_m, z, t_m]) def code(t_s, y_s, x, y_m, z, t_m): return t_s * (y_s * (y_m * (x * t_m)))
y_m = abs(y) y_s = copysign(1.0, y) t_m = abs(t) t_s = copysign(1.0, t) x, y_m, z, t_m = sort([x, y_m, z, t_m]) function code(t_s, y_s, x, y_m, z, t_m) return Float64(t_s * Float64(y_s * Float64(y_m * Float64(x * t_m)))) end
y_m = abs(y);
y_s = sign(y) * abs(1.0);
t_m = abs(t);
t_s = sign(t) * abs(1.0);
x, y_m, z, t_m = num2cell(sort([x, y_m, z, t_m])){:}
function tmp = code(t_s, y_s, x, y_m, z, t_m)
tmp = t_s * (y_s * (y_m * (x * t_m)));
end
y_m = N[Abs[y], $MachinePrecision]
y_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y_m, z, and t_m should be sorted in increasing order before calling this function.
code[t$95$s_, y$95$s_, x_, y$95$m_, z_, t$95$m_] := N[(t$95$s * N[(y$95$s * N[(y$95$m * N[(x * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
y_m = \left|y\right|
\\
y_s = \mathsf{copysign}\left(1, y\right)
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
[x, y_m, z, t_m] = \mathsf{sort}([x, y_m, z, t_m])\\
\\
t_s \cdot \left(y_s \cdot \left(y_m \cdot \left(x \cdot t_m\right)\right)\right)
\end{array}
(FPCore (x y z t) :precision binary64 (if (< t -9.231879582886777e-80) (* (* y t) (- x z)) (if (< t 2.543067051564877e+83) (* y (* t (- x z))) (* (* y (- x z)) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (t < -9.231879582886777e-80) {
tmp = (y * t) * (x - z);
} else if (t < 2.543067051564877e+83) {
tmp = y * (t * (x - z));
} else {
tmp = (y * (x - z)) * t;
}
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) :: tmp
if (t < (-9.231879582886777d-80)) then
tmp = (y * t) * (x - z)
else if (t < 2.543067051564877d+83) then
tmp = y * (t * (x - z))
else
tmp = (y * (x - z)) * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t < -9.231879582886777e-80) {
tmp = (y * t) * (x - z);
} else if (t < 2.543067051564877e+83) {
tmp = y * (t * (x - z));
} else {
tmp = (y * (x - z)) * t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t < -9.231879582886777e-80: tmp = (y * t) * (x - z) elif t < 2.543067051564877e+83: tmp = y * (t * (x - z)) else: tmp = (y * (x - z)) * t return tmp
function code(x, y, z, t) tmp = 0.0 if (t < -9.231879582886777e-80) tmp = Float64(Float64(y * t) * Float64(x - z)); elseif (t < 2.543067051564877e+83) tmp = Float64(y * Float64(t * Float64(x - z))); else tmp = Float64(Float64(y * Float64(x - z)) * t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t < -9.231879582886777e-80) tmp = (y * t) * (x - z); elseif (t < 2.543067051564877e+83) tmp = y * (t * (x - z)); else tmp = (y * (x - z)) * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Less[t, -9.231879582886777e-80], N[(N[(y * t), $MachinePrecision] * N[(x - z), $MachinePrecision]), $MachinePrecision], If[Less[t, 2.543067051564877e+83], N[(y * N[(t * N[(x - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * N[(x - z), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t < -9.231879582886777 \cdot 10^{-80}:\\
\;\;\;\;\left(y \cdot t\right) \cdot \left(x - z\right)\\
\mathbf{elif}\;t < 2.543067051564877 \cdot 10^{+83}:\\
\;\;\;\;y \cdot \left(t \cdot \left(x - z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot \left(x - z\right)\right) \cdot t\\
\end{array}
\end{array}
herbie shell --seed 2023347
(FPCore (x y z t)
:name "Linear.Projection:inverseInfinitePerspective from linear-1.19.1.3"
:precision binary64
:herbie-target
(if (< t -9.231879582886777e-80) (* (* y t) (- x z)) (if (< t 2.543067051564877e+83) (* y (* t (- x z))) (* (* y (- x z)) t)))
(* (- (* x y) (* z y)) t))