
(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 10 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 -1.5e+302)
(- (* x (/ y a)) (* z (/ t a)))
(if (<= t_1 1e+301)
(/ (fma x y (* z (- t))) a)
(* y (- (/ x a) (* z (/ t (* y 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 <= -1.5e+302) {
tmp = (x * (y / a)) - (z * (t / a));
} else if (t_1 <= 1e+301) {
tmp = fma(x, y, (z * -t)) / a;
} else {
tmp = y * ((x / a) - (z * (t / (y * 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 <= -1.5e+302) tmp = Float64(Float64(x * Float64(y / a)) - Float64(z * Float64(t / a))); elseif (t_1 <= 1e+301) tmp = Float64(fma(x, y, Float64(z * Float64(-t))) / a); else tmp = Float64(y * Float64(Float64(x / a) - Float64(z * Float64(t / Float64(y * 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_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1.5e+302], N[(N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision] - N[(z * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+301], N[(N[(x * y + N[(z * (-t)), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(y * N[(N[(x / a), $MachinePrecision] - N[(z * N[(t / N[(y * a), $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 -1.5 \cdot 10^{+302}:\\
\;\;\;\;x \cdot \frac{y}{a} - z \cdot \frac{t}{a}\\
\mathbf{elif}\;t\_1 \leq 10^{+301}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y, z \cdot \left(-t\right)\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(\frac{x}{a} - z \cdot \frac{t}{y \cdot a}\right)\\
\end{array}
\end{array}
if (-.f64 (*.f64 x y) (*.f64 z t)) < -1.4999999999999999e302Initial program 67.5%
div-sub64.7%
associate-/l*80.6%
associate-/l*94.2%
Applied egg-rr94.2%
if -1.4999999999999999e302 < (-.f64 (*.f64 x y) (*.f64 z t)) < 1.00000000000000005e301Initial program 98.3%
div-sub96.2%
*-commutative96.2%
div-sub98.3%
*-commutative98.3%
fma-neg98.3%
distribute-rgt-neg-out98.3%
Simplified98.3%
if 1.00000000000000005e301 < (-.f64 (*.f64 x y) (*.f64 z t)) Initial program 64.1%
Taylor expanded in y around inf 83.5%
+-commutative83.5%
mul-1-neg83.5%
unsub-neg83.5%
*-commutative83.5%
associate-/l*95.6%
Simplified95.6%
Final simplification97.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 (- (* x y) (* z t))))
(if (<= t_1 -1.5e+302)
(- (* x (/ y a)) (* z (/ t a)))
(if (<= t_1 1e+301) (/ t_1 a) (* y (- (/ x a) (* z (/ t (* y 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 <= -1.5e+302) {
tmp = (x * (y / a)) - (z * (t / a));
} else if (t_1 <= 1e+301) {
tmp = t_1 / a;
} else {
tmp = y * ((x / a) - (z * (t / (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) :: t_1
real(8) :: tmp
t_1 = (x * y) - (z * t)
if (t_1 <= (-1.5d+302)) then
tmp = (x * (y / a)) - (z * (t / a))
else if (t_1 <= 1d+301) then
tmp = t_1 / a
else
tmp = y * ((x / a) - (z * (t / (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 t_1 = (x * y) - (z * t);
double tmp;
if (t_1 <= -1.5e+302) {
tmp = (x * (y / a)) - (z * (t / a));
} else if (t_1 <= 1e+301) {
tmp = t_1 / a;
} else {
tmp = y * ((x / a) - (z * (t / (y * 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 <= -1.5e+302: tmp = (x * (y / a)) - (z * (t / a)) elif t_1 <= 1e+301: tmp = t_1 / a else: tmp = y * ((x / a) - (z * (t / (y * 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 <= -1.5e+302) tmp = Float64(Float64(x * Float64(y / a)) - Float64(z * Float64(t / a))); elseif (t_1 <= 1e+301) tmp = Float64(t_1 / a); else tmp = Float64(y * Float64(Float64(x / a) - Float64(z * Float64(t / Float64(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)
t_1 = (x * y) - (z * t);
tmp = 0.0;
if (t_1 <= -1.5e+302)
tmp = (x * (y / a)) - (z * (t / a));
elseif (t_1 <= 1e+301)
tmp = t_1 / a;
else
tmp = y * ((x / a) - (z * (t / (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_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1.5e+302], N[(N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision] - N[(z * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+301], N[(t$95$1 / a), $MachinePrecision], N[(y * N[(N[(x / a), $MachinePrecision] - N[(z * N[(t / N[(y * a), $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 -1.5 \cdot 10^{+302}:\\
\;\;\;\;x \cdot \frac{y}{a} - z \cdot \frac{t}{a}\\
\mathbf{elif}\;t\_1 \leq 10^{+301}:\\
\;\;\;\;\frac{t\_1}{a}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(\frac{x}{a} - z \cdot \frac{t}{y \cdot a}\right)\\
\end{array}
\end{array}
if (-.f64 (*.f64 x y) (*.f64 z t)) < -1.4999999999999999e302Initial program 67.5%
div-sub64.7%
associate-/l*80.6%
associate-/l*94.2%
Applied egg-rr94.2%
if -1.4999999999999999e302 < (-.f64 (*.f64 x y) (*.f64 z t)) < 1.00000000000000005e301Initial program 98.3%
if 1.00000000000000005e301 < (-.f64 (*.f64 x y) (*.f64 z t)) Initial program 64.1%
Taylor expanded in y around inf 83.5%
+-commutative83.5%
mul-1-neg83.5%
unsub-neg83.5%
*-commutative83.5%
associate-/l*95.6%
Simplified95.6%
Final simplification97.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 (or (<= (* x y) -1e+82)
(not
(or (<= (* x y) -2e-40)
(and (not (<= (* x y) -5e-70)) (<= (* x y) 1e-19)))))
(* y (/ x a))
(/ (* 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 (((x * y) <= -1e+82) || !(((x * y) <= -2e-40) || (!((x * y) <= -5e-70) && ((x * y) <= 1e-19)))) {
tmp = y * (x / a);
} else {
tmp = (z * t) / -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) <= (-1d+82)) .or. (.not. ((x * y) <= (-2d-40)) .or. (.not. ((x * y) <= (-5d-70))) .and. ((x * y) <= 1d-19))) then
tmp = y * (x / a)
else
tmp = (z * t) / -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) <= -1e+82) || !(((x * y) <= -2e-40) || (!((x * y) <= -5e-70) && ((x * y) <= 1e-19)))) {
tmp = y * (x / a);
} else {
tmp = (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 ((x * y) <= -1e+82) or not (((x * y) <= -2e-40) or (not ((x * y) <= -5e-70) and ((x * y) <= 1e-19))): tmp = y * (x / a) else: tmp = (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(x * y) <= -1e+82) || !((Float64(x * y) <= -2e-40) || (!(Float64(x * y) <= -5e-70) && (Float64(x * y) <= 1e-19)))) tmp = Float64(y * Float64(x / a)); else tmp = Float64(Float64(z * t) / Float64(-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) <= -1e+82) || ~((((x * y) <= -2e-40) || (~(((x * y) <= -5e-70)) && ((x * y) <= 1e-19)))))
tmp = y * (x / a);
else
tmp = (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[Or[LessEqual[N[(x * y), $MachinePrecision], -1e+82], N[Not[Or[LessEqual[N[(x * y), $MachinePrecision], -2e-40], And[N[Not[LessEqual[N[(x * y), $MachinePrecision], -5e-70]], $MachinePrecision], LessEqual[N[(x * y), $MachinePrecision], 1e-19]]]], $MachinePrecision]], N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision], N[(N[(z * t), $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 -1 \cdot 10^{+82} \lor \neg \left(x \cdot y \leq -2 \cdot 10^{-40} \lor \neg \left(x \cdot y \leq -5 \cdot 10^{-70}\right) \land x \cdot y \leq 10^{-19}\right):\\
\;\;\;\;y \cdot \frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot t}{-a}\\
\end{array}
\end{array}
if (*.f64 x y) < -9.9999999999999996e81 or -1.9999999999999999e-40 < (*.f64 x y) < -4.9999999999999998e-70 or 9.9999999999999998e-20 < (*.f64 x y) Initial program 83.6%
Taylor expanded in x around inf 70.3%
associate-*r/80.3%
Simplified80.3%
Taylor expanded in x around 0 70.3%
associate-*l/75.5%
*-commutative75.5%
Simplified75.5%
if -9.9999999999999996e81 < (*.f64 x y) < -1.9999999999999999e-40 or -4.9999999999999998e-70 < (*.f64 x y) < 9.9999999999999998e-20Initial program 97.6%
Taylor expanded in x around 0 79.8%
associate-*r*79.8%
mul-1-neg79.8%
Simplified79.8%
Final simplification77.8%
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 (* t (/ (- z) a))) (t_2 (* y (/ x a))))
(if (<= (* x y) -2e+53)
t_2
(if (<= (* x y) -2e-40)
t_1
(if (<= (* x y) -5e-70)
t_2
(if (<= (* x y) 5e+114) t_1 (* 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 t_1 = t * (-z / a);
double t_2 = y * (x / a);
double tmp;
if ((x * y) <= -2e+53) {
tmp = t_2;
} else if ((x * y) <= -2e-40) {
tmp = t_1;
} else if ((x * y) <= -5e-70) {
tmp = t_2;
} else if ((x * y) <= 5e+114) {
tmp = t_1;
} 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t * (-z / a)
t_2 = y * (x / a)
if ((x * y) <= (-2d+53)) then
tmp = t_2
else if ((x * y) <= (-2d-40)) then
tmp = t_1
else if ((x * y) <= (-5d-70)) then
tmp = t_2
else if ((x * y) <= 5d+114) then
tmp = t_1
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 t_1 = t * (-z / a);
double t_2 = y * (x / a);
double tmp;
if ((x * y) <= -2e+53) {
tmp = t_2;
} else if ((x * y) <= -2e-40) {
tmp = t_1;
} else if ((x * y) <= -5e-70) {
tmp = t_2;
} else if ((x * y) <= 5e+114) {
tmp = t_1;
} 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): t_1 = t * (-z / a) t_2 = y * (x / a) tmp = 0 if (x * y) <= -2e+53: tmp = t_2 elif (x * y) <= -2e-40: tmp = t_1 elif (x * y) <= -5e-70: tmp = t_2 elif (x * y) <= 5e+114: tmp = t_1 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) t_1 = Float64(t * Float64(Float64(-z) / a)) t_2 = Float64(y * Float64(x / a)) tmp = 0.0 if (Float64(x * y) <= -2e+53) tmp = t_2; elseif (Float64(x * y) <= -2e-40) tmp = t_1; elseif (Float64(x * y) <= -5e-70) tmp = t_2; elseif (Float64(x * y) <= 5e+114) tmp = t_1; else tmp = Float64(x * Float64(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)
t_1 = t * (-z / a);
t_2 = y * (x / a);
tmp = 0.0;
if ((x * y) <= -2e+53)
tmp = t_2;
elseif ((x * y) <= -2e-40)
tmp = t_1;
elseif ((x * y) <= -5e-70)
tmp = t_2;
elseif ((x * y) <= 5e+114)
tmp = t_1;
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_] := Block[{t$95$1 = N[(t * N[((-z) / a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -2e+53], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], -2e-40], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], -5e-70], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], 5e+114], t$95$1, N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
t_1 := t \cdot \frac{-z}{a}\\
t_2 := y \cdot \frac{x}{a}\\
\mathbf{if}\;x \cdot y \leq -2 \cdot 10^{+53}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \cdot y \leq -2 \cdot 10^{-40}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq -5 \cdot 10^{-70}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{+114}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{a}\\
\end{array}
\end{array}
if (*.f64 x y) < -2e53 or -1.9999999999999999e-40 < (*.f64 x y) < -4.9999999999999998e-70Initial program 82.7%
Taylor expanded in x around inf 74.8%
associate-*r/83.4%
Simplified83.4%
Taylor expanded in x around 0 74.8%
associate-*l/79.4%
*-commutative79.4%
Simplified79.4%
if -2e53 < (*.f64 x y) < -1.9999999999999999e-40 or -4.9999999999999998e-70 < (*.f64 x y) < 5.0000000000000001e114Initial program 96.6%
Taylor expanded in x around 0 75.8%
mul-1-neg75.8%
associate-/l*73.6%
distribute-rgt-neg-in73.6%
distribute-neg-frac273.6%
Simplified73.6%
if 5.0000000000000001e114 < (*.f64 x y) Initial program 82.8%
Taylor expanded in x around inf 71.7%
associate-*r/85.9%
Simplified85.9%
Final simplification77.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 (* y (/ x a))))
(if (<= (* x y) -2e+53)
t_1
(if (<= (* x y) -2e-40)
(* t (/ (- z) a))
(if (<= (* x y) -5e-70)
t_1
(if (<= (* x y) 5e+114) (* z (/ t (- 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 t_1 = y * (x / a);
double tmp;
if ((x * y) <= -2e+53) {
tmp = t_1;
} else if ((x * y) <= -2e-40) {
tmp = t * (-z / a);
} else if ((x * y) <= -5e-70) {
tmp = t_1;
} else if ((x * y) <= 5e+114) {
tmp = z * (t / -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) :: t_1
real(8) :: tmp
t_1 = y * (x / a)
if ((x * y) <= (-2d+53)) then
tmp = t_1
else if ((x * y) <= (-2d-40)) then
tmp = t * (-z / a)
else if ((x * y) <= (-5d-70)) then
tmp = t_1
else if ((x * y) <= 5d+114) then
tmp = z * (t / -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 t_1 = y * (x / a);
double tmp;
if ((x * y) <= -2e+53) {
tmp = t_1;
} else if ((x * y) <= -2e-40) {
tmp = t * (-z / a);
} else if ((x * y) <= -5e-70) {
tmp = t_1;
} else if ((x * y) <= 5e+114) {
tmp = z * (t / -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): t_1 = y * (x / a) tmp = 0 if (x * y) <= -2e+53: tmp = t_1 elif (x * y) <= -2e-40: tmp = t * (-z / a) elif (x * y) <= -5e-70: tmp = t_1 elif (x * y) <= 5e+114: tmp = z * (t / -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) t_1 = Float64(y * Float64(x / a)) tmp = 0.0 if (Float64(x * y) <= -2e+53) tmp = t_1; elseif (Float64(x * y) <= -2e-40) tmp = Float64(t * Float64(Float64(-z) / a)); elseif (Float64(x * y) <= -5e-70) tmp = t_1; elseif (Float64(x * y) <= 5e+114) tmp = Float64(z * Float64(t / Float64(-a))); else tmp = Float64(x * Float64(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)
t_1 = y * (x / a);
tmp = 0.0;
if ((x * y) <= -2e+53)
tmp = t_1;
elseif ((x * y) <= -2e-40)
tmp = t * (-z / a);
elseif ((x * y) <= -5e-70)
tmp = t_1;
elseif ((x * y) <= 5e+114)
tmp = z * (t / -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_] := Block[{t$95$1 = N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -2e+53], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], -2e-40], N[(t * N[((-z) / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -5e-70], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 5e+114], N[(z * N[(t / (-a)), $MachinePrecision]), $MachinePrecision], N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
t_1 := y \cdot \frac{x}{a}\\
\mathbf{if}\;x \cdot y \leq -2 \cdot 10^{+53}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq -2 \cdot 10^{-40}:\\
\;\;\;\;t \cdot \frac{-z}{a}\\
\mathbf{elif}\;x \cdot y \leq -5 \cdot 10^{-70}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{+114}:\\
\;\;\;\;z \cdot \frac{t}{-a}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{a}\\
\end{array}
\end{array}
if (*.f64 x y) < -2e53 or -1.9999999999999999e-40 < (*.f64 x y) < -4.9999999999999998e-70Initial program 82.7%
Taylor expanded in x around inf 74.8%
associate-*r/83.4%
Simplified83.4%
Taylor expanded in x around 0 74.8%
associate-*l/79.4%
*-commutative79.4%
Simplified79.4%
if -2e53 < (*.f64 x y) < -1.9999999999999999e-40Initial program 99.8%
Taylor expanded in x around 0 72.0%
mul-1-neg72.0%
associate-/l*66.3%
distribute-rgt-neg-in66.3%
distribute-neg-frac266.3%
Simplified66.3%
if -4.9999999999999998e-70 < (*.f64 x y) < 5.0000000000000001e114Initial program 96.2%
Taylor expanded in x around 0 76.3%
*-commutative76.3%
associate-*r/72.2%
neg-mul-172.2%
distribute-rgt-neg-in72.2%
distribute-frac-neg72.2%
Simplified72.2%
if 5.0000000000000001e114 < (*.f64 x y) Initial program 82.8%
Taylor expanded in x around inf 71.7%
associate-*r/85.9%
Simplified85.9%
Final simplification75.8%
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 (* y (/ x a))))
(if (<= (* x y) -2e+53)
t_1
(if (<= (* x y) -2e-40)
(* t (/ (- z) a))
(if (<= (* x y) -5e-70)
t_1
(if (<= (* x y) 5e+114) (/ z (/ a (- t))) (* 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 t_1 = y * (x / a);
double tmp;
if ((x * y) <= -2e+53) {
tmp = t_1;
} else if ((x * y) <= -2e-40) {
tmp = t * (-z / a);
} else if ((x * y) <= -5e-70) {
tmp = t_1;
} else if ((x * y) <= 5e+114) {
tmp = z / (a / -t);
} 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) :: t_1
real(8) :: tmp
t_1 = y * (x / a)
if ((x * y) <= (-2d+53)) then
tmp = t_1
else if ((x * y) <= (-2d-40)) then
tmp = t * (-z / a)
else if ((x * y) <= (-5d-70)) then
tmp = t_1
else if ((x * y) <= 5d+114) then
tmp = z / (a / -t)
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 t_1 = y * (x / a);
double tmp;
if ((x * y) <= -2e+53) {
tmp = t_1;
} else if ((x * y) <= -2e-40) {
tmp = t * (-z / a);
} else if ((x * y) <= -5e-70) {
tmp = t_1;
} else if ((x * y) <= 5e+114) {
tmp = z / (a / -t);
} 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): t_1 = y * (x / a) tmp = 0 if (x * y) <= -2e+53: tmp = t_1 elif (x * y) <= -2e-40: tmp = t * (-z / a) elif (x * y) <= -5e-70: tmp = t_1 elif (x * y) <= 5e+114: tmp = z / (a / -t) 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) t_1 = Float64(y * Float64(x / a)) tmp = 0.0 if (Float64(x * y) <= -2e+53) tmp = t_1; elseif (Float64(x * y) <= -2e-40) tmp = Float64(t * Float64(Float64(-z) / a)); elseif (Float64(x * y) <= -5e-70) tmp = t_1; elseif (Float64(x * y) <= 5e+114) tmp = Float64(z / Float64(a / Float64(-t))); else tmp = Float64(x * Float64(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)
t_1 = y * (x / a);
tmp = 0.0;
if ((x * y) <= -2e+53)
tmp = t_1;
elseif ((x * y) <= -2e-40)
tmp = t * (-z / a);
elseif ((x * y) <= -5e-70)
tmp = t_1;
elseif ((x * y) <= 5e+114)
tmp = z / (a / -t);
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_] := Block[{t$95$1 = N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -2e+53], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], -2e-40], N[(t * N[((-z) / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -5e-70], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 5e+114], N[(z / N[(a / (-t)), $MachinePrecision]), $MachinePrecision], N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
t_1 := y \cdot \frac{x}{a}\\
\mathbf{if}\;x \cdot y \leq -2 \cdot 10^{+53}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq -2 \cdot 10^{-40}:\\
\;\;\;\;t \cdot \frac{-z}{a}\\
\mathbf{elif}\;x \cdot y \leq -5 \cdot 10^{-70}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{+114}:\\
\;\;\;\;\frac{z}{\frac{a}{-t}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{a}\\
\end{array}
\end{array}
if (*.f64 x y) < -2e53 or -1.9999999999999999e-40 < (*.f64 x y) < -4.9999999999999998e-70Initial program 82.7%
Taylor expanded in x around inf 74.8%
associate-*r/83.4%
Simplified83.4%
Taylor expanded in x around 0 74.8%
associate-*l/79.4%
*-commutative79.4%
Simplified79.4%
if -2e53 < (*.f64 x y) < -1.9999999999999999e-40Initial program 99.8%
Taylor expanded in x around 0 72.0%
mul-1-neg72.0%
associate-/l*66.3%
distribute-rgt-neg-in66.3%
distribute-neg-frac266.3%
Simplified66.3%
if -4.9999999999999998e-70 < (*.f64 x y) < 5.0000000000000001e114Initial program 96.2%
div-sub96.2%
associate-/l*94.7%
associate-/l*89.9%
Applied egg-rr89.9%
Taylor expanded in x around 0 76.3%
mul-1-neg76.3%
associate-*l/72.2%
distribute-rgt-neg-out72.2%
Simplified72.2%
distribute-rgt-neg-out72.2%
clear-num71.9%
associate-*l/72.6%
*-un-lft-identity72.6%
distribute-neg-frac272.6%
distribute-neg-frac272.6%
Applied egg-rr72.6%
if 5.0000000000000001e114 < (*.f64 x y) Initial program 82.8%
Taylor expanded in x around inf 71.7%
associate-*r/85.9%
Simplified85.9%
Final simplification76.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 (if (or (<= (* x y) -1e+302) (not (<= (* x y) 5e+276))) (* x (/ y 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 (((x * y) <= -1e+302) || !((x * y) <= 5e+276)) {
tmp = x * (y / a);
} else {
tmp = ((x * y) - (z * t)) / 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) <= (-1d+302)) .or. (.not. ((x * y) <= 5d+276))) then
tmp = x * (y / a)
else
tmp = ((x * y) - (z * t)) / 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) <= -1e+302) || !((x * y) <= 5e+276)) {
tmp = x * (y / 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 ((x * y) <= -1e+302) or not ((x * y) <= 5e+276): tmp = x * (y / 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(x * y) <= -1e+302) || !(Float64(x * y) <= 5e+276)) tmp = Float64(x * Float64(y / 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 (((x * y) <= -1e+302) || ~(((x * y) <= 5e+276)))
tmp = x * (y / 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[Or[LessEqual[N[(x * y), $MachinePrecision], -1e+302], N[Not[LessEqual[N[(x * y), $MachinePrecision], 5e+276]], $MachinePrecision]], N[(x * N[(y / 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}\;x \cdot y \leq -1 \cdot 10^{+302} \lor \neg \left(x \cdot y \leq 5 \cdot 10^{+276}\right):\\
\;\;\;\;x \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y - z \cdot t}{a}\\
\end{array}
\end{array}
if (*.f64 x y) < -1.0000000000000001e302 or 5.00000000000000001e276 < (*.f64 x y) Initial program 57.4%
Taylor expanded in x around inf 62.6%
associate-*r/92.7%
Simplified92.7%
if -1.0000000000000001e302 < (*.f64 x y) < 5.00000000000000001e276Initial program 96.7%
Final simplification96.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
(let* ((t_1 (* x (/ y a))))
(if (<= (* x y) -1e+302)
(- t_1 (* z (/ t a)))
(if (<= (* x y) 5e+276) (/ (- (* x y) (* z t)) a) t_1))))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 / a);
double tmp;
if ((x * y) <= -1e+302) {
tmp = t_1 - (z * (t / a));
} else if ((x * y) <= 5e+276) {
tmp = ((x * y) - (z * t)) / a;
} else {
tmp = t_1;
}
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 = x * (y / a)
if ((x * y) <= (-1d+302)) then
tmp = t_1 - (z * (t / a))
else if ((x * y) <= 5d+276) then
tmp = ((x * y) - (z * t)) / a
else
tmp = t_1
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 = x * (y / a);
double tmp;
if ((x * y) <= -1e+302) {
tmp = t_1 - (z * (t / a));
} else if ((x * y) <= 5e+276) {
tmp = ((x * y) - (z * t)) / a;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): t_1 = x * (y / a) tmp = 0 if (x * y) <= -1e+302: tmp = t_1 - (z * (t / a)) elif (x * y) <= 5e+276: tmp = ((x * y) - (z * t)) / a else: tmp = t_1 return tmp
x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) t_1 = Float64(x * Float64(y / a)) tmp = 0.0 if (Float64(x * y) <= -1e+302) tmp = Float64(t_1 - Float64(z * Float64(t / a))); elseif (Float64(x * y) <= 5e+276) tmp = Float64(Float64(Float64(x * y) - Float64(z * t)) / a); else tmp = t_1; 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 / a);
tmp = 0.0;
if ((x * y) <= -1e+302)
tmp = t_1 - (z * (t / a));
elseif ((x * y) <= 5e+276)
tmp = ((x * y) - (z * t)) / a;
else
tmp = t_1;
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[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -1e+302], N[(t$95$1 - N[(z * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 5e+276], N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
t_1 := x \cdot \frac{y}{a}\\
\mathbf{if}\;x \cdot y \leq -1 \cdot 10^{+302}:\\
\;\;\;\;t\_1 - z \cdot \frac{t}{a}\\
\mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{+276}:\\
\;\;\;\;\frac{x \cdot y - z \cdot t}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 x y) < -1.0000000000000001e302Initial program 44.7%
div-sub44.7%
associate-/l*79.4%
associate-/l*94.6%
Applied egg-rr94.6%
if -1.0000000000000001e302 < (*.f64 x y) < 5.00000000000000001e276Initial program 96.7%
if 5.00000000000000001e276 < (*.f64 x y) Initial program 70.0%
Taylor expanded in x around inf 75.3%
associate-*r/100.0%
Simplified100.0%
Final simplification96.8%
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 90.9%
Taylor expanded in x around inf 48.9%
associate-*r/53.7%
Simplified53.7%
Final simplification53.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 (* 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 90.9%
Taylor expanded in x around inf 48.9%
associate-*r/53.7%
Simplified53.7%
Taylor expanded in x around 0 48.9%
associate-*l/50.7%
*-commutative50.7%
Simplified50.7%
Final simplification50.7%
(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 2024078
(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))