
(FPCore (x y z t a b c i j) :precision binary64 (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i)))) (* j (- (* c a) (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
real(8) function code(x, y, z, t, a, b, c, i, j)
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), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
def code(x, y, z, t, a, b, c, i, j): return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(t * i)))) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i))); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j) :precision binary64 (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i)))) (* j (- (* c a) (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
real(8) function code(x, y, z, t, a, b, c, i, j)
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), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
def code(x, y, z, t, a, b, c, i, j): return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(t * i)))) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i))); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)
\end{array}
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1
(+
(+ (* x (- (* y z) (* t a))) (* b (- (* t i) (* z c))))
(* j (- (* a c) (* y i))))))
(if (<= t_1 INFINITY)
t_1
(fma t (fma a (- x) (* b i)) (* z (fma x y (* b (- c))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((x * ((y * z) - (t * a))) + (b * ((t * i) - (z * c)))) + (j * ((a * c) - (y * i)));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = fma(t, fma(a, -x, (b * i)), (z * fma(x, y, (b * -c))));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) + Float64(b * Float64(Float64(t * i) - Float64(z * c)))) + Float64(j * Float64(Float64(a * c) - Float64(y * i)))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = fma(t, fma(a, Float64(-x), Float64(b * i)), Float64(z * fma(x, y, Float64(b * Float64(-c))))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(N[(t * i), $MachinePrecision] - N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(a * c), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(t * N[(a * (-x) + N[(b * i), $MachinePrecision]), $MachinePrecision] + N[(z * N[(x * y + N[(b * (-c)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot \left(y \cdot z - t \cdot a\right) + b \cdot \left(t \cdot i - z \cdot c\right)\right) + j \cdot \left(a \cdot c - y \cdot i\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t, \mathsf{fma}\left(a, -x, b \cdot i\right), z \cdot \mathsf{fma}\left(x, y, b \cdot \left(-c\right)\right)\right)\\
\end{array}
\end{array}
if (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) < +inf.0Initial program 92.6%
if +inf.0 < (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) Initial program 0.0%
Taylor expanded in t around 0
associate--l+N/A
sub-negN/A
associate-+r+N/A
sub-negN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-out--N/A
accelerator-lowering-fma.f64N/A
Simplified41.3%
Taylor expanded in j around 0
accelerator-lowering-fma.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f6455.1
Simplified55.1%
Final simplification85.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* y (fma j (- i) (* x z)))))
(if (<= y -7.8e+182)
t_1
(if (<= y 9e+118)
(fma
j
(- (* a c) (* y i))
(fma t (fma a (- x) (* b i)) (* z (fma c (- b) (* x y)))))
t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = y * fma(j, -i, (x * z));
double tmp;
if (y <= -7.8e+182) {
tmp = t_1;
} else if (y <= 9e+118) {
tmp = fma(j, ((a * c) - (y * i)), fma(t, fma(a, -x, (b * i)), (z * fma(c, -b, (x * y)))));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(y * fma(j, Float64(-i), Float64(x * z))) tmp = 0.0 if (y <= -7.8e+182) tmp = t_1; elseif (y <= 9e+118) tmp = fma(j, Float64(Float64(a * c) - Float64(y * i)), fma(t, fma(a, Float64(-x), Float64(b * i)), Float64(z * fma(c, Float64(-b), Float64(x * y))))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(y * N[(j * (-i) + N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.8e+182], t$95$1, If[LessEqual[y, 9e+118], N[(j * N[(N[(a * c), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision] + N[(t * N[(a * (-x) + N[(b * i), $MachinePrecision]), $MachinePrecision] + N[(z * N[(c * (-b) + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \mathsf{fma}\left(j, -i, x \cdot z\right)\\
\mathbf{if}\;y \leq -7.8 \cdot 10^{+182}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 9 \cdot 10^{+118}:\\
\;\;\;\;\mathsf{fma}\left(j, a \cdot c - y \cdot i, \mathsf{fma}\left(t, \mathsf{fma}\left(a, -x, b \cdot i\right), z \cdot \mathsf{fma}\left(c, -b, x \cdot y\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -7.7999999999999998e182 or 9.00000000000000004e118 < y Initial program 57.2%
Taylor expanded in y around inf
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
neg-mul-1N/A
neg-lowering-neg.f64N/A
*-commutativeN/A
*-lowering-*.f6479.4
Simplified79.4%
if -7.7999999999999998e182 < y < 9.00000000000000004e118Initial program 80.2%
Taylor expanded in t around 0
associate--l+N/A
sub-negN/A
associate-+r+N/A
sub-negN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-out--N/A
accelerator-lowering-fma.f64N/A
Simplified82.8%
Final simplification81.9%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= j -8e+162)
(* i (* j (- (/ (* a c) i) y)))
(if (<= j 3.3e+95)
(fma t (fma a (- x) (* b i)) (* z (fma x y (* b (- c)))))
(* j (- (* a c) (* y i))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (j <= -8e+162) {
tmp = i * (j * (((a * c) / i) - y));
} else if (j <= 3.3e+95) {
tmp = fma(t, fma(a, -x, (b * i)), (z * fma(x, y, (b * -c))));
} else {
tmp = j * ((a * c) - (y * i));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (j <= -8e+162) tmp = Float64(i * Float64(j * Float64(Float64(Float64(a * c) / i) - y))); elseif (j <= 3.3e+95) tmp = fma(t, fma(a, Float64(-x), Float64(b * i)), Float64(z * fma(x, y, Float64(b * Float64(-c))))); else tmp = Float64(j * Float64(Float64(a * c) - Float64(y * i))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[j, -8e+162], N[(i * N[(j * N[(N[(N[(a * c), $MachinePrecision] / i), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 3.3e+95], N[(t * N[(a * (-x) + N[(b * i), $MachinePrecision]), $MachinePrecision] + N[(z * N[(x * y + N[(b * (-c)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(j * N[(N[(a * c), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;j \leq -8 \cdot 10^{+162}:\\
\;\;\;\;i \cdot \left(j \cdot \left(\frac{a \cdot c}{i} - y\right)\right)\\
\mathbf{elif}\;j \leq 3.3 \cdot 10^{+95}:\\
\;\;\;\;\mathsf{fma}\left(t, \mathsf{fma}\left(a, -x, b \cdot i\right), z \cdot \mathsf{fma}\left(x, y, b \cdot \left(-c\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(a \cdot c - y \cdot i\right)\\
\end{array}
\end{array}
if j < -7.9999999999999995e162Initial program 62.6%
Taylor expanded in i around -inf
Simplified59.6%
Taylor expanded in j around inf
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6475.5
Simplified75.5%
if -7.9999999999999995e162 < j < 3.2999999999999998e95Initial program 76.0%
Taylor expanded in t around 0
associate--l+N/A
sub-negN/A
associate-+r+N/A
sub-negN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-out--N/A
accelerator-lowering-fma.f64N/A
Simplified77.8%
Taylor expanded in j around 0
accelerator-lowering-fma.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f6471.7
Simplified71.7%
if 3.2999999999999998e95 < j Initial program 75.0%
Taylor expanded in j around inf
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6470.5
Simplified70.5%
Final simplification71.9%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= j -7.2e+111)
(* i (* j (- (/ (* a c) i) y)))
(if (<= j 2.95e+94)
(fma t (* b i) (* z (fma x y (* b (- c)))))
(* j (- (* a c) (* y i))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (j <= -7.2e+111) {
tmp = i * (j * (((a * c) / i) - y));
} else if (j <= 2.95e+94) {
tmp = fma(t, (b * i), (z * fma(x, y, (b * -c))));
} else {
tmp = j * ((a * c) - (y * i));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (j <= -7.2e+111) tmp = Float64(i * Float64(j * Float64(Float64(Float64(a * c) / i) - y))); elseif (j <= 2.95e+94) tmp = fma(t, Float64(b * i), Float64(z * fma(x, y, Float64(b * Float64(-c))))); else tmp = Float64(j * Float64(Float64(a * c) - Float64(y * i))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[j, -7.2e+111], N[(i * N[(j * N[(N[(N[(a * c), $MachinePrecision] / i), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 2.95e+94], N[(t * N[(b * i), $MachinePrecision] + N[(z * N[(x * y + N[(b * (-c)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(j * N[(N[(a * c), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;j \leq -7.2 \cdot 10^{+111}:\\
\;\;\;\;i \cdot \left(j \cdot \left(\frac{a \cdot c}{i} - y\right)\right)\\
\mathbf{elif}\;j \leq 2.95 \cdot 10^{+94}:\\
\;\;\;\;\mathsf{fma}\left(t, b \cdot i, z \cdot \mathsf{fma}\left(x, y, b \cdot \left(-c\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(a \cdot c - y \cdot i\right)\\
\end{array}
\end{array}
if j < -7.2000000000000004e111Initial program 67.6%
Taylor expanded in i around -inf
Simplified57.7%
Taylor expanded in j around inf
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6473.0
Simplified73.0%
if -7.2000000000000004e111 < j < 2.94999999999999995e94Initial program 75.5%
Taylor expanded in t around 0
associate--l+N/A
sub-negN/A
associate-+r+N/A
sub-negN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-out--N/A
accelerator-lowering-fma.f64N/A
Simplified77.4%
Taylor expanded in j around 0
accelerator-lowering-fma.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f6472.1
Simplified72.1%
Taylor expanded in a around 0
*-lowering-*.f6465.4
Simplified65.4%
if 2.94999999999999995e94 < j Initial program 75.0%
Taylor expanded in j around inf
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6470.5
Simplified70.5%
Final simplification67.4%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= j -5.6e+132)
(* i (fma j (- y) (* t b)))
(if (<= j 3.4e+95)
(fma t (* b i) (* z (fma x y (* b (- c)))))
(* j (- (* a c) (* y i))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (j <= -5.6e+132) {
tmp = i * fma(j, -y, (t * b));
} else if (j <= 3.4e+95) {
tmp = fma(t, (b * i), (z * fma(x, y, (b * -c))));
} else {
tmp = j * ((a * c) - (y * i));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (j <= -5.6e+132) tmp = Float64(i * fma(j, Float64(-y), Float64(t * b))); elseif (j <= 3.4e+95) tmp = fma(t, Float64(b * i), Float64(z * fma(x, y, Float64(b * Float64(-c))))); else tmp = Float64(j * Float64(Float64(a * c) - Float64(y * i))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[j, -5.6e+132], N[(i * N[(j * (-y) + N[(t * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 3.4e+95], N[(t * N[(b * i), $MachinePrecision] + N[(z * N[(x * y + N[(b * (-c)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(j * N[(N[(a * c), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;j \leq -5.6 \cdot 10^{+132}:\\
\;\;\;\;i \cdot \mathsf{fma}\left(j, -y, t \cdot b\right)\\
\mathbf{elif}\;j \leq 3.4 \cdot 10^{+95}:\\
\;\;\;\;\mathsf{fma}\left(t, b \cdot i, z \cdot \mathsf{fma}\left(x, y, b \cdot \left(-c\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(a \cdot c - y \cdot i\right)\\
\end{array}
\end{array}
if j < -5.5999999999999998e132Initial program 65.9%
Taylor expanded in i around inf
*-lowering-*.f64N/A
cancel-sign-sub-invN/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
metadata-evalN/A
*-lft-identityN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6466.8
Simplified66.8%
if -5.5999999999999998e132 < j < 3.40000000000000022e95Initial program 75.8%
Taylor expanded in t around 0
associate--l+N/A
sub-negN/A
associate-+r+N/A
sub-negN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-out--N/A
accelerator-lowering-fma.f64N/A
Simplified77.6%
Taylor expanded in j around 0
accelerator-lowering-fma.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f6471.8
Simplified71.8%
Taylor expanded in a around 0
*-lowering-*.f6465.2
Simplified65.2%
if 3.40000000000000022e95 < j Initial program 75.0%
Taylor expanded in j around inf
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6470.5
Simplified70.5%
Final simplification66.3%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* b (- (* t i) (* z c))))) (if (<= b -1e+80) t_1 (if (<= b 1.9e-47) (* y (fma j (- i) (* x z))) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = b * ((t * i) - (z * c));
double tmp;
if (b <= -1e+80) {
tmp = t_1;
} else if (b <= 1.9e-47) {
tmp = y * fma(j, -i, (x * z));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(b * Float64(Float64(t * i) - Float64(z * c))) tmp = 0.0 if (b <= -1e+80) tmp = t_1; elseif (b <= 1.9e-47) tmp = Float64(y * fma(j, Float64(-i), Float64(x * z))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(b * N[(N[(t * i), $MachinePrecision] - N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1e+80], t$95$1, If[LessEqual[b, 1.9e-47], N[(y * N[(j * (-i) + N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(t \cdot i - z \cdot c\right)\\
\mathbf{if}\;b \leq -1 \cdot 10^{+80}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.9 \cdot 10^{-47}:\\
\;\;\;\;y \cdot \mathsf{fma}\left(j, -i, x \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1e80 or 1.90000000000000007e-47 < b Initial program 74.4%
Taylor expanded in b around inf
cancel-sign-sub-invN/A
+-commutativeN/A
distribute-lft-neg-inN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
remove-double-negN/A
+-commutativeN/A
sub-negN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6470.9
Simplified70.9%
if -1e80 < b < 1.90000000000000007e-47Initial program 74.0%
Taylor expanded in y around inf
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
neg-mul-1N/A
neg-lowering-neg.f64N/A
*-commutativeN/A
*-lowering-*.f6454.8
Simplified54.8%
Final simplification62.4%
(FPCore (x y z t a b c i j) :precision binary64 (if (<= j -6.7e+131) (* i (fma j (- y) (* t b))) (if (<= j 1.12e+95) (* b (- (* t i) (* z c))) (* j (- (* a c) (* y i))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (j <= -6.7e+131) {
tmp = i * fma(j, -y, (t * b));
} else if (j <= 1.12e+95) {
tmp = b * ((t * i) - (z * c));
} else {
tmp = j * ((a * c) - (y * i));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (j <= -6.7e+131) tmp = Float64(i * fma(j, Float64(-y), Float64(t * b))); elseif (j <= 1.12e+95) tmp = Float64(b * Float64(Float64(t * i) - Float64(z * c))); else tmp = Float64(j * Float64(Float64(a * c) - Float64(y * i))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[j, -6.7e+131], N[(i * N[(j * (-y) + N[(t * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 1.12e+95], N[(b * N[(N[(t * i), $MachinePrecision] - N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(j * N[(N[(a * c), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;j \leq -6.7 \cdot 10^{+131}:\\
\;\;\;\;i \cdot \mathsf{fma}\left(j, -y, t \cdot b\right)\\
\mathbf{elif}\;j \leq 1.12 \cdot 10^{+95}:\\
\;\;\;\;b \cdot \left(t \cdot i - z \cdot c\right)\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(a \cdot c - y \cdot i\right)\\
\end{array}
\end{array}
if j < -6.70000000000000008e131Initial program 65.9%
Taylor expanded in i around inf
*-lowering-*.f64N/A
cancel-sign-sub-invN/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
metadata-evalN/A
*-lft-identityN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6466.8
Simplified66.8%
if -6.70000000000000008e131 < j < 1.11999999999999999e95Initial program 75.8%
Taylor expanded in b around inf
cancel-sign-sub-invN/A
+-commutativeN/A
distribute-lft-neg-inN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
remove-double-negN/A
+-commutativeN/A
sub-negN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6452.7
Simplified52.7%
if 1.11999999999999999e95 < j Initial program 75.0%
Taylor expanded in j around inf
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6470.5
Simplified70.5%
Final simplification57.8%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* b (- (* t i) (* z c)))))
(if (<= b -8.6e-130)
t_1
(if (<= b 1.2e-69) (* a (fma j c (* t (- x)))) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = b * ((t * i) - (z * c));
double tmp;
if (b <= -8.6e-130) {
tmp = t_1;
} else if (b <= 1.2e-69) {
tmp = a * fma(j, c, (t * -x));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(b * Float64(Float64(t * i) - Float64(z * c))) tmp = 0.0 if (b <= -8.6e-130) tmp = t_1; elseif (b <= 1.2e-69) tmp = Float64(a * fma(j, c, Float64(t * Float64(-x)))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(b * N[(N[(t * i), $MachinePrecision] - N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -8.6e-130], t$95$1, If[LessEqual[b, 1.2e-69], N[(a * N[(j * c + N[(t * (-x)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(t \cdot i - z \cdot c\right)\\
\mathbf{if}\;b \leq -8.6 \cdot 10^{-130}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.2 \cdot 10^{-69}:\\
\;\;\;\;a \cdot \mathsf{fma}\left(j, c, t \cdot \left(-x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -8.60000000000000058e-130 or 1.2000000000000001e-69 < b Initial program 74.4%
Taylor expanded in b around inf
cancel-sign-sub-invN/A
+-commutativeN/A
distribute-lft-neg-inN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
remove-double-negN/A
+-commutativeN/A
sub-negN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6462.2
Simplified62.2%
if -8.60000000000000058e-130 < b < 1.2000000000000001e-69Initial program 73.7%
Taylor expanded in a around inf
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f6443.3
Simplified43.3%
Final simplification55.8%
(FPCore (x y z t a b c i j) :precision binary64 (if (<= b -1.42e+29) (* t (* b i)) (if (<= b 1.25e+62) (* a (fma j c (* t (- x)))) (* c (* z (- b))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (b <= -1.42e+29) {
tmp = t * (b * i);
} else if (b <= 1.25e+62) {
tmp = a * fma(j, c, (t * -x));
} else {
tmp = c * (z * -b);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (b <= -1.42e+29) tmp = Float64(t * Float64(b * i)); elseif (b <= 1.25e+62) tmp = Float64(a * fma(j, c, Float64(t * Float64(-x)))); else tmp = Float64(c * Float64(z * Float64(-b))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[b, -1.42e+29], N[(t * N[(b * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.25e+62], N[(a * N[(j * c + N[(t * (-x)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c * N[(z * (-b)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.42 \cdot 10^{+29}:\\
\;\;\;\;t \cdot \left(b \cdot i\right)\\
\mathbf{elif}\;b \leq 1.25 \cdot 10^{+62}:\\
\;\;\;\;a \cdot \mathsf{fma}\left(j, c, t \cdot \left(-x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;c \cdot \left(z \cdot \left(-b\right)\right)\\
\end{array}
\end{array}
if b < -1.42e29Initial program 74.8%
Taylor expanded in i around inf
*-lowering-*.f64N/A
cancel-sign-sub-invN/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
metadata-evalN/A
*-lft-identityN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6450.5
Simplified50.5%
Taylor expanded in j around 0
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6438.6
Simplified38.6%
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6443.4
Applied egg-rr43.4%
if -1.42e29 < b < 1.25000000000000007e62Initial program 76.5%
Taylor expanded in a around inf
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f6439.8
Simplified39.8%
if 1.25000000000000007e62 < b Initial program 67.4%
Taylor expanded in c around inf
*-lowering-*.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6452.0
Simplified52.0%
Taylor expanded in j around 0
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f6450.4
Simplified50.4%
Final simplification42.8%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* x (* y z))))
(if (<= x -3.35e+140)
t_1
(if (<= x -8.5e-221)
(* b (* c (- z)))
(if (<= x 3.2e-57) (* b (* t i)) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = x * (y * z);
double tmp;
if (x <= -3.35e+140) {
tmp = t_1;
} else if (x <= -8.5e-221) {
tmp = b * (c * -z);
} else if (x <= 3.2e-57) {
tmp = b * (t * i);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
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), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = x * (y * z)
if (x <= (-3.35d+140)) then
tmp = t_1
else if (x <= (-8.5d-221)) then
tmp = b * (c * -z)
else if (x <= 3.2d-57) then
tmp = b * (t * i)
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 b, double c, double i, double j) {
double t_1 = x * (y * z);
double tmp;
if (x <= -3.35e+140) {
tmp = t_1;
} else if (x <= -8.5e-221) {
tmp = b * (c * -z);
} else if (x <= 3.2e-57) {
tmp = b * (t * i);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = x * (y * z) tmp = 0 if x <= -3.35e+140: tmp = t_1 elif x <= -8.5e-221: tmp = b * (c * -z) elif x <= 3.2e-57: tmp = b * (t * i) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(x * Float64(y * z)) tmp = 0.0 if (x <= -3.35e+140) tmp = t_1; elseif (x <= -8.5e-221) tmp = Float64(b * Float64(c * Float64(-z))); elseif (x <= 3.2e-57) tmp = Float64(b * Float64(t * i)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = x * (y * z); tmp = 0.0; if (x <= -3.35e+140) tmp = t_1; elseif (x <= -8.5e-221) tmp = b * (c * -z); elseif (x <= 3.2e-57) tmp = b * (t * i); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.35e+140], t$95$1, If[LessEqual[x, -8.5e-221], N[(b * N[(c * (-z)), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.2e-57], N[(b * N[(t * i), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z\right)\\
\mathbf{if}\;x \leq -3.35 \cdot 10^{+140}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -8.5 \cdot 10^{-221}:\\
\;\;\;\;b \cdot \left(c \cdot \left(-z\right)\right)\\
\mathbf{elif}\;x \leq 3.2 \cdot 10^{-57}:\\
\;\;\;\;b \cdot \left(t \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -3.35e140 or 3.2000000000000001e-57 < x Initial program 69.1%
Taylor expanded in y around inf
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
neg-mul-1N/A
neg-lowering-neg.f64N/A
*-commutativeN/A
*-lowering-*.f6455.9
Simplified55.9%
Taylor expanded in j around 0
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6449.3
Simplified49.3%
if -3.35e140 < x < -8.49999999999999984e-221Initial program 80.1%
Taylor expanded in c around inf
*-lowering-*.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6448.7
Simplified48.7%
Taylor expanded in j around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6436.5
Simplified36.5%
if -8.49999999999999984e-221 < x < 3.2000000000000001e-57Initial program 76.0%
Taylor expanded in i around inf
*-lowering-*.f64N/A
cancel-sign-sub-invN/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
metadata-evalN/A
*-lft-identityN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6453.3
Simplified53.3%
Taylor expanded in j around 0
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6435.4
Simplified35.4%
Final simplification41.5%
(FPCore (x y z t a b c i j) :precision binary64 (if (<= b -2.15e+80) (* t (* b i)) (if (<= b 1.5e-68) (* x (* y z)) (* c (* z (- b))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (b <= -2.15e+80) {
tmp = t * (b * i);
} else if (b <= 1.5e-68) {
tmp = x * (y * z);
} else {
tmp = c * (z * -b);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
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), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (b <= (-2.15d+80)) then
tmp = t * (b * i)
else if (b <= 1.5d-68) then
tmp = x * (y * z)
else
tmp = c * (z * -b)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (b <= -2.15e+80) {
tmp = t * (b * i);
} else if (b <= 1.5e-68) {
tmp = x * (y * z);
} else {
tmp = c * (z * -b);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if b <= -2.15e+80: tmp = t * (b * i) elif b <= 1.5e-68: tmp = x * (y * z) else: tmp = c * (z * -b) return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (b <= -2.15e+80) tmp = Float64(t * Float64(b * i)); elseif (b <= 1.5e-68) tmp = Float64(x * Float64(y * z)); else tmp = Float64(c * Float64(z * Float64(-b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (b <= -2.15e+80) tmp = t * (b * i); elseif (b <= 1.5e-68) tmp = x * (y * z); else tmp = c * (z * -b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[b, -2.15e+80], N[(t * N[(b * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.5e-68], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision], N[(c * N[(z * (-b)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.15 \cdot 10^{+80}:\\
\;\;\;\;t \cdot \left(b \cdot i\right)\\
\mathbf{elif}\;b \leq 1.5 \cdot 10^{-68}:\\
\;\;\;\;x \cdot \left(y \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;c \cdot \left(z \cdot \left(-b\right)\right)\\
\end{array}
\end{array}
if b < -2.15000000000000002e80Initial program 79.4%
Taylor expanded in i around inf
*-lowering-*.f64N/A
cancel-sign-sub-invN/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
metadata-evalN/A
*-lft-identityN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6451.3
Simplified51.3%
Taylor expanded in j around 0
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6444.3
Simplified44.3%
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6448.5
Applied egg-rr48.5%
if -2.15000000000000002e80 < b < 1.5e-68Initial program 74.1%
Taylor expanded in y around inf
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
neg-mul-1N/A
neg-lowering-neg.f64N/A
*-commutativeN/A
*-lowering-*.f6454.6
Simplified54.6%
Taylor expanded in j around 0
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6435.9
Simplified35.9%
if 1.5e-68 < b Initial program 71.4%
Taylor expanded in c around inf
*-lowering-*.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6447.5
Simplified47.5%
Taylor expanded in j around 0
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f6442.5
Simplified42.5%
Final simplification40.1%
(FPCore (x y z t a b c i j) :precision binary64 (if (<= z -1.6e+54) (* y (* x z)) (if (<= z 6.2e+59) (* t (* b i)) (* z (* x y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (z <= -1.6e+54) {
tmp = y * (x * z);
} else if (z <= 6.2e+59) {
tmp = t * (b * i);
} else {
tmp = z * (x * y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
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), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (z <= (-1.6d+54)) then
tmp = y * (x * z)
else if (z <= 6.2d+59) then
tmp = t * (b * i)
else
tmp = z * (x * y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (z <= -1.6e+54) {
tmp = y * (x * z);
} else if (z <= 6.2e+59) {
tmp = t * (b * i);
} else {
tmp = z * (x * y);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if z <= -1.6e+54: tmp = y * (x * z) elif z <= 6.2e+59: tmp = t * (b * i) else: tmp = z * (x * y) return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (z <= -1.6e+54) tmp = Float64(y * Float64(x * z)); elseif (z <= 6.2e+59) tmp = Float64(t * Float64(b * i)); else tmp = Float64(z * Float64(x * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (z <= -1.6e+54) tmp = y * (x * z); elseif (z <= 6.2e+59) tmp = t * (b * i); else tmp = z * (x * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[z, -1.6e+54], N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.2e+59], N[(t * N[(b * i), $MachinePrecision]), $MachinePrecision], N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.6 \cdot 10^{+54}:\\
\;\;\;\;y \cdot \left(x \cdot z\right)\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{+59}:\\
\;\;\;\;t \cdot \left(b \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(x \cdot y\right)\\
\end{array}
\end{array}
if z < -1.6e54Initial program 67.4%
Taylor expanded in y around inf
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
neg-mul-1N/A
neg-lowering-neg.f64N/A
*-commutativeN/A
*-lowering-*.f6454.8
Simplified54.8%
Taylor expanded in j around 0
*-lowering-*.f6443.0
Simplified43.0%
if -1.6e54 < z < 6.20000000000000029e59Initial program 81.5%
Taylor expanded in i around inf
*-lowering-*.f64N/A
cancel-sign-sub-invN/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
metadata-evalN/A
*-lft-identityN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6448.2
Simplified48.2%
Taylor expanded in j around 0
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6430.7
Simplified30.7%
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6431.6
Applied egg-rr31.6%
if 6.20000000000000029e59 < z Initial program 65.4%
Taylor expanded in t around 0
associate--l+N/A
sub-negN/A
associate-+r+N/A
sub-negN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-out--N/A
accelerator-lowering-fma.f64N/A
Simplified77.9%
Taylor expanded in j around 0
accelerator-lowering-fma.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f6471.6
Simplified71.6%
Taylor expanded in y around inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6452.1
Simplified52.1%
Final simplification39.3%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* x (* y z)))) (if (<= x -1.4e+40) t_1 (if (<= x 3e-57) (* b (* t i)) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = x * (y * z);
double tmp;
if (x <= -1.4e+40) {
tmp = t_1;
} else if (x <= 3e-57) {
tmp = b * (t * i);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
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), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = x * (y * z)
if (x <= (-1.4d+40)) then
tmp = t_1
else if (x <= 3d-57) then
tmp = b * (t * i)
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 b, double c, double i, double j) {
double t_1 = x * (y * z);
double tmp;
if (x <= -1.4e+40) {
tmp = t_1;
} else if (x <= 3e-57) {
tmp = b * (t * i);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = x * (y * z) tmp = 0 if x <= -1.4e+40: tmp = t_1 elif x <= 3e-57: tmp = b * (t * i) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(x * Float64(y * z)) tmp = 0.0 if (x <= -1.4e+40) tmp = t_1; elseif (x <= 3e-57) tmp = Float64(b * Float64(t * i)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = x * (y * z); tmp = 0.0; if (x <= -1.4e+40) tmp = t_1; elseif (x <= 3e-57) tmp = b * (t * i); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.4e+40], t$95$1, If[LessEqual[x, 3e-57], N[(b * N[(t * i), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z\right)\\
\mathbf{if}\;x \leq -1.4 \cdot 10^{+40}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 3 \cdot 10^{-57}:\\
\;\;\;\;b \cdot \left(t \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.4000000000000001e40 or 3.00000000000000001e-57 < x Initial program 69.9%
Taylor expanded in y around inf
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
neg-mul-1N/A
neg-lowering-neg.f64N/A
*-commutativeN/A
*-lowering-*.f6455.8
Simplified55.8%
Taylor expanded in j around 0
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6448.2
Simplified48.2%
if -1.4000000000000001e40 < x < 3.00000000000000001e-57Initial program 77.9%
Taylor expanded in i around inf
*-lowering-*.f64N/A
cancel-sign-sub-invN/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
metadata-evalN/A
*-lft-identityN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6446.5
Simplified46.5%
Taylor expanded in j around 0
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6430.7
Simplified30.7%
Final simplification38.9%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* a (* c j)))) (if (<= c -5.6e+145) t_1 (if (<= c 5.6e+52) (* b (* t i)) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = a * (c * j);
double tmp;
if (c <= -5.6e+145) {
tmp = t_1;
} else if (c <= 5.6e+52) {
tmp = b * (t * i);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
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), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = a * (c * j)
if (c <= (-5.6d+145)) then
tmp = t_1
else if (c <= 5.6d+52) then
tmp = b * (t * i)
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 b, double c, double i, double j) {
double t_1 = a * (c * j);
double tmp;
if (c <= -5.6e+145) {
tmp = t_1;
} else if (c <= 5.6e+52) {
tmp = b * (t * i);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = a * (c * j) tmp = 0 if c <= -5.6e+145: tmp = t_1 elif c <= 5.6e+52: tmp = b * (t * i) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(a * Float64(c * j)) tmp = 0.0 if (c <= -5.6e+145) tmp = t_1; elseif (c <= 5.6e+52) tmp = Float64(b * Float64(t * i)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = a * (c * j); tmp = 0.0; if (c <= -5.6e+145) tmp = t_1; elseif (c <= 5.6e+52) tmp = b * (t * i); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(a * N[(c * j), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -5.6e+145], t$95$1, If[LessEqual[c, 5.6e+52], N[(b * N[(t * i), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(c \cdot j\right)\\
\mathbf{if}\;c \leq -5.6 \cdot 10^{+145}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 5.6 \cdot 10^{+52}:\\
\;\;\;\;b \cdot \left(t \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -5.5999999999999997e145 or 5.6e52 < c Initial program 66.4%
Taylor expanded in a around inf
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f6446.0
Simplified46.0%
Taylor expanded in j around inf
*-lowering-*.f6440.1
Simplified40.1%
if -5.5999999999999997e145 < c < 5.6e52Initial program 77.7%
Taylor expanded in i around inf
*-lowering-*.f64N/A
cancel-sign-sub-invN/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
metadata-evalN/A
*-lft-identityN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6447.8
Simplified47.8%
Taylor expanded in j around 0
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6428.7
Simplified28.7%
(FPCore (x y z t a b c i j) :precision binary64 (* a (* c j)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return a * (c * j);
}
real(8) function code(x, y, z, t, a, b, c, i, j)
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), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = a * (c * j)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return a * (c * j);
}
def code(x, y, z, t, a, b, c, i, j): return a * (c * j)
function code(x, y, z, t, a, b, c, i, j) return Float64(a * Float64(c * j)) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = a * (c * j); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(a * N[(c * j), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a \cdot \left(c \cdot j\right)
\end{array}
Initial program 74.2%
Taylor expanded in a around inf
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f6431.0
Simplified31.0%
Taylor expanded in j around inf
*-lowering-*.f6418.4
Simplified18.4%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* j (- (* c a) (* y i))))
(t_2
(+
(-
(* x (- (* y z) (* t a)))
(/
(* b (- (pow (* c z) 2.0) (pow (* t i) 2.0)))
(+ (* c z) (* t i))))
t_1)))
(if (< x -1.469694296777705e-64)
t_2
(if (< x 3.2113527362226803e-147)
(- (* (- (* b i) (* x a)) t) (- (* z (* c b)) t_1))
t_2))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = j * ((c * a) - (y * i));
double t_2 = ((x * ((y * z) - (t * a))) - ((b * (pow((c * z), 2.0) - pow((t * i), 2.0))) / ((c * z) + (t * i)))) + t_1;
double tmp;
if (x < -1.469694296777705e-64) {
tmp = t_2;
} else if (x < 3.2113527362226803e-147) {
tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1);
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
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), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = j * ((c * a) - (y * i))
t_2 = ((x * ((y * z) - (t * a))) - ((b * (((c * z) ** 2.0d0) - ((t * i) ** 2.0d0))) / ((c * z) + (t * i)))) + t_1
if (x < (-1.469694296777705d-64)) then
tmp = t_2
else if (x < 3.2113527362226803d-147) then
tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1)
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = j * ((c * a) - (y * i));
double t_2 = ((x * ((y * z) - (t * a))) - ((b * (Math.pow((c * z), 2.0) - Math.pow((t * i), 2.0))) / ((c * z) + (t * i)))) + t_1;
double tmp;
if (x < -1.469694296777705e-64) {
tmp = t_2;
} else if (x < 3.2113527362226803e-147) {
tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = j * ((c * a) - (y * i)) t_2 = ((x * ((y * z) - (t * a))) - ((b * (math.pow((c * z), 2.0) - math.pow((t * i), 2.0))) / ((c * z) + (t * i)))) + t_1 tmp = 0 if x < -1.469694296777705e-64: tmp = t_2 elif x < 3.2113527362226803e-147: tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(j * Float64(Float64(c * a) - Float64(y * i))) t_2 = Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(Float64(b * Float64((Float64(c * z) ^ 2.0) - (Float64(t * i) ^ 2.0))) / Float64(Float64(c * z) + Float64(t * i)))) + t_1) tmp = 0.0 if (x < -1.469694296777705e-64) tmp = t_2; elseif (x < 3.2113527362226803e-147) tmp = Float64(Float64(Float64(Float64(b * i) - Float64(x * a)) * t) - Float64(Float64(z * Float64(c * b)) - t_1)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = j * ((c * a) - (y * i)); t_2 = ((x * ((y * z) - (t * a))) - ((b * (((c * z) ^ 2.0) - ((t * i) ^ 2.0))) / ((c * z) + (t * i)))) + t_1; tmp = 0.0; if (x < -1.469694296777705e-64) tmp = t_2; elseif (x < 3.2113527362226803e-147) tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(b * N[(N[Power[N[(c * z), $MachinePrecision], 2.0], $MachinePrecision] - N[Power[N[(t * i), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(c * z), $MachinePrecision] + N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[Less[x, -1.469694296777705e-64], t$95$2, If[Less[x, 3.2113527362226803e-147], N[(N[(N[(N[(b * i), $MachinePrecision] - N[(x * a), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision] - N[(N[(z * N[(c * b), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot \left(c \cdot a - y \cdot i\right)\\
t_2 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - \frac{b \cdot \left({\left(c \cdot z\right)}^{2} - {\left(t \cdot i\right)}^{2}\right)}{c \cdot z + t \cdot i}\right) + t\_1\\
\mathbf{if}\;x < -1.469694296777705 \cdot 10^{-64}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x < 3.2113527362226803 \cdot 10^{-147}:\\
\;\;\;\;\left(b \cdot i - x \cdot a\right) \cdot t - \left(z \cdot \left(c \cdot b\right) - t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
herbie shell --seed 2024198
(FPCore (x y z t a b c i j)
:name "Data.Colour.Matrix:determinant from colour-2.3.3, A"
:precision binary64
:alt
(! :herbie-platform default (if (< x -293938859355541/2000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (* x (- (* y z) (* t a))) (/ (* b (- (pow (* c z) 2) (pow (* t i) 2))) (+ (* c z) (* t i)))) (* j (- (* c a) (* y i)))) (if (< x 32113527362226803/10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (* (- (* b i) (* x a)) t) (- (* z (* c b)) (* j (- (* c a) (* y i))))) (+ (- (* x (- (* y z) (* t a))) (/ (* b (- (pow (* c z) 2) (pow (* t i) 2))) (+ (* c z) (* t i)))) (* j (- (* c a) (* y i)))))))
(+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i)))) (* j (- (* c a) (* y i)))))