
(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 20 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
(-
(* (- (* c a) (* i y)) j)
(- (* (- (* c z) (* i t)) b) (* (- (* z y) (* a t)) x)))))
(if (<= t_1 INFINITY)
t_1
(*
(-
(* y x)
(fma
c
b
(/
(fma (- i) (* j y) (fma (* i b) t (* (fma (- t) x (* j c)) a)))
(- z))))
z))))
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) - (i * y)) * j) - ((((c * z) - (i * t)) * b) - (((z * y) - (a * t)) * x));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = ((y * x) - fma(c, b, (fma(-i, (j * y), fma((i * b), t, (fma(-t, x, (j * c)) * a))) / -z))) * z;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(Float64(c * a) - Float64(i * y)) * j) - Float64(Float64(Float64(Float64(c * z) - Float64(i * t)) * b) - Float64(Float64(Float64(z * y) - Float64(a * t)) * x))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(Float64(Float64(y * x) - fma(c, b, Float64(fma(Float64(-i), Float64(j * y), fma(Float64(i * b), t, Float64(fma(Float64(-t), x, Float64(j * c)) * a))) / Float64(-z)))) * z); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(N[(c * a), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision] - N[(N[(N[(N[(c * z), $MachinePrecision] - N[(i * t), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision] - N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(N[(N[(y * x), $MachinePrecision] - N[(c * b + N[(N[((-i) * N[(j * y), $MachinePrecision] + N[(N[(i * b), $MachinePrecision] * t + N[(N[((-t) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / (-z)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(c \cdot a - i \cdot y\right) \cdot j - \left(\left(c \cdot z - i \cdot t\right) \cdot b - \left(z \cdot y - a \cdot t\right) \cdot x\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot x - \mathsf{fma}\left(c, b, \frac{\mathsf{fma}\left(-i, j \cdot y, \mathsf{fma}\left(i \cdot b, t, \mathsf{fma}\left(-t, x, j \cdot c\right) \cdot a\right)\right)}{-z}\right)\right) \cdot z\\
\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 90.0%
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 0
Applied rewrites49.1%
Taylor expanded in z around -inf
Applied rewrites79.4%
Final simplification87.8%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1
(-
(* (- (* c a) (* i y)) j)
(- (* (- (* c z) (* i t)) b) (* (- (* z y) (* a t)) x)))))
(if (<= t_1 INFINITY)
t_1
(fma (fma (- t) x (* j c)) a (* (fma (- i) j (* z x)) y)))))
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) - (i * y)) * j) - ((((c * z) - (i * t)) * b) - (((z * y) - (a * t)) * x));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = fma(fma(-t, x, (j * c)), a, (fma(-i, j, (z * x)) * y));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(Float64(c * a) - Float64(i * y)) * j) - Float64(Float64(Float64(Float64(c * z) - Float64(i * t)) * b) - Float64(Float64(Float64(z * y) - Float64(a * t)) * x))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = fma(fma(Float64(-t), x, Float64(j * c)), a, Float64(fma(Float64(-i), j, Float64(z * x)) * y)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(N[(c * a), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision] - N[(N[(N[(N[(c * z), $MachinePrecision] - N[(i * t), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision] - N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(N[((-t) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * a + N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(c \cdot a - i \cdot y\right) \cdot j - \left(\left(c \cdot z - i \cdot t\right) \cdot b - \left(z \cdot y - a \cdot t\right) \cdot x\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-t, x, j \cdot c\right), a, \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\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 90.0%
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 0
Applied rewrites49.1%
Taylor expanded in b around 0
Applied rewrites65.4%
Final simplification84.9%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= t 8.8e+138)
(fma
(fma (- c) z (* i t))
b
(fma (fma (- j) i (* z x)) y (* (fma (- x) t (* j c)) a)))
(* (fma (- x) a (* i b)) t)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (t <= 8.8e+138) {
tmp = fma(fma(-c, z, (i * t)), b, fma(fma(-j, i, (z * x)), y, (fma(-x, t, (j * c)) * a)));
} else {
tmp = fma(-x, a, (i * b)) * t;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (t <= 8.8e+138) tmp = fma(fma(Float64(-c), z, Float64(i * t)), b, fma(fma(Float64(-j), i, Float64(z * x)), y, Float64(fma(Float64(-x), t, Float64(j * c)) * a))); else tmp = Float64(fma(Float64(-x), a, Float64(i * b)) * t); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[t, 8.8e+138], N[(N[((-c) * z + N[(i * t), $MachinePrecision]), $MachinePrecision] * b + N[(N[((-j) * i + N[(z * x), $MachinePrecision]), $MachinePrecision] * y + N[(N[((-x) * t + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[((-x) * a + N[(i * b), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 8.8 \cdot 10^{+138}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-c, z, i \cdot t\right), b, \mathsf{fma}\left(\mathsf{fma}\left(-j, i, z \cdot x\right), y, \mathsf{fma}\left(-x, t, j \cdot c\right) \cdot a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-x, a, i \cdot b\right) \cdot t\\
\end{array}
\end{array}
if t < 8.8000000000000003e138Initial program 73.4%
Taylor expanded in a around 0
Applied rewrites79.7%
if 8.8000000000000003e138 < t Initial program 62.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
*-commutativeN/A
associate-*r*N/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6483.4
Applied rewrites83.4%
Final simplification80.4%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- c) z (* i t)) b)))
(if (<= b -4.2e+131)
t_1
(if (<= b 2.2e-158)
(fma (fma (- t) x (* j c)) a (* (fma (- i) j (* z x)) y))
(if (<= b 3.4e+167)
(+ (* (fma (- x) a (* i b)) t) (* (- (* c a) (* i y)) 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 = fma(-c, z, (i * t)) * b;
double tmp;
if (b <= -4.2e+131) {
tmp = t_1;
} else if (b <= 2.2e-158) {
tmp = fma(fma(-t, x, (j * c)), a, (fma(-i, j, (z * x)) * y));
} else if (b <= 3.4e+167) {
tmp = (fma(-x, a, (i * b)) * t) + (((c * a) - (i * y)) * j);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-c), z, Float64(i * t)) * b) tmp = 0.0 if (b <= -4.2e+131) tmp = t_1; elseif (b <= 2.2e-158) tmp = fma(fma(Float64(-t), x, Float64(j * c)), a, Float64(fma(Float64(-i), j, Float64(z * x)) * y)); elseif (b <= 3.4e+167) tmp = Float64(Float64(fma(Float64(-x), a, Float64(i * b)) * t) + Float64(Float64(Float64(c * a) - Float64(i * y)) * j)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-c) * z + N[(i * t), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -4.2e+131], t$95$1, If[LessEqual[b, 2.2e-158], N[(N[((-t) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * a + N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.4e+167], N[(N[(N[((-x) * a + N[(i * b), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision] + N[(N[(N[(c * a), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-c, z, i \cdot t\right) \cdot b\\
\mathbf{if}\;b \leq -4.2 \cdot 10^{+131}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 2.2 \cdot 10^{-158}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-t, x, j \cdot c\right), a, \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\right)\\
\mathbf{elif}\;b \leq 3.4 \cdot 10^{+167}:\\
\;\;\;\;\mathsf{fma}\left(-x, a, i \cdot b\right) \cdot t + \left(c \cdot a - i \cdot y\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -4.19999999999999971e131 or 3.4e167 < b Initial program 67.3%
Taylor expanded in b around inf
*-commutativeN/A
sub-negN/A
+-commutativeN/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
distribute-lft-neg-inN/A
neg-mul-1N/A
remove-double-negN/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6475.1
Applied rewrites75.1%
if -4.19999999999999971e131 < b < 2.2000000000000001e-158Initial program 69.2%
Taylor expanded in a around 0
Applied rewrites72.7%
Taylor expanded in b around 0
Applied rewrites71.7%
if 2.2000000000000001e-158 < b < 3.4e167Initial program 78.9%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
*-commutativeN/A
associate-*r*N/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6479.3
Applied rewrites79.3%
Final simplification74.7%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- x) a (* i b)) t)))
(if (<= t -1.35e+141)
t_1
(if (<= t 3.6e+136)
(fma (fma (- t) x (* j c)) a (* (fma (- i) j (* z 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 = fma(-x, a, (i * b)) * t;
double tmp;
if (t <= -1.35e+141) {
tmp = t_1;
} else if (t <= 3.6e+136) {
tmp = fma(fma(-t, x, (j * c)), a, (fma(-i, j, (z * x)) * y));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-x), a, Float64(i * b)) * t) tmp = 0.0 if (t <= -1.35e+141) tmp = t_1; elseif (t <= 3.6e+136) tmp = fma(fma(Float64(-t), x, Float64(j * c)), a, Float64(fma(Float64(-i), j, Float64(z * 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[(N[((-x) * a + N[(i * b), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -1.35e+141], t$95$1, If[LessEqual[t, 3.6e+136], N[(N[((-t) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * a + N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-x, a, i \cdot b\right) \cdot t\\
\mathbf{if}\;t \leq -1.35 \cdot 10^{+141}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{+136}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-t, x, j \cdot c\right), a, \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.35e141 or 3.60000000000000006e136 < t Initial program 61.9%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
*-commutativeN/A
associate-*r*N/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6485.0
Applied rewrites85.0%
if -1.35e141 < t < 3.60000000000000006e136Initial program 75.1%
Taylor expanded in a around 0
Applied rewrites80.0%
Taylor expanded in b around 0
Applied rewrites64.1%
Final simplification70.1%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- x) a (* i b)) t)))
(if (<= t -5.8e+98)
t_1
(if (<= t 1.35e-97)
(+ (* (* z y) x) (* (- (* c a) (* i y)) j))
(if (<= t 140000000.0) (* (fma (- b) z (* 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 = fma(-x, a, (i * b)) * t;
double tmp;
if (t <= -5.8e+98) {
tmp = t_1;
} else if (t <= 1.35e-97) {
tmp = ((z * y) * x) + (((c * a) - (i * y)) * j);
} else if (t <= 140000000.0) {
tmp = fma(-b, z, (j * a)) * c;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-x), a, Float64(i * b)) * t) tmp = 0.0 if (t <= -5.8e+98) tmp = t_1; elseif (t <= 1.35e-97) tmp = Float64(Float64(Float64(z * y) * x) + Float64(Float64(Float64(c * a) - Float64(i * y)) * j)); elseif (t <= 140000000.0) tmp = Float64(fma(Float64(-b), z, Float64(j * a)) * c); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-x) * a + N[(i * b), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -5.8e+98], t$95$1, If[LessEqual[t, 1.35e-97], N[(N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision] + N[(N[(N[(c * a), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 140000000.0], N[(N[((-b) * z + N[(j * a), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-x, a, i \cdot b\right) \cdot t\\
\mathbf{if}\;t \leq -5.8 \cdot 10^{+98}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{-97}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x + \left(c \cdot a - i \cdot y\right) \cdot j\\
\mathbf{elif}\;t \leq 140000000:\\
\;\;\;\;\mathsf{fma}\left(-b, z, j \cdot a\right) \cdot c\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -5.8000000000000002e98 or 1.4e8 < t Initial program 63.8%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
*-commutativeN/A
associate-*r*N/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6475.0
Applied rewrites75.0%
if -5.8000000000000002e98 < t < 1.34999999999999993e-97Initial program 81.6%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6468.6
Applied rewrites68.6%
if 1.34999999999999993e-97 < t < 1.4e8Initial program 55.5%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
lower-*.f6461.2
Applied rewrites61.2%
Final simplification71.0%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- x) a (* i b)) t)))
(if (<= t -1.7e-77)
t_1
(if (<= t -1.25e-226)
(* (fma (- c) b (* y x)) z)
(if (<= t 9.8e-98)
(* (fma (- i) y (* c a)) j)
(if (<= t 140000000.0) (* (fma (- b) z (* 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 = fma(-x, a, (i * b)) * t;
double tmp;
if (t <= -1.7e-77) {
tmp = t_1;
} else if (t <= -1.25e-226) {
tmp = fma(-c, b, (y * x)) * z;
} else if (t <= 9.8e-98) {
tmp = fma(-i, y, (c * a)) * j;
} else if (t <= 140000000.0) {
tmp = fma(-b, z, (j * a)) * c;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-x), a, Float64(i * b)) * t) tmp = 0.0 if (t <= -1.7e-77) tmp = t_1; elseif (t <= -1.25e-226) tmp = Float64(fma(Float64(-c), b, Float64(y * x)) * z); elseif (t <= 9.8e-98) tmp = Float64(fma(Float64(-i), y, Float64(c * a)) * j); elseif (t <= 140000000.0) tmp = Float64(fma(Float64(-b), z, Float64(j * a)) * c); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-x) * a + N[(i * b), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -1.7e-77], t$95$1, If[LessEqual[t, -1.25e-226], N[(N[((-c) * b + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[t, 9.8e-98], N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[t, 140000000.0], N[(N[((-b) * z + N[(j * a), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-x, a, i \cdot b\right) \cdot t\\
\mathbf{if}\;t \leq -1.7 \cdot 10^{-77}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.25 \cdot 10^{-226}:\\
\;\;\;\;\mathsf{fma}\left(-c, b, y \cdot x\right) \cdot z\\
\mathbf{elif}\;t \leq 9.8 \cdot 10^{-98}:\\
\;\;\;\;\mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\\
\mathbf{elif}\;t \leq 140000000:\\
\;\;\;\;\mathsf{fma}\left(-b, z, j \cdot a\right) \cdot c\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.69999999999999991e-77 or 1.4e8 < t Initial program 66.9%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
*-commutativeN/A
associate-*r*N/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6468.6
Applied rewrites68.6%
if -1.69999999999999991e-77 < t < -1.2499999999999999e-226Initial program 75.5%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
lower-*.f6457.3
Applied rewrites57.3%
if -1.2499999999999999e-226 < t < 9.80000000000000028e-98Initial program 86.4%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6467.2
Applied rewrites67.2%
if 9.80000000000000028e-98 < t < 1.4e8Initial program 55.5%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
lower-*.f6461.2
Applied rewrites61.2%
Final simplification66.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- x) a (* i b)) t)))
(if (<= t -1.7e-77)
t_1
(if (<= t -6.8e-228)
(* (fma (- c) b (* y x)) z)
(if (<= t 1.7e-6) (fma (- i) (* j y) (* (* j c) a)) 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 = fma(-x, a, (i * b)) * t;
double tmp;
if (t <= -1.7e-77) {
tmp = t_1;
} else if (t <= -6.8e-228) {
tmp = fma(-c, b, (y * x)) * z;
} else if (t <= 1.7e-6) {
tmp = fma(-i, (j * y), ((j * c) * a));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-x), a, Float64(i * b)) * t) tmp = 0.0 if (t <= -1.7e-77) tmp = t_1; elseif (t <= -6.8e-228) tmp = Float64(fma(Float64(-c), b, Float64(y * x)) * z); elseif (t <= 1.7e-6) tmp = fma(Float64(-i), Float64(j * y), Float64(Float64(j * c) * a)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-x) * a + N[(i * b), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -1.7e-77], t$95$1, If[LessEqual[t, -6.8e-228], N[(N[((-c) * b + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[t, 1.7e-6], N[((-i) * N[(j * y), $MachinePrecision] + N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-x, a, i \cdot b\right) \cdot t\\
\mathbf{if}\;t \leq -1.7 \cdot 10^{-77}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -6.8 \cdot 10^{-228}:\\
\;\;\;\;\mathsf{fma}\left(-c, b, y \cdot x\right) \cdot z\\
\mathbf{elif}\;t \leq 1.7 \cdot 10^{-6}:\\
\;\;\;\;\mathsf{fma}\left(-i, j \cdot y, \left(j \cdot c\right) \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.69999999999999991e-77 or 1.70000000000000003e-6 < t Initial program 67.7%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
*-commutativeN/A
associate-*r*N/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6467.5
Applied rewrites67.5%
if -1.69999999999999991e-77 < t < -6.79999999999999981e-228Initial program 75.5%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
lower-*.f6457.3
Applied rewrites57.3%
if -6.79999999999999981e-228 < t < 1.70000000000000003e-6Initial program 77.3%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6461.0
Applied rewrites61.0%
Taylor expanded in c around 0
Applied rewrites63.3%
Final simplification65.2%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= t -4.4e+39)
(* (* b t) i)
(if (<= t -2.9e-228)
(* (* z y) x)
(if (<= t 1.7e-6)
(* (* j c) a)
(if (<= t 2.35e+139) (* (* i b) t) (* (* (- a) t) x))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (t <= -4.4e+39) {
tmp = (b * t) * i;
} else if (t <= -2.9e-228) {
tmp = (z * y) * x;
} else if (t <= 1.7e-6) {
tmp = (j * c) * a;
} else if (t <= 2.35e+139) {
tmp = (i * b) * t;
} else {
tmp = (-a * t) * x;
}
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 <= (-4.4d+39)) then
tmp = (b * t) * i
else if (t <= (-2.9d-228)) then
tmp = (z * y) * x
else if (t <= 1.7d-6) then
tmp = (j * c) * a
else if (t <= 2.35d+139) then
tmp = (i * b) * t
else
tmp = (-a * t) * x
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 <= -4.4e+39) {
tmp = (b * t) * i;
} else if (t <= -2.9e-228) {
tmp = (z * y) * x;
} else if (t <= 1.7e-6) {
tmp = (j * c) * a;
} else if (t <= 2.35e+139) {
tmp = (i * b) * t;
} else {
tmp = (-a * t) * x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if t <= -4.4e+39: tmp = (b * t) * i elif t <= -2.9e-228: tmp = (z * y) * x elif t <= 1.7e-6: tmp = (j * c) * a elif t <= 2.35e+139: tmp = (i * b) * t else: tmp = (-a * t) * x return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (t <= -4.4e+39) tmp = Float64(Float64(b * t) * i); elseif (t <= -2.9e-228) tmp = Float64(Float64(z * y) * x); elseif (t <= 1.7e-6) tmp = Float64(Float64(j * c) * a); elseif (t <= 2.35e+139) tmp = Float64(Float64(i * b) * t); else tmp = Float64(Float64(Float64(-a) * t) * x); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (t <= -4.4e+39) tmp = (b * t) * i; elseif (t <= -2.9e-228) tmp = (z * y) * x; elseif (t <= 1.7e-6) tmp = (j * c) * a; elseif (t <= 2.35e+139) tmp = (i * b) * t; else tmp = (-a * t) * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[t, -4.4e+39], N[(N[(b * t), $MachinePrecision] * i), $MachinePrecision], If[LessEqual[t, -2.9e-228], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[t, 1.7e-6], N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[t, 2.35e+139], N[(N[(i * b), $MachinePrecision] * t), $MachinePrecision], N[(N[((-a) * t), $MachinePrecision] * x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.4 \cdot 10^{+39}:\\
\;\;\;\;\left(b \cdot t\right) \cdot i\\
\mathbf{elif}\;t \leq -2.9 \cdot 10^{-228}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\
\mathbf{elif}\;t \leq 1.7 \cdot 10^{-6}:\\
\;\;\;\;\left(j \cdot c\right) \cdot a\\
\mathbf{elif}\;t \leq 2.35 \cdot 10^{+139}:\\
\;\;\;\;\left(i \cdot b\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;\left(\left(-a\right) \cdot t\right) \cdot x\\
\end{array}
\end{array}
if t < -4.4000000000000003e39Initial program 64.2%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-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
lower-*.f6463.5
Applied rewrites63.5%
Taylor expanded in b around inf
Applied rewrites47.5%
if -4.4000000000000003e39 < t < -2.9000000000000001e-228Initial program 76.9%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
+-commutativeN/A
mul-1-negN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6438.2
Applied rewrites38.2%
Taylor expanded in a around 0
Applied rewrites31.8%
if -2.9000000000000001e-228 < t < 1.70000000000000003e-6Initial program 77.3%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6461.0
Applied rewrites61.0%
Taylor expanded in c around inf
Applied rewrites40.2%
if 1.70000000000000003e-6 < t < 2.35e139Initial program 72.0%
Applied rewrites79.7%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6455.1
Applied rewrites55.1%
Taylor expanded in b around inf
Applied rewrites36.1%
if 2.35e139 < t Initial program 63.3%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
+-commutativeN/A
mul-1-negN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6468.2
Applied rewrites68.2%
Taylor expanded in a around inf
Applied rewrites64.1%
Final simplification43.7%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- a) t (* z y)) x)))
(if (<= x -1.05e+40)
t_1
(if (<= x 5e-274)
(* (fma (- b) z (* j a)) c)
(if (<= x 3.8e-53) (* (fma (- i) y (* 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 = fma(-a, t, (z * y)) * x;
double tmp;
if (x <= -1.05e+40) {
tmp = t_1;
} else if (x <= 5e-274) {
tmp = fma(-b, z, (j * a)) * c;
} else if (x <= 3.8e-53) {
tmp = fma(-i, y, (c * a)) * j;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-a), t, Float64(z * y)) * x) tmp = 0.0 if (x <= -1.05e+40) tmp = t_1; elseif (x <= 5e-274) tmp = Float64(fma(Float64(-b), z, Float64(j * a)) * c); elseif (x <= 3.8e-53) tmp = Float64(fma(Float64(-i), y, Float64(c * a)) * j); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -1.05e+40], t$95$1, If[LessEqual[x, 5e-274], N[(N[((-b) * z + N[(j * a), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[x, 3.8e-53], N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\
\mathbf{if}\;x \leq -1.05 \cdot 10^{+40}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 5 \cdot 10^{-274}:\\
\;\;\;\;\mathsf{fma}\left(-b, z, j \cdot a\right) \cdot c\\
\mathbf{elif}\;x \leq 3.8 \cdot 10^{-53}:\\
\;\;\;\;\mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.05000000000000005e40 or 3.7999999999999998e-53 < x Initial program 69.3%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
+-commutativeN/A
mul-1-negN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6461.9
Applied rewrites61.9%
if -1.05000000000000005e40 < x < 5e-274Initial program 73.4%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
lower-*.f6456.4
Applied rewrites56.4%
if 5e-274 < x < 3.7999999999999998e-53Initial program 73.1%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6451.4
Applied rewrites51.4%
Final simplification58.0%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- a) t (* z y)) x)))
(if (<= x -1.05e+40)
t_1
(if (<= x 1.25e-286)
(* (fma (- b) z (* j a)) c)
(if (<= x 8.5e-53) (* (fma (- c) z (* 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 = fma(-a, t, (z * y)) * x;
double tmp;
if (x <= -1.05e+40) {
tmp = t_1;
} else if (x <= 1.25e-286) {
tmp = fma(-b, z, (j * a)) * c;
} else if (x <= 8.5e-53) {
tmp = fma(-c, z, (i * t)) * b;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-a), t, Float64(z * y)) * x) tmp = 0.0 if (x <= -1.05e+40) tmp = t_1; elseif (x <= 1.25e-286) tmp = Float64(fma(Float64(-b), z, Float64(j * a)) * c); elseif (x <= 8.5e-53) tmp = Float64(fma(Float64(-c), z, Float64(i * t)) * b); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -1.05e+40], t$95$1, If[LessEqual[x, 1.25e-286], N[(N[((-b) * z + N[(j * a), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[x, 8.5e-53], N[(N[((-c) * z + N[(i * t), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\
\mathbf{if}\;x \leq -1.05 \cdot 10^{+40}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.25 \cdot 10^{-286}:\\
\;\;\;\;\mathsf{fma}\left(-b, z, j \cdot a\right) \cdot c\\
\mathbf{elif}\;x \leq 8.5 \cdot 10^{-53}:\\
\;\;\;\;\mathsf{fma}\left(-c, z, i \cdot t\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.05000000000000005e40 or 8.50000000000000044e-53 < x Initial program 69.3%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
+-commutativeN/A
mul-1-negN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6461.9
Applied rewrites61.9%
if -1.05000000000000005e40 < x < 1.25000000000000009e-286Initial program 73.3%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
lower-*.f6456.6
Applied rewrites56.6%
if 1.25000000000000009e-286 < x < 8.50000000000000044e-53Initial program 73.3%
Taylor expanded in b around inf
*-commutativeN/A
sub-negN/A
+-commutativeN/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
distribute-lft-neg-inN/A
neg-mul-1N/A
remove-double-negN/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6450.8
Applied rewrites50.8%
Final simplification57.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- a) t (* z y)) x)))
(if (<= x -2.05e+37)
t_1
(if (<= x -1.6e-111)
(* (* j c) a)
(if (<= x 2.3e-53) (* (* i b) t) 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 = fma(-a, t, (z * y)) * x;
double tmp;
if (x <= -2.05e+37) {
tmp = t_1;
} else if (x <= -1.6e-111) {
tmp = (j * c) * a;
} else if (x <= 2.3e-53) {
tmp = (i * b) * t;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-a), t, Float64(z * y)) * x) tmp = 0.0 if (x <= -2.05e+37) tmp = t_1; elseif (x <= -1.6e-111) tmp = Float64(Float64(j * c) * a); elseif (x <= 2.3e-53) tmp = Float64(Float64(i * b) * t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -2.05e+37], t$95$1, If[LessEqual[x, -1.6e-111], N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[x, 2.3e-53], N[(N[(i * b), $MachinePrecision] * t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\
\mathbf{if}\;x \leq -2.05 \cdot 10^{+37}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -1.6 \cdot 10^{-111}:\\
\;\;\;\;\left(j \cdot c\right) \cdot a\\
\mathbf{elif}\;x \leq 2.3 \cdot 10^{-53}:\\
\;\;\;\;\left(i \cdot b\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -2.0499999999999999e37 or 2.3000000000000001e-53 < x Initial program 69.3%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
+-commutativeN/A
mul-1-negN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6461.9
Applied rewrites61.9%
if -2.0499999999999999e37 < x < -1.5999999999999999e-111Initial program 80.2%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6450.2
Applied rewrites50.2%
Taylor expanded in c around inf
Applied rewrites41.6%
if -1.5999999999999999e-111 < x < 2.3000000000000001e-53Initial program 71.2%
Applied rewrites72.2%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6442.2
Applied rewrites42.2%
Taylor expanded in b around inf
Applied rewrites38.8%
Final simplification50.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* j a) c)) (t_2 (* (* i b) t)))
(if (<= b -2.9e+147)
t_2
(if (<= b -7e-111)
t_1
(if (<= b 1.5e-306) (* (* z y) x) (if (<= b 76.0) 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 * a) * c;
double t_2 = (i * b) * t;
double tmp;
if (b <= -2.9e+147) {
tmp = t_2;
} else if (b <= -7e-111) {
tmp = t_1;
} else if (b <= 1.5e-306) {
tmp = (z * y) * x;
} else if (b <= 76.0) {
tmp = 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 * a) * c
t_2 = (i * b) * t
if (b <= (-2.9d+147)) then
tmp = t_2
else if (b <= (-7d-111)) then
tmp = t_1
else if (b <= 1.5d-306) then
tmp = (z * y) * x
else if (b <= 76.0d0) then
tmp = 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 * a) * c;
double t_2 = (i * b) * t;
double tmp;
if (b <= -2.9e+147) {
tmp = t_2;
} else if (b <= -7e-111) {
tmp = t_1;
} else if (b <= 1.5e-306) {
tmp = (z * y) * x;
} else if (b <= 76.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (j * a) * c t_2 = (i * b) * t tmp = 0 if b <= -2.9e+147: tmp = t_2 elif b <= -7e-111: tmp = t_1 elif b <= 1.5e-306: tmp = (z * y) * x elif b <= 76.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(j * a) * c) t_2 = Float64(Float64(i * b) * t) tmp = 0.0 if (b <= -2.9e+147) tmp = t_2; elseif (b <= -7e-111) tmp = t_1; elseif (b <= 1.5e-306) tmp = Float64(Float64(z * y) * x); elseif (b <= 76.0) tmp = 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 * a) * c; t_2 = (i * b) * t; tmp = 0.0; if (b <= -2.9e+147) tmp = t_2; elseif (b <= -7e-111) tmp = t_1; elseif (b <= 1.5e-306) tmp = (z * y) * x; elseif (b <= 76.0) tmp = 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[(N[(j * a), $MachinePrecision] * c), $MachinePrecision]}, Block[{t$95$2 = N[(N[(i * b), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[b, -2.9e+147], t$95$2, If[LessEqual[b, -7e-111], t$95$1, If[LessEqual[b, 1.5e-306], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[b, 76.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(j \cdot a\right) \cdot c\\
t_2 := \left(i \cdot b\right) \cdot t\\
\mathbf{if}\;b \leq -2.9 \cdot 10^{+147}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq -7 \cdot 10^{-111}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.5 \cdot 10^{-306}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\
\mathbf{elif}\;b \leq 76:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if b < -2.8999999999999998e147 or 76 < b Initial program 71.8%
Applied rewrites79.6%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6460.1
Applied rewrites60.1%
Taylor expanded in b around inf
Applied rewrites49.6%
if -2.8999999999999998e147 < b < -7.0000000000000001e-111 or 1.50000000000000012e-306 < b < 76Initial program 70.4%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6449.5
Applied rewrites49.5%
Taylor expanded in c around inf
Applied rewrites34.2%
Applied rewrites35.9%
if -7.0000000000000001e-111 < b < 1.50000000000000012e-306Initial program 72.5%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
+-commutativeN/A
mul-1-negN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6455.5
Applied rewrites55.5%
Taylor expanded in a around 0
Applied rewrites36.8%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* j a) c)))
(if (<= b -7.2e+147)
(* (* i t) b)
(if (<= b -7e-111)
t_1
(if (<= b 1.5e-306)
(* (* z y) x)
(if (<= b 76.0) t_1 (* (* b t) i)))))))
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;
double tmp;
if (b <= -7.2e+147) {
tmp = (i * t) * b;
} else if (b <= -7e-111) {
tmp = t_1;
} else if (b <= 1.5e-306) {
tmp = (z * y) * x;
} else if (b <= 76.0) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (j * a) * c
if (b <= (-7.2d+147)) then
tmp = (i * t) * b
else if (b <= (-7d-111)) then
tmp = t_1
else if (b <= 1.5d-306) then
tmp = (z * y) * x
else if (b <= 76.0d0) then
tmp = t_1
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 t_1 = (j * a) * c;
double tmp;
if (b <= -7.2e+147) {
tmp = (i * t) * b;
} else if (b <= -7e-111) {
tmp = t_1;
} else if (b <= 1.5e-306) {
tmp = (z * y) * x;
} else if (b <= 76.0) {
tmp = t_1;
} else {
tmp = (b * t) * i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (j * a) * c tmp = 0 if b <= -7.2e+147: tmp = (i * t) * b elif b <= -7e-111: tmp = t_1 elif b <= 1.5e-306: tmp = (z * y) * x elif b <= 76.0: tmp = t_1 else: tmp = (b * t) * i return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(j * a) * c) tmp = 0.0 if (b <= -7.2e+147) tmp = Float64(Float64(i * t) * b); elseif (b <= -7e-111) tmp = t_1; elseif (b <= 1.5e-306) tmp = Float64(Float64(z * y) * x); elseif (b <= 76.0) tmp = t_1; else tmp = Float64(Float64(b * t) * i); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (j * a) * c; tmp = 0.0; if (b <= -7.2e+147) tmp = (i * t) * b; elseif (b <= -7e-111) tmp = t_1; elseif (b <= 1.5e-306) tmp = (z * y) * x; elseif (b <= 76.0) tmp = t_1; else tmp = (b * t) * i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(j * a), $MachinePrecision] * c), $MachinePrecision]}, If[LessEqual[b, -7.2e+147], N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[b, -7e-111], t$95$1, If[LessEqual[b, 1.5e-306], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[b, 76.0], t$95$1, N[(N[(b * t), $MachinePrecision] * i), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(j \cdot a\right) \cdot c\\
\mathbf{if}\;b \leq -7.2 \cdot 10^{+147}:\\
\;\;\;\;\left(i \cdot t\right) \cdot b\\
\mathbf{elif}\;b \leq -7 \cdot 10^{-111}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.5 \cdot 10^{-306}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\
\mathbf{elif}\;b \leq 76:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot t\right) \cdot i\\
\end{array}
\end{array}
if b < -7.20000000000000041e147Initial program 66.9%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-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
lower-*.f6454.7
Applied rewrites54.7%
Taylor expanded in b around inf
Applied rewrites55.0%
if -7.20000000000000041e147 < b < -7.0000000000000001e-111 or 1.50000000000000012e-306 < b < 76Initial program 70.4%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6449.5
Applied rewrites49.5%
Taylor expanded in c around inf
Applied rewrites34.2%
Applied rewrites35.9%
if -7.0000000000000001e-111 < b < 1.50000000000000012e-306Initial program 72.5%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
+-commutativeN/A
mul-1-negN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6455.5
Applied rewrites55.5%
Taylor expanded in a around 0
Applied rewrites36.8%
if 76 < b Initial program 74.8%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-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
lower-*.f6462.9
Applied rewrites62.9%
Taylor expanded in b around inf
Applied rewrites41.8%
Final simplification40.4%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* j a) c)) (t_2 (* (* i t) b)))
(if (<= b -7.2e+147)
t_2
(if (<= b -7e-111)
t_1
(if (<= b 1.5e-306) (* (* z y) x) (if (<= b 76.0) 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 * a) * c;
double t_2 = (i * t) * b;
double tmp;
if (b <= -7.2e+147) {
tmp = t_2;
} else if (b <= -7e-111) {
tmp = t_1;
} else if (b <= 1.5e-306) {
tmp = (z * y) * x;
} else if (b <= 76.0) {
tmp = 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 * a) * c
t_2 = (i * t) * b
if (b <= (-7.2d+147)) then
tmp = t_2
else if (b <= (-7d-111)) then
tmp = t_1
else if (b <= 1.5d-306) then
tmp = (z * y) * x
else if (b <= 76.0d0) then
tmp = 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 * a) * c;
double t_2 = (i * t) * b;
double tmp;
if (b <= -7.2e+147) {
tmp = t_2;
} else if (b <= -7e-111) {
tmp = t_1;
} else if (b <= 1.5e-306) {
tmp = (z * y) * x;
} else if (b <= 76.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (j * a) * c t_2 = (i * t) * b tmp = 0 if b <= -7.2e+147: tmp = t_2 elif b <= -7e-111: tmp = t_1 elif b <= 1.5e-306: tmp = (z * y) * x elif b <= 76.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(j * a) * c) t_2 = Float64(Float64(i * t) * b) tmp = 0.0 if (b <= -7.2e+147) tmp = t_2; elseif (b <= -7e-111) tmp = t_1; elseif (b <= 1.5e-306) tmp = Float64(Float64(z * y) * x); elseif (b <= 76.0) tmp = 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 * a) * c; t_2 = (i * t) * b; tmp = 0.0; if (b <= -7.2e+147) tmp = t_2; elseif (b <= -7e-111) tmp = t_1; elseif (b <= 1.5e-306) tmp = (z * y) * x; elseif (b <= 76.0) tmp = 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[(N[(j * a), $MachinePrecision] * c), $MachinePrecision]}, Block[{t$95$2 = N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -7.2e+147], t$95$2, If[LessEqual[b, -7e-111], t$95$1, If[LessEqual[b, 1.5e-306], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[b, 76.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(j \cdot a\right) \cdot c\\
t_2 := \left(i \cdot t\right) \cdot b\\
\mathbf{if}\;b \leq -7.2 \cdot 10^{+147}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq -7 \cdot 10^{-111}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.5 \cdot 10^{-306}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\
\mathbf{elif}\;b \leq 76:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if b < -7.20000000000000041e147 or 76 < b Initial program 71.8%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-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
lower-*.f6459.8
Applied rewrites59.8%
Taylor expanded in b around inf
Applied rewrites46.7%
if -7.20000000000000041e147 < b < -7.0000000000000001e-111 or 1.50000000000000012e-306 < b < 76Initial program 70.4%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6449.5
Applied rewrites49.5%
Taylor expanded in c around inf
Applied rewrites34.2%
Applied rewrites35.9%
if -7.0000000000000001e-111 < b < 1.50000000000000012e-306Initial program 72.5%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
+-commutativeN/A
mul-1-negN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6455.5
Applied rewrites55.5%
Taylor expanded in a around 0
Applied rewrites36.8%
Final simplification40.4%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* (- x) t) a)))
(if (<= x -3.3e+41)
t_1
(if (<= x -1.6e-111)
(* (* j c) a)
(if (<= x 8.7e-51) (* (* i b) t) 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 * t) * a;
double tmp;
if (x <= -3.3e+41) {
tmp = t_1;
} else if (x <= -1.6e-111) {
tmp = (j * c) * a;
} else if (x <= 8.7e-51) {
tmp = (i * b) * t;
} 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 * t) * a
if (x <= (-3.3d+41)) then
tmp = t_1
else if (x <= (-1.6d-111)) then
tmp = (j * c) * a
else if (x <= 8.7d-51) then
tmp = (i * b) * t
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 * t) * a;
double tmp;
if (x <= -3.3e+41) {
tmp = t_1;
} else if (x <= -1.6e-111) {
tmp = (j * c) * a;
} else if (x <= 8.7e-51) {
tmp = (i * b) * t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (-x * t) * a tmp = 0 if x <= -3.3e+41: tmp = t_1 elif x <= -1.6e-111: tmp = (j * c) * a elif x <= 8.7e-51: tmp = (i * b) * t else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(-x) * t) * a) tmp = 0.0 if (x <= -3.3e+41) tmp = t_1; elseif (x <= -1.6e-111) tmp = Float64(Float64(j * c) * a); elseif (x <= 8.7e-51) tmp = Float64(Float64(i * b) * t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (-x * t) * a; tmp = 0.0; if (x <= -3.3e+41) tmp = t_1; elseif (x <= -1.6e-111) tmp = (j * c) * a; elseif (x <= 8.7e-51) tmp = (i * b) * t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-x) * t), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[x, -3.3e+41], t$95$1, If[LessEqual[x, -1.6e-111], N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[x, 8.7e-51], N[(N[(i * b), $MachinePrecision] * t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(-x\right) \cdot t\right) \cdot a\\
\mathbf{if}\;x \leq -3.3 \cdot 10^{+41}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -1.6 \cdot 10^{-111}:\\
\;\;\;\;\left(j \cdot c\right) \cdot a\\
\mathbf{elif}\;x \leq 8.7 \cdot 10^{-51}:\\
\;\;\;\;\left(i \cdot b\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -3.3e41 or 8.6999999999999998e-51 < x Initial program 69.3%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
+-commutativeN/A
mul-1-negN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6461.9
Applied rewrites61.9%
Taylor expanded in a around inf
Applied rewrites41.1%
if -3.3e41 < x < -1.5999999999999999e-111Initial program 80.2%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6450.2
Applied rewrites50.2%
Taylor expanded in c around inf
Applied rewrites41.6%
if -1.5999999999999999e-111 < x < 8.6999999999999998e-51Initial program 71.2%
Applied rewrites72.2%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6442.2
Applied rewrites42.2%
Taylor expanded in b around inf
Applied rewrites38.8%
Final simplification40.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- a) t (* z y)) x)))
(if (<= x -1.05e+40)
t_1
(if (<= x 2.7e-5) (* (fma (- b) z (* 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 = fma(-a, t, (z * y)) * x;
double tmp;
if (x <= -1.05e+40) {
tmp = t_1;
} else if (x <= 2.7e-5) {
tmp = fma(-b, z, (j * a)) * c;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-a), t, Float64(z * y)) * x) tmp = 0.0 if (x <= -1.05e+40) tmp = t_1; elseif (x <= 2.7e-5) tmp = Float64(fma(Float64(-b), z, Float64(j * a)) * c); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -1.05e+40], t$95$1, If[LessEqual[x, 2.7e-5], N[(N[((-b) * z + N[(j * a), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\
\mathbf{if}\;x \leq -1.05 \cdot 10^{+40}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 2.7 \cdot 10^{-5}:\\
\;\;\;\;\mathsf{fma}\left(-b, z, j \cdot a\right) \cdot c\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.05000000000000005e40 or 2.6999999999999999e-5 < x Initial program 69.5%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
+-commutativeN/A
mul-1-negN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6465.7
Applied rewrites65.7%
if -1.05000000000000005e40 < x < 2.6999999999999999e-5Initial program 72.6%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
lower-*.f6448.7
Applied rewrites48.7%
Final simplification55.7%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* (* i t) b))) (if (<= b -7.2e+147) t_1 (if (<= b 76.0) (* (* j c) a) 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 <= -7.2e+147) {
tmp = t_1;
} else if (b <= 76.0) {
tmp = (j * c) * a;
} 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 <= (-7.2d+147)) then
tmp = t_1
else if (b <= 76.0d0) then
tmp = (j * c) * a
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (i * t) * b;
double tmp;
if (b <= -7.2e+147) {
tmp = t_1;
} else if (b <= 76.0) {
tmp = (j * c) * a;
} 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 <= -7.2e+147: tmp = t_1 elif b <= 76.0: tmp = (j * c) * a else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(i * t) * b) tmp = 0.0 if (b <= -7.2e+147) tmp = t_1; elseif (b <= 76.0) tmp = Float64(Float64(j * c) * a); 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 <= -7.2e+147) tmp = t_1; elseif (b <= 76.0) tmp = (j * c) * a; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -7.2e+147], t$95$1, If[LessEqual[b, 76.0], N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(i \cdot t\right) \cdot b\\
\mathbf{if}\;b \leq -7.2 \cdot 10^{+147}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 76:\\
\;\;\;\;\left(j \cdot c\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -7.20000000000000041e147 or 76 < b Initial program 71.8%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-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
lower-*.f6459.8
Applied rewrites59.8%
Taylor expanded in b around inf
Applied rewrites46.7%
if -7.20000000000000041e147 < b < 76Initial program 71.1%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6445.8
Applied rewrites45.8%
Taylor expanded in c around inf
Applied rewrites30.7%
Final simplification37.1%
(FPCore (x y z t a b c i j) :precision binary64 (* (* j a) c))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return (j * a) * c;
}
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 = (j * a) * c
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 (j * a) * c;
}
def code(x, y, z, t, a, b, c, i, j): return (j * a) * c
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(j * a) * c) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = (j * a) * c; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(j * a), $MachinePrecision] * c), $MachinePrecision]
\begin{array}{l}
\\
\left(j \cdot a\right) \cdot c
\end{array}
Initial program 71.3%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6438.7
Applied rewrites38.7%
Taylor expanded in c around inf
Applied rewrites24.2%
Applied rewrites24.6%
(FPCore (x y z t a b c i j) :precision binary64 (* (* j c) a))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return (j * c) * a;
}
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 = (j * c) * a
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 (j * c) * a;
}
def code(x, y, z, t, a, b, c, i, j): return (j * c) * a
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(j * c) * a) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = (j * c) * a; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision]
\begin{array}{l}
\\
\left(j \cdot c\right) \cdot a
\end{array}
Initial program 71.3%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6438.7
Applied rewrites38.7%
Taylor expanded in c around inf
Applied rewrites24.2%
Final simplification24.2%
(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 2024255
(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)))))