
(FPCore (x y z t a) :precision binary64 (/ (- (* x y) (* z t)) a))
double code(double x, double y, double z, double t, double a) {
return ((x * y) - (z * t)) / a;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((x * y) - (z * t)) / a
end function
public static double code(double x, double y, double z, double t, double a) {
return ((x * y) - (z * t)) / a;
}
def code(x, y, z, t, a): return ((x * y) - (z * t)) / a
function code(x, y, z, t, a) return Float64(Float64(Float64(x * y) - Float64(z * t)) / a) end
function tmp = code(x, y, z, t, a) tmp = ((x * y) - (z * t)) / a; end
code[x_, y_, z_, t_, a_] := N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y - z \cdot t}{a}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 12 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (/ (- (* x y) (* z t)) a))
double code(double x, double y, double z, double t, double a) {
return ((x * y) - (z * t)) / a;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((x * y) - (z * t)) / a
end function
public static double code(double x, double y, double z, double t, double a) {
return ((x * y) - (z * t)) / a;
}
def code(x, y, z, t, a): return ((x * y) - (z * t)) / a
function code(x, y, z, t, a) return Float64(Float64(Float64(x * y) - Float64(z * t)) / a) end
function tmp = code(x, y, z, t, a) tmp = ((x * y) - (z * t)) / a; end
code[x_, y_, z_, t_, a_] := N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y - z \cdot t}{a}
\end{array}
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (* x y) (* z t))))
(if (<= t_1 (- INFINITY))
(* y (/ (- x (* t (/ z y))) a))
(if (<= t_1 1e+308) (/ t_1 a) (* y (- (/ x a) (* t (/ z (* a y)))))))))assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
double t_1 = (x * y) - (z * t);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = y * ((x - (t * (z / y))) / a);
} else if (t_1 <= 1e+308) {
tmp = t_1 / a;
} else {
tmp = y * ((x / a) - (t * (z / (a * y))));
}
return tmp;
}
assert x < y && y < z && z < t && t < a;
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (x * y) - (z * t);
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = y * ((x - (t * (z / y))) / a);
} else if (t_1 <= 1e+308) {
tmp = t_1 / a;
} else {
tmp = y * ((x / a) - (t * (z / (a * y))));
}
return tmp;
}
[x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): t_1 = (x * y) - (z * t) tmp = 0 if t_1 <= -math.inf: tmp = y * ((x - (t * (z / y))) / a) elif t_1 <= 1e+308: tmp = t_1 / a else: tmp = y * ((x / a) - (t * (z / (a * y)))) return tmp
x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) t_1 = Float64(Float64(x * y) - Float64(z * t)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(y * Float64(Float64(x - Float64(t * Float64(z / y))) / a)); elseif (t_1 <= 1e+308) tmp = Float64(t_1 / a); else tmp = Float64(y * Float64(Float64(x / a) - Float64(t * Float64(z / Float64(a * y))))); end return tmp end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
function tmp_2 = code(x, y, z, t, a)
t_1 = (x * y) - (z * t);
tmp = 0.0;
if (t_1 <= -Inf)
tmp = y * ((x - (t * (z / y))) / a);
elseif (t_1 <= 1e+308)
tmp = t_1 / a;
else
tmp = y * ((x / a) - (t * (z / (a * y))));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(y * N[(N[(x - N[(t * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+308], N[(t$95$1 / a), $MachinePrecision], N[(y * N[(N[(x / a), $MachinePrecision] - N[(t * N[(z / N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
t_1 := x \cdot y - z \cdot t\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;y \cdot \frac{x - t \cdot \frac{z}{y}}{a}\\
\mathbf{elif}\;t\_1 \leq 10^{+308}:\\
\;\;\;\;\frac{t\_1}{a}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(\frac{x}{a} - t \cdot \frac{z}{a \cdot y}\right)\\
\end{array}
\end{array}
if (-.f64 (*.f64 x y) (*.f64 z t)) < -inf.0Initial program 68.4%
Taylor expanded in y around inf 81.6%
+-commutative81.6%
mul-1-neg81.6%
unsub-neg81.6%
associate-/l*85.3%
Simplified85.3%
Taylor expanded in x around 0 81.6%
times-frac88.8%
associate-*l/89.0%
associate-/l*81.9%
*-commutative81.9%
associate-*r/89.0%
div-sub92.7%
associate-*r/85.6%
*-commutative85.6%
associate-/l*92.7%
Simplified92.7%
if -inf.0 < (-.f64 (*.f64 x y) (*.f64 z t)) < 1e308Initial program 99.6%
if 1e308 < (-.f64 (*.f64 x y) (*.f64 z t)) Initial program 65.3%
Taylor expanded in y around inf 76.7%
+-commutative76.7%
mul-1-neg76.7%
unsub-neg76.7%
associate-/l*88.4%
Simplified88.4%
Final simplification97.4%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (if (<= a 1.95e+79) (/ (fma x y (* z (- t))) a) (- (* (/ x (sqrt a)) (/ y (sqrt a))) (* t (/ z a)))))
assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= 1.95e+79) {
tmp = fma(x, y, (z * -t)) / a;
} else {
tmp = ((x / sqrt(a)) * (y / sqrt(a))) - (t * (z / a));
}
return tmp;
}
x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) tmp = 0.0 if (a <= 1.95e+79) tmp = Float64(fma(x, y, Float64(z * Float64(-t))) / a); else tmp = Float64(Float64(Float64(x / sqrt(a)) * Float64(y / sqrt(a))) - Float64(t * Float64(z / a))); end return tmp end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := If[LessEqual[a, 1.95e+79], N[(N[(x * y + N[(z * (-t)), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(N[(N[(x / N[Sqrt[a], $MachinePrecision]), $MachinePrecision] * N[(y / N[Sqrt[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.95 \cdot 10^{+79}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y, z \cdot \left(-t\right)\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\sqrt{a}} \cdot \frac{y}{\sqrt{a}} - t \cdot \frac{z}{a}\\
\end{array}
\end{array}
if a < 1.9499999999999999e79Initial program 94.7%
div-sub91.8%
*-commutative91.8%
div-sub94.7%
*-commutative94.7%
fmm-def95.2%
distribute-rgt-neg-out95.2%
Simplified95.2%
if 1.9499999999999999e79 < a Initial program 79.1%
div-sub79.1%
*-un-lft-identity79.1%
add-sqr-sqrt78.9%
times-frac78.9%
fmm-def78.9%
associate-/l*87.1%
Applied egg-rr87.1%
fmm-undef87.1%
associate-*l/87.1%
*-lft-identity87.1%
associate-/l*91.2%
associate-*l/95.4%
associate-*r/85.2%
*-commutative85.2%
associate-/l*99.6%
Simplified99.6%
Final simplification96.0%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (* x y) (* z t))))
(if (<= t_1 (- INFINITY))
(* y (/ (- x (* t (/ z y))) a))
(if (<= t_1 2e+220) (/ t_1 a) (* t (- (* x (/ (/ y a) t)) (/ z a)))))))assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
double t_1 = (x * y) - (z * t);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = y * ((x - (t * (z / y))) / a);
} else if (t_1 <= 2e+220) {
tmp = t_1 / a;
} else {
tmp = t * ((x * ((y / a) / t)) - (z / a));
}
return tmp;
}
assert x < y && y < z && z < t && t < a;
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (x * y) - (z * t);
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = y * ((x - (t * (z / y))) / a);
} else if (t_1 <= 2e+220) {
tmp = t_1 / a;
} else {
tmp = t * ((x * ((y / a) / t)) - (z / a));
}
return tmp;
}
[x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): t_1 = (x * y) - (z * t) tmp = 0 if t_1 <= -math.inf: tmp = y * ((x - (t * (z / y))) / a) elif t_1 <= 2e+220: tmp = t_1 / a else: tmp = t * ((x * ((y / a) / t)) - (z / a)) return tmp
x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) t_1 = Float64(Float64(x * y) - Float64(z * t)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(y * Float64(Float64(x - Float64(t * Float64(z / y))) / a)); elseif (t_1 <= 2e+220) tmp = Float64(t_1 / a); else tmp = Float64(t * Float64(Float64(x * Float64(Float64(y / a) / t)) - Float64(z / a))); end return tmp end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
function tmp_2 = code(x, y, z, t, a)
t_1 = (x * y) - (z * t);
tmp = 0.0;
if (t_1 <= -Inf)
tmp = y * ((x - (t * (z / y))) / a);
elseif (t_1 <= 2e+220)
tmp = t_1 / a;
else
tmp = t * ((x * ((y / a) / t)) - (z / a));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(y * N[(N[(x - N[(t * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+220], N[(t$95$1 / a), $MachinePrecision], N[(t * N[(N[(x * N[(N[(y / a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
t_1 := x \cdot y - z \cdot t\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;y \cdot \frac{x - t \cdot \frac{z}{y}}{a}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+220}:\\
\;\;\;\;\frac{t\_1}{a}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(x \cdot \frac{\frac{y}{a}}{t} - \frac{z}{a}\right)\\
\end{array}
\end{array}
if (-.f64 (*.f64 x y) (*.f64 z t)) < -inf.0Initial program 68.4%
Taylor expanded in y around inf 81.6%
+-commutative81.6%
mul-1-neg81.6%
unsub-neg81.6%
associate-/l*85.3%
Simplified85.3%
Taylor expanded in x around 0 81.6%
times-frac88.8%
associate-*l/89.0%
associate-/l*81.9%
*-commutative81.9%
associate-*r/89.0%
div-sub92.7%
associate-*r/85.6%
*-commutative85.6%
associate-/l*92.7%
Simplified92.7%
if -inf.0 < (-.f64 (*.f64 x y) (*.f64 z t)) < 2e220Initial program 99.6%
if 2e220 < (-.f64 (*.f64 x y) (*.f64 z t)) Initial program 78.4%
Taylor expanded in t around inf 83.6%
+-commutative83.6%
mul-1-neg83.6%
unsub-neg83.6%
associate-/l*85.5%
associate-/r*88.7%
Simplified88.7%
Final simplification96.6%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* z (/ (- t) a))))
(if (<= (* x y) -1e+29)
(* y (/ x a))
(if (<= (* x y) 5e-208)
t_1
(if (<= (* x y) 0.001)
(* x (/ y a))
(if (<= (* x y) 2e+47) t_1 (/ y (/ a x))))))))assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
double t_1 = z * (-t / a);
double tmp;
if ((x * y) <= -1e+29) {
tmp = y * (x / a);
} else if ((x * y) <= 5e-208) {
tmp = t_1;
} else if ((x * y) <= 0.001) {
tmp = x * (y / a);
} else if ((x * y) <= 2e+47) {
tmp = t_1;
} else {
tmp = y / (a / x);
}
return tmp;
}
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = z * (-t / a)
if ((x * y) <= (-1d+29)) then
tmp = y * (x / a)
else if ((x * y) <= 5d-208) then
tmp = t_1
else if ((x * y) <= 0.001d0) then
tmp = x * (y / a)
else if ((x * y) <= 2d+47) then
tmp = t_1
else
tmp = y / (a / x)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a;
public static double code(double x, double y, double z, double t, double a) {
double t_1 = z * (-t / a);
double tmp;
if ((x * y) <= -1e+29) {
tmp = y * (x / a);
} else if ((x * y) <= 5e-208) {
tmp = t_1;
} else if ((x * y) <= 0.001) {
tmp = x * (y / a);
} else if ((x * y) <= 2e+47) {
tmp = t_1;
} else {
tmp = y / (a / x);
}
return tmp;
}
[x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): t_1 = z * (-t / a) tmp = 0 if (x * y) <= -1e+29: tmp = y * (x / a) elif (x * y) <= 5e-208: tmp = t_1 elif (x * y) <= 0.001: tmp = x * (y / a) elif (x * y) <= 2e+47: tmp = t_1 else: tmp = y / (a / x) return tmp
x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) t_1 = Float64(z * Float64(Float64(-t) / a)) tmp = 0.0 if (Float64(x * y) <= -1e+29) tmp = Float64(y * Float64(x / a)); elseif (Float64(x * y) <= 5e-208) tmp = t_1; elseif (Float64(x * y) <= 0.001) tmp = Float64(x * Float64(y / a)); elseif (Float64(x * y) <= 2e+47) tmp = t_1; else tmp = Float64(y / Float64(a / x)); end return tmp end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
function tmp_2 = code(x, y, z, t, a)
t_1 = z * (-t / a);
tmp = 0.0;
if ((x * y) <= -1e+29)
tmp = y * (x / a);
elseif ((x * y) <= 5e-208)
tmp = t_1;
elseif ((x * y) <= 0.001)
tmp = x * (y / a);
elseif ((x * y) <= 2e+47)
tmp = t_1;
else
tmp = y / (a / x);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * N[((-t) / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -1e+29], N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 5e-208], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 0.001], N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 2e+47], t$95$1, N[(y / N[(a / x), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
t_1 := z \cdot \frac{-t}{a}\\
\mathbf{if}\;x \cdot y \leq -1 \cdot 10^{+29}:\\
\;\;\;\;y \cdot \frac{x}{a}\\
\mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{-208}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 0.001:\\
\;\;\;\;x \cdot \frac{y}{a}\\
\mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{+47}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{a}{x}}\\
\end{array}
\end{array}
if (*.f64 x y) < -9.99999999999999914e28Initial program 88.7%
Taylor expanded in y around inf 96.4%
+-commutative96.4%
mul-1-neg96.4%
unsub-neg96.4%
associate-/l*98.1%
Simplified98.1%
Taylor expanded in x around inf 86.6%
if -9.99999999999999914e28 < (*.f64 x y) < 4.99999999999999963e-208 or 1e-3 < (*.f64 x y) < 2.0000000000000001e47Initial program 96.9%
Taylor expanded in x around 0 79.6%
mul-1-neg79.6%
*-commutative79.6%
associate-*r/73.7%
distribute-rgt-neg-in73.7%
distribute-frac-neg73.7%
Simplified73.7%
if 4.99999999999999963e-208 < (*.f64 x y) < 1e-3Initial program 93.7%
Taylor expanded in x around inf 63.8%
associate-*r/63.7%
Simplified63.7%
if 2.0000000000000001e47 < (*.f64 x y) Initial program 84.4%
Taylor expanded in y around inf 83.8%
+-commutative83.8%
mul-1-neg83.8%
unsub-neg83.8%
associate-/l*82.1%
Simplified82.1%
Taylor expanded in x around inf 78.5%
clear-num78.5%
un-div-inv78.4%
Applied egg-rr78.4%
Final simplification76.5%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* z (- t)) a)))
(if (<= (* x y) -1e+29)
(* y (/ x a))
(if (<= (* x y) 5e-208)
t_1
(if (<= (* x y) 0.001)
(* x (/ y a))
(if (<= (* x y) 2e+47) t_1 (/ y (/ a x))))))))assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
double t_1 = (z * -t) / a;
double tmp;
if ((x * y) <= -1e+29) {
tmp = y * (x / a);
} else if ((x * y) <= 5e-208) {
tmp = t_1;
} else if ((x * y) <= 0.001) {
tmp = x * (y / a);
} else if ((x * y) <= 2e+47) {
tmp = t_1;
} else {
tmp = y / (a / x);
}
return tmp;
}
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (z * -t) / a
if ((x * y) <= (-1d+29)) then
tmp = y * (x / a)
else if ((x * y) <= 5d-208) then
tmp = t_1
else if ((x * y) <= 0.001d0) then
tmp = x * (y / a)
else if ((x * y) <= 2d+47) then
tmp = t_1
else
tmp = y / (a / x)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a;
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (z * -t) / a;
double tmp;
if ((x * y) <= -1e+29) {
tmp = y * (x / a);
} else if ((x * y) <= 5e-208) {
tmp = t_1;
} else if ((x * y) <= 0.001) {
tmp = x * (y / a);
} else if ((x * y) <= 2e+47) {
tmp = t_1;
} else {
tmp = y / (a / x);
}
return tmp;
}
[x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): t_1 = (z * -t) / a tmp = 0 if (x * y) <= -1e+29: tmp = y * (x / a) elif (x * y) <= 5e-208: tmp = t_1 elif (x * y) <= 0.001: tmp = x * (y / a) elif (x * y) <= 2e+47: tmp = t_1 else: tmp = y / (a / x) return tmp
x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) t_1 = Float64(Float64(z * Float64(-t)) / a) tmp = 0.0 if (Float64(x * y) <= -1e+29) tmp = Float64(y * Float64(x / a)); elseif (Float64(x * y) <= 5e-208) tmp = t_1; elseif (Float64(x * y) <= 0.001) tmp = Float64(x * Float64(y / a)); elseif (Float64(x * y) <= 2e+47) tmp = t_1; else tmp = Float64(y / Float64(a / x)); end return tmp end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
function tmp_2 = code(x, y, z, t, a)
t_1 = (z * -t) / a;
tmp = 0.0;
if ((x * y) <= -1e+29)
tmp = y * (x / a);
elseif ((x * y) <= 5e-208)
tmp = t_1;
elseif ((x * y) <= 0.001)
tmp = x * (y / a);
elseif ((x * y) <= 2e+47)
tmp = t_1;
else
tmp = y / (a / x);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z * (-t)), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -1e+29], N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 5e-208], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 0.001], N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 2e+47], t$95$1, N[(y / N[(a / x), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
t_1 := \frac{z \cdot \left(-t\right)}{a}\\
\mathbf{if}\;x \cdot y \leq -1 \cdot 10^{+29}:\\
\;\;\;\;y \cdot \frac{x}{a}\\
\mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{-208}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 0.001:\\
\;\;\;\;x \cdot \frac{y}{a}\\
\mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{+47}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{a}{x}}\\
\end{array}
\end{array}
if (*.f64 x y) < -9.99999999999999914e28Initial program 88.7%
Taylor expanded in y around inf 96.4%
+-commutative96.4%
mul-1-neg96.4%
unsub-neg96.4%
associate-/l*98.1%
Simplified98.1%
Taylor expanded in x around inf 86.6%
if -9.99999999999999914e28 < (*.f64 x y) < 4.99999999999999963e-208 or 1e-3 < (*.f64 x y) < 2.0000000000000001e47Initial program 96.9%
Taylor expanded in x around 0 79.6%
associate-*r*79.6%
mul-1-neg79.6%
Simplified79.6%
if 4.99999999999999963e-208 < (*.f64 x y) < 1e-3Initial program 93.7%
Taylor expanded in x around inf 63.8%
associate-*r/63.7%
Simplified63.7%
if 2.0000000000000001e47 < (*.f64 x y) Initial program 84.4%
Taylor expanded in y around inf 83.8%
+-commutative83.8%
mul-1-neg83.8%
unsub-neg83.8%
associate-/l*82.1%
Simplified82.1%
Taylor expanded in x around inf 78.5%
clear-num78.5%
un-div-inv78.4%
Applied egg-rr78.4%
Final simplification79.0%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (* x y) (* z t))))
(if (or (<= t_1 (- INFINITY)) (not (<= t_1 1e+299)))
(* y (/ (- x (* t (/ z y))) a))
(/ t_1 a))))assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
double t_1 = (x * y) - (z * t);
double tmp;
if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 1e+299)) {
tmp = y * ((x - (t * (z / y))) / a);
} else {
tmp = t_1 / a;
}
return tmp;
}
assert x < y && y < z && z < t && t < a;
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (x * y) - (z * t);
double tmp;
if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 1e+299)) {
tmp = y * ((x - (t * (z / y))) / a);
} else {
tmp = t_1 / a;
}
return tmp;
}
[x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): t_1 = (x * y) - (z * t) tmp = 0 if (t_1 <= -math.inf) or not (t_1 <= 1e+299): tmp = y * ((x - (t * (z / y))) / a) else: tmp = t_1 / a return tmp
x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) t_1 = Float64(Float64(x * y) - Float64(z * t)) tmp = 0.0 if ((t_1 <= Float64(-Inf)) || !(t_1 <= 1e+299)) tmp = Float64(y * Float64(Float64(x - Float64(t * Float64(z / y))) / a)); else tmp = Float64(t_1 / a); end return tmp end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
function tmp_2 = code(x, y, z, t, a)
t_1 = (x * y) - (z * t);
tmp = 0.0;
if ((t_1 <= -Inf) || ~((t_1 <= 1e+299)))
tmp = y * ((x - (t * (z / y))) / a);
else
tmp = t_1 / a;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 1e+299]], $MachinePrecision]], N[(y * N[(N[(x - N[(t * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(t$95$1 / a), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
t_1 := x \cdot y - z \cdot t\\
\mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 10^{+299}\right):\\
\;\;\;\;y \cdot \frac{x - t \cdot \frac{z}{y}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_1}{a}\\
\end{array}
\end{array}
if (-.f64 (*.f64 x y) (*.f64 z t)) < -inf.0 or 1.0000000000000001e299 < (-.f64 (*.f64 x y) (*.f64 z t)) Initial program 67.8%
Taylor expanded in y around inf 78.0%
+-commutative78.0%
mul-1-neg78.0%
unsub-neg78.0%
associate-/l*85.8%
Simplified85.8%
Taylor expanded in x around 0 78.0%
times-frac82.6%
associate-*l/82.9%
associate-/l*78.2%
*-commutative78.2%
associate-*r/82.9%
div-sub87.7%
associate-*r/81.4%
*-commutative81.4%
associate-/l*87.7%
Simplified87.7%
if -inf.0 < (-.f64 (*.f64 x y) (*.f64 z t)) < 1.0000000000000001e299Initial program 99.6%
Final simplification96.7%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (if (<= (* x y) -2e-53) (* y (/ x a)) (if (<= (* x y) 5e-208) (* t (/ (- z) a)) (/ (* x y) a))))
assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x * y) <= -2e-53) {
tmp = y * (x / a);
} else if ((x * y) <= 5e-208) {
tmp = t * (-z / a);
} else {
tmp = (x * y) / a;
}
return tmp;
}
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((x * y) <= (-2d-53)) then
tmp = y * (x / a)
else if ((x * y) <= 5d-208) then
tmp = t * (-z / a)
else
tmp = (x * y) / a
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a;
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x * y) <= -2e-53) {
tmp = y * (x / a);
} else if ((x * y) <= 5e-208) {
tmp = t * (-z / a);
} else {
tmp = (x * y) / a;
}
return tmp;
}
[x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): tmp = 0 if (x * y) <= -2e-53: tmp = y * (x / a) elif (x * y) <= 5e-208: tmp = t * (-z / a) else: tmp = (x * y) / a return tmp
x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) tmp = 0.0 if (Float64(x * y) <= -2e-53) tmp = Float64(y * Float64(x / a)); elseif (Float64(x * y) <= 5e-208) tmp = Float64(t * Float64(Float64(-z) / a)); else tmp = Float64(Float64(x * y) / a); end return tmp end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
function tmp_2 = code(x, y, z, t, a)
tmp = 0.0;
if ((x * y) <= -2e-53)
tmp = y * (x / a);
elseif ((x * y) <= 5e-208)
tmp = t * (-z / a);
else
tmp = (x * y) / a;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := If[LessEqual[N[(x * y), $MachinePrecision], -2e-53], N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 5e-208], N[(t * N[((-z) / a), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] / a), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -2 \cdot 10^{-53}:\\
\;\;\;\;y \cdot \frac{x}{a}\\
\mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{-208}:\\
\;\;\;\;t \cdot \frac{-z}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y}{a}\\
\end{array}
\end{array}
if (*.f64 x y) < -2.00000000000000006e-53Initial program 90.6%
Taylor expanded in y around inf 94.2%
+-commutative94.2%
mul-1-neg94.2%
unsub-neg94.2%
associate-/l*94.4%
Simplified94.4%
Taylor expanded in x around inf 79.5%
if -2.00000000000000006e-53 < (*.f64 x y) < 4.99999999999999963e-208Initial program 96.1%
Taylor expanded in x around 0 85.2%
mul-1-neg85.2%
associate-/l*84.3%
distribute-rgt-neg-in84.3%
distribute-neg-frac284.3%
Simplified84.3%
if 4.99999999999999963e-208 < (*.f64 x y) Initial program 89.2%
Taylor expanded in x around inf 67.7%
Final simplification76.6%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (if (<= (* z t) (- INFINITY)) (* t (/ (- z) a)) (/ (- (* x y) (* z t)) a)))
assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z * t) <= -((double) INFINITY)) {
tmp = t * (-z / a);
} else {
tmp = ((x * y) - (z * t)) / a;
}
return tmp;
}
assert x < y && y < z && z < t && t < a;
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z * t) <= -Double.POSITIVE_INFINITY) {
tmp = t * (-z / a);
} else {
tmp = ((x * y) - (z * t)) / a;
}
return tmp;
}
[x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): tmp = 0 if (z * t) <= -math.inf: tmp = t * (-z / a) else: tmp = ((x * y) - (z * t)) / a return tmp
x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) tmp = 0.0 if (Float64(z * t) <= Float64(-Inf)) tmp = Float64(t * Float64(Float64(-z) / a)); else tmp = Float64(Float64(Float64(x * y) - Float64(z * t)) / a); end return tmp end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
function tmp_2 = code(x, y, z, t, a)
tmp = 0.0;
if ((z * t) <= -Inf)
tmp = t * (-z / a);
else
tmp = ((x * y) - (z * t)) / a;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := If[LessEqual[N[(z * t), $MachinePrecision], (-Infinity)], N[(t * N[((-z) / a), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;z \cdot t \leq -\infty:\\
\;\;\;\;t \cdot \frac{-z}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y - z \cdot t}{a}\\
\end{array}
\end{array}
if (*.f64 z t) < -inf.0Initial program 59.9%
Taylor expanded in x around 0 65.2%
mul-1-neg65.2%
associate-/l*94.7%
distribute-rgt-neg-in94.7%
distribute-neg-frac294.7%
Simplified94.7%
if -inf.0 < (*.f64 z t) Initial program 94.5%
Final simplification94.5%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (if (<= (* x y) -2e+237) (/ x (/ a y)) (/ (* x y) a)))
assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x * y) <= -2e+237) {
tmp = x / (a / y);
} else {
tmp = (x * y) / a;
}
return tmp;
}
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((x * y) <= (-2d+237)) then
tmp = x / (a / y)
else
tmp = (x * y) / a
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a;
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x * y) <= -2e+237) {
tmp = x / (a / y);
} else {
tmp = (x * y) / a;
}
return tmp;
}
[x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): tmp = 0 if (x * y) <= -2e+237: tmp = x / (a / y) else: tmp = (x * y) / a return tmp
x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) tmp = 0.0 if (Float64(x * y) <= -2e+237) tmp = Float64(x / Float64(a / y)); else tmp = Float64(Float64(x * y) / a); end return tmp end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
function tmp_2 = code(x, y, z, t, a)
tmp = 0.0;
if ((x * y) <= -2e+237)
tmp = x / (a / y);
else
tmp = (x * y) / a;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := If[LessEqual[N[(x * y), $MachinePrecision], -2e+237], N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] / a), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -2 \cdot 10^{+237}:\\
\;\;\;\;\frac{x}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y}{a}\\
\end{array}
\end{array}
if (*.f64 x y) < -1.99999999999999988e237Initial program 73.0%
Taylor expanded in y around inf 95.6%
+-commutative95.6%
mul-1-neg95.6%
unsub-neg95.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 91.7%
*-commutative91.7%
associate-/r/91.9%
Applied egg-rr91.9%
if -1.99999999999999988e237 < (*.f64 x y) Initial program 93.9%
Taylor expanded in x around inf 52.2%
Final simplification56.1%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (* x (/ y a)))
assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
return x * (y / a);
}
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x * (y / a)
end function
assert x < y && y < z && z < t && t < a;
public static double code(double x, double y, double z, double t, double a) {
return x * (y / a);
}
[x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): return x * (y / a)
x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) return Float64(x * Float64(y / a)) end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
function tmp = code(x, y, z, t, a)
tmp = x * (y / a);
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
x \cdot \frac{y}{a}
\end{array}
Initial program 91.9%
Taylor expanded in x around inf 53.9%
associate-*r/52.1%
Simplified52.1%
Final simplification52.1%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (* y (/ x a)))
assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
return y * (x / a);
}
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = y * (x / a)
end function
assert x < y && y < z && z < t && t < a;
public static double code(double x, double y, double z, double t, double a) {
return y * (x / a);
}
[x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): return y * (x / a)
x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) return Float64(y * Float64(x / a)) end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
function tmp = code(x, y, z, t, a)
tmp = y * (x / a);
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
y \cdot \frac{x}{a}
\end{array}
Initial program 91.9%
Taylor expanded in y around inf 82.1%
+-commutative82.1%
mul-1-neg82.1%
unsub-neg82.1%
associate-/l*78.8%
Simplified78.8%
Taylor expanded in x around inf 54.9%
Final simplification54.9%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (/ y (/ a x)))
assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
return y / (a / x);
}
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = y / (a / x)
end function
assert x < y && y < z && z < t && t < a;
public static double code(double x, double y, double z, double t, double a) {
return y / (a / x);
}
[x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): return y / (a / x)
x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) return Float64(y / Float64(a / x)) end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
function tmp = code(x, y, z, t, a)
tmp = y / (a / x);
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := N[(y / N[(a / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\frac{y}{\frac{a}{x}}
\end{array}
Initial program 91.9%
Taylor expanded in y around inf 82.1%
+-commutative82.1%
mul-1-neg82.1%
unsub-neg82.1%
associate-/l*78.8%
Simplified78.8%
Taylor expanded in x around inf 54.9%
clear-num54.8%
un-div-inv54.9%
Applied egg-rr54.9%
Final simplification54.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (* (/ y a) x) (* (/ t a) z))))
(if (< z -2.468684968699548e+170)
t_1
(if (< z 6.309831121978371e-71) (/ (- (* x y) (* z t)) a) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((y / a) * x) - ((t / a) * z);
double tmp;
if (z < -2.468684968699548e+170) {
tmp = t_1;
} else if (z < 6.309831121978371e-71) {
tmp = ((x * y) - (z * t)) / a;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = ((y / a) * x) - ((t / a) * z)
if (z < (-2.468684968699548d+170)) then
tmp = t_1
else if (z < 6.309831121978371d-71) then
tmp = ((x * y) - (z * t)) / a
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = ((y / a) * x) - ((t / a) * z);
double tmp;
if (z < -2.468684968699548e+170) {
tmp = t_1;
} else if (z < 6.309831121978371e-71) {
tmp = ((x * y) - (z * t)) / a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = ((y / a) * x) - ((t / a) * z) tmp = 0 if z < -2.468684968699548e+170: tmp = t_1 elif z < 6.309831121978371e-71: tmp = ((x * y) - (z * t)) / a else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(y / a) * x) - Float64(Float64(t / a) * z)) tmp = 0.0 if (z < -2.468684968699548e+170) tmp = t_1; elseif (z < 6.309831121978371e-71) tmp = Float64(Float64(Float64(x * y) - Float64(z * t)) / a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = ((y / a) * x) - ((t / a) * z); tmp = 0.0; if (z < -2.468684968699548e+170) tmp = t_1; elseif (z < 6.309831121978371e-71) tmp = ((x * y) - (z * t)) / a; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y / a), $MachinePrecision] * x), $MachinePrecision] - N[(N[(t / a), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -2.468684968699548e+170], t$95$1, If[Less[z, 6.309831121978371e-71], N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{a} \cdot x - \frac{t}{a} \cdot z\\
\mathbf{if}\;z < -2.468684968699548 \cdot 10^{+170}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z < 6.309831121978371 \cdot 10^{-71}:\\
\;\;\;\;\frac{x \cdot y - z \cdot t}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024095
(FPCore (x y z t a)
:name "Data.Colour.Matrix:inverse from colour-2.3.3, B"
:precision binary64
:alt
(if (< z -2.468684968699548e+170) (- (* (/ y a) x) (* (/ t a) z)) (if (< z 6.309831121978371e-71) (/ (- (* x y) (* z t)) a) (- (* (/ y a) x) (* (/ t a) z))))
(/ (- (* x y) (* z t)) a))