
(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 21 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 (fma (- j) i (* z x))))
(if (<= b -1.5e+14)
(fma (fma (- t) x (* j c)) a (fma t_1 y (* (fma (- z) c (* i t)) b)))
(if (<= b 1.25e+83)
(fma
(fma (- i) y (* c a))
j
(fma (fma (- c) b (* y x)) z (* (fma (- x) a (* i b)) t)))
(fma
(fma (- c) z (* i t))
b
(fma t_1 y (* (fma (- x) t (* j c)) a)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-j, i, (z * x));
double tmp;
if (b <= -1.5e+14) {
tmp = fma(fma(-t, x, (j * c)), a, fma(t_1, y, (fma(-z, c, (i * t)) * b)));
} else if (b <= 1.25e+83) {
tmp = fma(fma(-i, y, (c * a)), j, fma(fma(-c, b, (y * x)), z, (fma(-x, a, (i * b)) * t)));
} else {
tmp = fma(fma(-c, z, (i * t)), b, fma(t_1, y, (fma(-x, t, (j * c)) * a)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = fma(Float64(-j), i, Float64(z * x)) tmp = 0.0 if (b <= -1.5e+14) tmp = fma(fma(Float64(-t), x, Float64(j * c)), a, fma(t_1, y, Float64(fma(Float64(-z), c, Float64(i * t)) * b))); elseif (b <= 1.25e+83) tmp = fma(fma(Float64(-i), y, Float64(c * a)), j, fma(fma(Float64(-c), b, Float64(y * x)), z, Float64(fma(Float64(-x), a, Float64(i * b)) * t))); else tmp = fma(fma(Float64(-c), z, Float64(i * t)), b, fma(t_1, y, Float64(fma(Float64(-x), t, Float64(j * c)) * a))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[((-j) * i + N[(z * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.5e+14], N[(N[((-t) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * a + N[(t$95$1 * y + N[(N[((-z) * c + N[(i * t), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.25e+83], N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j + N[(N[((-c) * b + N[(y * x), $MachinePrecision]), $MachinePrecision] * z + N[(N[((-x) * a + N[(i * b), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[((-c) * z + N[(i * t), $MachinePrecision]), $MachinePrecision] * b + N[(t$95$1 * y + N[(N[((-x) * t + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-j, i, z \cdot x\right)\\
\mathbf{if}\;b \leq -1.5 \cdot 10^{+14}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-t, x, j \cdot c\right), a, \mathsf{fma}\left(t\_1, y, \mathsf{fma}\left(-z, c, i \cdot t\right) \cdot b\right)\right)\\
\mathbf{elif}\;b \leq 1.25 \cdot 10^{+83}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-i, y, c \cdot a\right), j, \mathsf{fma}\left(\mathsf{fma}\left(-c, b, y \cdot x\right), z, \mathsf{fma}\left(-x, a, i \cdot b\right) \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-c, z, i \cdot t\right), b, \mathsf{fma}\left(t\_1, y, \mathsf{fma}\left(-x, t, j \cdot c\right) \cdot a\right)\right)\\
\end{array}
\end{array}
if b < -1.5e14Initial program 69.7%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
sub-negN/A
associate-+r+N/A
sub-negN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-out--N/A
lower-fma.f64N/A
Applied rewrites67.3%
Taylor expanded in y around 0
Applied rewrites87.8%
if -1.5e14 < b < 1.25000000000000007e83Initial program 75.7%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
sub-negN/A
associate-+r+N/A
sub-negN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-out--N/A
lower-fma.f64N/A
Applied rewrites87.8%
if 1.25000000000000007e83 < b Initial program 68.1%
Taylor expanded in a around 0
Applied rewrites77.8%
Final simplification85.7%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (fma (- j) i (* z x))))
(if (<= b -1.45e+80)
(fma (* j c) a (fma t_1 y (* (fma (- z) c (* i t)) b)))
(if (<= b 1.25e+83)
(fma
(fma (- i) y (* c a))
j
(fma (fma (- c) b (* y x)) z (* (fma (- x) a (* i b)) t)))
(fma
(fma (- c) z (* i t))
b
(fma t_1 y (* (fma (- x) t (* j c)) a)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-j, i, (z * x));
double tmp;
if (b <= -1.45e+80) {
tmp = fma((j * c), a, fma(t_1, y, (fma(-z, c, (i * t)) * b)));
} else if (b <= 1.25e+83) {
tmp = fma(fma(-i, y, (c * a)), j, fma(fma(-c, b, (y * x)), z, (fma(-x, a, (i * b)) * t)));
} else {
tmp = fma(fma(-c, z, (i * t)), b, fma(t_1, y, (fma(-x, t, (j * c)) * a)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = fma(Float64(-j), i, Float64(z * x)) tmp = 0.0 if (b <= -1.45e+80) tmp = fma(Float64(j * c), a, fma(t_1, y, Float64(fma(Float64(-z), c, Float64(i * t)) * b))); elseif (b <= 1.25e+83) tmp = fma(fma(Float64(-i), y, Float64(c * a)), j, fma(fma(Float64(-c), b, Float64(y * x)), z, Float64(fma(Float64(-x), a, Float64(i * b)) * t))); else tmp = fma(fma(Float64(-c), z, Float64(i * t)), b, fma(t_1, y, Float64(fma(Float64(-x), t, Float64(j * c)) * a))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[((-j) * i + N[(z * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.45e+80], N[(N[(j * c), $MachinePrecision] * a + N[(t$95$1 * y + N[(N[((-z) * c + N[(i * t), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.25e+83], N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j + N[(N[((-c) * b + N[(y * x), $MachinePrecision]), $MachinePrecision] * z + N[(N[((-x) * a + N[(i * b), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[((-c) * z + N[(i * t), $MachinePrecision]), $MachinePrecision] * b + N[(t$95$1 * y + N[(N[((-x) * t + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-j, i, z \cdot x\right)\\
\mathbf{if}\;b \leq -1.45 \cdot 10^{+80}:\\
\;\;\;\;\mathsf{fma}\left(j \cdot c, a, \mathsf{fma}\left(t\_1, y, \mathsf{fma}\left(-z, c, i \cdot t\right) \cdot b\right)\right)\\
\mathbf{elif}\;b \leq 1.25 \cdot 10^{+83}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-i, y, c \cdot a\right), j, \mathsf{fma}\left(\mathsf{fma}\left(-c, b, y \cdot x\right), z, \mathsf{fma}\left(-x, a, i \cdot b\right) \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-c, z, i \cdot t\right), b, \mathsf{fma}\left(t\_1, y, \mathsf{fma}\left(-x, t, j \cdot c\right) \cdot a\right)\right)\\
\end{array}
\end{array}
if b < -1.44999999999999993e80Initial program 76.0%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
sub-negN/A
associate-+r+N/A
sub-negN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-out--N/A
lower-fma.f64N/A
Applied rewrites66.4%
Taylor expanded in y around 0
Applied rewrites86.0%
Taylor expanded in c around inf
Applied rewrites88.0%
if -1.44999999999999993e80 < b < 1.25000000000000007e83Initial program 73.0%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
sub-negN/A
associate-+r+N/A
sub-negN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-out--N/A
lower-fma.f64N/A
Applied rewrites86.0%
if 1.25000000000000007e83 < b Initial program 68.1%
Taylor expanded in a around 0
Applied rewrites77.8%
Final simplification84.7%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (fma (- y) j (* t b))))
(if (<= i -1.3e+199)
(* t_1 i)
(if (<= i 7.2e+156)
(fma
(fma (- c) z (* i t))
b
(fma (fma (- j) i (* z x)) y (* (fma (- x) t (* j c)) a)))
(fma t_1 i (* (fma (- a) t (* z y)) x))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-y, j, (t * b));
double tmp;
if (i <= -1.3e+199) {
tmp = t_1 * i;
} else if (i <= 7.2e+156) {
tmp = fma(fma(-c, z, (i * t)), b, fma(fma(-j, i, (z * x)), y, (fma(-x, t, (j * c)) * a)));
} else {
tmp = fma(t_1, i, (fma(-a, t, (z * y)) * x));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = fma(Float64(-y), j, Float64(t * b)) tmp = 0.0 if (i <= -1.3e+199) tmp = Float64(t_1 * i); elseif (i <= 7.2e+156) 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 = fma(t_1, i, Float64(fma(Float64(-a), t, Float64(z * y)) * x)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[((-y) * j + N[(t * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -1.3e+199], N[(t$95$1 * i), $MachinePrecision], If[LessEqual[i, 7.2e+156], 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[(t$95$1 * i + N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-y, j, t \cdot b\right)\\
\mathbf{if}\;i \leq -1.3 \cdot 10^{+199}:\\
\;\;\;\;t\_1 \cdot i\\
\mathbf{elif}\;i \leq 7.2 \cdot 10^{+156}:\\
\;\;\;\;\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(t\_1, i, \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\right)\\
\end{array}
\end{array}
if i < -1.3000000000000001e199Initial program 53.1%
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-*.f6489.3
Applied rewrites89.3%
if -1.3000000000000001e199 < i < 7.19999999999999958e156Initial program 77.4%
Taylor expanded in a around 0
Applied rewrites82.2%
if 7.19999999999999958e156 < i Initial program 64.4%
Taylor expanded in c around 0
cancel-sign-sub-invN/A
+-commutativeN/A
metadata-evalN/A
*-lft-identityN/A
associate-+l+N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lft-identityN/A
metadata-evalN/A
cancel-sign-sub-invN/A
+-commutativeN/A
Applied rewrites71.6%
Final simplification82.0%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= x -3.8e+91)
(* (fma (- a) t (* z y)) x)
(if (<= x 1.2e+127)
(fma (* j c) a (fma (fma (- j) i (* z x)) y (* (fma (- z) c (* i t)) b)))
(fma (fma (- b) c (* y x)) z (* (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 (x <= -3.8e+91) {
tmp = fma(-a, t, (z * y)) * x;
} else if (x <= 1.2e+127) {
tmp = fma((j * c), a, fma(fma(-j, i, (z * x)), y, (fma(-z, c, (i * t)) * b)));
} else {
tmp = fma(fma(-b, c, (y * x)), z, (fma(-x, a, (i * b)) * t));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (x <= -3.8e+91) tmp = Float64(fma(Float64(-a), t, Float64(z * y)) * x); elseif (x <= 1.2e+127) tmp = fma(Float64(j * c), a, fma(fma(Float64(-j), i, Float64(z * x)), y, Float64(fma(Float64(-z), c, Float64(i * t)) * b))); else tmp = fma(fma(Float64(-b), c, Float64(y * x)), z, 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[x, -3.8e+91], N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[x, 1.2e+127], N[(N[(j * c), $MachinePrecision] * a + N[(N[((-j) * i + N[(z * x), $MachinePrecision]), $MachinePrecision] * y + N[(N[((-z) * c + N[(i * t), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[((-b) * c + N[(y * x), $MachinePrecision]), $MachinePrecision] * z + N[(N[((-x) * a + N[(i * b), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.8 \cdot 10^{+91}:\\
\;\;\;\;\mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\
\mathbf{elif}\;x \leq 1.2 \cdot 10^{+127}:\\
\;\;\;\;\mathsf{fma}\left(j \cdot c, a, \mathsf{fma}\left(\mathsf{fma}\left(-j, i, z \cdot x\right), y, \mathsf{fma}\left(-z, c, i \cdot t\right) \cdot b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-b, c, y \cdot x\right), z, \mathsf{fma}\left(-x, a, i \cdot b\right) \cdot t\right)\\
\end{array}
\end{array}
if x < -3.7999999999999998e91Initial program 74.4%
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-*.f6477.1
Applied rewrites77.1%
if -3.7999999999999998e91 < x < 1.2000000000000001e127Initial program 72.4%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
sub-negN/A
associate-+r+N/A
sub-negN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-out--N/A
lower-fma.f64N/A
Applied rewrites79.9%
Taylor expanded in y around 0
Applied rewrites78.3%
Taylor expanded in c around inf
Applied rewrites74.4%
if 1.2000000000000001e127 < x Initial program 70.8%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
sub-negN/A
associate-+r+N/A
sub-negN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-out--N/A
lower-fma.f64N/A
Applied rewrites82.6%
Taylor expanded in j around 0
Applied rewrites76.8%
Final simplification75.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (fma (fma (- i) y (* c a)) j (* (* z y) x))))
(if (<= j -8.6e+238)
(* (fma c a (* (- y) i)) j)
(if (<= j -1.2e-49)
t_1
(if (<= j 2.15e-177)
(fma (fma (- a) t (* z y)) x (* (* (- b) c) z))
(if (<= j 102.0) (* (fma (- x) a (* 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(fma(-i, y, (c * a)), j, ((z * y) * x));
double tmp;
if (j <= -8.6e+238) {
tmp = fma(c, a, (-y * i)) * j;
} else if (j <= -1.2e-49) {
tmp = t_1;
} else if (j <= 2.15e-177) {
tmp = fma(fma(-a, t, (z * y)), x, ((-b * c) * z));
} else if (j <= 102.0) {
tmp = fma(-x, a, (i * b)) * t;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = fma(fma(Float64(-i), y, Float64(c * a)), j, Float64(Float64(z * y) * x)) tmp = 0.0 if (j <= -8.6e+238) tmp = Float64(fma(c, a, Float64(Float64(-y) * i)) * j); elseif (j <= -1.2e-49) tmp = t_1; elseif (j <= 2.15e-177) tmp = fma(fma(Float64(-a), t, Float64(z * y)), x, Float64(Float64(Float64(-b) * c) * z)); elseif (j <= 102.0) tmp = Float64(fma(Float64(-x), a, 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[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j + N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -8.6e+238], N[(N[(c * a + N[((-y) * i), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[j, -1.2e-49], t$95$1, If[LessEqual[j, 2.15e-177], N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x + N[(N[((-b) * c), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 102.0], N[(N[((-x) * a + N[(i * b), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\mathsf{fma}\left(-i, y, c \cdot a\right), j, \left(z \cdot y\right) \cdot x\right)\\
\mathbf{if}\;j \leq -8.6 \cdot 10^{+238}:\\
\;\;\;\;\mathsf{fma}\left(c, a, \left(-y\right) \cdot i\right) \cdot j\\
\mathbf{elif}\;j \leq -1.2 \cdot 10^{-49}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 2.15 \cdot 10^{-177}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), x, \left(\left(-b\right) \cdot c\right) \cdot z\right)\\
\mathbf{elif}\;j \leq 102:\\
\;\;\;\;\mathsf{fma}\left(-x, a, i \cdot b\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if j < -8.59999999999999967e238Initial program 43.8%
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-*.f6481.4
Applied rewrites81.4%
Applied rewrites81.4%
if -8.59999999999999967e238 < j < -1.19999999999999996e-49 or 102 < j Initial program 76.9%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
sub-negN/A
associate-+r+N/A
sub-negN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-out--N/A
lower-fma.f64N/A
Applied rewrites85.7%
Taylor expanded in y around inf
Applied rewrites65.6%
if -1.19999999999999996e-49 < j < 2.1500000000000001e-177Initial program 74.0%
lift-+.f64N/A
lift--.f64N/A
sub-negN/A
associate-+l+N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites76.3%
Taylor expanded in z 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
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6470.1
Applied rewrites70.1%
if 2.1500000000000001e-177 < j < 102Initial program 65.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-*.f6476.4
Applied rewrites76.4%
Final simplification69.3%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= j -1.2e+154)
(* (fma c a (* (- y) i)) j)
(if (<= j 5.2e+110)
(fma (fma (- b) c (* y x)) z (* (fma (- x) a (* i b)) t))
(fma (fma (- i) y (* c a)) j (* (* z y) x)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (j <= -1.2e+154) {
tmp = fma(c, a, (-y * i)) * j;
} else if (j <= 5.2e+110) {
tmp = fma(fma(-b, c, (y * x)), z, (fma(-x, a, (i * b)) * t));
} else {
tmp = fma(fma(-i, y, (c * a)), j, ((z * y) * x));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (j <= -1.2e+154) tmp = Float64(fma(c, a, Float64(Float64(-y) * i)) * j); elseif (j <= 5.2e+110) tmp = fma(fma(Float64(-b), c, Float64(y * x)), z, Float64(fma(Float64(-x), a, Float64(i * b)) * t)); else tmp = fma(fma(Float64(-i), y, Float64(c * a)), j, Float64(Float64(z * y) * x)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[j, -1.2e+154], N[(N[(c * a + N[((-y) * i), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[j, 5.2e+110], N[(N[((-b) * c + N[(y * x), $MachinePrecision]), $MachinePrecision] * z + N[(N[((-x) * a + N[(i * b), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j + N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;j \leq -1.2 \cdot 10^{+154}:\\
\;\;\;\;\mathsf{fma}\left(c, a, \left(-y\right) \cdot i\right) \cdot j\\
\mathbf{elif}\;j \leq 5.2 \cdot 10^{+110}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-b, c, y \cdot x\right), z, \mathsf{fma}\left(-x, a, i \cdot b\right) \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-i, y, c \cdot a\right), j, \left(z \cdot y\right) \cdot x\right)\\
\end{array}
\end{array}
if j < -1.20000000000000007e154Initial program 53.5%
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-*.f6475.8
Applied rewrites75.8%
Applied rewrites75.8%
if -1.20000000000000007e154 < j < 5.2e110Initial program 75.1%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
sub-negN/A
associate-+r+N/A
sub-negN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-out--N/A
lower-fma.f64N/A
Applied rewrites77.5%
Taylor expanded in j around 0
Applied rewrites73.4%
if 5.2e110 < j Initial program 75.1%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
sub-negN/A
associate-+r+N/A
sub-negN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-out--N/A
lower-fma.f64N/A
Applied rewrites84.2%
Taylor expanded in y around inf
Applied rewrites71.1%
Final simplification73.3%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- a) t (* z y)) x)))
(if (<= x -3.4e+79)
t_1
(if (<= x -7000.0)
(* (fma (- b) z (* j a)) c)
(if (<= x 2.75e-14)
(* (fma (- c) z (* i t)) b)
(if (<= x 2.95e+44) (* (fma c a (* (- y) i)) 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 <= -3.4e+79) {
tmp = t_1;
} else if (x <= -7000.0) {
tmp = fma(-b, z, (j * a)) * c;
} else if (x <= 2.75e-14) {
tmp = fma(-c, z, (i * t)) * b;
} else if (x <= 2.95e+44) {
tmp = fma(c, a, (-y * i)) * 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 <= -3.4e+79) tmp = t_1; elseif (x <= -7000.0) tmp = Float64(fma(Float64(-b), z, Float64(j * a)) * c); elseif (x <= 2.75e-14) tmp = Float64(fma(Float64(-c), z, Float64(i * t)) * b); elseif (x <= 2.95e+44) tmp = Float64(fma(c, a, Float64(Float64(-y) * i)) * 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, -3.4e+79], t$95$1, If[LessEqual[x, -7000.0], N[(N[((-b) * z + N[(j * a), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[x, 2.75e-14], N[(N[((-c) * z + N[(i * t), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[x, 2.95e+44], N[(N[(c * a + N[((-y) * i), $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 -3.4 \cdot 10^{+79}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -7000:\\
\;\;\;\;\mathsf{fma}\left(-b, z, j \cdot a\right) \cdot c\\
\mathbf{elif}\;x \leq 2.75 \cdot 10^{-14}:\\
\;\;\;\;\mathsf{fma}\left(-c, z, i \cdot t\right) \cdot b\\
\mathbf{elif}\;x \leq 2.95 \cdot 10^{+44}:\\
\;\;\;\;\mathsf{fma}\left(c, a, \left(-y\right) \cdot i\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -3.40000000000000032e79 or 2.94999999999999982e44 < x Initial program 73.8%
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-*.f6470.2
Applied rewrites70.2%
if -3.40000000000000032e79 < x < -7e3Initial program 82.8%
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.8
Applied rewrites61.8%
if -7e3 < x < 2.74999999999999996e-14Initial program 69.4%
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-*.f6453.9
Applied rewrites53.9%
if 2.74999999999999996e-14 < x < 2.94999999999999982e44Initial program 74.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-*.f6461.4
Applied rewrites61.4%
Applied rewrites61.4%
Final simplification61.3%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- x) a (* i b)) t)))
(if (<= t -7.2e+55)
t_1
(if (<= t 1.4e+44) (fma (fma (- i) y (* c a)) j (* (* z y) 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 = fma(-x, a, (i * b)) * t;
double tmp;
if (t <= -7.2e+55) {
tmp = t_1;
} else if (t <= 1.4e+44) {
tmp = fma(fma(-i, y, (c * a)), j, ((z * y) * x));
} 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 <= -7.2e+55) tmp = t_1; elseif (t <= 1.4e+44) tmp = fma(fma(Float64(-i), y, Float64(c * a)), j, Float64(Float64(z * y) * x)); 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, -7.2e+55], t$95$1, If[LessEqual[t, 1.4e+44], N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j + N[(N[(z * y), $MachinePrecision] * x), $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 -7.2 \cdot 10^{+55}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.4 \cdot 10^{+44}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-i, y, c \cdot a\right), j, \left(z \cdot y\right) \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -7.19999999999999975e55 or 1.4e44 < t Initial program 64.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-*.f6468.0
Applied rewrites68.0%
if -7.19999999999999975e55 < t < 1.4e44Initial program 78.5%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
sub-negN/A
associate-+r+N/A
sub-negN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-out--N/A
lower-fma.f64N/A
Applied rewrites78.0%
Taylor expanded in y around inf
Applied rewrites61.9%
Final simplification64.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* (- a) x) t)))
(if (<= x -5.4e+278)
t_1
(if (<= x -5.4e+48)
(* (* z y) x)
(if (<= x -8500.0)
(* (* j a) c)
(if (<= x 8e+48) (* (* t b) i) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (-a * x) * t;
double tmp;
if (x <= -5.4e+278) {
tmp = t_1;
} else if (x <= -5.4e+48) {
tmp = (z * y) * x;
} else if (x <= -8500.0) {
tmp = (j * a) * c;
} else if (x <= 8e+48) {
tmp = (t * b) * i;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = (-a * x) * t
if (x <= (-5.4d+278)) then
tmp = t_1
else if (x <= (-5.4d+48)) then
tmp = (z * y) * x
else if (x <= (-8500.0d0)) then
tmp = (j * a) * c
else if (x <= 8d+48) then
tmp = (t * b) * i
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (-a * x) * t;
double tmp;
if (x <= -5.4e+278) {
tmp = t_1;
} else if (x <= -5.4e+48) {
tmp = (z * y) * x;
} else if (x <= -8500.0) {
tmp = (j * a) * c;
} else if (x <= 8e+48) {
tmp = (t * b) * i;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (-a * x) * t tmp = 0 if x <= -5.4e+278: tmp = t_1 elif x <= -5.4e+48: tmp = (z * y) * x elif x <= -8500.0: tmp = (j * a) * c elif x <= 8e+48: tmp = (t * b) * i else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(-a) * x) * t) tmp = 0.0 if (x <= -5.4e+278) tmp = t_1; elseif (x <= -5.4e+48) tmp = Float64(Float64(z * y) * x); elseif (x <= -8500.0) tmp = Float64(Float64(j * a) * c); elseif (x <= 8e+48) tmp = Float64(Float64(t * b) * i); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (-a * x) * t; tmp = 0.0; if (x <= -5.4e+278) tmp = t_1; elseif (x <= -5.4e+48) tmp = (z * y) * x; elseif (x <= -8500.0) tmp = (j * a) * c; elseif (x <= 8e+48) tmp = (t * b) * i; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-a) * x), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[x, -5.4e+278], t$95$1, If[LessEqual[x, -5.4e+48], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[x, -8500.0], N[(N[(j * a), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[x, 8e+48], N[(N[(t * b), $MachinePrecision] * i), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(-a\right) \cdot x\right) \cdot t\\
\mathbf{if}\;x \leq -5.4 \cdot 10^{+278}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -5.4 \cdot 10^{+48}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\
\mathbf{elif}\;x \leq -8500:\\
\;\;\;\;\left(j \cdot a\right) \cdot c\\
\mathbf{elif}\;x \leq 8 \cdot 10^{+48}:\\
\;\;\;\;\left(t \cdot b\right) \cdot i\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -5.40000000000000021e278 or 8.00000000000000035e48 < x Initial program 73.5%
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-*.f6460.2
Applied rewrites60.2%
Taylor expanded in b around 0
Applied rewrites54.6%
if -5.40000000000000021e278 < x < -5.40000000000000007e48Initial program 74.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-*.f6464.6
Applied rewrites64.6%
Taylor expanded in a around 0
Applied rewrites54.5%
if -5.40000000000000007e48 < x < -8500Initial program 85.7%
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-*.f6472.5
Applied rewrites72.5%
Taylor expanded in c around inf
Applied rewrites44.6%
Applied rewrites58.3%
if -8500 < x < 8.00000000000000035e48Initial program 70.1%
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-*.f6452.9
Applied rewrites52.9%
Taylor expanded in b around inf
Applied rewrites35.7%
Final simplification44.8%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= x -5.4e+48)
(* (* z y) x)
(if (<= x -8500.0)
(* (* j a) c)
(if (<= x 7e-15)
(* (* i t) b)
(if (<= x 3.7e+179) (* (* y x) z) (* (* (- x) t) a))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (x <= -5.4e+48) {
tmp = (z * y) * x;
} else if (x <= -8500.0) {
tmp = (j * a) * c;
} else if (x <= 7e-15) {
tmp = (i * t) * b;
} else if (x <= 3.7e+179) {
tmp = (y * x) * z;
} else {
tmp = (-x * t) * a;
}
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 (x <= (-5.4d+48)) then
tmp = (z * y) * x
else if (x <= (-8500.0d0)) then
tmp = (j * a) * c
else if (x <= 7d-15) then
tmp = (i * t) * b
else if (x <= 3.7d+179) then
tmp = (y * x) * z
else
tmp = (-x * t) * a
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 (x <= -5.4e+48) {
tmp = (z * y) * x;
} else if (x <= -8500.0) {
tmp = (j * a) * c;
} else if (x <= 7e-15) {
tmp = (i * t) * b;
} else if (x <= 3.7e+179) {
tmp = (y * x) * z;
} else {
tmp = (-x * t) * a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if x <= -5.4e+48: tmp = (z * y) * x elif x <= -8500.0: tmp = (j * a) * c elif x <= 7e-15: tmp = (i * t) * b elif x <= 3.7e+179: tmp = (y * x) * z else: tmp = (-x * t) * a return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (x <= -5.4e+48) tmp = Float64(Float64(z * y) * x); elseif (x <= -8500.0) tmp = Float64(Float64(j * a) * c); elseif (x <= 7e-15) tmp = Float64(Float64(i * t) * b); elseif (x <= 3.7e+179) tmp = Float64(Float64(y * x) * z); else tmp = Float64(Float64(Float64(-x) * t) * a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (x <= -5.4e+48) tmp = (z * y) * x; elseif (x <= -8500.0) tmp = (j * a) * c; elseif (x <= 7e-15) tmp = (i * t) * b; elseif (x <= 3.7e+179) tmp = (y * x) * z; else tmp = (-x * t) * a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[x, -5.4e+48], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[x, -8500.0], N[(N[(j * a), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[x, 7e-15], N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[x, 3.7e+179], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision], N[(N[((-x) * t), $MachinePrecision] * a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.4 \cdot 10^{+48}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\
\mathbf{elif}\;x \leq -8500:\\
\;\;\;\;\left(j \cdot a\right) \cdot c\\
\mathbf{elif}\;x \leq 7 \cdot 10^{-15}:\\
\;\;\;\;\left(i \cdot t\right) \cdot b\\
\mathbf{elif}\;x \leq 3.7 \cdot 10^{+179}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;\left(\left(-x\right) \cdot t\right) \cdot a\\
\end{array}
\end{array}
if x < -5.40000000000000007e48Initial program 75.4%
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-*.f6469.7
Applied rewrites69.7%
Taylor expanded in a around 0
Applied rewrites50.6%
if -5.40000000000000007e48 < x < -8500Initial program 85.7%
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-*.f6472.5
Applied rewrites72.5%
Taylor expanded in c around inf
Applied rewrites44.6%
Applied rewrites58.3%
if -8500 < x < 7.0000000000000001e-15Initial program 69.4%
Taylor expanded in c around 0
cancel-sign-sub-invN/A
+-commutativeN/A
metadata-evalN/A
*-lft-identityN/A
associate-+l+N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lft-identityN/A
metadata-evalN/A
cancel-sign-sub-invN/A
+-commutativeN/A
Applied rewrites53.0%
Taylor expanded in b around inf
Applied rewrites38.1%
if 7.0000000000000001e-15 < x < 3.6999999999999999e179Initial program 76.1%
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-*.f6444.7
Applied rewrites44.7%
Taylor expanded in c around 0
Applied rewrites36.8%
if 3.6999999999999999e179 < x Initial program 68.4%
Taylor expanded in c around 0
cancel-sign-sub-invN/A
+-commutativeN/A
metadata-evalN/A
*-lft-identityN/A
associate-+l+N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lft-identityN/A
metadata-evalN/A
cancel-sign-sub-invN/A
+-commutativeN/A
Applied rewrites76.9%
Taylor expanded in a around inf
Applied rewrites54.2%
Final simplification43.6%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= z -3.9e+28)
(* (fma (- j) i (* z x)) y)
(if (<= z 1.12e-123)
(* (fma (- x) a (* i b)) t)
(if (<= z 2.95e+50)
(* (fma c a (* (- y) i)) j)
(* (fma (- c) b (* y x)) z)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (z <= -3.9e+28) {
tmp = fma(-j, i, (z * x)) * y;
} else if (z <= 1.12e-123) {
tmp = fma(-x, a, (i * b)) * t;
} else if (z <= 2.95e+50) {
tmp = fma(c, a, (-y * i)) * j;
} else {
tmp = fma(-c, b, (y * x)) * z;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (z <= -3.9e+28) tmp = Float64(fma(Float64(-j), i, Float64(z * x)) * y); elseif (z <= 1.12e-123) tmp = Float64(fma(Float64(-x), a, Float64(i * b)) * t); elseif (z <= 2.95e+50) tmp = Float64(fma(c, a, Float64(Float64(-y) * i)) * j); else tmp = Float64(fma(Float64(-c), b, Float64(y * x)) * z); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[z, -3.9e+28], N[(N[((-j) * i + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[z, 1.12e-123], N[(N[((-x) * a + N[(i * b), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[z, 2.95e+50], N[(N[(c * a + N[((-y) * i), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], N[(N[((-c) * b + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.9 \cdot 10^{+28}:\\
\;\;\;\;\mathsf{fma}\left(-j, i, z \cdot x\right) \cdot y\\
\mathbf{elif}\;z \leq 1.12 \cdot 10^{-123}:\\
\;\;\;\;\mathsf{fma}\left(-x, a, i \cdot b\right) \cdot t\\
\mathbf{elif}\;z \leq 2.95 \cdot 10^{+50}:\\
\;\;\;\;\mathsf{fma}\left(c, a, \left(-y\right) \cdot i\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-c, b, y \cdot x\right) \cdot z\\
\end{array}
\end{array}
if z < -3.8999999999999999e28Initial program 65.4%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6464.1
Applied rewrites64.1%
if -3.8999999999999999e28 < z < 1.11999999999999999e-123Initial program 80.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-*.f6459.3
Applied rewrites59.3%
if 1.11999999999999999e-123 < z < 2.9499999999999999e50Initial program 83.0%
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-*.f6458.3
Applied rewrites58.3%
Applied rewrites58.3%
if 2.9499999999999999e50 < z Initial program 58.9%
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-*.f6470.7
Applied rewrites70.7%
Final simplification62.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma c a (* (- y) i)) j)))
(if (<= j -5.5e+126)
t_1
(if (<= j -2.1e-240)
(* (fma (- c) b (* y x)) z)
(if (<= j 1.5e-23) (* (fma (- a) t (* z y)) 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 = fma(c, a, (-y * i)) * j;
double tmp;
if (j <= -5.5e+126) {
tmp = t_1;
} else if (j <= -2.1e-240) {
tmp = fma(-c, b, (y * x)) * z;
} else if (j <= 1.5e-23) {
tmp = fma(-a, t, (z * y)) * x;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(c, a, Float64(Float64(-y) * i)) * j) tmp = 0.0 if (j <= -5.5e+126) tmp = t_1; elseif (j <= -2.1e-240) tmp = Float64(fma(Float64(-c), b, Float64(y * x)) * z); elseif (j <= 1.5e-23) tmp = Float64(fma(Float64(-a), t, Float64(z * y)) * x); 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 * a + N[((-y) * i), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]}, If[LessEqual[j, -5.5e+126], t$95$1, If[LessEqual[j, -2.1e-240], N[(N[((-c) * b + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[j, 1.5e-23], N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(c, a, \left(-y\right) \cdot i\right) \cdot j\\
\mathbf{if}\;j \leq -5.5 \cdot 10^{+126}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq -2.1 \cdot 10^{-240}:\\
\;\;\;\;\mathsf{fma}\left(-c, b, y \cdot x\right) \cdot z\\
\mathbf{elif}\;j \leq 1.5 \cdot 10^{-23}:\\
\;\;\;\;\mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if j < -5.5000000000000004e126 or 1.50000000000000001e-23 < j Initial program 71.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-*.f6462.5
Applied rewrites62.5%
Applied rewrites62.5%
if -5.5000000000000004e126 < j < -2.09999999999999994e-240Initial program 76.8%
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-*.f6460.2
Applied rewrites60.2%
if -2.09999999999999994e-240 < j < 1.50000000000000001e-23Initial program 70.1%
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-*.f6453.2
Applied rewrites53.2%
Final simplification59.3%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* (- a) x) t)))
(if (<= x -5.4e+278)
t_1
(if (<= x -9e+146)
(* (* z y) x)
(if (<= x 1e+210) (* (fma c a (* (- y) i)) 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 = (-a * x) * t;
double tmp;
if (x <= -5.4e+278) {
tmp = t_1;
} else if (x <= -9e+146) {
tmp = (z * y) * x;
} else if (x <= 1e+210) {
tmp = fma(c, a, (-y * i)) * j;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(-a) * x) * t) tmp = 0.0 if (x <= -5.4e+278) tmp = t_1; elseif (x <= -9e+146) tmp = Float64(Float64(z * y) * x); elseif (x <= 1e+210) tmp = Float64(fma(c, a, Float64(Float64(-y) * i)) * 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) * x), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[x, -5.4e+278], t$95$1, If[LessEqual[x, -9e+146], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[x, 1e+210], N[(N[(c * a + N[((-y) * i), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(-a\right) \cdot x\right) \cdot t\\
\mathbf{if}\;x \leq -5.4 \cdot 10^{+278}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -9 \cdot 10^{+146}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\
\mathbf{elif}\;x \leq 10^{+210}:\\
\;\;\;\;\mathsf{fma}\left(c, a, \left(-y\right) \cdot i\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -5.40000000000000021e278 or 9.99999999999999927e209 < x Initial program 76.6%
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-*.f6471.4
Applied rewrites71.4%
Taylor expanded in b around 0
Applied rewrites71.5%
if -5.40000000000000021e278 < x < -9.00000000000000051e146Initial program 83.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-*.f6480.5
Applied rewrites80.5%
Taylor expanded in a around 0
Applied rewrites72.9%
if -9.00000000000000051e146 < x < 9.99999999999999927e209Initial program 70.5%
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-*.f6444.2
Applied rewrites44.2%
Applied rewrites44.7%
Final simplification51.0%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= c -3.8e+86)
(* (* (- b) c) z)
(if (<= c 9e-283)
(* (* t b) i)
(if (<= c 2.8e-210)
(* (* (- x) t) a)
(if (<= c 8.8e+30) (* (* y x) z) (* (* c a) j))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (c <= -3.8e+86) {
tmp = (-b * c) * z;
} else if (c <= 9e-283) {
tmp = (t * b) * i;
} else if (c <= 2.8e-210) {
tmp = (-x * t) * a;
} else if (c <= 8.8e+30) {
tmp = (y * x) * z;
} else {
tmp = (c * a) * j;
}
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 (c <= (-3.8d+86)) then
tmp = (-b * c) * z
else if (c <= 9d-283) then
tmp = (t * b) * i
else if (c <= 2.8d-210) then
tmp = (-x * t) * a
else if (c <= 8.8d+30) then
tmp = (y * x) * z
else
tmp = (c * a) * j
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 (c <= -3.8e+86) {
tmp = (-b * c) * z;
} else if (c <= 9e-283) {
tmp = (t * b) * i;
} else if (c <= 2.8e-210) {
tmp = (-x * t) * a;
} else if (c <= 8.8e+30) {
tmp = (y * x) * z;
} else {
tmp = (c * a) * j;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if c <= -3.8e+86: tmp = (-b * c) * z elif c <= 9e-283: tmp = (t * b) * i elif c <= 2.8e-210: tmp = (-x * t) * a elif c <= 8.8e+30: tmp = (y * x) * z else: tmp = (c * a) * j return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (c <= -3.8e+86) tmp = Float64(Float64(Float64(-b) * c) * z); elseif (c <= 9e-283) tmp = Float64(Float64(t * b) * i); elseif (c <= 2.8e-210) tmp = Float64(Float64(Float64(-x) * t) * a); elseif (c <= 8.8e+30) tmp = Float64(Float64(y * x) * z); else tmp = Float64(Float64(c * a) * j); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (c <= -3.8e+86) tmp = (-b * c) * z; elseif (c <= 9e-283) tmp = (t * b) * i; elseif (c <= 2.8e-210) tmp = (-x * t) * a; elseif (c <= 8.8e+30) tmp = (y * x) * z; else tmp = (c * a) * j; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[c, -3.8e+86], N[(N[((-b) * c), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[c, 9e-283], N[(N[(t * b), $MachinePrecision] * i), $MachinePrecision], If[LessEqual[c, 2.8e-210], N[(N[((-x) * t), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[c, 8.8e+30], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision], N[(N[(c * a), $MachinePrecision] * j), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -3.8 \cdot 10^{+86}:\\
\;\;\;\;\left(\left(-b\right) \cdot c\right) \cdot z\\
\mathbf{elif}\;c \leq 9 \cdot 10^{-283}:\\
\;\;\;\;\left(t \cdot b\right) \cdot i\\
\mathbf{elif}\;c \leq 2.8 \cdot 10^{-210}:\\
\;\;\;\;\left(\left(-x\right) \cdot t\right) \cdot a\\
\mathbf{elif}\;c \leq 8.8 \cdot 10^{+30}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;\left(c \cdot a\right) \cdot j\\
\end{array}
\end{array}
if c < -3.79999999999999978e86Initial program 53.4%
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-*.f6453.5
Applied rewrites53.5%
Taylor expanded in c around inf
Applied rewrites45.0%
if -3.79999999999999978e86 < c < 8.9999999999999994e-283Initial program 79.7%
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-*.f6456.3
Applied rewrites56.3%
Taylor expanded in b around inf
Applied rewrites40.2%
if 8.9999999999999994e-283 < c < 2.8e-210Initial program 75.7%
Taylor expanded in c around 0
cancel-sign-sub-invN/A
+-commutativeN/A
metadata-evalN/A
*-lft-identityN/A
associate-+l+N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lft-identityN/A
metadata-evalN/A
cancel-sign-sub-invN/A
+-commutativeN/A
Applied rewrites84.2%
Taylor expanded in a around inf
Applied rewrites67.5%
if 2.8e-210 < c < 8.7999999999999999e30Initial program 73.4%
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-*.f6451.9
Applied rewrites51.9%
Taylor expanded in c around 0
Applied rewrites44.5%
if 8.7999999999999999e30 < c Initial program 75.8%
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-*.f6458.2
Applied rewrites58.2%
Taylor expanded in c around inf
Applied rewrites45.5%
Final simplification44.4%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma c a (* (- y) i)) j)))
(if (<= j -5.4e-6)
t_1
(if (<= j 1.5e-23) (* (fma (- a) t (* z y)) 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 = fma(c, a, (-y * i)) * j;
double tmp;
if (j <= -5.4e-6) {
tmp = t_1;
} else if (j <= 1.5e-23) {
tmp = fma(-a, t, (z * y)) * x;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(c, a, Float64(Float64(-y) * i)) * j) tmp = 0.0 if (j <= -5.4e-6) tmp = t_1; elseif (j <= 1.5e-23) tmp = Float64(fma(Float64(-a), t, Float64(z * y)) * x); 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 * a + N[((-y) * i), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]}, If[LessEqual[j, -5.4e-6], t$95$1, If[LessEqual[j, 1.5e-23], N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(c, a, \left(-y\right) \cdot i\right) \cdot j\\
\mathbf{if}\;j \leq -5.4 \cdot 10^{-6}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 1.5 \cdot 10^{-23}:\\
\;\;\;\;\mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if j < -5.39999999999999997e-6 or 1.50000000000000001e-23 < j Initial program 71.8%
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-*.f6459.2
Applied rewrites59.2%
Applied rewrites60.0%
if -5.39999999999999997e-6 < j < 1.50000000000000001e-23Initial program 73.4%
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-*.f6450.4
Applied rewrites50.4%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= x -5.4e+48)
(* (* z y) x)
(if (<= x -8500.0)
(* (* j a) c)
(if (<= x 7e-15) (* (* i t) b) (* (* y x) z)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (x <= -5.4e+48) {
tmp = (z * y) * x;
} else if (x <= -8500.0) {
tmp = (j * a) * c;
} else if (x <= 7e-15) {
tmp = (i * t) * b;
} else {
tmp = (y * x) * z;
}
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 (x <= (-5.4d+48)) then
tmp = (z * y) * x
else if (x <= (-8500.0d0)) then
tmp = (j * a) * c
else if (x <= 7d-15) then
tmp = (i * t) * b
else
tmp = (y * x) * z
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 (x <= -5.4e+48) {
tmp = (z * y) * x;
} else if (x <= -8500.0) {
tmp = (j * a) * c;
} else if (x <= 7e-15) {
tmp = (i * t) * b;
} else {
tmp = (y * x) * z;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if x <= -5.4e+48: tmp = (z * y) * x elif x <= -8500.0: tmp = (j * a) * c elif x <= 7e-15: tmp = (i * t) * b else: tmp = (y * x) * z return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (x <= -5.4e+48) tmp = Float64(Float64(z * y) * x); elseif (x <= -8500.0) tmp = Float64(Float64(j * a) * c); elseif (x <= 7e-15) tmp = Float64(Float64(i * t) * b); else tmp = Float64(Float64(y * x) * z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (x <= -5.4e+48) tmp = (z * y) * x; elseif (x <= -8500.0) tmp = (j * a) * c; elseif (x <= 7e-15) tmp = (i * t) * b; else tmp = (y * x) * z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[x, -5.4e+48], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[x, -8500.0], N[(N[(j * a), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[x, 7e-15], N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.4 \cdot 10^{+48}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\
\mathbf{elif}\;x \leq -8500:\\
\;\;\;\;\left(j \cdot a\right) \cdot c\\
\mathbf{elif}\;x \leq 7 \cdot 10^{-15}:\\
\;\;\;\;\left(i \cdot t\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\end{array}
\end{array}
if x < -5.40000000000000007e48Initial program 75.4%
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-*.f6469.7
Applied rewrites69.7%
Taylor expanded in a around 0
Applied rewrites50.6%
if -5.40000000000000007e48 < x < -8500Initial program 85.7%
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-*.f6472.5
Applied rewrites72.5%
Taylor expanded in c around inf
Applied rewrites44.6%
Applied rewrites58.3%
if -8500 < x < 7.0000000000000001e-15Initial program 69.4%
Taylor expanded in c around 0
cancel-sign-sub-invN/A
+-commutativeN/A
metadata-evalN/A
*-lft-identityN/A
associate-+l+N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lft-identityN/A
metadata-evalN/A
cancel-sign-sub-invN/A
+-commutativeN/A
Applied rewrites53.0%
Taylor expanded in b around inf
Applied rewrites38.1%
if 7.0000000000000001e-15 < x Initial program 73.0%
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-*.f6442.8
Applied rewrites42.8%
Taylor expanded in c around 0
Applied rewrites35.5%
Final simplification41.6%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* z y) x)))
(if (<= x -5.4e+48)
t_1
(if (<= x -8500.0) (* (* j a) c) (if (<= x 7e-15) (* (* 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 = (z * y) * x;
double tmp;
if (x <= -5.4e+48) {
tmp = t_1;
} else if (x <= -8500.0) {
tmp = (j * a) * c;
} else if (x <= 7e-15) {
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 = (z * y) * x
if (x <= (-5.4d+48)) then
tmp = t_1
else if (x <= (-8500.0d0)) then
tmp = (j * a) * c
else if (x <= 7d-15) 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 = (z * y) * x;
double tmp;
if (x <= -5.4e+48) {
tmp = t_1;
} else if (x <= -8500.0) {
tmp = (j * a) * c;
} else if (x <= 7e-15) {
tmp = (i * t) * b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (z * y) * x tmp = 0 if x <= -5.4e+48: tmp = t_1 elif x <= -8500.0: tmp = (j * a) * c elif x <= 7e-15: tmp = (i * t) * b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(z * y) * x) tmp = 0.0 if (x <= -5.4e+48) tmp = t_1; elseif (x <= -8500.0) tmp = Float64(Float64(j * a) * c); elseif (x <= 7e-15) tmp = Float64(Float64(i * 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 = (z * y) * x; tmp = 0.0; if (x <= -5.4e+48) tmp = t_1; elseif (x <= -8500.0) tmp = (j * a) * c; elseif (x <= 7e-15) 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[(N[(z * y), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -5.4e+48], t$95$1, If[LessEqual[x, -8500.0], N[(N[(j * a), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[x, 7e-15], N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z \cdot y\right) \cdot x\\
\mathbf{if}\;x \leq -5.4 \cdot 10^{+48}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -8500:\\
\;\;\;\;\left(j \cdot a\right) \cdot c\\
\mathbf{elif}\;x \leq 7 \cdot 10^{-15}:\\
\;\;\;\;\left(i \cdot t\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -5.40000000000000007e48 or 7.0000000000000001e-15 < x Initial program 74.2%
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.7
Applied rewrites61.7%
Taylor expanded in a around 0
Applied rewrites41.4%
if -5.40000000000000007e48 < x < -8500Initial program 85.7%
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-*.f6472.5
Applied rewrites72.5%
Taylor expanded in c around inf
Applied rewrites44.6%
Applied rewrites58.3%
if -8500 < x < 7.0000000000000001e-15Initial program 69.4%
Taylor expanded in c around 0
cancel-sign-sub-invN/A
+-commutativeN/A
metadata-evalN/A
*-lft-identityN/A
associate-+l+N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lft-identityN/A
metadata-evalN/A
cancel-sign-sub-invN/A
+-commutativeN/A
Applied rewrites53.0%
Taylor expanded in b around inf
Applied rewrites38.1%
Final simplification40.8%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* z x) y)))
(if (<= x -5.4e+48)
t_1
(if (<= x -8500.0) (* (* j a) c) (if (<= x 7e-15) (* (* 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 = (z * x) * y;
double tmp;
if (x <= -5.4e+48) {
tmp = t_1;
} else if (x <= -8500.0) {
tmp = (j * a) * c;
} else if (x <= 7e-15) {
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 = (z * x) * y
if (x <= (-5.4d+48)) then
tmp = t_1
else if (x <= (-8500.0d0)) then
tmp = (j * a) * c
else if (x <= 7d-15) 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 = (z * x) * y;
double tmp;
if (x <= -5.4e+48) {
tmp = t_1;
} else if (x <= -8500.0) {
tmp = (j * a) * c;
} else if (x <= 7e-15) {
tmp = (i * t) * b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (z * x) * y tmp = 0 if x <= -5.4e+48: tmp = t_1 elif x <= -8500.0: tmp = (j * a) * c elif x <= 7e-15: tmp = (i * t) * b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(z * x) * y) tmp = 0.0 if (x <= -5.4e+48) tmp = t_1; elseif (x <= -8500.0) tmp = Float64(Float64(j * a) * c); elseif (x <= 7e-15) tmp = Float64(Float64(i * 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 = (z * x) * y; tmp = 0.0; if (x <= -5.4e+48) tmp = t_1; elseif (x <= -8500.0) tmp = (j * a) * c; elseif (x <= 7e-15) 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[(N[(z * x), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[x, -5.4e+48], t$95$1, If[LessEqual[x, -8500.0], N[(N[(j * a), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[x, 7e-15], N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z \cdot x\right) \cdot y\\
\mathbf{if}\;x \leq -5.4 \cdot 10^{+48}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -8500:\\
\;\;\;\;\left(j \cdot a\right) \cdot c\\
\mathbf{elif}\;x \leq 7 \cdot 10^{-15}:\\
\;\;\;\;\left(i \cdot t\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -5.40000000000000007e48 or 7.0000000000000001e-15 < x Initial program 74.2%
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.7
Applied rewrites61.7%
Taylor expanded in a around inf
Applied rewrites33.6%
Taylor expanded in a around 0
Applied rewrites39.9%
if -5.40000000000000007e48 < x < -8500Initial program 85.7%
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-*.f6472.5
Applied rewrites72.5%
Taylor expanded in c around inf
Applied rewrites44.6%
Applied rewrites58.3%
if -8500 < x < 7.0000000000000001e-15Initial program 69.4%
Taylor expanded in c around 0
cancel-sign-sub-invN/A
+-commutativeN/A
metadata-evalN/A
*-lft-identityN/A
associate-+l+N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lft-identityN/A
metadata-evalN/A
cancel-sign-sub-invN/A
+-commutativeN/A
Applied rewrites53.0%
Taylor expanded in b around inf
Applied rewrites38.1%
Final simplification40.1%
(FPCore (x y z t a b c i j) :precision binary64 (if (<= j -2.1e+119) (* (* j c) a) (if (<= j 7e-15) (* (* z x) y) (* (* 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 (j <= -2.1e+119) {
tmp = (j * c) * a;
} else if (j <= 7e-15) {
tmp = (z * x) * y;
} 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 (j <= (-2.1d+119)) then
tmp = (j * c) * a
else if (j <= 7d-15) then
tmp = (z * x) * y
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 (j <= -2.1e+119) {
tmp = (j * c) * a;
} else if (j <= 7e-15) {
tmp = (z * x) * y;
} else {
tmp = (j * a) * c;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if j <= -2.1e+119: tmp = (j * c) * a elif j <= 7e-15: tmp = (z * x) * y else: tmp = (j * a) * c return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (j <= -2.1e+119) tmp = Float64(Float64(j * c) * a); elseif (j <= 7e-15) tmp = Float64(Float64(z * x) * y); else tmp = Float64(Float64(j * a) * c); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (j <= -2.1e+119) tmp = (j * c) * a; elseif (j <= 7e-15) tmp = (z * x) * y; else tmp = (j * a) * c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[j, -2.1e+119], N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[j, 7e-15], N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision], N[(N[(j * a), $MachinePrecision] * c), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;j \leq -2.1 \cdot 10^{+119}:\\
\;\;\;\;\left(j \cdot c\right) \cdot a\\
\mathbf{elif}\;j \leq 7 \cdot 10^{-15}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;\left(j \cdot a\right) \cdot c\\
\end{array}
\end{array}
if j < -2.09999999999999983e119Initial program 59.0%
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-*.f6468.8
Applied rewrites68.8%
Taylor expanded in c around inf
Applied rewrites44.6%
if -2.09999999999999983e119 < j < 7.0000000000000001e-15Initial program 73.6%
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-*.f6448.5
Applied rewrites48.5%
Taylor expanded in a around inf
Applied rewrites26.1%
Taylor expanded in a around 0
Applied rewrites30.8%
if 7.0000000000000001e-15 < j Initial program 77.9%
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-*.f6457.8
Applied rewrites57.8%
Taylor expanded in c around inf
Applied rewrites32.8%
Applied rewrites38.0%
Final simplification34.9%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* (* z x) y))) (if (<= z -5.6e-24) t_1 (if (<= z 1.9e-16) (* (* 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 = (z * x) * y;
double tmp;
if (z <= -5.6e-24) {
tmp = t_1;
} else if (z <= 1.9e-16) {
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 = (z * x) * y
if (z <= (-5.6d-24)) then
tmp = t_1
else if (z <= 1.9d-16) 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 = (z * x) * y;
double tmp;
if (z <= -5.6e-24) {
tmp = t_1;
} else if (z <= 1.9e-16) {
tmp = (j * c) * a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (z * x) * y tmp = 0 if z <= -5.6e-24: tmp = t_1 elif z <= 1.9e-16: 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(z * x) * y) tmp = 0.0 if (z <= -5.6e-24) tmp = t_1; elseif (z <= 1.9e-16) 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 = (z * x) * y; tmp = 0.0; if (z <= -5.6e-24) tmp = t_1; elseif (z <= 1.9e-16) 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[(z * x), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[z, -5.6e-24], t$95$1, If[LessEqual[z, 1.9e-16], N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z \cdot x\right) \cdot y\\
\mathbf{if}\;z \leq -5.6 \cdot 10^{-24}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{-16}:\\
\;\;\;\;\left(j \cdot c\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -5.6000000000000003e-24 or 1.90000000000000006e-16 < z Initial program 64.0%
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-*.f6445.8
Applied rewrites45.8%
Taylor expanded in a around inf
Applied rewrites19.0%
Taylor expanded in a around 0
Applied rewrites39.0%
if -5.6000000000000003e-24 < z < 1.90000000000000006e-16Initial program 82.5%
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.3
Applied rewrites45.3%
Taylor expanded in c around inf
Applied rewrites29.1%
Final simplification34.4%
(FPCore (x y z t a b c i j) :precision binary64 (* (* z x) y))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return (z * x) * y;
}
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 = (z * x) * y
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 (z * x) * y;
}
def code(x, y, z, t, a, b, c, i, j): return (z * x) * y
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(z * x) * y) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = (z * x) * y; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision]
\begin{array}{l}
\\
\left(z \cdot x\right) \cdot y
\end{array}
Initial program 72.6%
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.5
Applied rewrites38.5%
Taylor expanded in a around inf
Applied rewrites21.9%
Taylor expanded in a around 0
Applied rewrites24.1%
(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 2024244
(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)))))