
(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}
a\_m = (fabs.f64 a)
a\_s = (copysign.f64 #s(literal 1 binary64) a)
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
(FPCore (a_s x y z t a_m)
:precision binary64
(*
a_s
(if (<= a_m 1.22e+98)
(* (fma t (- z) (* x y)) (/ 1.0 a_m))
(fma (/ y a_m) x (/ z (/ a_m (- t)))))))a\_m = fabs(a);
a\_s = copysign(1.0, a);
assert(x < y && y < z && z < t && t < a_m);
assert(x < y && y < z && z < t && t < a_m);
double code(double a_s, double x, double y, double z, double t, double a_m) {
double tmp;
if (a_m <= 1.22e+98) {
tmp = fma(t, -z, (x * y)) * (1.0 / a_m);
} else {
tmp = fma((y / a_m), x, (z / (a_m / -t)));
}
return a_s * tmp;
}
a\_m = abs(a) a\_s = copysign(1.0, a) x, y, z, t, a_m = sort([x, y, z, t, a_m]) x, y, z, t, a_m = sort([x, y, z, t, a_m]) function code(a_s, x, y, z, t, a_m) tmp = 0.0 if (a_m <= 1.22e+98) tmp = Float64(fma(t, Float64(-z), Float64(x * y)) * Float64(1.0 / a_m)); else tmp = fma(Float64(y / a_m), x, Float64(z / Float64(a_m / Float64(-t)))); end return Float64(a_s * tmp) end
a\_m = N[Abs[a], $MachinePrecision]
a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
code[a$95$s_, x_, y_, z_, t_, a$95$m_] := N[(a$95$s * If[LessEqual[a$95$m, 1.22e+98], N[(N[(t * (-z) + N[(x * y), $MachinePrecision]), $MachinePrecision] * N[(1.0 / a$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(y / a$95$m), $MachinePrecision] * x + N[(z / N[(a$95$m / (-t)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
a\_m = \left|a\right|
\\
a\_s = \mathsf{copysign}\left(1, a\right)
\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\
\\
a\_s \cdot \begin{array}{l}
\mathbf{if}\;a\_m \leq 1.22 \cdot 10^{+98}:\\
\;\;\;\;\mathsf{fma}\left(t, -z, x \cdot y\right) \cdot \frac{1}{a\_m}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a\_m}, x, \frac{z}{\frac{a\_m}{-t}}\right)\\
\end{array}
\end{array}
if a < 1.22e98Initial program 92.7%
div-invN/A
*-lowering-*.f64N/A
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6493.1
Applied egg-rr93.1%
if 1.22e98 < a Initial program 81.3%
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-*.f6485.6
Applied egg-rr85.6%
associate-/l*N/A
clear-numN/A
un-div-invN/A
distribute-frac-negN/A
/-lowering-/.f64N/A
neg-lowering-neg.f64N/A
/-lowering-/.f6490.4
Applied egg-rr90.4%
Final simplification92.6%
a\_m = (fabs.f64 a)
a\_s = (copysign.f64 #s(literal 1 binary64) a)
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
(FPCore (a_s x y z t a_m)
:precision binary64
(let* ((t_1 (- (* x y) (* t z))))
(*
a_s
(if (<= t_1 (- INFINITY))
(* x (- (/ y a_m) (* t (/ z (* a_m x)))))
(if (<= t_1 2e+277)
(/ t_1 a_m)
(fma (/ x a_m) y (/ (* z (- t)) a_m)))))))a\_m = fabs(a);
a\_s = copysign(1.0, a);
assert(x < y && y < z && z < t && t < a_m);
assert(x < y && y < z && z < t && t < a_m);
double code(double a_s, double x, double y, double z, double t, double a_m) {
double t_1 = (x * y) - (t * z);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = x * ((y / a_m) - (t * (z / (a_m * x))));
} else if (t_1 <= 2e+277) {
tmp = t_1 / a_m;
} else {
tmp = fma((x / a_m), y, ((z * -t) / a_m));
}
return a_s * tmp;
}
a\_m = abs(a) a\_s = copysign(1.0, a) x, y, z, t, a_m = sort([x, y, z, t, a_m]) x, y, z, t, a_m = sort([x, y, z, t, a_m]) function code(a_s, x, y, z, t, a_m) t_1 = Float64(Float64(x * y) - Float64(t * z)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(x * Float64(Float64(y / a_m) - Float64(t * Float64(z / Float64(a_m * x))))); elseif (t_1 <= 2e+277) tmp = Float64(t_1 / a_m); else tmp = fma(Float64(x / a_m), y, Float64(Float64(z * Float64(-t)) / a_m)); end return Float64(a_s * tmp) end
a\_m = N[Abs[a], $MachinePrecision]
a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
code[a$95$s_, x_, y_, z_, t_, a$95$m_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]}, N[(a$95$s * If[LessEqual[t$95$1, (-Infinity)], N[(x * N[(N[(y / a$95$m), $MachinePrecision] - N[(t * N[(z / N[(a$95$m * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+277], N[(t$95$1 / a$95$m), $MachinePrecision], N[(N[(x / a$95$m), $MachinePrecision] * y + N[(N[(z * (-t)), $MachinePrecision] / a$95$m), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
a\_m = \left|a\right|
\\
a\_s = \mathsf{copysign}\left(1, a\right)
\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\
\\
\begin{array}{l}
t_1 := x \cdot y - t \cdot z\\
a\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;x \cdot \left(\frac{y}{a\_m} - t \cdot \frac{z}{a\_m \cdot x}\right)\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+277}:\\
\;\;\;\;\frac{t\_1}{a\_m}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{a\_m}, y, \frac{z \cdot \left(-t\right)}{a\_m}\right)\\
\end{array}
\end{array}
\end{array}
if (-.f64 (*.f64 x y) (*.f64 z t)) < -inf.0Initial program 60.5%
div-invN/A
*-lowering-*.f64N/A
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6460.5
Applied egg-rr60.5%
Taylor expanded in x around inf
*-lowering-*.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6490.7
Simplified90.7%
if -inf.0 < (-.f64 (*.f64 x y) (*.f64 z t)) < 2.00000000000000001e277Initial program 98.8%
if 2.00000000000000001e277 < (-.f64 (*.f64 x y) (*.f64 z t)) Initial program 67.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-*.f6485.6
Applied egg-rr85.6%
Final simplification96.4%
a\_m = (fabs.f64 a)
a\_s = (copysign.f64 #s(literal 1 binary64) a)
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
(FPCore (a_s x y z t a_m)
:precision binary64
(*
a_s
(if (<= (* x y) (- INFINITY))
(* y (* x (/ 1.0 a_m)))
(if (<= (* x y) 2e+277)
(/ (- (* x y) (* t z)) a_m)
(fma (/ x a_m) y (/ (* z (- t)) a_m))))))a\_m = fabs(a);
a\_s = copysign(1.0, a);
assert(x < y && y < z && z < t && t < a_m);
assert(x < y && y < z && z < t && t < a_m);
double code(double a_s, double x, double y, double z, double t, double a_m) {
double tmp;
if ((x * y) <= -((double) INFINITY)) {
tmp = y * (x * (1.0 / a_m));
} else if ((x * y) <= 2e+277) {
tmp = ((x * y) - (t * z)) / a_m;
} else {
tmp = fma((x / a_m), y, ((z * -t) / a_m));
}
return a_s * tmp;
}
a\_m = abs(a) a\_s = copysign(1.0, a) x, y, z, t, a_m = sort([x, y, z, t, a_m]) x, y, z, t, a_m = sort([x, y, z, t, a_m]) function code(a_s, x, y, z, t, a_m) tmp = 0.0 if (Float64(x * y) <= Float64(-Inf)) tmp = Float64(y * Float64(x * Float64(1.0 / a_m))); elseif (Float64(x * y) <= 2e+277) tmp = Float64(Float64(Float64(x * y) - Float64(t * z)) / a_m); else tmp = fma(Float64(x / a_m), y, Float64(Float64(z * Float64(-t)) / a_m)); end return Float64(a_s * tmp) end
a\_m = N[Abs[a], $MachinePrecision]
a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
code[a$95$s_, x_, y_, z_, t_, a$95$m_] := N[(a$95$s * If[LessEqual[N[(x * y), $MachinePrecision], (-Infinity)], N[(y * N[(x * N[(1.0 / a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 2e+277], N[(N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision] / a$95$m), $MachinePrecision], N[(N[(x / a$95$m), $MachinePrecision] * y + N[(N[(z * (-t)), $MachinePrecision] / a$95$m), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
a\_m = \left|a\right|
\\
a\_s = \mathsf{copysign}\left(1, a\right)
\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\
\\
a\_s \cdot \begin{array}{l}
\mathbf{if}\;x \cdot y \leq -\infty:\\
\;\;\;\;y \cdot \left(x \cdot \frac{1}{a\_m}\right)\\
\mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{+277}:\\
\;\;\;\;\frac{x \cdot y - t \cdot z}{a\_m}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{a\_m}, y, \frac{z \cdot \left(-t\right)}{a\_m}\right)\\
\end{array}
\end{array}
if (*.f64 x y) < -inf.0Initial program 55.1%
Taylor expanded in x around inf
/-lowering-/.f64N/A
*-lowering-*.f6460.4
Simplified60.4%
associate-/l*N/A
*-commutativeN/A
div-invN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6499.6
Applied egg-rr99.6%
if -inf.0 < (*.f64 x y) < 2.00000000000000001e277Initial program 95.5%
if 2.00000000000000001e277 < (*.f64 x y) Initial program 67.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.7
Applied egg-rr99.7%
Final simplification96.0%
a\_m = (fabs.f64 a)
a\_s = (copysign.f64 #s(literal 1 binary64) a)
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
(FPCore (a_s x y z t a_m)
:precision binary64
(let* ((t_1 (* x (/ y a_m))))
(*
a_s
(if (<= (* x y) -4e+48)
t_1
(if (<= (* x y) 1e-68)
(- (* z (/ t a_m)))
(if (<= (* x y) 4e+109) (/ (* x y) a_m) t_1))))))a\_m = fabs(a);
a\_s = copysign(1.0, a);
assert(x < y && y < z && z < t && t < a_m);
assert(x < y && y < z && z < t && t < a_m);
double code(double a_s, double x, double y, double z, double t, double a_m) {
double t_1 = x * (y / a_m);
double tmp;
if ((x * y) <= -4e+48) {
tmp = t_1;
} else if ((x * y) <= 1e-68) {
tmp = -(z * (t / a_m));
} else if ((x * y) <= 4e+109) {
tmp = (x * y) / a_m;
} else {
tmp = t_1;
}
return a_s * tmp;
}
a\_m = abs(a)
a\_s = copysign(1.0d0, a)
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
real(8) function code(a_s, x, y, z, t, a_m)
real(8), intent (in) :: a_s
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_m
real(8) :: t_1
real(8) :: tmp
t_1 = x * (y / a_m)
if ((x * y) <= (-4d+48)) then
tmp = t_1
else if ((x * y) <= 1d-68) then
tmp = -(z * (t / a_m))
else if ((x * y) <= 4d+109) then
tmp = (x * y) / a_m
else
tmp = t_1
end if
code = a_s * tmp
end function
a\_m = Math.abs(a);
a\_s = Math.copySign(1.0, a);
assert x < y && y < z && z < t && t < a_m;
assert x < y && y < z && z < t && t < a_m;
public static double code(double a_s, double x, double y, double z, double t, double a_m) {
double t_1 = x * (y / a_m);
double tmp;
if ((x * y) <= -4e+48) {
tmp = t_1;
} else if ((x * y) <= 1e-68) {
tmp = -(z * (t / a_m));
} else if ((x * y) <= 4e+109) {
tmp = (x * y) / a_m;
} else {
tmp = t_1;
}
return a_s * tmp;
}
a\_m = math.fabs(a) a\_s = math.copysign(1.0, a) [x, y, z, t, a_m] = sort([x, y, z, t, a_m]) [x, y, z, t, a_m] = sort([x, y, z, t, a_m]) def code(a_s, x, y, z, t, a_m): t_1 = x * (y / a_m) tmp = 0 if (x * y) <= -4e+48: tmp = t_1 elif (x * y) <= 1e-68: tmp = -(z * (t / a_m)) elif (x * y) <= 4e+109: tmp = (x * y) / a_m else: tmp = t_1 return a_s * tmp
a\_m = abs(a) a\_s = copysign(1.0, a) x, y, z, t, a_m = sort([x, y, z, t, a_m]) x, y, z, t, a_m = sort([x, y, z, t, a_m]) function code(a_s, x, y, z, t, a_m) t_1 = Float64(x * Float64(y / a_m)) tmp = 0.0 if (Float64(x * y) <= -4e+48) tmp = t_1; elseif (Float64(x * y) <= 1e-68) tmp = Float64(-Float64(z * Float64(t / a_m))); elseif (Float64(x * y) <= 4e+109) tmp = Float64(Float64(x * y) / a_m); else tmp = t_1; end return Float64(a_s * tmp) end
a\_m = abs(a);
a\_s = sign(a) * abs(1.0);
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
function tmp_2 = code(a_s, x, y, z, t, a_m)
t_1 = x * (y / a_m);
tmp = 0.0;
if ((x * y) <= -4e+48)
tmp = t_1;
elseif ((x * y) <= 1e-68)
tmp = -(z * (t / a_m));
elseif ((x * y) <= 4e+109)
tmp = (x * y) / a_m;
else
tmp = t_1;
end
tmp_2 = a_s * tmp;
end
a\_m = N[Abs[a], $MachinePrecision]
a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
code[a$95$s_, x_, y_, z_, t_, a$95$m_] := Block[{t$95$1 = N[(x * N[(y / a$95$m), $MachinePrecision]), $MachinePrecision]}, N[(a$95$s * If[LessEqual[N[(x * y), $MachinePrecision], -4e+48], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 1e-68], (-N[(z * N[(t / a$95$m), $MachinePrecision]), $MachinePrecision]), If[LessEqual[N[(x * y), $MachinePrecision], 4e+109], N[(N[(x * y), $MachinePrecision] / a$95$m), $MachinePrecision], t$95$1]]]), $MachinePrecision]]
\begin{array}{l}
a\_m = \left|a\right|
\\
a\_s = \mathsf{copysign}\left(1, a\right)
\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\
\\
\begin{array}{l}
t_1 := x \cdot \frac{y}{a\_m}\\
a\_s \cdot \begin{array}{l}
\mathbf{if}\;x \cdot y \leq -4 \cdot 10^{+48}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 10^{-68}:\\
\;\;\;\;-z \cdot \frac{t}{a\_m}\\
\mathbf{elif}\;x \cdot y \leq 4 \cdot 10^{+109}:\\
\;\;\;\;\frac{x \cdot y}{a\_m}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
\end{array}
if (*.f64 x y) < -4.00000000000000018e48 or 3.99999999999999993e109 < (*.f64 x y) Initial program 83.9%
Taylor expanded in x around inf
/-lowering-/.f64N/A
*-lowering-*.f6470.5
Simplified70.5%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f6479.3
Applied egg-rr79.3%
if -4.00000000000000018e48 < (*.f64 x y) < 1.00000000000000007e-68Initial program 93.8%
Taylor expanded in x around 0
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f6475.3
Simplified75.3%
div-invN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
distribute-lft-neg-inN/A
associate-*r*N/A
*-lowering-*.f64N/A
frac-2negN/A
metadata-evalN/A
associate-*l/N/A
neg-mul-1N/A
remove-double-negN/A
/-lowering-/.f64N/A
neg-lowering-neg.f6476.2
Applied egg-rr76.2%
if 1.00000000000000007e-68 < (*.f64 x y) < 3.99999999999999993e109Initial program 99.8%
Taylor expanded in x around inf
/-lowering-/.f64N/A
*-lowering-*.f6470.0
Simplified70.0%
Final simplification76.6%
a\_m = (fabs.f64 a)
a\_s = (copysign.f64 #s(literal 1 binary64) a)
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
(FPCore (a_s x y z t a_m)
:precision binary64
(let* ((t_1 (* x (/ y a_m))))
(*
a_s
(if (<= (* x y) -4e+48)
t_1
(if (<= (* x y) 1e-68)
(* t (/ z (- a_m)))
(if (<= (* x y) 4e+109) (/ (* x y) a_m) t_1))))))a\_m = fabs(a);
a\_s = copysign(1.0, a);
assert(x < y && y < z && z < t && t < a_m);
assert(x < y && y < z && z < t && t < a_m);
double code(double a_s, double x, double y, double z, double t, double a_m) {
double t_1 = x * (y / a_m);
double tmp;
if ((x * y) <= -4e+48) {
tmp = t_1;
} else if ((x * y) <= 1e-68) {
tmp = t * (z / -a_m);
} else if ((x * y) <= 4e+109) {
tmp = (x * y) / a_m;
} else {
tmp = t_1;
}
return a_s * tmp;
}
a\_m = abs(a)
a\_s = copysign(1.0d0, a)
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
real(8) function code(a_s, x, y, z, t, a_m)
real(8), intent (in) :: a_s
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_m
real(8) :: t_1
real(8) :: tmp
t_1 = x * (y / a_m)
if ((x * y) <= (-4d+48)) then
tmp = t_1
else if ((x * y) <= 1d-68) then
tmp = t * (z / -a_m)
else if ((x * y) <= 4d+109) then
tmp = (x * y) / a_m
else
tmp = t_1
end if
code = a_s * tmp
end function
a\_m = Math.abs(a);
a\_s = Math.copySign(1.0, a);
assert x < y && y < z && z < t && t < a_m;
assert x < y && y < z && z < t && t < a_m;
public static double code(double a_s, double x, double y, double z, double t, double a_m) {
double t_1 = x * (y / a_m);
double tmp;
if ((x * y) <= -4e+48) {
tmp = t_1;
} else if ((x * y) <= 1e-68) {
tmp = t * (z / -a_m);
} else if ((x * y) <= 4e+109) {
tmp = (x * y) / a_m;
} else {
tmp = t_1;
}
return a_s * tmp;
}
a\_m = math.fabs(a) a\_s = math.copysign(1.0, a) [x, y, z, t, a_m] = sort([x, y, z, t, a_m]) [x, y, z, t, a_m] = sort([x, y, z, t, a_m]) def code(a_s, x, y, z, t, a_m): t_1 = x * (y / a_m) tmp = 0 if (x * y) <= -4e+48: tmp = t_1 elif (x * y) <= 1e-68: tmp = t * (z / -a_m) elif (x * y) <= 4e+109: tmp = (x * y) / a_m else: tmp = t_1 return a_s * tmp
a\_m = abs(a) a\_s = copysign(1.0, a) x, y, z, t, a_m = sort([x, y, z, t, a_m]) x, y, z, t, a_m = sort([x, y, z, t, a_m]) function code(a_s, x, y, z, t, a_m) t_1 = Float64(x * Float64(y / a_m)) tmp = 0.0 if (Float64(x * y) <= -4e+48) tmp = t_1; elseif (Float64(x * y) <= 1e-68) tmp = Float64(t * Float64(z / Float64(-a_m))); elseif (Float64(x * y) <= 4e+109) tmp = Float64(Float64(x * y) / a_m); else tmp = t_1; end return Float64(a_s * tmp) end
a\_m = abs(a);
a\_s = sign(a) * abs(1.0);
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
function tmp_2 = code(a_s, x, y, z, t, a_m)
t_1 = x * (y / a_m);
tmp = 0.0;
if ((x * y) <= -4e+48)
tmp = t_1;
elseif ((x * y) <= 1e-68)
tmp = t * (z / -a_m);
elseif ((x * y) <= 4e+109)
tmp = (x * y) / a_m;
else
tmp = t_1;
end
tmp_2 = a_s * tmp;
end
a\_m = N[Abs[a], $MachinePrecision]
a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
code[a$95$s_, x_, y_, z_, t_, a$95$m_] := Block[{t$95$1 = N[(x * N[(y / a$95$m), $MachinePrecision]), $MachinePrecision]}, N[(a$95$s * If[LessEqual[N[(x * y), $MachinePrecision], -4e+48], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 1e-68], N[(t * N[(z / (-a$95$m)), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 4e+109], N[(N[(x * y), $MachinePrecision] / a$95$m), $MachinePrecision], t$95$1]]]), $MachinePrecision]]
\begin{array}{l}
a\_m = \left|a\right|
\\
a\_s = \mathsf{copysign}\left(1, a\right)
\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\
\\
\begin{array}{l}
t_1 := x \cdot \frac{y}{a\_m}\\
a\_s \cdot \begin{array}{l}
\mathbf{if}\;x \cdot y \leq -4 \cdot 10^{+48}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 10^{-68}:\\
\;\;\;\;t \cdot \frac{z}{-a\_m}\\
\mathbf{elif}\;x \cdot y \leq 4 \cdot 10^{+109}:\\
\;\;\;\;\frac{x \cdot y}{a\_m}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
\end{array}
if (*.f64 x y) < -4.00000000000000018e48 or 3.99999999999999993e109 < (*.f64 x y) Initial program 83.9%
Taylor expanded in x around inf
/-lowering-/.f64N/A
*-lowering-*.f6470.5
Simplified70.5%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f6479.3
Applied egg-rr79.3%
if -4.00000000000000018e48 < (*.f64 x y) < 1.00000000000000007e-68Initial program 93.8%
div-invN/A
*-lowering-*.f64N/A
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6493.7
Applied egg-rr93.7%
Taylor expanded in t around inf
mul-1-negN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
/-lowering-/.f64N/A
mul-1-negN/A
neg-lowering-neg.f6473.8
Simplified73.8%
if 1.00000000000000007e-68 < (*.f64 x y) < 3.99999999999999993e109Initial program 99.8%
Taylor expanded in x around inf
/-lowering-/.f64N/A
*-lowering-*.f6470.0
Simplified70.0%
Final simplification75.4%
a\_m = (fabs.f64 a)
a\_s = (copysign.f64 #s(literal 1 binary64) a)
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
(FPCore (a_s x y z t a_m)
:precision binary64
(*
a_s
(if (<= (* x y) (- INFINITY))
(* y (* x (/ 1.0 a_m)))
(/ (- (* x y) (* t z)) a_m))))a\_m = fabs(a);
a\_s = copysign(1.0, a);
assert(x < y && y < z && z < t && t < a_m);
assert(x < y && y < z && z < t && t < a_m);
double code(double a_s, double x, double y, double z, double t, double a_m) {
double tmp;
if ((x * y) <= -((double) INFINITY)) {
tmp = y * (x * (1.0 / a_m));
} else {
tmp = ((x * y) - (t * z)) / a_m;
}
return a_s * tmp;
}
a\_m = Math.abs(a);
a\_s = Math.copySign(1.0, a);
assert x < y && y < z && z < t && t < a_m;
assert x < y && y < z && z < t && t < a_m;
public static double code(double a_s, double x, double y, double z, double t, double a_m) {
double tmp;
if ((x * y) <= -Double.POSITIVE_INFINITY) {
tmp = y * (x * (1.0 / a_m));
} else {
tmp = ((x * y) - (t * z)) / a_m;
}
return a_s * tmp;
}
a\_m = math.fabs(a) a\_s = math.copysign(1.0, a) [x, y, z, t, a_m] = sort([x, y, z, t, a_m]) [x, y, z, t, a_m] = sort([x, y, z, t, a_m]) def code(a_s, x, y, z, t, a_m): tmp = 0 if (x * y) <= -math.inf: tmp = y * (x * (1.0 / a_m)) else: tmp = ((x * y) - (t * z)) / a_m return a_s * tmp
a\_m = abs(a) a\_s = copysign(1.0, a) x, y, z, t, a_m = sort([x, y, z, t, a_m]) x, y, z, t, a_m = sort([x, y, z, t, a_m]) function code(a_s, x, y, z, t, a_m) tmp = 0.0 if (Float64(x * y) <= Float64(-Inf)) tmp = Float64(y * Float64(x * Float64(1.0 / a_m))); else tmp = Float64(Float64(Float64(x * y) - Float64(t * z)) / a_m); end return Float64(a_s * tmp) end
a\_m = abs(a);
a\_s = sign(a) * abs(1.0);
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
function tmp_2 = code(a_s, x, y, z, t, a_m)
tmp = 0.0;
if ((x * y) <= -Inf)
tmp = y * (x * (1.0 / a_m));
else
tmp = ((x * y) - (t * z)) / a_m;
end
tmp_2 = a_s * tmp;
end
a\_m = N[Abs[a], $MachinePrecision]
a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
code[a$95$s_, x_, y_, z_, t_, a$95$m_] := N[(a$95$s * If[LessEqual[N[(x * y), $MachinePrecision], (-Infinity)], N[(y * N[(x * N[(1.0 / a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision] / a$95$m), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
a\_m = \left|a\right|
\\
a\_s = \mathsf{copysign}\left(1, a\right)
\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\
\\
a\_s \cdot \begin{array}{l}
\mathbf{if}\;x \cdot y \leq -\infty:\\
\;\;\;\;y \cdot \left(x \cdot \frac{1}{a\_m}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y - t \cdot z}{a\_m}\\
\end{array}
\end{array}
if (*.f64 x y) < -inf.0Initial program 55.1%
Taylor expanded in x around inf
/-lowering-/.f64N/A
*-lowering-*.f6460.4
Simplified60.4%
associate-/l*N/A
*-commutativeN/A
div-invN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6499.6
Applied egg-rr99.6%
if -inf.0 < (*.f64 x y) Initial program 93.7%
Final simplification94.2%
a\_m = (fabs.f64 a) a\_s = (copysign.f64 #s(literal 1 binary64) a) NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function. NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function. (FPCore (a_s x y z t a_m) :precision binary64 (* a_s (* x (/ y a_m))))
a\_m = fabs(a);
a\_s = copysign(1.0, a);
assert(x < y && y < z && z < t && t < a_m);
assert(x < y && y < z && z < t && t < a_m);
double code(double a_s, double x, double y, double z, double t, double a_m) {
return a_s * (x * (y / a_m));
}
a\_m = abs(a)
a\_s = copysign(1.0d0, a)
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
real(8) function code(a_s, x, y, z, t, a_m)
real(8), intent (in) :: a_s
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_m
code = a_s * (x * (y / a_m))
end function
a\_m = Math.abs(a);
a\_s = Math.copySign(1.0, a);
assert x < y && y < z && z < t && t < a_m;
assert x < y && y < z && z < t && t < a_m;
public static double code(double a_s, double x, double y, double z, double t, double a_m) {
return a_s * (x * (y / a_m));
}
a\_m = math.fabs(a) a\_s = math.copysign(1.0, a) [x, y, z, t, a_m] = sort([x, y, z, t, a_m]) [x, y, z, t, a_m] = sort([x, y, z, t, a_m]) def code(a_s, x, y, z, t, a_m): return a_s * (x * (y / a_m))
a\_m = abs(a) a\_s = copysign(1.0, a) x, y, z, t, a_m = sort([x, y, z, t, a_m]) x, y, z, t, a_m = sort([x, y, z, t, a_m]) function code(a_s, x, y, z, t, a_m) return Float64(a_s * Float64(x * Float64(y / a_m))) end
a\_m = abs(a);
a\_s = sign(a) * abs(1.0);
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
function tmp = code(a_s, x, y, z, t, a_m)
tmp = a_s * (x * (y / a_m));
end
a\_m = N[Abs[a], $MachinePrecision]
a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
code[a$95$s_, x_, y_, z_, t_, a$95$m_] := N[(a$95$s * N[(x * N[(y / a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a\_m = \left|a\right|
\\
a\_s = \mathsf{copysign}\left(1, a\right)
\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\
\\
a\_s \cdot \left(x \cdot \frac{y}{a\_m}\right)
\end{array}
Initial program 90.9%
Taylor expanded in x around inf
/-lowering-/.f64N/A
*-lowering-*.f6448.7
Simplified48.7%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f6450.2
Applied egg-rr50.2%
Final simplification50.2%
a\_m = (fabs.f64 a) a\_s = (copysign.f64 #s(literal 1 binary64) a) NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function. NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function. (FPCore (a_s x y z t a_m) :precision binary64 (* a_s (* y (/ x a_m))))
a\_m = fabs(a);
a\_s = copysign(1.0, a);
assert(x < y && y < z && z < t && t < a_m);
assert(x < y && y < z && z < t && t < a_m);
double code(double a_s, double x, double y, double z, double t, double a_m) {
return a_s * (y * (x / a_m));
}
a\_m = abs(a)
a\_s = copysign(1.0d0, a)
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
real(8) function code(a_s, x, y, z, t, a_m)
real(8), intent (in) :: a_s
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_m
code = a_s * (y * (x / a_m))
end function
a\_m = Math.abs(a);
a\_s = Math.copySign(1.0, a);
assert x < y && y < z && z < t && t < a_m;
assert x < y && y < z && z < t && t < a_m;
public static double code(double a_s, double x, double y, double z, double t, double a_m) {
return a_s * (y * (x / a_m));
}
a\_m = math.fabs(a) a\_s = math.copysign(1.0, a) [x, y, z, t, a_m] = sort([x, y, z, t, a_m]) [x, y, z, t, a_m] = sort([x, y, z, t, a_m]) def code(a_s, x, y, z, t, a_m): return a_s * (y * (x / a_m))
a\_m = abs(a) a\_s = copysign(1.0, a) x, y, z, t, a_m = sort([x, y, z, t, a_m]) x, y, z, t, a_m = sort([x, y, z, t, a_m]) function code(a_s, x, y, z, t, a_m) return Float64(a_s * Float64(y * Float64(x / a_m))) end
a\_m = abs(a);
a\_s = sign(a) * abs(1.0);
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
function tmp = code(a_s, x, y, z, t, a_m)
tmp = a_s * (y * (x / a_m));
end
a\_m = N[Abs[a], $MachinePrecision]
a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
code[a$95$s_, x_, y_, z_, t_, a$95$m_] := N[(a$95$s * N[(y * N[(x / a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a\_m = \left|a\right|
\\
a\_s = \mathsf{copysign}\left(1, a\right)
\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\
\\
a\_s \cdot \left(y \cdot \frac{x}{a\_m}\right)
\end{array}
Initial program 90.9%
Taylor expanded in x around inf
/-lowering-/.f64N/A
*-lowering-*.f6448.7
Simplified48.7%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6450.8
Applied egg-rr50.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 2024199
(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))