
(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 18 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 (* a (fma j c (* t (- x)))))))
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 = a * fma(j, c, (t * -x));
}
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 = Float64(a * fma(j, c, Float64(t * Float64(-x)))); 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[(a * N[(j * c + N[(t * (-x)), $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}:\\
\;\;\;\;a \cdot \mathsf{fma}\left(j, c, t \cdot \left(-x\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 93.4%
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 a around inf
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6452.8
Applied rewrites52.8%
Final simplification86.7%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* t (fma a (- x) (* b i)))))
(if (<= t -2.9e+106)
t_1
(if (<= t 4.3e+102)
(fma b (- (* t i) (* z c)) (* 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 = t * fma(a, -x, (b * i));
double tmp;
if (t <= -2.9e+106) {
tmp = t_1;
} else if (t <= 4.3e+102) {
tmp = fma(b, ((t * i) - (z * c)), (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(t * fma(a, Float64(-x), Float64(b * i))) tmp = 0.0 if (t <= -2.9e+106) tmp = t_1; elseif (t <= 4.3e+102) tmp = fma(b, Float64(Float64(t * i) - Float64(z * c)), 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[(t * N[(a * (-x) + N[(b * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.9e+106], t$95$1, If[LessEqual[t, 4.3e+102], N[(b * N[(N[(t * i), $MachinePrecision] - N[(z * c), $MachinePrecision]), $MachinePrecision] + N[(y * N[(j * (-i) + N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \mathsf{fma}\left(a, -x, b \cdot i\right)\\
\mathbf{if}\;t \leq -2.9 \cdot 10^{+106}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4.3 \cdot 10^{+102}:\\
\;\;\;\;\mathsf{fma}\left(b, t \cdot i - z \cdot c, y \cdot \mathsf{fma}\left(j, -i, x \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.9000000000000002e106 or 4.3000000000000001e102 < t Initial program 70.6%
Taylor expanded in t around inf
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6477.5
Applied rewrites77.5%
if -2.9000000000000002e106 < t < 4.3000000000000001e102Initial program 82.1%
Taylor expanded in a around 0
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
remove-double-negN/A
+-commutativeN/A
sub-negN/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
Applied rewrites70.7%
Final simplification73.1%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* t (fma a (- x) (* b i)))))
(if (<= t -7.2e+78)
t_1
(if (<= t -2.3e-274)
(* c (- (* a j) (* z b)))
(if (<= t 1.25e-174)
(* j (* a (fma i (/ y (- a)) c)))
(if (<= t 4.3e+32) (* z (fma x y (* b (- c)))) 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 = t * fma(a, -x, (b * i));
double tmp;
if (t <= -7.2e+78) {
tmp = t_1;
} else if (t <= -2.3e-274) {
tmp = c * ((a * j) - (z * b));
} else if (t <= 1.25e-174) {
tmp = j * (a * fma(i, (y / -a), c));
} else if (t <= 4.3e+32) {
tmp = z * fma(x, y, (b * -c));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(t * fma(a, Float64(-x), Float64(b * i))) tmp = 0.0 if (t <= -7.2e+78) tmp = t_1; elseif (t <= -2.3e-274) tmp = Float64(c * Float64(Float64(a * j) - Float64(z * b))); elseif (t <= 1.25e-174) tmp = Float64(j * Float64(a * fma(i, Float64(y / Float64(-a)), c))); elseif (t <= 4.3e+32) tmp = Float64(z * fma(x, y, Float64(b * Float64(-c)))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(t * N[(a * (-x) + N[(b * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.2e+78], t$95$1, If[LessEqual[t, -2.3e-274], N[(c * N[(N[(a * j), $MachinePrecision] - N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.25e-174], N[(j * N[(a * N[(i * N[(y / (-a)), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.3e+32], N[(z * N[(x * y + N[(b * (-c)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \mathsf{fma}\left(a, -x, b \cdot i\right)\\
\mathbf{if}\;t \leq -7.2 \cdot 10^{+78}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2.3 \cdot 10^{-274}:\\
\;\;\;\;c \cdot \left(a \cdot j - z \cdot b\right)\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{-174}:\\
\;\;\;\;j \cdot \left(a \cdot \mathsf{fma}\left(i, \frac{y}{-a}, c\right)\right)\\
\mathbf{elif}\;t \leq 4.3 \cdot 10^{+32}:\\
\;\;\;\;z \cdot \mathsf{fma}\left(x, y, b \cdot \left(-c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -7.20000000000000039e78 or 4.2999999999999997e32 < t Initial program 71.7%
Taylor expanded in t around inf
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6472.2
Applied rewrites72.2%
if -7.20000000000000039e78 < t < -2.29999999999999996e-274Initial program 83.3%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6461.5
Applied rewrites61.5%
if -2.29999999999999996e-274 < t < 1.2500000000000001e-174Initial program 87.2%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6468.7
Applied rewrites68.7%
Taylor expanded in a around inf
+-commutativeN/A
mul-1-negN/A
neg-sub0N/A
associate-+l-N/A
unsub-negN/A
mul-1-negN/A
+-commutativeN/A
neg-sub0N/A
lower-*.f64N/A
neg-sub0N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
associate-+l-N/A
neg-sub0N/A
associate-/l*N/A
distribute-rgt-neg-inN/A
lower-fma.f64N/A
Applied rewrites68.7%
if 1.2500000000000001e-174 < t < 4.2999999999999997e32Initial program 79.2%
Taylor expanded in a around 0
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
remove-double-negN/A
+-commutativeN/A
sub-negN/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
Applied rewrites79.3%
Taylor expanded in j around 0
lower-fma.f64N/A
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6473.4
Applied rewrites73.4%
Taylor expanded in z around inf
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6469.1
Applied rewrites69.1%
Final simplification68.4%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* t (fma a (- x) (* b i)))))
(if (<= t -7.2e+78)
t_1
(if (<= t -2.3e-274)
(* c (- (* a j) (* z b)))
(if (<= t 1.25e-174)
(* j (- (* a c) (* y i)))
(if (<= t 4.3e+32) (* z (fma x y (* b (- c)))) 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 = t * fma(a, -x, (b * i));
double tmp;
if (t <= -7.2e+78) {
tmp = t_1;
} else if (t <= -2.3e-274) {
tmp = c * ((a * j) - (z * b));
} else if (t <= 1.25e-174) {
tmp = j * ((a * c) - (y * i));
} else if (t <= 4.3e+32) {
tmp = z * fma(x, y, (b * -c));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(t * fma(a, Float64(-x), Float64(b * i))) tmp = 0.0 if (t <= -7.2e+78) tmp = t_1; elseif (t <= -2.3e-274) tmp = Float64(c * Float64(Float64(a * j) - Float64(z * b))); elseif (t <= 1.25e-174) tmp = Float64(j * Float64(Float64(a * c) - Float64(y * i))); elseif (t <= 4.3e+32) tmp = Float64(z * fma(x, y, Float64(b * Float64(-c)))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(t * N[(a * (-x) + N[(b * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.2e+78], t$95$1, If[LessEqual[t, -2.3e-274], N[(c * N[(N[(a * j), $MachinePrecision] - N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.25e-174], N[(j * N[(N[(a * c), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.3e+32], N[(z * N[(x * y + N[(b * (-c)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \mathsf{fma}\left(a, -x, b \cdot i\right)\\
\mathbf{if}\;t \leq -7.2 \cdot 10^{+78}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2.3 \cdot 10^{-274}:\\
\;\;\;\;c \cdot \left(a \cdot j - z \cdot b\right)\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{-174}:\\
\;\;\;\;j \cdot \left(a \cdot c - y \cdot i\right)\\
\mathbf{elif}\;t \leq 4.3 \cdot 10^{+32}:\\
\;\;\;\;z \cdot \mathsf{fma}\left(x, y, b \cdot \left(-c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -7.20000000000000039e78 or 4.2999999999999997e32 < t Initial program 71.7%
Taylor expanded in t around inf
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6472.2
Applied rewrites72.2%
if -7.20000000000000039e78 < t < -2.29999999999999996e-274Initial program 83.3%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6461.5
Applied rewrites61.5%
if -2.29999999999999996e-274 < t < 1.2500000000000001e-174Initial program 87.2%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6468.7
Applied rewrites68.7%
if 1.2500000000000001e-174 < t < 4.2999999999999997e32Initial program 79.2%
Taylor expanded in a around 0
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
remove-double-negN/A
+-commutativeN/A
sub-negN/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
Applied rewrites79.3%
Taylor expanded in j around 0
lower-fma.f64N/A
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6473.4
Applied rewrites73.4%
Taylor expanded in z around inf
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6469.1
Applied rewrites69.1%
Final simplification68.4%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* t (fma a (- x) (* b i)))))
(if (<= t -7.2e+78)
t_1
(if (<= t -2.3e-274)
(* c (- (* a j) (* z b)))
(if (<= t 1.25e-174)
(* j (- (* a c) (* y i)))
(if (<= t 4.3e+32) (* 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 = t * fma(a, -x, (b * i));
double tmp;
if (t <= -7.2e+78) {
tmp = t_1;
} else if (t <= -2.3e-274) {
tmp = c * ((a * j) - (z * b));
} else if (t <= 1.25e-174) {
tmp = j * ((a * c) - (y * i));
} else if (t <= 4.3e+32) {
tmp = 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(t * fma(a, Float64(-x), Float64(b * i))) tmp = 0.0 if (t <= -7.2e+78) tmp = t_1; elseif (t <= -2.3e-274) tmp = Float64(c * Float64(Float64(a * j) - Float64(z * b))); elseif (t <= 1.25e-174) tmp = Float64(j * Float64(Float64(a * c) - Float64(y * i))); elseif (t <= 4.3e+32) tmp = 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[(t * N[(a * (-x) + N[(b * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.2e+78], t$95$1, If[LessEqual[t, -2.3e-274], N[(c * N[(N[(a * j), $MachinePrecision] - N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.25e-174], N[(j * N[(N[(a * c), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.3e+32], N[(z * N[(c * (-b) + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \mathsf{fma}\left(a, -x, b \cdot i\right)\\
\mathbf{if}\;t \leq -7.2 \cdot 10^{+78}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2.3 \cdot 10^{-274}:\\
\;\;\;\;c \cdot \left(a \cdot j - z \cdot b\right)\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{-174}:\\
\;\;\;\;j \cdot \left(a \cdot c - y \cdot i\right)\\
\mathbf{elif}\;t \leq 4.3 \cdot 10^{+32}:\\
\;\;\;\;z \cdot \mathsf{fma}\left(c, -b, x \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -7.20000000000000039e78 or 4.2999999999999997e32 < t Initial program 71.7%
Taylor expanded in t around inf
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6472.2
Applied rewrites72.2%
if -7.20000000000000039e78 < t < -2.29999999999999996e-274Initial program 83.3%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6461.5
Applied rewrites61.5%
if -2.29999999999999996e-274 < t < 1.2500000000000001e-174Initial program 87.2%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6468.7
Applied rewrites68.7%
if 1.2500000000000001e-174 < t < 4.2999999999999997e32Initial program 79.2%
Taylor expanded in z around inf
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6467.1
Applied rewrites67.1%
Final simplification68.0%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* t (fma a (- x) (* b i)))))
(if (<= t -7.2e+78)
t_1
(if (<= t -2.3e-274)
(* c (- (* a j) (* z b)))
(if (<= t 1.25e-166)
(* j (- (* a c) (* y i)))
(if (<= t 9e+63) (* b (fma z (- c) (* 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 = t * fma(a, -x, (b * i));
double tmp;
if (t <= -7.2e+78) {
tmp = t_1;
} else if (t <= -2.3e-274) {
tmp = c * ((a * j) - (z * b));
} else if (t <= 1.25e-166) {
tmp = j * ((a * c) - (y * i));
} else if (t <= 9e+63) {
tmp = b * fma(z, -c, (t * i));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(t * fma(a, Float64(-x), Float64(b * i))) tmp = 0.0 if (t <= -7.2e+78) tmp = t_1; elseif (t <= -2.3e-274) tmp = Float64(c * Float64(Float64(a * j) - Float64(z * b))); elseif (t <= 1.25e-166) tmp = Float64(j * Float64(Float64(a * c) - Float64(y * i))); elseif (t <= 9e+63) tmp = Float64(b * fma(z, Float64(-c), Float64(t * i))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(t * N[(a * (-x) + N[(b * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.2e+78], t$95$1, If[LessEqual[t, -2.3e-274], N[(c * N[(N[(a * j), $MachinePrecision] - N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.25e-166], N[(j * N[(N[(a * c), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9e+63], N[(b * N[(z * (-c) + N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \mathsf{fma}\left(a, -x, b \cdot i\right)\\
\mathbf{if}\;t \leq -7.2 \cdot 10^{+78}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2.3 \cdot 10^{-274}:\\
\;\;\;\;c \cdot \left(a \cdot j - z \cdot b\right)\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{-166}:\\
\;\;\;\;j \cdot \left(a \cdot c - y \cdot i\right)\\
\mathbf{elif}\;t \leq 9 \cdot 10^{+63}:\\
\;\;\;\;b \cdot \mathsf{fma}\left(z, -c, t \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -7.20000000000000039e78 or 9.00000000000000034e63 < t Initial program 72.0%
Taylor expanded in t around inf
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6473.4
Applied rewrites73.4%
if -7.20000000000000039e78 < t < -2.29999999999999996e-274Initial program 83.3%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6461.5
Applied rewrites61.5%
if -2.29999999999999996e-274 < t < 1.25e-166Initial program 87.6%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6466.7
Applied rewrites66.7%
if 1.25e-166 < t < 9.00000000000000034e63Initial program 77.4%
lift-*.f64N/A
lift-*.f64N/A
flip--N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-/.f6477.4
lift-*.f64N/A
*-commutativeN/A
lower-*.f6477.4
Applied rewrites77.4%
Taylor expanded in b around inf
lower-*.f64N/A
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6455.0
Applied rewrites55.0%
Final simplification65.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* c (- (* a j) (* z b)))) (t_2 (* i (fma j (- y) (* t b)))))
(if (<= i -2.7e-7)
t_2
(if (<= i -5e-270)
t_1
(if (<= i 3.15e-168)
(* a (fma j c (* t (- x))))
(if (<= i 1.02e+155) 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 = c * ((a * j) - (z * b));
double t_2 = i * fma(j, -y, (t * b));
double tmp;
if (i <= -2.7e-7) {
tmp = t_2;
} else if (i <= -5e-270) {
tmp = t_1;
} else if (i <= 3.15e-168) {
tmp = a * fma(j, c, (t * -x));
} else if (i <= 1.02e+155) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(c * Float64(Float64(a * j) - Float64(z * b))) t_2 = Float64(i * fma(j, Float64(-y), Float64(t * b))) tmp = 0.0 if (i <= -2.7e-7) tmp = t_2; elseif (i <= -5e-270) tmp = t_1; elseif (i <= 3.15e-168) tmp = Float64(a * fma(j, c, Float64(t * Float64(-x)))); elseif (i <= 1.02e+155) tmp = t_1; else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(c * N[(N[(a * j), $MachinePrecision] - N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(i * N[(j * (-y) + N[(t * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -2.7e-7], t$95$2, If[LessEqual[i, -5e-270], t$95$1, If[LessEqual[i, 3.15e-168], N[(a * N[(j * c + N[(t * (-x)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 1.02e+155], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot \left(a \cdot j - z \cdot b\right)\\
t_2 := i \cdot \mathsf{fma}\left(j, -y, t \cdot b\right)\\
\mathbf{if}\;i \leq -2.7 \cdot 10^{-7}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;i \leq -5 \cdot 10^{-270}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;i \leq 3.15 \cdot 10^{-168}:\\
\;\;\;\;a \cdot \mathsf{fma}\left(j, c, t \cdot \left(-x\right)\right)\\
\mathbf{elif}\;i \leq 1.02 \cdot 10^{+155}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if i < -2.70000000000000009e-7 or 1.02e155 < i Initial program 75.2%
Taylor expanded in i around inf
lower-*.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
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6468.1
Applied rewrites68.1%
if -2.70000000000000009e-7 < i < -4.9999999999999998e-270 or 3.14999999999999979e-168 < i < 1.02e155Initial program 79.1%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6453.7
Applied rewrites53.7%
if -4.9999999999999998e-270 < i < 3.14999999999999979e-168Initial program 82.0%
Taylor expanded in a around inf
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6468.3
Applied rewrites68.3%
Final simplification60.8%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* j (- (* a c) (* y i)))))
(if (<= j -1.95e+134)
t_1
(if (<= j 1.45e+38) (fma b (fma z (- c) (* t i)) (* y (* 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 = j * ((a * c) - (y * i));
double tmp;
if (j <= -1.95e+134) {
tmp = t_1;
} else if (j <= 1.45e+38) {
tmp = fma(b, fma(z, -c, (t * i)), (y * (x * z)));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(j * Float64(Float64(a * c) - Float64(y * i))) tmp = 0.0 if (j <= -1.95e+134) tmp = t_1; elseif (j <= 1.45e+38) tmp = fma(b, fma(z, Float64(-c), Float64(t * i)), Float64(y * 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[(j * N[(N[(a * c), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -1.95e+134], t$95$1, If[LessEqual[j, 1.45e+38], N[(b * N[(z * (-c) + N[(t * i), $MachinePrecision]), $MachinePrecision] + N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot \left(a \cdot c - y \cdot i\right)\\
\mathbf{if}\;j \leq -1.95 \cdot 10^{+134}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 1.45 \cdot 10^{+38}:\\
\;\;\;\;\mathsf{fma}\left(b, \mathsf{fma}\left(z, -c, t \cdot i\right), y \cdot \left(x \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if j < -1.94999999999999992e134 or 1.45000000000000003e38 < j Initial program 80.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6476.2
Applied rewrites76.2%
if -1.94999999999999992e134 < j < 1.45000000000000003e38Initial program 76.6%
Taylor expanded in a around 0
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
remove-double-negN/A
+-commutativeN/A
sub-negN/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
Applied rewrites64.2%
Taylor expanded in j around 0
lower-fma.f64N/A
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6461.7
Applied rewrites61.7%
Final simplification67.0%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* t (* b i))) (t_2 (* x (* y z))))
(if (<= z -44000000000.0)
t_2
(if (<= z -8.2e-124)
t_1
(if (<= z -3e-276)
(* a (* t (- x)))
(if (<= z 1e-223) t_1 (if (<= z 7.2e+32) (* c (* a j)) 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 = t * (b * i);
double t_2 = x * (y * z);
double tmp;
if (z <= -44000000000.0) {
tmp = t_2;
} else if (z <= -8.2e-124) {
tmp = t_1;
} else if (z <= -3e-276) {
tmp = a * (t * -x);
} else if (z <= 1e-223) {
tmp = t_1;
} else if (z <= 7.2e+32) {
tmp = c * (a * j);
} 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 = t * (b * i)
t_2 = x * (y * z)
if (z <= (-44000000000.0d0)) then
tmp = t_2
else if (z <= (-8.2d-124)) then
tmp = t_1
else if (z <= (-3d-276)) then
tmp = a * (t * -x)
else if (z <= 1d-223) then
tmp = t_1
else if (z <= 7.2d+32) then
tmp = c * (a * j)
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 = t * (b * i);
double t_2 = x * (y * z);
double tmp;
if (z <= -44000000000.0) {
tmp = t_2;
} else if (z <= -8.2e-124) {
tmp = t_1;
} else if (z <= -3e-276) {
tmp = a * (t * -x);
} else if (z <= 1e-223) {
tmp = t_1;
} else if (z <= 7.2e+32) {
tmp = c * (a * j);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = t * (b * i) t_2 = x * (y * z) tmp = 0 if z <= -44000000000.0: tmp = t_2 elif z <= -8.2e-124: tmp = t_1 elif z <= -3e-276: tmp = a * (t * -x) elif z <= 1e-223: tmp = t_1 elif z <= 7.2e+32: tmp = c * (a * j) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(t * Float64(b * i)) t_2 = Float64(x * Float64(y * z)) tmp = 0.0 if (z <= -44000000000.0) tmp = t_2; elseif (z <= -8.2e-124) tmp = t_1; elseif (z <= -3e-276) tmp = Float64(a * Float64(t * Float64(-x))); elseif (z <= 1e-223) tmp = t_1; elseif (z <= 7.2e+32) tmp = Float64(c * Float64(a * j)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = t * (b * i); t_2 = x * (y * z); tmp = 0.0; if (z <= -44000000000.0) tmp = t_2; elseif (z <= -8.2e-124) tmp = t_1; elseif (z <= -3e-276) tmp = a * (t * -x); elseif (z <= 1e-223) tmp = t_1; elseif (z <= 7.2e+32) tmp = c * (a * j); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(t * N[(b * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -44000000000.0], t$95$2, If[LessEqual[z, -8.2e-124], t$95$1, If[LessEqual[z, -3e-276], N[(a * N[(t * (-x)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1e-223], t$95$1, If[LessEqual[z, 7.2e+32], N[(c * N[(a * j), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(b \cdot i\right)\\
t_2 := x \cdot \left(y \cdot z\right)\\
\mathbf{if}\;z \leq -44000000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -8.2 \cdot 10^{-124}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3 \cdot 10^{-276}:\\
\;\;\;\;a \cdot \left(t \cdot \left(-x\right)\right)\\
\mathbf{elif}\;z \leq 10^{-223}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{+32}:\\
\;\;\;\;c \cdot \left(a \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -4.4e10 or 7.1999999999999994e32 < z Initial program 68.7%
Taylor expanded in x around inf
lower-*.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6454.4
Applied rewrites54.4%
Taylor expanded in a around 0
lower-*.f6444.6
Applied rewrites44.6%
if -4.4e10 < z < -8.2000000000000008e-124 or -2.99999999999999988e-276 < z < 9.9999999999999997e-224Initial program 84.8%
Taylor expanded in t around inf
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6471.7
Applied rewrites71.7%
Taylor expanded in a around 0
*-commutativeN/A
lower-*.f6458.2
Applied rewrites58.2%
if -8.2000000000000008e-124 < z < -2.99999999999999988e-276Initial program 92.8%
Taylor expanded in a around inf
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6460.2
Applied rewrites60.2%
Taylor expanded in j around 0
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6441.4
Applied rewrites41.4%
if 9.9999999999999997e-224 < z < 7.1999999999999994e32Initial program 86.6%
Taylor expanded in a around inf
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6447.5
Applied rewrites47.5%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f6431.8
Applied rewrites31.8%
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6442.1
Applied rewrites42.1%
Final simplification46.1%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* x (* y z))))
(if (<= z -3.5e+130)
(* b (* z (- c)))
(if (<= z -1.45e+33)
t_1
(if (<= z 1.65e+103) (* 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 = x * (y * z);
double tmp;
if (z <= -3.5e+130) {
tmp = b * (z * -c);
} else if (z <= -1.45e+33) {
tmp = t_1;
} else if (z <= 1.65e+103) {
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(x * Float64(y * z)) tmp = 0.0 if (z <= -3.5e+130) tmp = Float64(b * Float64(z * Float64(-c))); elseif (z <= -1.45e+33) tmp = t_1; elseif (z <= 1.65e+103) 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[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.5e+130], N[(b * N[(z * (-c)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.45e+33], t$95$1, If[LessEqual[z, 1.65e+103], N[(a * N[(j * c + N[(t * (-x)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z\right)\\
\mathbf{if}\;z \leq -3.5 \cdot 10^{+130}:\\
\;\;\;\;b \cdot \left(z \cdot \left(-c\right)\right)\\
\mathbf{elif}\;z \leq -1.45 \cdot 10^{+33}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.65 \cdot 10^{+103}:\\
\;\;\;\;a \cdot \mathsf{fma}\left(j, c, t \cdot \left(-x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.5000000000000001e130Initial program 64.4%
Taylor expanded in a around 0
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
remove-double-negN/A
+-commutativeN/A
sub-negN/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
Applied rewrites71.4%
Taylor expanded in c around inf
mul-1-negN/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-neg-outN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6451.0
Applied rewrites51.0%
lift-neg.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f6451.3
Applied rewrites51.3%
if -3.5000000000000001e130 < z < -1.45000000000000012e33 or 1.65000000000000004e103 < z Initial program 73.4%
Taylor expanded in x around inf
lower-*.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6462.4
Applied rewrites62.4%
Taylor expanded in a around 0
lower-*.f6456.3
Applied rewrites56.3%
if -1.45000000000000012e33 < z < 1.65000000000000004e103Initial program 84.4%
Taylor expanded in a around inf
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6447.4
Applied rewrites47.4%
Final simplification50.4%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= t -8e+56)
(* a (* t (- x)))
(if (<= t 1.65e-153)
(* x (* y z))
(if (<= t 1.2e+15) (* z (* b (- c))) (* b (* t i))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (t <= -8e+56) {
tmp = a * (t * -x);
} else if (t <= 1.65e-153) {
tmp = x * (y * z);
} else if (t <= 1.2e+15) {
tmp = z * (b * -c);
} else {
tmp = b * (t * i);
}
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 (t <= (-8d+56)) then
tmp = a * (t * -x)
else if (t <= 1.65d-153) then
tmp = x * (y * z)
else if (t <= 1.2d+15) then
tmp = z * (b * -c)
else
tmp = b * (t * i)
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 (t <= -8e+56) {
tmp = a * (t * -x);
} else if (t <= 1.65e-153) {
tmp = x * (y * z);
} else if (t <= 1.2e+15) {
tmp = z * (b * -c);
} else {
tmp = b * (t * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if t <= -8e+56: tmp = a * (t * -x) elif t <= 1.65e-153: tmp = x * (y * z) elif t <= 1.2e+15: tmp = z * (b * -c) else: tmp = b * (t * i) return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (t <= -8e+56) tmp = Float64(a * Float64(t * Float64(-x))); elseif (t <= 1.65e-153) tmp = Float64(x * Float64(y * z)); elseif (t <= 1.2e+15) tmp = Float64(z * Float64(b * Float64(-c))); else tmp = Float64(b * Float64(t * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (t <= -8e+56) tmp = a * (t * -x); elseif (t <= 1.65e-153) tmp = x * (y * z); elseif (t <= 1.2e+15) tmp = z * (b * -c); else tmp = b * (t * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[t, -8e+56], N[(a * N[(t * (-x)), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.65e-153], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.2e+15], N[(z * N[(b * (-c)), $MachinePrecision]), $MachinePrecision], N[(b * N[(t * i), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8 \cdot 10^{+56}:\\
\;\;\;\;a \cdot \left(t \cdot \left(-x\right)\right)\\
\mathbf{elif}\;t \leq 1.65 \cdot 10^{-153}:\\
\;\;\;\;x \cdot \left(y \cdot z\right)\\
\mathbf{elif}\;t \leq 1.2 \cdot 10^{+15}:\\
\;\;\;\;z \cdot \left(b \cdot \left(-c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(t \cdot i\right)\\
\end{array}
\end{array}
if t < -8.00000000000000074e56Initial program 76.4%
Taylor expanded in a around inf
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6458.3
Applied rewrites58.3%
Taylor expanded in j around 0
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6454.1
Applied rewrites54.1%
if -8.00000000000000074e56 < t < 1.64999999999999994e-153Initial program 83.2%
Taylor expanded in x around inf
lower-*.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6440.7
Applied rewrites40.7%
Taylor expanded in a around 0
lower-*.f6438.3
Applied rewrites38.3%
if 1.64999999999999994e-153 < t < 1.2e15Initial program 79.8%
Taylor expanded in a around 0
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
remove-double-negN/A
+-commutativeN/A
sub-negN/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
Applied rewrites77.2%
Taylor expanded in c around inf
mul-1-negN/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-neg-outN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6448.4
Applied rewrites48.4%
if 1.2e15 < t Initial program 69.8%
Taylor expanded in a around 0
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
remove-double-negN/A
+-commutativeN/A
sub-negN/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
Applied rewrites55.4%
Taylor expanded in t around inf
lower-*.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
lower-*.f6455.4
Applied rewrites55.4%
Taylor expanded in t around inf
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6437.3
Applied rewrites37.3%
associate-*r*N/A
lift-*.f64N/A
lower-*.f6440.7
Applied rewrites40.7%
Final simplification43.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* b (- (* t i) (* z c)))))
(if (<= b -4.3e-26)
t_1
(if (<= b 9.5e-41) (* 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 <= -4.3e-26) {
tmp = t_1;
} else if (b <= 9.5e-41) {
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 <= -4.3e-26) tmp = t_1; elseif (b <= 9.5e-41) 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, -4.3e-26], t$95$1, If[LessEqual[b, 9.5e-41], 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 -4.3 \cdot 10^{-26}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 9.5 \cdot 10^{-41}:\\
\;\;\;\;a \cdot \mathsf{fma}\left(j, c, t \cdot \left(-x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -4.29999999999999988e-26 or 9.4999999999999997e-41 < b Initial program 81.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
lower-*.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
remove-double-negN/A
+-commutativeN/A
sub-negN/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6463.2
Applied rewrites63.2%
if -4.29999999999999988e-26 < b < 9.4999999999999997e-41Initial program 74.2%
Taylor expanded in a around inf
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6450.6
Applied rewrites50.6%
Final simplification57.0%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* x (* y z))))
(if (<= z -44000000000.0)
t_1
(if (<= z 1e-223) (* t (* b i)) (if (<= z 7.2e+32) (* c (* a j)) 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 (z <= -44000000000.0) {
tmp = t_1;
} else if (z <= 1e-223) {
tmp = t * (b * i);
} else if (z <= 7.2e+32) {
tmp = c * (a * j);
} 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 (z <= (-44000000000.0d0)) then
tmp = t_1
else if (z <= 1d-223) then
tmp = t * (b * i)
else if (z <= 7.2d+32) then
tmp = c * (a * j)
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 (z <= -44000000000.0) {
tmp = t_1;
} else if (z <= 1e-223) {
tmp = t * (b * i);
} else if (z <= 7.2e+32) {
tmp = c * (a * j);
} 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 z <= -44000000000.0: tmp = t_1 elif z <= 1e-223: tmp = t * (b * i) elif z <= 7.2e+32: tmp = c * (a * j) 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 (z <= -44000000000.0) tmp = t_1; elseif (z <= 1e-223) tmp = Float64(t * Float64(b * i)); elseif (z <= 7.2e+32) tmp = Float64(c * Float64(a * j)); 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 (z <= -44000000000.0) tmp = t_1; elseif (z <= 1e-223) tmp = t * (b * i); elseif (z <= 7.2e+32) tmp = c * (a * j); 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[z, -44000000000.0], t$95$1, If[LessEqual[z, 1e-223], N[(t * N[(b * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.2e+32], N[(c * N[(a * j), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z\right)\\
\mathbf{if}\;z \leq -44000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 10^{-223}:\\
\;\;\;\;t \cdot \left(b \cdot i\right)\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{+32}:\\
\;\;\;\;c \cdot \left(a \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.4e10 or 7.1999999999999994e32 < z Initial program 68.7%
Taylor expanded in x around inf
lower-*.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6454.4
Applied rewrites54.4%
Taylor expanded in a around 0
lower-*.f6444.6
Applied rewrites44.6%
if -4.4e10 < z < 9.9999999999999997e-224Initial program 88.6%
Taylor expanded in t around inf
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6463.5
Applied rewrites63.5%
Taylor expanded in a around 0
*-commutativeN/A
lower-*.f6439.1
Applied rewrites39.1%
if 9.9999999999999997e-224 < z < 7.1999999999999994e32Initial program 86.6%
Taylor expanded in a around inf
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6447.5
Applied rewrites47.5%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f6431.8
Applied rewrites31.8%
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6442.1
Applied rewrites42.1%
Final simplification42.4%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* x (* y z)))) (if (<= z -32000000000.0) t_1 (if (<= z 9.5e+45) (* i (* t b)) 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 (z <= -32000000000.0) {
tmp = t_1;
} else if (z <= 9.5e+45) {
tmp = i * (t * b);
} 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 (z <= (-32000000000.0d0)) then
tmp = t_1
else if (z <= 9.5d+45) then
tmp = i * (t * b)
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 (z <= -32000000000.0) {
tmp = t_1;
} else if (z <= 9.5e+45) {
tmp = i * (t * b);
} 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 z <= -32000000000.0: tmp = t_1 elif z <= 9.5e+45: tmp = i * (t * b) 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 (z <= -32000000000.0) tmp = t_1; elseif (z <= 9.5e+45) tmp = Float64(i * Float64(t * b)); 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 (z <= -32000000000.0) tmp = t_1; elseif (z <= 9.5e+45) tmp = i * (t * b); 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[z, -32000000000.0], t$95$1, If[LessEqual[z, 9.5e+45], N[(i * N[(t * b), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z\right)\\
\mathbf{if}\;z \leq -32000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{+45}:\\
\;\;\;\;i \cdot \left(t \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.2e10 or 9.4999999999999998e45 < z Initial program 68.2%
Taylor expanded in x around inf
lower-*.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6454.9
Applied rewrites54.9%
Taylor expanded in a around 0
lower-*.f6446.3
Applied rewrites46.3%
if -3.2e10 < z < 9.4999999999999998e45Initial program 87.8%
Taylor expanded in i around inf
lower-*.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
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6451.8
Applied rewrites51.8%
Taylor expanded in j around 0
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6433.4
Applied rewrites33.4%
Final simplification39.8%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* t (* b i)))) (if (<= b -0.0034) t_1 (if (<= b 9e+59) (* j (* a c)) 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 = t * (b * i);
double tmp;
if (b <= -0.0034) {
tmp = t_1;
} else if (b <= 9e+59) {
tmp = j * (a * c);
} 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 = t * (b * i)
if (b <= (-0.0034d0)) then
tmp = t_1
else if (b <= 9d+59) then
tmp = j * (a * c)
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 = t * (b * i);
double tmp;
if (b <= -0.0034) {
tmp = t_1;
} else if (b <= 9e+59) {
tmp = j * (a * c);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = t * (b * i) tmp = 0 if b <= -0.0034: tmp = t_1 elif b <= 9e+59: tmp = j * (a * c) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(t * Float64(b * i)) tmp = 0.0 if (b <= -0.0034) tmp = t_1; elseif (b <= 9e+59) tmp = Float64(j * Float64(a * c)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = t * (b * i); tmp = 0.0; if (b <= -0.0034) tmp = t_1; elseif (b <= 9e+59) tmp = j * (a * c); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(t * N[(b * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -0.0034], t$95$1, If[LessEqual[b, 9e+59], N[(j * N[(a * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(b \cdot i\right)\\
\mathbf{if}\;b \leq -0.0034:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 9 \cdot 10^{+59}:\\
\;\;\;\;j \cdot \left(a \cdot c\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -0.00339999999999999981 or 8.99999999999999919e59 < b Initial program 82.6%
Taylor expanded in t around inf
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6453.0
Applied rewrites53.0%
Taylor expanded in a around 0
*-commutativeN/A
lower-*.f6441.8
Applied rewrites41.8%
if -0.00339999999999999981 < b < 8.99999999999999919e59Initial program 74.4%
Taylor expanded in a around inf
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6446.7
Applied rewrites46.7%
Taylor expanded in j around inf
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6427.0
Applied rewrites27.0%
Final simplification33.6%
(FPCore (x y z t a b c i j) :precision binary64 (if (<= a -1.26e+45) (* a (* c j)) (if (<= a 860000000000.0) (* i (* t b)) (* j (* a c)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (a <= -1.26e+45) {
tmp = a * (c * j);
} else if (a <= 860000000000.0) {
tmp = i * (t * b);
} else {
tmp = j * (a * c);
}
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 (a <= (-1.26d+45)) then
tmp = a * (c * j)
else if (a <= 860000000000.0d0) then
tmp = i * (t * b)
else
tmp = j * (a * c)
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 (a <= -1.26e+45) {
tmp = a * (c * j);
} else if (a <= 860000000000.0) {
tmp = i * (t * b);
} else {
tmp = j * (a * c);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if a <= -1.26e+45: tmp = a * (c * j) elif a <= 860000000000.0: tmp = i * (t * b) else: tmp = j * (a * c) return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (a <= -1.26e+45) tmp = Float64(a * Float64(c * j)); elseif (a <= 860000000000.0) tmp = Float64(i * Float64(t * b)); else tmp = Float64(j * Float64(a * c)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (a <= -1.26e+45) tmp = a * (c * j); elseif (a <= 860000000000.0) tmp = i * (t * b); else tmp = j * (a * c); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[a, -1.26e+45], N[(a * N[(c * j), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 860000000000.0], N[(i * N[(t * b), $MachinePrecision]), $MachinePrecision], N[(j * N[(a * c), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.26 \cdot 10^{+45}:\\
\;\;\;\;a \cdot \left(c \cdot j\right)\\
\mathbf{elif}\;a \leq 860000000000:\\
\;\;\;\;i \cdot \left(t \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(a \cdot c\right)\\
\end{array}
\end{array}
if a < -1.26e45Initial program 67.6%
Taylor expanded in a around inf
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6466.5
Applied rewrites66.5%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f6436.3
Applied rewrites36.3%
if -1.26e45 < a < 8.6e11Initial program 86.1%
Taylor expanded in i around inf
lower-*.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
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6448.9
Applied rewrites48.9%
Taylor expanded in j around 0
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6430.5
Applied rewrites30.5%
if 8.6e11 < a Initial program 69.1%
Taylor expanded in a around inf
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6456.8
Applied rewrites56.8%
Taylor expanded in j around inf
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6437.5
Applied rewrites37.5%
Final simplification33.4%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* i (* t b)))) (if (<= b -0.001) t_1 (if (<= b 1.05e+60) (* a (* c j)) 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 = i * (t * b);
double tmp;
if (b <= -0.001) {
tmp = t_1;
} else if (b <= 1.05e+60) {
tmp = a * (c * j);
} 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 = i * (t * b)
if (b <= (-0.001d0)) then
tmp = t_1
else if (b <= 1.05d+60) then
tmp = a * (c * j)
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 = i * (t * b);
double tmp;
if (b <= -0.001) {
tmp = t_1;
} else if (b <= 1.05e+60) {
tmp = a * (c * j);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = i * (t * b) tmp = 0 if b <= -0.001: tmp = t_1 elif b <= 1.05e+60: tmp = a * (c * j) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(i * Float64(t * b)) tmp = 0.0 if (b <= -0.001) tmp = t_1; elseif (b <= 1.05e+60) tmp = Float64(a * Float64(c * j)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = i * (t * b); tmp = 0.0; if (b <= -0.001) tmp = t_1; elseif (b <= 1.05e+60) tmp = a * (c * j); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(i * N[(t * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -0.001], t$95$1, If[LessEqual[b, 1.05e+60], N[(a * N[(c * j), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := i \cdot \left(t \cdot b\right)\\
\mathbf{if}\;b \leq -0.001:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.05 \cdot 10^{+60}:\\
\;\;\;\;a \cdot \left(c \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1e-3 or 1.0500000000000001e60 < b Initial program 82.6%
Taylor expanded in i around inf
lower-*.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
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6452.9
Applied rewrites52.9%
Taylor expanded in j around 0
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6441.0
Applied rewrites41.0%
if -1e-3 < b < 1.0500000000000001e60Initial program 74.4%
Taylor expanded in a around inf
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6446.7
Applied rewrites46.7%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f6426.9
Applied rewrites26.9%
Final simplification33.2%
(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 78.1%
Taylor expanded in a around inf
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6439.2
Applied rewrites39.2%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f6421.4
Applied rewrites21.4%
Final simplification21.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 2024214
(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)))))