
(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 9 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.
(FPCore (a_s x y z t a_m)
:precision binary64
(*
a_s
(if (<= a_m 7.2e-60)
(/ (- (* y x) (* t z)) a_m)
(fma (/ x a_m) y (/ (- t) (/ a_m z))))))a\_m = fabs(a);
a\_s = copysign(1.0, a);
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 <= 7.2e-60) {
tmp = ((y * x) - (t * z)) / a_m;
} else {
tmp = fma((x / a_m), y, (-t / (a_m / z)));
}
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]) function code(a_s, x, y, z, t, a_m) tmp = 0.0 if (a_m <= 7.2e-60) tmp = Float64(Float64(Float64(y * x) - Float64(t * z)) / a_m); else tmp = fma(Float64(x / a_m), y, Float64(Float64(-t) / Float64(a_m / z))); 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.
code[a$95$s_, x_, y_, z_, t_, a$95$m_] := N[(a$95$s * If[LessEqual[a$95$m, 7.2e-60], N[(N[(N[(y * x), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision] / a$95$m), $MachinePrecision], N[(N[(x / a$95$m), $MachinePrecision] * y + N[((-t) / N[(a$95$m / z), $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])\\
\\
a\_s \cdot \begin{array}{l}
\mathbf{if}\;a\_m \leq 7.2 \cdot 10^{-60}:\\
\;\;\;\;\frac{y \cdot x - t \cdot z}{a\_m}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{a\_m}, y, \frac{-t}{\frac{a\_m}{z}}\right)\\
\end{array}
\end{array}
if a < 7.2e-60Initial program 90.2%
if 7.2e-60 < a Initial program 83.4%
lift-/.f64N/A
lift--.f64N/A
div-subN/A
sub-negN/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
lower-/.f6496.4
Applied rewrites96.4%
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6496.6
Applied rewrites96.6%
Final simplification92.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. (FPCore (a_s x y z t a_m) :precision binary64 (let* ((t_1 (* (/ y a_m) x)) (t_2 (- (* y x) (* t z)))) (* a_s (if (<= t_2 -1e+140) t_1 (if (<= t_2 5e+135) (/ (* y x) a_m) t_1)))))
a\_m = fabs(a);
a\_s = copysign(1.0, a);
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 = (y / a_m) * x;
double t_2 = (y * x) - (t * z);
double tmp;
if (t_2 <= -1e+140) {
tmp = t_1;
} else if (t_2 <= 5e+135) {
tmp = (y * x) / 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.
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) :: t_2
real(8) :: tmp
t_1 = (y / a_m) * x
t_2 = (y * x) - (t * z)
if (t_2 <= (-1d+140)) then
tmp = t_1
else if (t_2 <= 5d+135) then
tmp = (y * x) / 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;
public static double code(double a_s, double x, double y, double z, double t, double a_m) {
double t_1 = (y / a_m) * x;
double t_2 = (y * x) - (t * z);
double tmp;
if (t_2 <= -1e+140) {
tmp = t_1;
} else if (t_2 <= 5e+135) {
tmp = (y * x) / 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]) def code(a_s, x, y, z, t, a_m): t_1 = (y / a_m) * x t_2 = (y * x) - (t * z) tmp = 0 if t_2 <= -1e+140: tmp = t_1 elif t_2 <= 5e+135: tmp = (y * x) / 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]) function code(a_s, x, y, z, t, a_m) t_1 = Float64(Float64(y / a_m) * x) t_2 = Float64(Float64(y * x) - Float64(t * z)) tmp = 0.0 if (t_2 <= -1e+140) tmp = t_1; elseif (t_2 <= 5e+135) tmp = Float64(Float64(y * x) / 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])){:}
function tmp_2 = code(a_s, x, y, z, t, a_m)
t_1 = (y / a_m) * x;
t_2 = (y * x) - (t * z);
tmp = 0.0;
if (t_2 <= -1e+140)
tmp = t_1;
elseif (t_2 <= 5e+135)
tmp = (y * x) / 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.
code[a$95$s_, x_, y_, z_, t_, a$95$m_] := Block[{t$95$1 = N[(N[(y / a$95$m), $MachinePrecision] * x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * x), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]}, N[(a$95$s * If[LessEqual[t$95$2, -1e+140], t$95$1, If[LessEqual[t$95$2, 5e+135], N[(N[(y * x), $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])\\
\\
\begin{array}{l}
t_1 := \frac{y}{a\_m} \cdot x\\
t_2 := y \cdot x - t \cdot z\\
a\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+140}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+135}:\\
\;\;\;\;\frac{y \cdot x}{a\_m}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
\end{array}
if (-.f64 (*.f64 x y) (*.f64 z t)) < -1.00000000000000006e140 or 5.00000000000000029e135 < (-.f64 (*.f64 x y) (*.f64 z t)) Initial program 79.8%
Taylor expanded in t around 0
*-commutativeN/A
lower-*.f6437.2
Applied rewrites37.2%
Taylor expanded in t around 0
associate-*l/N/A
lower-*.f64N/A
lower-/.f6446.5
Applied rewrites46.5%
Applied rewrites47.1%
if -1.00000000000000006e140 < (-.f64 (*.f64 x y) (*.f64 z t)) < 5.00000000000000029e135Initial program 99.5%
Taylor expanded in t around 0
*-commutativeN/A
lower-*.f6462.0
Applied rewrites62.0%
Final simplification53.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.
(FPCore (a_s x y z t a_m)
:precision binary64
(let* ((t_1 (* (/ (- z) a_m) t)))
(*
a_s
(if (<= (* t z) -1e+305)
t_1
(if (<= (* t z) 2e+294) (/ (- (* y x) (* t z)) a_m) t_1)))))a\_m = fabs(a);
a\_s = copysign(1.0, a);
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 = (-z / a_m) * t;
double tmp;
if ((t * z) <= -1e+305) {
tmp = t_1;
} else if ((t * z) <= 2e+294) {
tmp = ((y * x) - (t * z)) / 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.
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 = (-z / a_m) * t
if ((t * z) <= (-1d+305)) then
tmp = t_1
else if ((t * z) <= 2d+294) then
tmp = ((y * x) - (t * z)) / 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;
public static double code(double a_s, double x, double y, double z, double t, double a_m) {
double t_1 = (-z / a_m) * t;
double tmp;
if ((t * z) <= -1e+305) {
tmp = t_1;
} else if ((t * z) <= 2e+294) {
tmp = ((y * x) - (t * z)) / 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]) def code(a_s, x, y, z, t, a_m): t_1 = (-z / a_m) * t tmp = 0 if (t * z) <= -1e+305: tmp = t_1 elif (t * z) <= 2e+294: tmp = ((y * x) - (t * z)) / 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]) function code(a_s, x, y, z, t, a_m) t_1 = Float64(Float64(Float64(-z) / a_m) * t) tmp = 0.0 if (Float64(t * z) <= -1e+305) tmp = t_1; elseif (Float64(t * z) <= 2e+294) tmp = Float64(Float64(Float64(y * x) - Float64(t * z)) / 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])){:}
function tmp_2 = code(a_s, x, y, z, t, a_m)
t_1 = (-z / a_m) * t;
tmp = 0.0;
if ((t * z) <= -1e+305)
tmp = t_1;
elseif ((t * z) <= 2e+294)
tmp = ((y * x) - (t * z)) / 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.
code[a$95$s_, x_, y_, z_, t_, a$95$m_] := Block[{t$95$1 = N[(N[((-z) / a$95$m), $MachinePrecision] * t), $MachinePrecision]}, N[(a$95$s * If[LessEqual[N[(t * z), $MachinePrecision], -1e+305], t$95$1, If[LessEqual[N[(t * z), $MachinePrecision], 2e+294], N[(N[(N[(y * x), $MachinePrecision] - N[(t * z), $MachinePrecision]), $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])\\
\\
\begin{array}{l}
t_1 := \frac{-z}{a\_m} \cdot t\\
a\_s \cdot \begin{array}{l}
\mathbf{if}\;t \cdot z \leq -1 \cdot 10^{+305}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \cdot z \leq 2 \cdot 10^{+294}:\\
\;\;\;\;\frac{y \cdot x - t \cdot z}{a\_m}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
\end{array}
if (*.f64 z t) < -9.9999999999999994e304 or 2.00000000000000013e294 < (*.f64 z t) Initial program 59.7%
Taylor expanded in t around inf
associate-/l*N/A
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f6497.5
Applied rewrites97.5%
if -9.9999999999999994e304 < (*.f64 z t) < 2.00000000000000013e294Initial program 93.8%
Final simplification94.5%
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.
(FPCore (a_s x y z t a_m)
:precision binary64
(let* ((t_1 (/ (- t) (/ a_m z))))
(*
a_s
(if (<= (* t z) -1e+54) t_1 (if (<= (* t z) 5e+29) (/ y (/ a_m x)) t_1)))))a\_m = fabs(a);
a\_s = copysign(1.0, a);
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 = -t / (a_m / z);
double tmp;
if ((t * z) <= -1e+54) {
tmp = t_1;
} else if ((t * z) <= 5e+29) {
tmp = y / (a_m / x);
} 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.
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 = -t / (a_m / z)
if ((t * z) <= (-1d+54)) then
tmp = t_1
else if ((t * z) <= 5d+29) then
tmp = y / (a_m / x)
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;
public static double code(double a_s, double x, double y, double z, double t, double a_m) {
double t_1 = -t / (a_m / z);
double tmp;
if ((t * z) <= -1e+54) {
tmp = t_1;
} else if ((t * z) <= 5e+29) {
tmp = y / (a_m / x);
} 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]) def code(a_s, x, y, z, t, a_m): t_1 = -t / (a_m / z) tmp = 0 if (t * z) <= -1e+54: tmp = t_1 elif (t * z) <= 5e+29: tmp = y / (a_m / x) 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]) function code(a_s, x, y, z, t, a_m) t_1 = Float64(Float64(-t) / Float64(a_m / z)) tmp = 0.0 if (Float64(t * z) <= -1e+54) tmp = t_1; elseif (Float64(t * z) <= 5e+29) tmp = Float64(y / Float64(a_m / x)); 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])){:}
function tmp_2 = code(a_s, x, y, z, t, a_m)
t_1 = -t / (a_m / z);
tmp = 0.0;
if ((t * z) <= -1e+54)
tmp = t_1;
elseif ((t * z) <= 5e+29)
tmp = y / (a_m / x);
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.
code[a$95$s_, x_, y_, z_, t_, a$95$m_] := Block[{t$95$1 = N[((-t) / N[(a$95$m / z), $MachinePrecision]), $MachinePrecision]}, N[(a$95$s * If[LessEqual[N[(t * z), $MachinePrecision], -1e+54], t$95$1, If[LessEqual[N[(t * z), $MachinePrecision], 5e+29], N[(y / N[(a$95$m / x), $MachinePrecision]), $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])\\
\\
\begin{array}{l}
t_1 := \frac{-t}{\frac{a\_m}{z}}\\
a\_s \cdot \begin{array}{l}
\mathbf{if}\;t \cdot z \leq -1 \cdot 10^{+54}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \cdot z \leq 5 \cdot 10^{+29}:\\
\;\;\;\;\frac{y}{\frac{a\_m}{x}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
\end{array}
if (*.f64 z t) < -1.0000000000000001e54 or 5.0000000000000001e29 < (*.f64 z t) Initial program 82.5%
Taylor expanded in t around 0
*-commutativeN/A
lower-*.f6419.0
Applied rewrites19.0%
Taylor expanded in t around inf
associate-*l/N/A
associate-*l*N/A
lower-*.f64N/A
associate-*r/N/A
lower-/.f64N/A
mul-1-negN/A
lower-neg.f6482.0
Applied rewrites82.0%
Applied rewrites83.4%
if -1.0000000000000001e54 < (*.f64 z t) < 5.0000000000000001e29Initial program 92.6%
Taylor expanded in t around 0
*-commutativeN/A
lower-*.f6472.8
Applied rewrites72.8%
Taylor expanded in t around 0
associate-*l/N/A
lower-*.f64N/A
lower-/.f6473.4
Applied rewrites73.4%
Applied rewrites73.3%
Final simplification78.1%
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. (FPCore (a_s x y z t a_m) :precision binary64 (* a_s (if (<= (/ (- (* y x) (* t z)) a_m) 2e+39) (* (/ x a_m) y) (* (/ y a_m) x))))
a\_m = fabs(a);
a\_s = copysign(1.0, a);
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 ((((y * x) - (t * z)) / a_m) <= 2e+39) {
tmp = (x / a_m) * y;
} else {
tmp = (y / a_m) * x;
}
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.
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) :: tmp
if ((((y * x) - (t * z)) / a_m) <= 2d+39) then
tmp = (x / a_m) * y
else
tmp = (y / a_m) * x
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;
public static double code(double a_s, double x, double y, double z, double t, double a_m) {
double tmp;
if ((((y * x) - (t * z)) / a_m) <= 2e+39) {
tmp = (x / a_m) * y;
} else {
tmp = (y / a_m) * x;
}
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]) def code(a_s, x, y, z, t, a_m): tmp = 0 if (((y * x) - (t * z)) / a_m) <= 2e+39: tmp = (x / a_m) * y else: tmp = (y / a_m) * x 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]) function code(a_s, x, y, z, t, a_m) tmp = 0.0 if (Float64(Float64(Float64(y * x) - Float64(t * z)) / a_m) <= 2e+39) tmp = Float64(Float64(x / a_m) * y); else tmp = Float64(Float64(y / a_m) * x); 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])){:}
function tmp_2 = code(a_s, x, y, z, t, a_m)
tmp = 0.0;
if ((((y * x) - (t * z)) / a_m) <= 2e+39)
tmp = (x / a_m) * y;
else
tmp = (y / a_m) * x;
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.
code[a$95$s_, x_, y_, z_, t_, a$95$m_] := N[(a$95$s * If[LessEqual[N[(N[(N[(y * x), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision] / a$95$m), $MachinePrecision], 2e+39], N[(N[(x / a$95$m), $MachinePrecision] * y), $MachinePrecision], N[(N[(y / a$95$m), $MachinePrecision] * x), $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])\\
\\
a\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{y \cdot x - t \cdot z}{a\_m} \leq 2 \cdot 10^{+39}:\\
\;\;\;\;\frac{x}{a\_m} \cdot y\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a\_m} \cdot x\\
\end{array}
\end{array}
if (/.f64 (-.f64 (*.f64 x y) (*.f64 z t)) a) < 1.99999999999999988e39Initial program 91.4%
Taylor expanded in t around 0
*-commutativeN/A
lower-*.f6451.0
Applied rewrites51.0%
Taylor expanded in t around 0
associate-*l/N/A
lower-*.f64N/A
lower-/.f6449.9
Applied rewrites49.9%
if 1.99999999999999988e39 < (/.f64 (-.f64 (*.f64 x y) (*.f64 z t)) a) Initial program 80.4%
Taylor expanded in t around 0
*-commutativeN/A
lower-*.f6439.7
Applied rewrites39.7%
Taylor expanded in t around 0
associate-*l/N/A
lower-*.f64N/A
lower-/.f6448.6
Applied rewrites48.6%
Applied rewrites48.6%
Final simplification49.5%
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.
(FPCore (a_s x y z t a_m)
:precision binary64
(let* ((t_1 (* (/ (- z) a_m) t)))
(*
a_s
(if (<= (* t z) -1e+54) t_1 (if (<= (* t z) 5e+29) (/ y (/ a_m x)) t_1)))))a\_m = fabs(a);
a\_s = copysign(1.0, a);
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 = (-z / a_m) * t;
double tmp;
if ((t * z) <= -1e+54) {
tmp = t_1;
} else if ((t * z) <= 5e+29) {
tmp = y / (a_m / x);
} 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.
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 = (-z / a_m) * t
if ((t * z) <= (-1d+54)) then
tmp = t_1
else if ((t * z) <= 5d+29) then
tmp = y / (a_m / x)
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;
public static double code(double a_s, double x, double y, double z, double t, double a_m) {
double t_1 = (-z / a_m) * t;
double tmp;
if ((t * z) <= -1e+54) {
tmp = t_1;
} else if ((t * z) <= 5e+29) {
tmp = y / (a_m / x);
} 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]) def code(a_s, x, y, z, t, a_m): t_1 = (-z / a_m) * t tmp = 0 if (t * z) <= -1e+54: tmp = t_1 elif (t * z) <= 5e+29: tmp = y / (a_m / x) 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]) function code(a_s, x, y, z, t, a_m) t_1 = Float64(Float64(Float64(-z) / a_m) * t) tmp = 0.0 if (Float64(t * z) <= -1e+54) tmp = t_1; elseif (Float64(t * z) <= 5e+29) tmp = Float64(y / Float64(a_m / x)); 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])){:}
function tmp_2 = code(a_s, x, y, z, t, a_m)
t_1 = (-z / a_m) * t;
tmp = 0.0;
if ((t * z) <= -1e+54)
tmp = t_1;
elseif ((t * z) <= 5e+29)
tmp = y / (a_m / x);
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.
code[a$95$s_, x_, y_, z_, t_, a$95$m_] := Block[{t$95$1 = N[(N[((-z) / a$95$m), $MachinePrecision] * t), $MachinePrecision]}, N[(a$95$s * If[LessEqual[N[(t * z), $MachinePrecision], -1e+54], t$95$1, If[LessEqual[N[(t * z), $MachinePrecision], 5e+29], N[(y / N[(a$95$m / x), $MachinePrecision]), $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])\\
\\
\begin{array}{l}
t_1 := \frac{-z}{a\_m} \cdot t\\
a\_s \cdot \begin{array}{l}
\mathbf{if}\;t \cdot z \leq -1 \cdot 10^{+54}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \cdot z \leq 5 \cdot 10^{+29}:\\
\;\;\;\;\frac{y}{\frac{a\_m}{x}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
\end{array}
if (*.f64 z t) < -1.0000000000000001e54 or 5.0000000000000001e29 < (*.f64 z t) Initial program 82.5%
Taylor expanded in t around inf
associate-/l*N/A
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f6482.8
Applied rewrites82.8%
if -1.0000000000000001e54 < (*.f64 z t) < 5.0000000000000001e29Initial program 92.6%
Taylor expanded in t around 0
*-commutativeN/A
lower-*.f6472.8
Applied rewrites72.8%
Taylor expanded in t around 0
associate-*l/N/A
lower-*.f64N/A
lower-/.f6473.4
Applied rewrites73.4%
Applied rewrites73.3%
Final simplification77.8%
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.
(FPCore (a_s x y z t a_m)
:precision binary64
(*
a_s
(if (<= a_m 4e-60)
(/ (- (* y x) (* t z)) a_m)
(fma (/ x a_m) y (* (/ (- z) a_m) t)))))a\_m = fabs(a);
a\_s = copysign(1.0, a);
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 <= 4e-60) {
tmp = ((y * x) - (t * z)) / a_m;
} else {
tmp = fma((x / a_m), y, ((-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]) function code(a_s, x, y, z, t, a_m) tmp = 0.0 if (a_m <= 4e-60) tmp = Float64(Float64(Float64(y * x) - Float64(t * z)) / a_m); else tmp = fma(Float64(x / a_m), y, Float64(Float64(Float64(-z) / a_m) * 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.
code[a$95$s_, x_, y_, z_, t_, a$95$m_] := N[(a$95$s * If[LessEqual[a$95$m, 4e-60], N[(N[(N[(y * x), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision] / a$95$m), $MachinePrecision], N[(N[(x / a$95$m), $MachinePrecision] * y + N[(N[((-z) / a$95$m), $MachinePrecision] * t), $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])\\
\\
a\_s \cdot \begin{array}{l}
\mathbf{if}\;a\_m \leq 4 \cdot 10^{-60}:\\
\;\;\;\;\frac{y \cdot x - t \cdot z}{a\_m}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{a\_m}, y, \frac{-z}{a\_m} \cdot t\right)\\
\end{array}
\end{array}
if a < 3.9999999999999999e-60Initial program 90.2%
if 3.9999999999999999e-60 < a Initial program 83.4%
lift-/.f64N/A
lift--.f64N/A
div-subN/A
sub-negN/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
lower-/.f6496.4
Applied rewrites96.4%
Final simplification92.3%
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.
(FPCore (a_s x y z t a_m)
:precision binary64
(let* ((t_1 (* (/ (- z) a_m) t)))
(*
a_s
(if (<= (* t z) -5e+48) t_1 (if (<= (* t z) 5e+29) (* (/ x a_m) y) t_1)))))a\_m = fabs(a);
a\_s = copysign(1.0, a);
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 = (-z / a_m) * t;
double tmp;
if ((t * z) <= -5e+48) {
tmp = t_1;
} else if ((t * z) <= 5e+29) {
tmp = (x / a_m) * y;
} 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.
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 = (-z / a_m) * t
if ((t * z) <= (-5d+48)) then
tmp = t_1
else if ((t * z) <= 5d+29) then
tmp = (x / a_m) * y
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;
public static double code(double a_s, double x, double y, double z, double t, double a_m) {
double t_1 = (-z / a_m) * t;
double tmp;
if ((t * z) <= -5e+48) {
tmp = t_1;
} else if ((t * z) <= 5e+29) {
tmp = (x / a_m) * y;
} 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]) def code(a_s, x, y, z, t, a_m): t_1 = (-z / a_m) * t tmp = 0 if (t * z) <= -5e+48: tmp = t_1 elif (t * z) <= 5e+29: tmp = (x / a_m) * y 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]) function code(a_s, x, y, z, t, a_m) t_1 = Float64(Float64(Float64(-z) / a_m) * t) tmp = 0.0 if (Float64(t * z) <= -5e+48) tmp = t_1; elseif (Float64(t * z) <= 5e+29) tmp = Float64(Float64(x / a_m) * y); 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])){:}
function tmp_2 = code(a_s, x, y, z, t, a_m)
t_1 = (-z / a_m) * t;
tmp = 0.0;
if ((t * z) <= -5e+48)
tmp = t_1;
elseif ((t * z) <= 5e+29)
tmp = (x / a_m) * y;
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.
code[a$95$s_, x_, y_, z_, t_, a$95$m_] := Block[{t$95$1 = N[(N[((-z) / a$95$m), $MachinePrecision] * t), $MachinePrecision]}, N[(a$95$s * If[LessEqual[N[(t * z), $MachinePrecision], -5e+48], t$95$1, If[LessEqual[N[(t * z), $MachinePrecision], 5e+29], N[(N[(x / a$95$m), $MachinePrecision] * y), $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])\\
\\
\begin{array}{l}
t_1 := \frac{-z}{a\_m} \cdot t\\
a\_s \cdot \begin{array}{l}
\mathbf{if}\;t \cdot z \leq -5 \cdot 10^{+48}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \cdot z \leq 5 \cdot 10^{+29}:\\
\;\;\;\;\frac{x}{a\_m} \cdot y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
\end{array}
if (*.f64 z t) < -4.99999999999999973e48 or 5.0000000000000001e29 < (*.f64 z t) Initial program 82.8%
Taylor expanded in t around inf
associate-/l*N/A
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f6482.3
Applied rewrites82.3%
if -4.99999999999999973e48 < (*.f64 z t) < 5.0000000000000001e29Initial program 92.5%
Taylor expanded in t around 0
*-commutativeN/A
lower-*.f6473.1
Applied rewrites73.1%
Taylor expanded in t around 0
associate-*l/N/A
lower-*.f64N/A
lower-/.f6473.7
Applied rewrites73.7%
Final simplification77.9%
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. (FPCore (a_s x y z t a_m) :precision binary64 (* a_s (* (/ y a_m) x)))
a\_m = fabs(a);
a\_s = copysign(1.0, a);
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 / a_m) * x);
}
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.
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 / a_m) * x)
end function
a\_m = Math.abs(a);
a\_s = Math.copySign(1.0, a);
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 / a_m) * x);
}
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]) def code(a_s, x, y, z, t, a_m): return a_s * ((y / a_m) * x)
a\_m = abs(a) a\_s = copysign(1.0, a) 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(Float64(y / a_m) * x)) 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])){:}
function tmp = code(a_s, x, y, z, t, a_m)
tmp = a_s * ((y / a_m) * x);
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.
code[a$95$s_, x_, y_, z_, t_, a$95$m_] := N[(a$95$s * N[(N[(y / a$95$m), $MachinePrecision] * x), $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])\\
\\
a\_s \cdot \left(\frac{y}{a\_m} \cdot x\right)
\end{array}
Initial program 87.8%
Taylor expanded in t around 0
*-commutativeN/A
lower-*.f6447.4
Applied rewrites47.4%
Taylor expanded in t around 0
associate-*l/N/A
lower-*.f64N/A
lower-/.f6449.5
Applied rewrites49.5%
Applied rewrites49.2%
Final simplification49.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 2024244
(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))