
(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 8 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}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (* x y) (* z t))))
(if (or (<= t_1 (- INFINITY)) (not (<= t_1 5e+303)))
(* y (/ (- x (* t (/ z y))) a))
(/ t_1 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 <= 5e+303)) {
tmp = y * ((x - (t * (z / y))) / a);
} else {
tmp = t_1 / a;
}
return tmp;
}
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 <= 5e+303)) {
tmp = y * ((x - (t * (z / y))) / a);
} else {
tmp = t_1 / a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x * y) - (z * t) tmp = 0 if (t_1 <= -math.inf) or not (t_1 <= 5e+303): tmp = y * ((x - (t * (z / y))) / a) else: tmp = t_1 / a return tmp
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 <= 5e+303)) tmp = Float64(y * Float64(Float64(x - Float64(t * Float64(z / y))) / a)); else tmp = Float64(t_1 / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x * y) - (z * t); tmp = 0.0; if ((t_1 <= -Inf) || ~((t_1 <= 5e+303))) tmp = y * ((x - (t * (z / y))) / a); else tmp = t_1 / a; end tmp_2 = tmp; end
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, 5e+303]], $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}
\\
\begin{array}{l}
t_1 := x \cdot y - z \cdot t\\
\mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 5 \cdot 10^{+303}\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 4.9999999999999997e303 < (-.f64 (*.f64 x y) (*.f64 z t)) Initial program 79.0%
clear-num79.0%
inv-pow79.0%
fma-neg79.0%
*-commutative79.0%
distribute-rgt-neg-in79.0%
Applied egg-rr79.0%
Taylor expanded in y around inf 88.4%
+-commutative88.4%
mul-1-neg88.4%
sub-neg88.4%
*-commutative88.4%
associate-/r*90.1%
div-sub91.6%
associate-*r/95.8%
Simplified95.8%
if -inf.0 < (-.f64 (*.f64 x y) (*.f64 z t)) < 4.9999999999999997e303Initial program 99.1%
Final simplification98.2%
(FPCore (x y z t a) :precision binary64 (if (<= (* x y) (- INFINITY)) (/ y (/ a x)) (if (<= (* x y) 1e+282) (/ (- (* x y) (* z t)) a) (* y (/ x a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x * y) <= -((double) INFINITY)) {
tmp = y / (a / x);
} else if ((x * y) <= 1e+282) {
tmp = ((x * y) - (z * t)) / a;
} else {
tmp = y * (x / a);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x * y) <= -Double.POSITIVE_INFINITY) {
tmp = y / (a / x);
} else if ((x * y) <= 1e+282) {
tmp = ((x * y) - (z * t)) / a;
} else {
tmp = y * (x / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x * y) <= -math.inf: tmp = y / (a / x) elif (x * y) <= 1e+282: tmp = ((x * y) - (z * t)) / a else: tmp = y * (x / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(x * y) <= Float64(-Inf)) tmp = Float64(y / Float64(a / x)); elseif (Float64(x * y) <= 1e+282) tmp = Float64(Float64(Float64(x * y) - Float64(z * t)) / a); else tmp = Float64(y * Float64(x / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x * y) <= -Inf) tmp = y / (a / x); elseif ((x * y) <= 1e+282) tmp = ((x * y) - (z * t)) / a; else tmp = y * (x / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(x * y), $MachinePrecision], (-Infinity)], N[(y / N[(a / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 1e+282], N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -\infty:\\
\;\;\;\;\frac{y}{\frac{a}{x}}\\
\mathbf{elif}\;x \cdot y \leq 10^{+282}:\\
\;\;\;\;\frac{x \cdot y - z \cdot t}{a}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{a}\\
\end{array}
\end{array}
if (*.f64 x y) < -inf.0Initial program 77.7%
Taylor expanded in y around inf 95.2%
+-commutative95.2%
mul-1-neg95.2%
unsub-neg95.2%
times-frac99.9%
Simplified99.9%
Taylor expanded in x around inf 99.9%
clear-num99.8%
un-div-inv99.9%
Applied egg-rr99.9%
if -inf.0 < (*.f64 x y) < 1.00000000000000003e282Initial program 97.1%
if 1.00000000000000003e282 < (*.f64 x y) Initial program 66.3%
Taylor expanded in y around inf 100.0%
+-commutative100.0%
mul-1-neg100.0%
unsub-neg100.0%
times-frac85.7%
Simplified85.7%
Taylor expanded in x around inf 100.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= (* x y) -5e+19) (not (<= (* x y) 5e+134))) (* x (/ y a)) (* (* z t) (/ -1.0 a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((x * y) <= -5e+19) || !((x * y) <= 5e+134)) {
tmp = x * (y / a);
} else {
tmp = (z * t) * (-1.0 / a);
}
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) :: tmp
if (((x * y) <= (-5d+19)) .or. (.not. ((x * y) <= 5d+134))) then
tmp = x * (y / a)
else
tmp = (z * t) * ((-1.0d0) / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (((x * y) <= -5e+19) || !((x * y) <= 5e+134)) {
tmp = x * (y / a);
} else {
tmp = (z * t) * (-1.0 / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((x * y) <= -5e+19) or not ((x * y) <= 5e+134): tmp = x * (y / a) else: tmp = (z * t) * (-1.0 / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(x * y) <= -5e+19) || !(Float64(x * y) <= 5e+134)) tmp = Float64(x * Float64(y / a)); else tmp = Float64(Float64(z * t) * Float64(-1.0 / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((x * y) <= -5e+19) || ~(((x * y) <= 5e+134))) tmp = x * (y / a); else tmp = (z * t) * (-1.0 / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(x * y), $MachinePrecision], -5e+19], N[Not[LessEqual[N[(x * y), $MachinePrecision], 5e+134]], $MachinePrecision]], N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision], N[(N[(z * t), $MachinePrecision] * N[(-1.0 / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -5 \cdot 10^{+19} \lor \neg \left(x \cdot y \leq 5 \cdot 10^{+134}\right):\\
\;\;\;\;x \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot t\right) \cdot \frac{-1}{a}\\
\end{array}
\end{array}
if (*.f64 x y) < -5e19 or 4.99999999999999981e134 < (*.f64 x y) Initial program 88.4%
Taylor expanded in x around inf 77.7%
associate-*r/80.5%
Simplified80.5%
if -5e19 < (*.f64 x y) < 4.99999999999999981e134Initial program 97.7%
Taylor expanded in x around 0 78.2%
associate-*r*78.2%
neg-mul-178.2%
Simplified78.2%
frac-2neg78.2%
div-inv78.2%
distribute-lft-neg-out78.2%
remove-double-neg78.2%
Applied egg-rr78.2%
Final simplification79.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= (* x y) -5e+19) (not (<= (* x y) 5e+134))) (* x (/ y a)) (/ (* z t) (- a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((x * y) <= -5e+19) || !((x * y) <= 5e+134)) {
tmp = x * (y / a);
} else {
tmp = (z * t) / -a;
}
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) :: tmp
if (((x * y) <= (-5d+19)) .or. (.not. ((x * y) <= 5d+134))) then
tmp = x * (y / a)
else
tmp = (z * t) / -a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (((x * y) <= -5e+19) || !((x * y) <= 5e+134)) {
tmp = x * (y / a);
} else {
tmp = (z * t) / -a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((x * y) <= -5e+19) or not ((x * y) <= 5e+134): tmp = x * (y / a) else: tmp = (z * t) / -a return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(x * y) <= -5e+19) || !(Float64(x * y) <= 5e+134)) tmp = Float64(x * Float64(y / a)); else tmp = Float64(Float64(z * t) / Float64(-a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((x * y) <= -5e+19) || ~(((x * y) <= 5e+134))) tmp = x * (y / a); else tmp = (z * t) / -a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(x * y), $MachinePrecision], -5e+19], N[Not[LessEqual[N[(x * y), $MachinePrecision], 5e+134]], $MachinePrecision]], N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision], N[(N[(z * t), $MachinePrecision] / (-a)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -5 \cdot 10^{+19} \lor \neg \left(x \cdot y \leq 5 \cdot 10^{+134}\right):\\
\;\;\;\;x \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot t}{-a}\\
\end{array}
\end{array}
if (*.f64 x y) < -5e19 or 4.99999999999999981e134 < (*.f64 x y) Initial program 88.4%
Taylor expanded in x around inf 77.7%
associate-*r/80.5%
Simplified80.5%
if -5e19 < (*.f64 x y) < 4.99999999999999981e134Initial program 97.7%
Taylor expanded in x around 0 78.2%
associate-*r*78.2%
neg-mul-178.2%
Simplified78.2%
Final simplification79.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= (* x y) -5e+19) (not (<= (* x y) 5e+134))) (* x (/ y a)) (* t (/ z (- a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((x * y) <= -5e+19) || !((x * y) <= 5e+134)) {
tmp = x * (y / a);
} else {
tmp = t * (z / -a);
}
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) :: tmp
if (((x * y) <= (-5d+19)) .or. (.not. ((x * y) <= 5d+134))) then
tmp = x * (y / a)
else
tmp = t * (z / -a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (((x * y) <= -5e+19) || !((x * y) <= 5e+134)) {
tmp = x * (y / a);
} else {
tmp = t * (z / -a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((x * y) <= -5e+19) or not ((x * y) <= 5e+134): tmp = x * (y / a) else: tmp = t * (z / -a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(x * y) <= -5e+19) || !(Float64(x * y) <= 5e+134)) tmp = Float64(x * Float64(y / a)); else tmp = Float64(t * Float64(z / Float64(-a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((x * y) <= -5e+19) || ~(((x * y) <= 5e+134))) tmp = x * (y / a); else tmp = t * (z / -a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(x * y), $MachinePrecision], -5e+19], N[Not[LessEqual[N[(x * y), $MachinePrecision], 5e+134]], $MachinePrecision]], N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision], N[(t * N[(z / (-a)), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -5 \cdot 10^{+19} \lor \neg \left(x \cdot y \leq 5 \cdot 10^{+134}\right):\\
\;\;\;\;x \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{z}{-a}\\
\end{array}
\end{array}
if (*.f64 x y) < -5e19 or 4.99999999999999981e134 < (*.f64 x y) Initial program 88.4%
Taylor expanded in x around inf 77.7%
associate-*r/80.5%
Simplified80.5%
if -5e19 < (*.f64 x y) < 4.99999999999999981e134Initial program 97.7%
clear-num97.5%
inv-pow97.5%
fma-neg97.5%
*-commutative97.5%
distribute-rgt-neg-in97.5%
Applied egg-rr97.5%
Taylor expanded in x around 0 78.2%
mul-1-neg78.2%
associate-*r/75.9%
distribute-rgt-neg-in75.9%
mul-1-neg75.9%
associate-*r/75.9%
mul-1-neg75.9%
Simplified75.9%
Final simplification77.8%
(FPCore (x y z t a) :precision binary64 (if (<= a 5.1e+168) (/ (* x y) a) (* x (/ y a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= 5.1e+168) {
tmp = (x * y) / a;
} else {
tmp = x * (y / a);
}
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) :: tmp
if (a <= 5.1d+168) then
tmp = (x * y) / a
else
tmp = x * (y / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= 5.1e+168) {
tmp = (x * y) / a;
} else {
tmp = x * (y / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= 5.1e+168: tmp = (x * y) / a else: tmp = x * (y / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= 5.1e+168) tmp = Float64(Float64(x * y) / a); else tmp = Float64(x * Float64(y / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= 5.1e+168) tmp = (x * y) / a; else tmp = x * (y / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, 5.1e+168], N[(N[(x * y), $MachinePrecision] / a), $MachinePrecision], N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 5.1 \cdot 10^{+168}:\\
\;\;\;\;\frac{x \cdot y}{a}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{a}\\
\end{array}
\end{array}
if a < 5.10000000000000025e168Initial program 94.7%
Taylor expanded in x around inf 48.6%
if 5.10000000000000025e168 < a Initial program 87.1%
Taylor expanded in x around inf 57.8%
associate-*r/54.9%
Simplified54.9%
(FPCore (x y z t a) :precision binary64 (/ x (/ a y)))
double code(double x, double y, double z, double t, double a) {
return x / (a / y);
}
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 / (a / y)
end function
public static double code(double x, double y, double z, double t, double a) {
return x / (a / y);
}
def code(x, y, z, t, a): return x / (a / y)
function code(x, y, z, t, a) return Float64(x / Float64(a / y)) end
function tmp = code(x, y, z, t, a) tmp = x / (a / y); end
code[x_, y_, z_, t_, a_] := N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{\frac{a}{y}}
\end{array}
Initial program 93.8%
Taylor expanded in x around inf 49.7%
associate-*r/49.8%
Simplified49.8%
clear-num49.8%
un-div-inv49.8%
Applied egg-rr49.8%
(FPCore (x y z t a) :precision binary64 (* x (/ y a)))
double code(double x, double y, double z, double t, double a) {
return x * (y / 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 / a)
end function
public static double code(double x, double y, double z, double t, double a) {
return x * (y / a);
}
def code(x, y, z, t, a): return x * (y / a)
function code(x, y, z, t, a) return Float64(x * Float64(y / a)) end
function tmp = code(x, y, z, t, a) tmp = x * (y / a); end
code[x_, y_, z_, t_, a_] := N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \frac{y}{a}
\end{array}
Initial program 93.8%
Taylor expanded in x around inf 49.7%
associate-*r/49.8%
Simplified49.8%
(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 2024086
(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))