
(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))) (t_2 (fma (/ y a) x (- (* t (/ z a)))))) (if (<= t_1 -1e+223) t_2 (if (<= t_1 2e+197) (/ t_1 a) t_2))))
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 t_2 = fma((y / a), x, -(t * (z / a)));
double tmp;
if (t_1 <= -1e+223) {
tmp = t_2;
} else if (t_1 <= 2e+197) {
tmp = t_1 / a;
} else {
tmp = t_2;
}
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)) t_2 = fma(Float64(y / a), x, Float64(-Float64(t * Float64(z / a)))) tmp = 0.0 if (t_1 <= -1e+223) tmp = t_2; elseif (t_1 <= 2e+197) tmp = Float64(t_1 / a); else tmp = t_2; 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]}, Block[{t$95$2 = N[(N[(y / a), $MachinePrecision] * x + (-N[(t * N[(z / a), $MachinePrecision]), $MachinePrecision])), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+223], t$95$2, If[LessEqual[t$95$1, 2e+197], N[(t$95$1 / a), $MachinePrecision], t$95$2]]]]
\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\\
t_2 := \mathsf{fma}\left(\frac{y}{a}, x, -t \cdot \frac{z}{a}\right)\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+223}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+197}:\\
\;\;\;\;\frac{t\_1}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (-.f64 (*.f64 x y) (*.f64 z t)) < -1.00000000000000005e223 or 1.9999999999999999e197 < (-.f64 (*.f64 x y) (*.f64 z t)) Initial program 84.9%
div-subN/A
sub-negN/A
associate-/l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6489.0
Applied egg-rr89.0%
associate-/l*N/A
clear-numN/A
un-div-invN/A
distribute-frac-negN/A
associate-/r/N/A
*-lowering-*.f64N/A
distribute-frac-negN/A
distribute-frac-neg2N/A
/-lowering-/.f64N/A
neg-lowering-neg.f6497.5
Applied egg-rr97.5%
if -1.00000000000000005e223 < (-.f64 (*.f64 x y) (*.f64 z t)) < 1.9999999999999999e197Initial program 98.5%
Final simplification98.2%
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 530000000.0)
(/ (- (* x y) (* z t)) a)
(if (<= a 1.05e+189)
(fma (- t) (/ z a) (/ (* x y) a))
(fma (/ y a) x (- (/ (* 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 (a <= 530000000.0) {
tmp = ((x * y) - (z * t)) / a;
} else if (a <= 1.05e+189) {
tmp = fma(-t, (z / a), ((x * y) / a));
} else {
tmp = fma((y / a), x, -((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 (a <= 530000000.0) tmp = Float64(Float64(Float64(x * y) - Float64(z * t)) / a); elseif (a <= 1.05e+189) tmp = fma(Float64(-t), Float64(z / a), Float64(Float64(x * y) / a)); else tmp = fma(Float64(y / a), x, Float64(-Float64(Float64(z * t) / 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, 530000000.0], N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[a, 1.05e+189], N[((-t) * N[(z / a), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(N[(y / a), $MachinePrecision] * x + (-N[(N[(z * t), $MachinePrecision] / a), $MachinePrecision])), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq 530000000:\\
\;\;\;\;\frac{x \cdot y - z \cdot t}{a}\\
\mathbf{elif}\;a \leq 1.05 \cdot 10^{+189}:\\
\;\;\;\;\mathsf{fma}\left(-t, \frac{z}{a}, \frac{x \cdot y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, x, -\frac{z \cdot t}{a}\right)\\
\end{array}
\end{array}
if a < 5.3e8Initial program 94.4%
if 5.3e8 < a < 1.04999999999999996e189Initial program 92.9%
div-subN/A
sub-negN/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6499.9
Applied egg-rr99.9%
if 1.04999999999999996e189 < a Initial program 90.8%
div-subN/A
sub-negN/A
associate-/l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6498.8
Applied egg-rr98.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
(if (<= a 530000000.0)
(/ (- (* x y) (* z t)) a)
(if (<= a 3.1e+168)
(fma (- t) (/ z a) (/ (* x y) a))
(fma (/ x a) 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 (a <= 530000000.0) {
tmp = ((x * y) - (z * t)) / a;
} else if (a <= 3.1e+168) {
tmp = fma(-t, (z / a), ((x * y) / a));
} else {
tmp = fma((x / a), 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 (a <= 530000000.0) tmp = Float64(Float64(Float64(x * y) - Float64(z * t)) / a); elseif (a <= 3.1e+168) tmp = fma(Float64(-t), Float64(z / a), Float64(Float64(x * y) / a)); else tmp = fma(Float64(x / a), y, Float64(-Float64(Float64(z * t) / 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, 530000000.0], N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[a, 3.1e+168], N[((-t) * N[(z / a), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(N[(x / a), $MachinePrecision] * y + (-N[(N[(z * t), $MachinePrecision] / a), $MachinePrecision])), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq 530000000:\\
\;\;\;\;\frac{x \cdot y - z \cdot t}{a}\\
\mathbf{elif}\;a \leq 3.1 \cdot 10^{+168}:\\
\;\;\;\;\mathsf{fma}\left(-t, \frac{z}{a}, \frac{x \cdot y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{a}, y, -\frac{z \cdot t}{a}\right)\\
\end{array}
\end{array}
if a < 5.3e8Initial program 94.4%
if 5.3e8 < a < 3.09999999999999996e168Initial program 92.3%
div-subN/A
sub-negN/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6499.9
Applied egg-rr99.9%
if 3.09999999999999996e168 < a Initial program 91.9%
div-subN/A
sub-negN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6499.9
Applied egg-rr99.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 (if (<= (* z t) -5e+23) (/ t (/ a (- z))) (if (<= (* z t) 2e+61) (/ (* x y) a) (- (/ z (/ a t))))))
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) <= -5e+23) {
tmp = t / (a / -z);
} else if ((z * t) <= 2e+61) {
tmp = (x * y) / a;
} else {
tmp = -(z / (a / t));
}
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 ((z * t) <= (-5d+23)) then
tmp = t / (a / -z)
else if ((z * t) <= 2d+61) then
tmp = (x * y) / a
else
tmp = -(z / (a / t))
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 ((z * t) <= -5e+23) {
tmp = t / (a / -z);
} else if ((z * t) <= 2e+61) {
tmp = (x * y) / a;
} else {
tmp = -(z / (a / t));
}
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) <= -5e+23: tmp = t / (a / -z) elif (z * t) <= 2e+61: tmp = (x * y) / a else: tmp = -(z / (a / t)) 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) <= -5e+23) tmp = Float64(t / Float64(a / Float64(-z))); elseif (Float64(z * t) <= 2e+61) tmp = Float64(Float64(x * y) / a); else tmp = Float64(-Float64(z / Float64(a / t))); 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) <= -5e+23)
tmp = t / (a / -z);
elseif ((z * t) <= 2e+61)
tmp = (x * y) / a;
else
tmp = -(z / (a / t));
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], -5e+23], N[(t / N[(a / (-z)), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z * t), $MachinePrecision], 2e+61], N[(N[(x * y), $MachinePrecision] / a), $MachinePrecision], (-N[(z / N[(a / t), $MachinePrecision]), $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 -5 \cdot 10^{+23}:\\
\;\;\;\;\frac{t}{\frac{a}{-z}}\\
\mathbf{elif}\;z \cdot t \leq 2 \cdot 10^{+61}:\\
\;\;\;\;\frac{x \cdot y}{a}\\
\mathbf{else}:\\
\;\;\;\;-\frac{z}{\frac{a}{t}}\\
\end{array}
\end{array}
if (*.f64 z t) < -4.9999999999999999e23Initial program 88.3%
sub-negN/A
+-commutativeN/A
distribute-lft-neg-inN/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f64N/A
*-lowering-*.f6488.3
Applied egg-rr88.3%
Taylor expanded in z around inf
associate-*r/N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f6481.1
Simplified81.1%
distribute-rgt-neg-outN/A
distribute-lft-neg-inN/A
associate-*l/N/A
*-commutativeN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
neg-lowering-neg.f6486.3
Applied egg-rr86.3%
if -4.9999999999999999e23 < (*.f64 z t) < 1.9999999999999999e61Initial program 96.1%
Taylor expanded in x around inf
/-lowering-/.f64N/A
*-lowering-*.f6478.1
Simplified78.1%
if 1.9999999999999999e61 < (*.f64 z t) Initial program 92.6%
sub-negN/A
+-commutativeN/A
distribute-lft-neg-inN/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f64N/A
*-lowering-*.f6492.6
Applied egg-rr92.6%
Taylor expanded in z around inf
associate-*r/N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f6483.6
Simplified83.6%
distribute-rgt-neg-outN/A
distribute-lft-neg-inN/A
associate-*l/N/A
associate-/r/N/A
/-lowering-/.f64N/A
neg-lowering-neg.f64N/A
/-lowering-/.f6490.7
Applied egg-rr90.7%
Final simplification81.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 (/ a (- z))))) (if (<= (* z t) -5e+23) t_1 (if (<= (* z t) 2e+61) (/ (* x y) 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 = t / (a / -z);
double tmp;
if ((z * t) <= -5e+23) {
tmp = t_1;
} else if ((z * t) <= 2e+61) {
tmp = (x * y) / 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 = t / (a / -z)
if ((z * t) <= (-5d+23)) then
tmp = t_1
else if ((z * t) <= 2d+61) then
tmp = (x * y) / 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 = t / (a / -z);
double tmp;
if ((z * t) <= -5e+23) {
tmp = t_1;
} else if ((z * t) <= 2e+61) {
tmp = (x * y) / 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 = t / (a / -z) tmp = 0 if (z * t) <= -5e+23: tmp = t_1 elif (z * t) <= 2e+61: tmp = (x * y) / 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(t / Float64(a / Float64(-z))) tmp = 0.0 if (Float64(z * t) <= -5e+23) tmp = t_1; elseif (Float64(z * t) <= 2e+61) tmp = Float64(Float64(x * y) / 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 = t / (a / -z);
tmp = 0.0;
if ((z * t) <= -5e+23)
tmp = t_1;
elseif ((z * t) <= 2e+61)
tmp = (x * y) / 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[(t / N[(a / (-z)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(z * t), $MachinePrecision], -5e+23], t$95$1, If[LessEqual[N[(z * t), $MachinePrecision], 2e+61], N[(N[(x * y), $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 := \frac{t}{\frac{a}{-z}}\\
\mathbf{if}\;z \cdot t \leq -5 \cdot 10^{+23}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \cdot t \leq 2 \cdot 10^{+61}:\\
\;\;\;\;\frac{x \cdot y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 z t) < -4.9999999999999999e23 or 1.9999999999999999e61 < (*.f64 z t) Initial program 90.0%
sub-negN/A
+-commutativeN/A
distribute-lft-neg-inN/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f64N/A
*-lowering-*.f6490.0
Applied egg-rr90.0%
Taylor expanded in z around inf
associate-*r/N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f6482.1
Simplified82.1%
distribute-rgt-neg-outN/A
distribute-lft-neg-inN/A
associate-*l/N/A
*-commutativeN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
neg-lowering-neg.f6484.2
Applied egg-rr84.2%
if -4.9999999999999999e23 < (*.f64 z t) < 1.9999999999999999e61Initial program 96.1%
Taylor expanded in x around inf
/-lowering-/.f64N/A
*-lowering-*.f6478.1
Simplified78.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 (if (<= (* z t) -1e+103) (fma (- t) (/ z a) (/ (* x y) a)) (/ (fma (- z) 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 tmp;
if ((z * t) <= -1e+103) {
tmp = fma(-t, (z / a), ((x * y) / a));
} else {
tmp = fma(-z, t, (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(z * t) <= -1e+103) tmp = fma(Float64(-t), Float64(z / a), Float64(Float64(x * y) / a)); else tmp = Float64(fma(Float64(-z), t, Float64(x * 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_] := If[LessEqual[N[(z * t), $MachinePrecision], -1e+103], N[((-t) * N[(z / a), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(N[((-z) * t + N[(x * y), $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 -1 \cdot 10^{+103}:\\
\;\;\;\;\mathsf{fma}\left(-t, \frac{z}{a}, \frac{x \cdot y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(-z, t, x \cdot y\right)}{a}\\
\end{array}
\end{array}
if (*.f64 z t) < -1e103Initial program 87.1%
div-subN/A
sub-negN/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6497.6
Applied egg-rr97.6%
if -1e103 < (*.f64 z t) Initial program 95.3%
sub-negN/A
+-commutativeN/A
distribute-lft-neg-inN/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f64N/A
*-lowering-*.f6495.3
Applied egg-rr95.3%
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) -5e+23) (- (* t (/ z a))) (if (<= (* z t) 2e+61) (/ (* x y) 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 ((z * t) <= -5e+23) {
tmp = -(t * (z / a));
} else if ((z * t) <= 2e+61) {
tmp = (x * y) / 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 ((z * t) <= (-5d+23)) then
tmp = -(t * (z / a))
else if ((z * t) <= 2d+61) then
tmp = (x * y) / 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 ((z * t) <= -5e+23) {
tmp = -(t * (z / a));
} else if ((z * t) <= 2e+61) {
tmp = (x * y) / 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 (z * t) <= -5e+23: tmp = -(t * (z / a)) elif (z * t) <= 2e+61: tmp = (x * y) / 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(z * t) <= -5e+23) tmp = Float64(-Float64(t * Float64(z / a))); elseif (Float64(z * t) <= 2e+61) tmp = Float64(Float64(x * y) / a); else tmp = Float64(-Float64(z * Float64(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) <= -5e+23)
tmp = -(t * (z / a));
elseif ((z * t) <= 2e+61)
tmp = (x * y) / 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[LessEqual[N[(z * t), $MachinePrecision], -5e+23], (-N[(t * N[(z / a), $MachinePrecision]), $MachinePrecision]), If[LessEqual[N[(z * t), $MachinePrecision], 2e+61], N[(N[(x * y), $MachinePrecision] / a), $MachinePrecision], (-N[(z * N[(t / a), $MachinePrecision]), $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 -5 \cdot 10^{+23}:\\
\;\;\;\;-t \cdot \frac{z}{a}\\
\mathbf{elif}\;z \cdot t \leq 2 \cdot 10^{+61}:\\
\;\;\;\;\frac{x \cdot y}{a}\\
\mathbf{else}:\\
\;\;\;\;-z \cdot \frac{t}{a}\\
\end{array}
\end{array}
if (*.f64 z t) < -4.9999999999999999e23Initial program 88.3%
sub-negN/A
+-commutativeN/A
distribute-lft-neg-inN/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f64N/A
*-lowering-*.f6488.3
Applied egg-rr88.3%
Taylor expanded in z around inf
associate-*r/N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f6481.1
Simplified81.1%
distribute-rgt-neg-outN/A
distribute-lft-neg-inN/A
associate-*l/N/A
*-lowering-*.f64N/A
frac-2negN/A
remove-double-negN/A
/-lowering-/.f64N/A
neg-lowering-neg.f6486.3
Applied egg-rr86.3%
if -4.9999999999999999e23 < (*.f64 z t) < 1.9999999999999999e61Initial program 96.1%
Taylor expanded in x around inf
/-lowering-/.f64N/A
*-lowering-*.f6478.1
Simplified78.1%
if 1.9999999999999999e61 < (*.f64 z t) Initial program 92.6%
sub-negN/A
+-commutativeN/A
distribute-lft-neg-inN/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f64N/A
*-lowering-*.f6492.6
Applied egg-rr92.6%
Taylor expanded in z around inf
associate-*r/N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f6483.6
Simplified83.6%
associate-*r/N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
neg-lowering-neg.f6488.2
Applied egg-rr88.2%
Final simplification81.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 (let* ((t_1 (- (* t (/ z a))))) (if (<= (* z t) -5e+23) t_1 (if (<= (* z t) 2e+61) (/ (* x y) 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 = -(t * (z / a));
double tmp;
if ((z * t) <= -5e+23) {
tmp = t_1;
} else if ((z * t) <= 2e+61) {
tmp = (x * y) / 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 = -(t * (z / a))
if ((z * t) <= (-5d+23)) then
tmp = t_1
else if ((z * t) <= 2d+61) then
tmp = (x * y) / 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 = -(t * (z / a));
double tmp;
if ((z * t) <= -5e+23) {
tmp = t_1;
} else if ((z * t) <= 2e+61) {
tmp = (x * y) / 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 = -(t * (z / a)) tmp = 0 if (z * t) <= -5e+23: tmp = t_1 elif (z * t) <= 2e+61: tmp = (x * y) / 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(-Float64(t * Float64(z / a))) tmp = 0.0 if (Float64(z * t) <= -5e+23) tmp = t_1; elseif (Float64(z * t) <= 2e+61) tmp = Float64(Float64(x * y) / 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 = -(t * (z / a));
tmp = 0.0;
if ((z * t) <= -5e+23)
tmp = t_1;
elseif ((z * t) <= 2e+61)
tmp = (x * y) / 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[(t * N[(z / a), $MachinePrecision]), $MachinePrecision])}, If[LessEqual[N[(z * t), $MachinePrecision], -5e+23], t$95$1, If[LessEqual[N[(z * t), $MachinePrecision], 2e+61], N[(N[(x * y), $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 := -t \cdot \frac{z}{a}\\
\mathbf{if}\;z \cdot t \leq -5 \cdot 10^{+23}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \cdot t \leq 2 \cdot 10^{+61}:\\
\;\;\;\;\frac{x \cdot y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 z t) < -4.9999999999999999e23 or 1.9999999999999999e61 < (*.f64 z t) Initial program 90.0%
sub-negN/A
+-commutativeN/A
distribute-lft-neg-inN/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f64N/A
*-lowering-*.f6490.0
Applied egg-rr90.0%
Taylor expanded in z around inf
associate-*r/N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f6482.1
Simplified82.1%
distribute-rgt-neg-outN/A
distribute-lft-neg-inN/A
associate-*l/N/A
*-lowering-*.f64N/A
frac-2negN/A
remove-double-negN/A
/-lowering-/.f64N/A
neg-lowering-neg.f6484.4
Applied egg-rr84.4%
if -4.9999999999999999e23 < (*.f64 z t) < 1.9999999999999999e61Initial program 96.1%
Taylor expanded in x around inf
/-lowering-/.f64N/A
*-lowering-*.f6478.1
Simplified78.1%
Final simplification80.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 (<= (* z t) -1e+204) (- (* t (/ z a))) (/ (fma (- z) 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 tmp;
if ((z * t) <= -1e+204) {
tmp = -(t * (z / a));
} else {
tmp = fma(-z, t, (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(z * t) <= -1e+204) tmp = Float64(-Float64(t * Float64(z / a))); else tmp = Float64(fma(Float64(-z), t, Float64(x * 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_] := If[LessEqual[N[(z * t), $MachinePrecision], -1e+204], (-N[(t * N[(z / a), $MachinePrecision]), $MachinePrecision]), N[(N[((-z) * t + N[(x * y), $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 -1 \cdot 10^{+204}:\\
\;\;\;\;-t \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(-z, t, x \cdot y\right)}{a}\\
\end{array}
\end{array}
if (*.f64 z t) < -9.99999999999999989e203Initial program 78.3%
sub-negN/A
+-commutativeN/A
distribute-lft-neg-inN/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f64N/A
*-lowering-*.f6478.3
Applied egg-rr78.3%
Taylor expanded in z around inf
associate-*r/N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f6478.2
Simplified78.2%
distribute-rgt-neg-outN/A
distribute-lft-neg-inN/A
associate-*l/N/A
*-lowering-*.f64N/A
frac-2negN/A
remove-double-negN/A
/-lowering-/.f64N/A
neg-lowering-neg.f6496.1
Applied egg-rr96.1%
if -9.99999999999999989e203 < (*.f64 z t) Initial program 95.6%
sub-negN/A
+-commutativeN/A
distribute-lft-neg-inN/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f64N/A
*-lowering-*.f6495.6
Applied egg-rr95.6%
Final simplification95.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 (<= (* z t) -1e+204) (- (* 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) <= -1e+204) {
tmp = -(t * (z / 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 ((z * t) <= (-1d+204)) then
tmp = -(t * (z / 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 ((z * t) <= -1e+204) {
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) <= -1e+204: 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) <= -1e+204) tmp = Float64(-Float64(t * 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) <= -1e+204)
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], -1e+204], (-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 -1 \cdot 10^{+204}:\\
\;\;\;\;-t \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y - z \cdot t}{a}\\
\end{array}
\end{array}
if (*.f64 z t) < -9.99999999999999989e203Initial program 78.3%
sub-negN/A
+-commutativeN/A
distribute-lft-neg-inN/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f64N/A
*-lowering-*.f6478.3
Applied egg-rr78.3%
Taylor expanded in z around inf
associate-*r/N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f6478.2
Simplified78.2%
distribute-rgt-neg-outN/A
distribute-lft-neg-inN/A
associate-*l/N/A
*-lowering-*.f64N/A
frac-2negN/A
remove-double-negN/A
/-lowering-/.f64N/A
neg-lowering-neg.f6496.1
Applied egg-rr96.1%
if -9.99999999999999989e203 < (*.f64 z t) Initial program 95.6%
Final simplification95.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 (<= a 2.45e+120) (/ (* x y) a) (* y (/ x 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 <= 2.45e+120) {
tmp = (x * y) / a;
} else {
tmp = y * (x / 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 (a <= 2.45d+120) then
tmp = (x * y) / a
else
tmp = y * (x / 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 (a <= 2.45e+120) {
tmp = (x * y) / a;
} else {
tmp = y * (x / a);
}
return tmp;
}
[x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): tmp = 0 if a <= 2.45e+120: tmp = (x * y) / a else: tmp = y * (x / 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 <= 2.45e+120) tmp = Float64(Float64(x * y) / a); else tmp = Float64(y * Float64(x / 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 (a <= 2.45e+120)
tmp = (x * y) / a;
else
tmp = y * (x / 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[a, 2.45e+120], N[(N[(x * y), $MachinePrecision] / a), $MachinePrecision], N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.45 \cdot 10^{+120}:\\
\;\;\;\;\frac{x \cdot y}{a}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{a}\\
\end{array}
\end{array}
if a < 2.45000000000000005e120Initial program 94.2%
Taylor expanded in x around inf
/-lowering-/.f64N/A
*-lowering-*.f6456.8
Simplified56.8%
if 2.45000000000000005e120 < a Initial program 92.0%
Taylor expanded in x around inf
/-lowering-/.f64N/A
*-lowering-*.f6452.2
Simplified52.2%
associate-/l*N/A
clear-numN/A
un-div-invN/A
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f6457.5
Applied egg-rr57.5%
Final simplification56.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 (/ 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 93.9%
Taylor expanded in x around inf
/-lowering-/.f64N/A
*-lowering-*.f6456.2
Simplified56.2%
associate-/l*N/A
clear-numN/A
un-div-invN/A
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f6453.8
Applied egg-rr53.8%
Final simplification53.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 2024198
(FPCore (x y z t a)
:name "Data.Colour.Matrix:inverse from colour-2.3.3, B"
:precision binary64
:alt
(! :herbie-platform default (if (< z -246868496869954800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (* (/ y a) x) (* (/ t a) z)) (if (< z 6309831121978371/100000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ (- (* x y) (* z t)) a) (- (* (/ y a) x) (* (/ t a) z)))))
(/ (- (* x y) (* z t)) a))