
(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 and y should be sorted in increasing order before calling this function. NOTE: z and t should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (if (<= (- (* x y) (* z t)) -2e+200) (fma -1.0 (/ t (/ a z)) (/ y (/ a x))) (* (fma x y (- (* z t))) (/ 1.0 a))))
assert(x < y);
assert(z < t);
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((x * y) - (z * t)) <= -2e+200) {
tmp = fma(-1.0, (t / (a / z)), (y / (a / x)));
} else {
tmp = fma(x, y, -(z * t)) * (1.0 / a);
}
return tmp;
}
x, y = sort([x, y]) z, t = sort([z, t]) function code(x, y, z, t, a) tmp = 0.0 if (Float64(Float64(x * y) - Float64(z * t)) <= -2e+200) tmp = fma(-1.0, Float64(t / Float64(a / z)), Float64(y / Float64(a / x))); else tmp = Float64(fma(x, y, Float64(-Float64(z * t))) * Float64(1.0 / a)); end return tmp end
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: z and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := If[LessEqual[N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision], -2e+200], N[(-1.0 * N[(t / N[(a / z), $MachinePrecision]), $MachinePrecision] + N[(y / N[(a / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * y + (-N[(z * t), $MachinePrecision])), $MachinePrecision] * N[(1.0 / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[z, t] = \mathsf{sort}([z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y - z \cdot t \leq -2 \cdot 10^{+200}:\\
\;\;\;\;\mathsf{fma}\left(-1, \frac{t}{\frac{a}{z}}, \frac{y}{\frac{a}{x}}\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, y, -z \cdot t\right) \cdot \frac{1}{a}\\
\end{array}
\end{array}
if (-.f64 (*.f64 x y) (*.f64 z t)) < -1.9999999999999999e200Initial program 82.0%
Taylor expanded in x around 0 76.8%
fma-def76.8%
associate-/l*82.8%
associate-/l*92.4%
Simplified92.4%
if -1.9999999999999999e200 < (-.f64 (*.f64 x y) (*.f64 z t)) Initial program 96.1%
div-inv95.9%
fma-neg96.5%
*-commutative96.5%
distribute-rgt-neg-in96.5%
Applied egg-rr96.5%
Final simplification95.6%
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: z and t should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (if (<= a 2.1e-80) (* (fma x y (- (* z t))) (/ 1.0 a)) (- (/ x (/ a y)) (/ z (/ a t)))))
assert(x < y);
assert(z < t);
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= 2.1e-80) {
tmp = fma(x, y, -(z * t)) * (1.0 / a);
} else {
tmp = (x / (a / y)) - (z / (a / t));
}
return tmp;
}
x, y = sort([x, y]) z, t = sort([z, t]) function code(x, y, z, t, a) tmp = 0.0 if (a <= 2.1e-80) tmp = Float64(fma(x, y, Float64(-Float64(z * t))) * Float64(1.0 / a)); else tmp = Float64(Float64(x / Float64(a / y)) - Float64(z / Float64(a / t))); end return tmp end
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: z and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := If[LessEqual[a, 2.1e-80], N[(N[(x * y + (-N[(z * t), $MachinePrecision])), $MachinePrecision] * N[(1.0 / a), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision] - N[(z / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[z, t] = \mathsf{sort}([z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.1 \cdot 10^{-80}:\\
\;\;\;\;\mathsf{fma}\left(x, y, -z \cdot t\right) \cdot \frac{1}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{a}{y}} - \frac{z}{\frac{a}{t}}\\
\end{array}
\end{array}
if a < 2.10000000000000001e-80Initial program 94.8%
div-inv94.8%
fma-neg95.4%
*-commutative95.4%
distribute-rgt-neg-in95.4%
Applied egg-rr95.4%
if 2.10000000000000001e-80 < a Initial program 88.7%
div-sub88.7%
associate-/l*92.3%
associate-/l*93.8%
Applied egg-rr93.8%
Final simplification94.9%
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: z and t should be sorted in increasing order before calling this function.
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- (* z t)) a)))
(if (<= (* x y) -1000000000.0)
(/ x (/ a y))
(if (<= (* x y) -4e-15)
t_1
(if (<= (* x y) -5e-67)
(/ (* x y) a)
(if (<= (* x y) 4e-13) t_1 (* y (/ x a))))))))assert(x < y);
assert(z < t);
double code(double x, double y, double z, double t, double a) {
double t_1 = -(z * t) / a;
double tmp;
if ((x * y) <= -1000000000.0) {
tmp = x / (a / y);
} else if ((x * y) <= -4e-15) {
tmp = t_1;
} else if ((x * y) <= -5e-67) {
tmp = (x * y) / a;
} else if ((x * y) <= 4e-13) {
tmp = t_1;
} else {
tmp = y * (x / a);
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: z and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = -(z * t) / a
if ((x * y) <= (-1000000000.0d0)) then
tmp = x / (a / y)
else if ((x * y) <= (-4d-15)) then
tmp = t_1
else if ((x * y) <= (-5d-67)) then
tmp = (x * y) / a
else if ((x * y) <= 4d-13) then
tmp = t_1
else
tmp = y * (x / a)
end if
code = tmp
end function
assert x < y;
assert z < t;
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -(z * t) / a;
double tmp;
if ((x * y) <= -1000000000.0) {
tmp = x / (a / y);
} else if ((x * y) <= -4e-15) {
tmp = t_1;
} else if ((x * y) <= -5e-67) {
tmp = (x * y) / a;
} else if ((x * y) <= 4e-13) {
tmp = t_1;
} else {
tmp = y * (x / a);
}
return tmp;
}
[x, y] = sort([x, y]) [z, t] = sort([z, t]) def code(x, y, z, t, a): t_1 = -(z * t) / a tmp = 0 if (x * y) <= -1000000000.0: tmp = x / (a / y) elif (x * y) <= -4e-15: tmp = t_1 elif (x * y) <= -5e-67: tmp = (x * y) / a elif (x * y) <= 4e-13: tmp = t_1 else: tmp = y * (x / a) return tmp
x, y = sort([x, y]) z, t = sort([z, t]) function code(x, y, z, t, a) t_1 = Float64(Float64(-Float64(z * t)) / a) tmp = 0.0 if (Float64(x * y) <= -1000000000.0) tmp = Float64(x / Float64(a / y)); elseif (Float64(x * y) <= -4e-15) tmp = t_1; elseif (Float64(x * y) <= -5e-67) tmp = Float64(Float64(x * y) / a); elseif (Float64(x * y) <= 4e-13) tmp = t_1; else tmp = Float64(y * Float64(x / a)); end return tmp end
x, y = num2cell(sort([x, y])){:}
z, t = num2cell(sort([z, t])){:}
function tmp_2 = code(x, y, z, t, a)
t_1 = -(z * t) / a;
tmp = 0.0;
if ((x * y) <= -1000000000.0)
tmp = x / (a / y);
elseif ((x * y) <= -4e-15)
tmp = t_1;
elseif ((x * y) <= -5e-67)
tmp = (x * y) / a;
elseif ((x * y) <= 4e-13)
tmp = t_1;
else
tmp = y * (x / a);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: z and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[((-N[(z * t), $MachinePrecision]) / a), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -1000000000.0], N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -4e-15], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], -5e-67], N[(N[(x * y), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 4e-13], t$95$1, N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[z, t] = \mathsf{sort}([z, t])\\
\\
\begin{array}{l}
t_1 := \frac{-z \cdot t}{a}\\
\mathbf{if}\;x \cdot y \leq -1000000000:\\
\;\;\;\;\frac{x}{\frac{a}{y}}\\
\mathbf{elif}\;x \cdot y \leq -4 \cdot 10^{-15}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \cdot y \leq -5 \cdot 10^{-67}:\\
\;\;\;\;\frac{x \cdot y}{a}\\
\mathbf{elif}\;x \cdot y \leq 4 \cdot 10^{-13}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{a}\\
\end{array}
\end{array}
if (*.f64 x y) < -1e9Initial program 89.2%
Taylor expanded in x around inf 77.5%
associate-*r/86.5%
Simplified86.5%
associate-*r/77.5%
*-commutative77.5%
associate-/l*78.7%
Applied egg-rr78.7%
if -1e9 < (*.f64 x y) < -4.0000000000000003e-15 or -4.9999999999999999e-67 < (*.f64 x y) < 4.0000000000000001e-13Initial program 95.9%
Taylor expanded in x around 0 83.4%
associate-*r/83.4%
associate-*r*83.4%
neg-mul-183.4%
Simplified83.4%
if -4.0000000000000003e-15 < (*.f64 x y) < -4.9999999999999999e-67Initial program 99.6%
Taylor expanded in x around inf 67.7%
if 4.0000000000000001e-13 < (*.f64 x y) Initial program 89.6%
Taylor expanded in x around inf 77.7%
associate-*r/81.9%
Simplified81.9%
Final simplification80.9%
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: z and t should be sorted in increasing order before calling this function.
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- (* z t)) a)))
(if (<= (* x y) -1000000000.0)
(/ 1.0 (* (/ a y) (/ 1.0 x)))
(if (<= (* x y) -4e-15)
t_1
(if (<= (* x y) -5e-67)
(/ (* x y) a)
(if (<= (* x y) 4e-13) t_1 (* y (/ x a))))))))assert(x < y);
assert(z < t);
double code(double x, double y, double z, double t, double a) {
double t_1 = -(z * t) / a;
double tmp;
if ((x * y) <= -1000000000.0) {
tmp = 1.0 / ((a / y) * (1.0 / x));
} else if ((x * y) <= -4e-15) {
tmp = t_1;
} else if ((x * y) <= -5e-67) {
tmp = (x * y) / a;
} else if ((x * y) <= 4e-13) {
tmp = t_1;
} else {
tmp = y * (x / a);
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: z and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = -(z * t) / a
if ((x * y) <= (-1000000000.0d0)) then
tmp = 1.0d0 / ((a / y) * (1.0d0 / x))
else if ((x * y) <= (-4d-15)) then
tmp = t_1
else if ((x * y) <= (-5d-67)) then
tmp = (x * y) / a
else if ((x * y) <= 4d-13) then
tmp = t_1
else
tmp = y * (x / a)
end if
code = tmp
end function
assert x < y;
assert z < t;
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -(z * t) / a;
double tmp;
if ((x * y) <= -1000000000.0) {
tmp = 1.0 / ((a / y) * (1.0 / x));
} else if ((x * y) <= -4e-15) {
tmp = t_1;
} else if ((x * y) <= -5e-67) {
tmp = (x * y) / a;
} else if ((x * y) <= 4e-13) {
tmp = t_1;
} else {
tmp = y * (x / a);
}
return tmp;
}
[x, y] = sort([x, y]) [z, t] = sort([z, t]) def code(x, y, z, t, a): t_1 = -(z * t) / a tmp = 0 if (x * y) <= -1000000000.0: tmp = 1.0 / ((a / y) * (1.0 / x)) elif (x * y) <= -4e-15: tmp = t_1 elif (x * y) <= -5e-67: tmp = (x * y) / a elif (x * y) <= 4e-13: tmp = t_1 else: tmp = y * (x / a) return tmp
x, y = sort([x, y]) z, t = sort([z, t]) function code(x, y, z, t, a) t_1 = Float64(Float64(-Float64(z * t)) / a) tmp = 0.0 if (Float64(x * y) <= -1000000000.0) tmp = Float64(1.0 / Float64(Float64(a / y) * Float64(1.0 / x))); elseif (Float64(x * y) <= -4e-15) tmp = t_1; elseif (Float64(x * y) <= -5e-67) tmp = Float64(Float64(x * y) / a); elseif (Float64(x * y) <= 4e-13) tmp = t_1; else tmp = Float64(y * Float64(x / a)); end return tmp end
x, y = num2cell(sort([x, y])){:}
z, t = num2cell(sort([z, t])){:}
function tmp_2 = code(x, y, z, t, a)
t_1 = -(z * t) / a;
tmp = 0.0;
if ((x * y) <= -1000000000.0)
tmp = 1.0 / ((a / y) * (1.0 / x));
elseif ((x * y) <= -4e-15)
tmp = t_1;
elseif ((x * y) <= -5e-67)
tmp = (x * y) / a;
elseif ((x * y) <= 4e-13)
tmp = t_1;
else
tmp = y * (x / a);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: z and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[((-N[(z * t), $MachinePrecision]) / a), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -1000000000.0], N[(1.0 / N[(N[(a / y), $MachinePrecision] * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -4e-15], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], -5e-67], N[(N[(x * y), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 4e-13], t$95$1, N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[z, t] = \mathsf{sort}([z, t])\\
\\
\begin{array}{l}
t_1 := \frac{-z \cdot t}{a}\\
\mathbf{if}\;x \cdot y \leq -1000000000:\\
\;\;\;\;\frac{1}{\frac{a}{y} \cdot \frac{1}{x}}\\
\mathbf{elif}\;x \cdot y \leq -4 \cdot 10^{-15}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \cdot y \leq -5 \cdot 10^{-67}:\\
\;\;\;\;\frac{x \cdot y}{a}\\
\mathbf{elif}\;x \cdot y \leq 4 \cdot 10^{-13}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{a}\\
\end{array}
\end{array}
if (*.f64 x y) < -1e9Initial program 89.2%
Taylor expanded in x around inf 77.5%
associate-*r/86.5%
Simplified86.5%
associate-*r/77.5%
clear-num77.4%
*-commutative77.4%
Applied egg-rr77.4%
associate-/l/78.6%
div-inv78.6%
Applied egg-rr78.6%
if -1e9 < (*.f64 x y) < -4.0000000000000003e-15 or -4.9999999999999999e-67 < (*.f64 x y) < 4.0000000000000001e-13Initial program 95.9%
Taylor expanded in x around 0 83.4%
associate-*r/83.4%
associate-*r*83.4%
neg-mul-183.4%
Simplified83.4%
if -4.0000000000000003e-15 < (*.f64 x y) < -4.9999999999999999e-67Initial program 99.6%
Taylor expanded in x around inf 67.7%
if 4.0000000000000001e-13 < (*.f64 x y) Initial program 89.6%
Taylor expanded in x around inf 77.7%
associate-*r/81.9%
Simplified81.9%
Final simplification80.9%
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: z and t should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (if (<= a 1000000000.0) (/ (- (* x y) (* z t)) a) (- (/ x (/ a y)) (* z (/ t a)))))
assert(x < y);
assert(z < t);
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= 1000000000.0) {
tmp = ((x * y) - (z * t)) / a;
} else {
tmp = (x / (a / y)) - (z * (t / a));
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: z and t 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 <= 1000000000.0d0) then
tmp = ((x * y) - (z * t)) / a
else
tmp = (x / (a / y)) - (z * (t / a))
end if
code = tmp
end function
assert x < y;
assert z < t;
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= 1000000000.0) {
tmp = ((x * y) - (z * t)) / a;
} else {
tmp = (x / (a / y)) - (z * (t / a));
}
return tmp;
}
[x, y] = sort([x, y]) [z, t] = sort([z, t]) def code(x, y, z, t, a): tmp = 0 if a <= 1000000000.0: tmp = ((x * y) - (z * t)) / a else: tmp = (x / (a / y)) - (z * (t / a)) return tmp
x, y = sort([x, y]) z, t = sort([z, t]) function code(x, y, z, t, a) tmp = 0.0 if (a <= 1000000000.0) tmp = Float64(Float64(Float64(x * y) - Float64(z * t)) / a); else tmp = Float64(Float64(x / Float64(a / y)) - Float64(z * Float64(t / a))); end return tmp end
x, y = num2cell(sort([x, y])){:}
z, t = num2cell(sort([z, t])){:}
function tmp_2 = code(x, y, z, t, a)
tmp = 0.0;
if (a <= 1000000000.0)
tmp = ((x * y) - (z * t)) / a;
else
tmp = (x / (a / y)) - (z * (t / a));
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: z and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := If[LessEqual[a, 1000000000.0], N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision] - N[(z * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[z, t] = \mathsf{sort}([z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1000000000:\\
\;\;\;\;\frac{x \cdot y - z \cdot t}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{a}{y}} - z \cdot \frac{t}{a}\\
\end{array}
\end{array}
if a < 1e9Initial program 94.7%
if 1e9 < a Initial program 86.8%
div-sub86.8%
associate-/l*91.7%
associate-/l*93.3%
Applied egg-rr93.3%
*-un-lft-identity93.3%
associate-*l/93.3%
clear-num93.3%
Applied egg-rr93.3%
Final simplification94.4%
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: z and t should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (if (<= a 1.65e-80) (/ (- (* x y) (* z t)) a) (- (/ x (/ a y)) (/ z (/ a t)))))
assert(x < y);
assert(z < t);
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= 1.65e-80) {
tmp = ((x * y) - (z * t)) / a;
} else {
tmp = (x / (a / y)) - (z / (a / t));
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: z and t 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 <= 1.65d-80) then
tmp = ((x * y) - (z * t)) / a
else
tmp = (x / (a / y)) - (z / (a / t))
end if
code = tmp
end function
assert x < y;
assert z < t;
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= 1.65e-80) {
tmp = ((x * y) - (z * t)) / a;
} else {
tmp = (x / (a / y)) - (z / (a / t));
}
return tmp;
}
[x, y] = sort([x, y]) [z, t] = sort([z, t]) def code(x, y, z, t, a): tmp = 0 if a <= 1.65e-80: tmp = ((x * y) - (z * t)) / a else: tmp = (x / (a / y)) - (z / (a / t)) return tmp
x, y = sort([x, y]) z, t = sort([z, t]) function code(x, y, z, t, a) tmp = 0.0 if (a <= 1.65e-80) tmp = Float64(Float64(Float64(x * y) - Float64(z * t)) / a); else tmp = Float64(Float64(x / Float64(a / y)) - Float64(z / Float64(a / t))); end return tmp end
x, y = num2cell(sort([x, y])){:}
z, t = num2cell(sort([z, t])){:}
function tmp_2 = code(x, y, z, t, a)
tmp = 0.0;
if (a <= 1.65e-80)
tmp = ((x * y) - (z * t)) / a;
else
tmp = (x / (a / y)) - (z / (a / t));
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: z and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := If[LessEqual[a, 1.65e-80], N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision] - N[(z / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[z, t] = \mathsf{sort}([z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.65 \cdot 10^{-80}:\\
\;\;\;\;\frac{x \cdot y - z \cdot t}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{a}{y}} - \frac{z}{\frac{a}{t}}\\
\end{array}
\end{array}
if a < 1.65e-80Initial program 94.8%
if 1.65e-80 < a Initial program 88.7%
div-sub88.7%
associate-/l*92.3%
associate-/l*93.8%
Applied egg-rr93.8%
Final simplification94.5%
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: z and t should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (if (<= z 2.9e-28) (/ (- (* x y) (* z t)) a) (/ t (/ (- a) z))))
assert(x < y);
assert(z < t);
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= 2.9e-28) {
tmp = ((x * y) - (z * t)) / a;
} else {
tmp = t / (-a / z);
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: z and t 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 <= 2.9d-28) then
tmp = ((x * y) - (z * t)) / a
else
tmp = t / (-a / z)
end if
code = tmp
end function
assert x < y;
assert z < t;
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= 2.9e-28) {
tmp = ((x * y) - (z * t)) / a;
} else {
tmp = t / (-a / z);
}
return tmp;
}
[x, y] = sort([x, y]) [z, t] = sort([z, t]) def code(x, y, z, t, a): tmp = 0 if z <= 2.9e-28: tmp = ((x * y) - (z * t)) / a else: tmp = t / (-a / z) return tmp
x, y = sort([x, y]) z, t = sort([z, t]) function code(x, y, z, t, a) tmp = 0.0 if (z <= 2.9e-28) tmp = Float64(Float64(Float64(x * y) - Float64(z * t)) / a); else tmp = Float64(t / Float64(Float64(-a) / z)); end return tmp end
x, y = num2cell(sort([x, y])){:}
z, t = num2cell(sort([z, t])){:}
function tmp_2 = code(x, y, z, t, a)
tmp = 0.0;
if (z <= 2.9e-28)
tmp = ((x * y) - (z * t)) / a;
else
tmp = t / (-a / z);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: z and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := If[LessEqual[z, 2.9e-28], N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(t / N[((-a) / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[z, t] = \mathsf{sort}([z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 2.9 \cdot 10^{-28}:\\
\;\;\;\;\frac{x \cdot y - z \cdot t}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{\frac{-a}{z}}\\
\end{array}
\end{array}
if z < 2.90000000000000013e-28Initial program 95.6%
if 2.90000000000000013e-28 < z Initial program 84.2%
Taylor expanded in x around 0 57.6%
associate-*r/57.6%
mul-1-neg57.6%
distribute-rgt-neg-out57.6%
*-commutative57.6%
associate-/l*60.9%
associate-/r/64.4%
Simplified64.4%
*-commutative64.4%
frac-2neg64.4%
remove-double-neg64.4%
associate-*r/57.6%
Applied egg-rr57.6%
associate-/l*65.5%
Simplified65.5%
Final simplification88.4%
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: z and t should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (if (<= x -1.45e-10) (* x (/ y a)) (if (<= x 6.2e-177) (* z (- (/ t a))) (/ (* x y) a))))
assert(x < y);
assert(z < t);
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.45e-10) {
tmp = x * (y / a);
} else if (x <= 6.2e-177) {
tmp = z * -(t / a);
} else {
tmp = (x * y) / a;
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: z and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= (-1.45d-10)) then
tmp = x * (y / a)
else if (x <= 6.2d-177) then
tmp = z * -(t / a)
else
tmp = (x * y) / a
end if
code = tmp
end function
assert x < y;
assert z < t;
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.45e-10) {
tmp = x * (y / a);
} else if (x <= 6.2e-177) {
tmp = z * -(t / a);
} else {
tmp = (x * y) / a;
}
return tmp;
}
[x, y] = sort([x, y]) [z, t] = sort([z, t]) def code(x, y, z, t, a): tmp = 0 if x <= -1.45e-10: tmp = x * (y / a) elif x <= 6.2e-177: tmp = z * -(t / a) else: tmp = (x * y) / a return tmp
x, y = sort([x, y]) z, t = sort([z, t]) function code(x, y, z, t, a) tmp = 0.0 if (x <= -1.45e-10) tmp = Float64(x * Float64(y / a)); elseif (x <= 6.2e-177) tmp = Float64(z * Float64(-Float64(t / a))); else tmp = Float64(Float64(x * y) / a); end return tmp end
x, y = num2cell(sort([x, y])){:}
z, t = num2cell(sort([z, t])){:}
function tmp_2 = code(x, y, z, t, a)
tmp = 0.0;
if (x <= -1.45e-10)
tmp = x * (y / a);
elseif (x <= 6.2e-177)
tmp = z * -(t / a);
else
tmp = (x * y) / a;
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: z and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := If[LessEqual[x, -1.45e-10], N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.2e-177], N[(z * (-N[(t / a), $MachinePrecision])), $MachinePrecision], N[(N[(x * y), $MachinePrecision] / a), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[z, t] = \mathsf{sort}([z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.45 \cdot 10^{-10}:\\
\;\;\;\;x \cdot \frac{y}{a}\\
\mathbf{elif}\;x \leq 6.2 \cdot 10^{-177}:\\
\;\;\;\;z \cdot \left(-\frac{t}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y}{a}\\
\end{array}
\end{array}
if x < -1.4499999999999999e-10Initial program 87.0%
Taylor expanded in x around inf 70.8%
associate-*l/76.4%
Applied egg-rr76.4%
if -1.4499999999999999e-10 < x < 6.20000000000000036e-177Initial program 97.3%
clear-num96.0%
inv-pow96.0%
fma-neg96.0%
*-commutative96.0%
distribute-rgt-neg-in96.0%
Applied egg-rr96.0%
Taylor expanded in x around 0 78.0%
mul-1-neg78.0%
associate-/l*71.7%
associate-/r/73.4%
distribute-lft-neg-in73.4%
Simplified73.4%
if 6.20000000000000036e-177 < x Initial program 92.6%
Taylor expanded in x around inf 64.7%
Final simplification70.9%
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: z and t should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (if (<= x -1.6e-8) (* x (/ y a)) (if (<= x 5.8e-177) (* t (- (/ z a))) (/ (* x y) a))))
assert(x < y);
assert(z < t);
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.6e-8) {
tmp = x * (y / a);
} else if (x <= 5.8e-177) {
tmp = t * -(z / a);
} else {
tmp = (x * y) / a;
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: z and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= (-1.6d-8)) then
tmp = x * (y / a)
else if (x <= 5.8d-177) then
tmp = t * -(z / a)
else
tmp = (x * y) / a
end if
code = tmp
end function
assert x < y;
assert z < t;
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.6e-8) {
tmp = x * (y / a);
} else if (x <= 5.8e-177) {
tmp = t * -(z / a);
} else {
tmp = (x * y) / a;
}
return tmp;
}
[x, y] = sort([x, y]) [z, t] = sort([z, t]) def code(x, y, z, t, a): tmp = 0 if x <= -1.6e-8: tmp = x * (y / a) elif x <= 5.8e-177: tmp = t * -(z / a) else: tmp = (x * y) / a return tmp
x, y = sort([x, y]) z, t = sort([z, t]) function code(x, y, z, t, a) tmp = 0.0 if (x <= -1.6e-8) tmp = Float64(x * Float64(y / a)); elseif (x <= 5.8e-177) tmp = Float64(t * Float64(-Float64(z / a))); else tmp = Float64(Float64(x * y) / a); end return tmp end
x, y = num2cell(sort([x, y])){:}
z, t = num2cell(sort([z, t])){:}
function tmp_2 = code(x, y, z, t, a)
tmp = 0.0;
if (x <= -1.6e-8)
tmp = x * (y / a);
elseif (x <= 5.8e-177)
tmp = t * -(z / a);
else
tmp = (x * y) / a;
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: z and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := If[LessEqual[x, -1.6e-8], N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.8e-177], N[(t * (-N[(z / a), $MachinePrecision])), $MachinePrecision], N[(N[(x * y), $MachinePrecision] / a), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[z, t] = \mathsf{sort}([z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.6 \cdot 10^{-8}:\\
\;\;\;\;x \cdot \frac{y}{a}\\
\mathbf{elif}\;x \leq 5.8 \cdot 10^{-177}:\\
\;\;\;\;t \cdot \left(-\frac{z}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y}{a}\\
\end{array}
\end{array}
if x < -1.6000000000000001e-8Initial program 87.0%
Taylor expanded in x around inf 70.8%
associate-*l/76.4%
Applied egg-rr76.4%
if -1.6000000000000001e-8 < x < 5.79999999999999994e-177Initial program 97.3%
Taylor expanded in x around 0 78.0%
associate-*r/78.0%
mul-1-neg78.0%
distribute-rgt-neg-out78.0%
*-commutative78.0%
associate-/l*73.4%
associate-/r/71.1%
Simplified71.1%
if 5.79999999999999994e-177 < x Initial program 92.6%
Taylor expanded in x around inf 64.7%
Final simplification70.1%
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: z and t should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (* y (/ x a)))
assert(x < y);
assert(z < t);
double code(double x, double y, double z, double t, double a) {
return y * (x / a);
}
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: z and t 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;
assert z < t;
public static double code(double x, double y, double z, double t, double a) {
return y * (x / a);
}
[x, y] = sort([x, y]) [z, t] = sort([z, t]) def code(x, y, z, t, a): return y * (x / a)
x, y = sort([x, y]) z, t = sort([z, t]) function code(x, y, z, t, a) return Float64(y * Float64(x / a)) end
x, y = num2cell(sort([x, y])){:}
z, t = num2cell(sort([z, t])){:}
function tmp = code(x, y, z, t, a)
tmp = y * (x / a);
end
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: z and t 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] = \mathsf{sort}([x, y])\\
[z, t] = \mathsf{sort}([z, t])\\
\\
y \cdot \frac{x}{a}
\end{array}
Initial program 92.9%
Taylor expanded in x around inf 54.8%
associate-*r/58.3%
Simplified58.3%
Final simplification58.3%
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: z and t should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (* x (/ y a)))
assert(x < y);
assert(z < t);
double code(double x, double y, double z, double t, double a) {
return x * (y / a);
}
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: z and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x * (y / a)
end function
assert x < y;
assert z < t;
public static double code(double x, double y, double z, double t, double a) {
return x * (y / a);
}
[x, y] = sort([x, y]) [z, t] = sort([z, t]) def code(x, y, z, t, a): return x * (y / a)
x, y = sort([x, y]) z, t = sort([z, t]) function code(x, y, z, t, a) return Float64(x * Float64(y / a)) end
x, y = num2cell(sort([x, y])){:}
z, t = num2cell(sort([z, t])){:}
function tmp = code(x, y, z, t, a)
tmp = x * (y / a);
end
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: z and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[z, t] = \mathsf{sort}([z, t])\\
\\
x \cdot \frac{y}{a}
\end{array}
Initial program 92.9%
Taylor expanded in x around inf 54.8%
associate-*l/53.8%
Applied egg-rr53.8%
Final simplification53.8%
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: z and t should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (/ x (/ a y)))
assert(x < y);
assert(z < t);
double code(double x, double y, double z, double t, double a) {
return x / (a / y);
}
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: z and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x / (a / y)
end function
assert x < y;
assert z < t;
public static double code(double x, double y, double z, double t, double a) {
return x / (a / y);
}
[x, y] = sort([x, y]) [z, t] = sort([z, t]) def code(x, y, z, t, a): return x / (a / y)
x, y = sort([x, y]) z, t = sort([z, t]) function code(x, y, z, t, a) return Float64(x / Float64(a / y)) end
x, y = num2cell(sort([x, y])){:}
z, t = num2cell(sort([z, t])){:}
function tmp = code(x, y, z, t, a)
tmp = x / (a / y);
end
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: z and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[z, t] = \mathsf{sort}([z, t])\\
\\
\frac{x}{\frac{a}{y}}
\end{array}
Initial program 92.9%
Taylor expanded in x around inf 54.8%
associate-*r/58.3%
Simplified58.3%
associate-*r/54.8%
*-commutative54.8%
associate-/l*54.2%
Applied egg-rr54.2%
Final simplification54.2%
(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 2023174
(FPCore (x y z t a)
:name "Data.Colour.Matrix:inverse from colour-2.3.3, B"
:precision binary64
:herbie-target
(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))