
(FPCore (x y z t a b c i j) :precision binary64 (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (* j (- (* c t) (* i y)))))
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) - (i * a)))) + (j * ((c * t) - (i * 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 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * 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 ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)));
}
def code(x, y, z, t, a, b, c, i, j): return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)))
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(i * a)))) + Float64(j * Float64(Float64(c * t) - Float64(i * y)))) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y))); 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[(i * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j) :precision binary64 (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (* j (- (* c t) (* i y)))))
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) - (i * a)))) + (j * ((c * t) - (i * 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 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * 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 ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)));
}
def code(x, y, z, t, a, b, c, i, j): return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)))
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(i * a)))) + Float64(j * Float64(Float64(c * t) - Float64(i * y)))) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y))); 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[(i * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)
\end{array}
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1
(+
(- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a))))
(* j (- (* c t) (* i y))))))
(if (<= t_1 INFINITY) t_1 (fma (* (- b) z) c (* (fma (- j) i (* z x)) y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = fma((-b * z), c, (fma(-j, i, (z * x)) * y));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(i * a)))) + Float64(j * Float64(Float64(c * t) - Float64(i * y)))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = fma(Float64(Float64(-b) * z), c, Float64(fma(Float64(-j), i, 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[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(N[((-b) * z), $MachinePrecision] * c + N[(N[((-j) * i + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\left(-b\right) \cdot z, c, \mathsf{fma}\left(-j, i, 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 i a)))) (*.f64 j (-.f64 (*.f64 c t) (*.f64 i y)))) < +inf.0Initial program 92.2%
if +inf.0 < (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 i a)))) (*.f64 j (-.f64 (*.f64 c t) (*.f64 i y)))) Initial program 0.0%
Taylor expanded in a around 0
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-out--N/A
lower-fma.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
distribute-lft-neg-inN/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6449.0
Applied rewrites49.0%
Taylor expanded in t around 0
Applied rewrites57.9%
(FPCore (x y z t a b c i j) :precision binary64 (if (or (<= a -7.5e+107) (not (<= a 1.35e+101))) (* (fma (- x) t (* i b)) a) (fma (fma (- i) y (* c t)) j (* (fma (- b) c (* 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 ((a <= -7.5e+107) || !(a <= 1.35e+101)) {
tmp = fma(-x, t, (i * b)) * a;
} else {
tmp = fma(fma(-i, y, (c * t)), j, (fma(-b, c, (y * x)) * z));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if ((a <= -7.5e+107) || !(a <= 1.35e+101)) tmp = Float64(fma(Float64(-x), t, Float64(i * b)) * a); else tmp = fma(fma(Float64(-i), y, Float64(c * t)), j, Float64(fma(Float64(-b), c, Float64(y * x)) * z)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[a, -7.5e+107], N[Not[LessEqual[a, 1.35e+101]], $MachinePrecision]], N[(N[((-x) * t + N[(i * b), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], N[(N[((-i) * y + N[(c * t), $MachinePrecision]), $MachinePrecision] * j + N[(N[((-b) * c + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.5 \cdot 10^{+107} \lor \neg \left(a \leq 1.35 \cdot 10^{+101}\right):\\
\;\;\;\;\mathsf{fma}\left(-x, t, i \cdot b\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-i, y, c \cdot t\right), j, \mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\right)\\
\end{array}
\end{array}
if a < -7.4999999999999996e107 or 1.35000000000000003e101 < a Initial program 64.2%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
*-lft-identityN/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6474.5
Applied rewrites74.5%
if -7.4999999999999996e107 < a < 1.35000000000000003e101Initial program 80.9%
Taylor expanded in a around 0
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-out--N/A
lower-fma.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
distribute-lft-neg-inN/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6478.2
Applied rewrites78.2%
Final simplification77.0%
(FPCore (x y z t a b c i j) :precision binary64 (if (or (<= a -3.4e+96) (not (<= a 1.15e+101))) (* (fma (- x) t (* i b)) a) (+ (* (* z x) y) (* j (- (* c t) (* i y))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if ((a <= -3.4e+96) || !(a <= 1.15e+101)) {
tmp = fma(-x, t, (i * b)) * a;
} else {
tmp = ((z * x) * y) + (j * ((c * t) - (i * y)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if ((a <= -3.4e+96) || !(a <= 1.15e+101)) tmp = Float64(fma(Float64(-x), t, Float64(i * b)) * a); else tmp = Float64(Float64(Float64(z * x) * y) + Float64(j * Float64(Float64(c * t) - Float64(i * y)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[a, -3.4e+96], N[Not[LessEqual[a, 1.15e+101]], $MachinePrecision]], N[(N[((-x) * t + N[(i * b), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], N[(N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision] + N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.4 \cdot 10^{+96} \lor \neg \left(a \leq 1.15 \cdot 10^{+101}\right):\\
\;\;\;\;\mathsf{fma}\left(-x, t, i \cdot b\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y + j \cdot \left(c \cdot t - i \cdot y\right)\\
\end{array}
\end{array}
if a < -3.4000000000000001e96 or 1.1500000000000001e101 < a Initial program 65.9%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
*-lft-identityN/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6472.4
Applied rewrites72.4%
if -3.4000000000000001e96 < a < 1.1500000000000001e101Initial program 80.6%
Taylor expanded in y around inf
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6468.1
Applied rewrites68.1%
Final simplification69.7%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= t -4.4e-75)
(* (* t c) j)
(if (<= t -3.8e-133)
(* (* i a) b)
(if (<= t -3e-293)
(* (* (- j) i) y)
(if (<= t 1.4e-76)
(* (* z x) y)
(if (<= t 3.3e+104) (* (* (- z) c) b) (* (* (- t) a) 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-75) {
tmp = (t * c) * j;
} else if (t <= -3.8e-133) {
tmp = (i * a) * b;
} else if (t <= -3e-293) {
tmp = (-j * i) * y;
} else if (t <= 1.4e-76) {
tmp = (z * x) * y;
} else if (t <= 3.3e+104) {
tmp = (-z * c) * b;
} else {
tmp = (-t * a) * 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-75)) then
tmp = (t * c) * j
else if (t <= (-3.8d-133)) then
tmp = (i * a) * b
else if (t <= (-3d-293)) then
tmp = (-j * i) * y
else if (t <= 1.4d-76) then
tmp = (z * x) * y
else if (t <= 3.3d+104) then
tmp = (-z * c) * b
else
tmp = (-t * a) * 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-75) {
tmp = (t * c) * j;
} else if (t <= -3.8e-133) {
tmp = (i * a) * b;
} else if (t <= -3e-293) {
tmp = (-j * i) * y;
} else if (t <= 1.4e-76) {
tmp = (z * x) * y;
} else if (t <= 3.3e+104) {
tmp = (-z * c) * b;
} else {
tmp = (-t * a) * x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if t <= -4.4e-75: tmp = (t * c) * j elif t <= -3.8e-133: tmp = (i * a) * b elif t <= -3e-293: tmp = (-j * i) * y elif t <= 1.4e-76: tmp = (z * x) * y elif t <= 3.3e+104: tmp = (-z * c) * b else: tmp = (-t * a) * x return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (t <= -4.4e-75) tmp = Float64(Float64(t * c) * j); elseif (t <= -3.8e-133) tmp = Float64(Float64(i * a) * b); elseif (t <= -3e-293) tmp = Float64(Float64(Float64(-j) * i) * y); elseif (t <= 1.4e-76) tmp = Float64(Float64(z * x) * y); elseif (t <= 3.3e+104) tmp = Float64(Float64(Float64(-z) * c) * b); else tmp = Float64(Float64(Float64(-t) * a) * 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-75) tmp = (t * c) * j; elseif (t <= -3.8e-133) tmp = (i * a) * b; elseif (t <= -3e-293) tmp = (-j * i) * y; elseif (t <= 1.4e-76) tmp = (z * x) * y; elseif (t <= 3.3e+104) tmp = (-z * c) * b; else tmp = (-t * a) * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[t, -4.4e-75], N[(N[(t * c), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[t, -3.8e-133], N[(N[(i * a), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[t, -3e-293], N[(N[((-j) * i), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t, 1.4e-76], N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t, 3.3e+104], N[(N[((-z) * c), $MachinePrecision] * b), $MachinePrecision], N[(N[((-t) * a), $MachinePrecision] * x), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.4 \cdot 10^{-75}:\\
\;\;\;\;\left(t \cdot c\right) \cdot j\\
\mathbf{elif}\;t \leq -3.8 \cdot 10^{-133}:\\
\;\;\;\;\left(i \cdot a\right) \cdot b\\
\mathbf{elif}\;t \leq -3 \cdot 10^{-293}:\\
\;\;\;\;\left(\left(-j\right) \cdot i\right) \cdot y\\
\mathbf{elif}\;t \leq 1.4 \cdot 10^{-76}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y\\
\mathbf{elif}\;t \leq 3.3 \cdot 10^{+104}:\\
\;\;\;\;\left(\left(-z\right) \cdot c\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;\left(\left(-t\right) \cdot a\right) \cdot x\\
\end{array}
\end{array}
if t < -4.40000000000000011e-75Initial program 73.6%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6458.8
Applied rewrites58.8%
Taylor expanded in x around 0
Applied rewrites43.5%
Applied rewrites49.9%
if -4.40000000000000011e-75 < t < -3.8000000000000003e-133Initial program 74.1%
Taylor expanded in b around inf
*-commutativeN/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-outN/A
*-lft-identityN/A
metadata-evalN/A
distribute-lft-neg-inN/A
mul-1-negN/A
distribute-lft-neg-inN/A
distribute-neg-inN/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
lower-*.f64N/A
Applied rewrites58.8%
Taylor expanded in z around 0
Applied rewrites48.7%
if -3.8000000000000003e-133 < t < -3.0000000000000002e-293Initial program 74.8%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6450.4
Applied rewrites50.4%
Taylor expanded in x around 0
Applied rewrites43.6%
if -3.0000000000000002e-293 < t < 1.40000000000000005e-76Initial program 78.5%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6453.0
Applied rewrites53.0%
Taylor expanded in x around inf
Applied rewrites40.3%
if 1.40000000000000005e-76 < t < 3.29999999999999985e104Initial program 87.1%
Taylor expanded in b around inf
*-commutativeN/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-outN/A
*-lft-identityN/A
metadata-evalN/A
distribute-lft-neg-inN/A
mul-1-negN/A
distribute-lft-neg-inN/A
distribute-neg-inN/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
lower-*.f64N/A
Applied rewrites56.7%
Taylor expanded in z around inf
Applied rewrites40.8%
if 3.29999999999999985e104 < t Initial program 66.9%
Taylor expanded in a around 0
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-out--N/A
lower-fma.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
distribute-lft-neg-inN/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6441.9
Applied rewrites41.9%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6467.0
Applied rewrites67.0%
Taylor expanded in y around 0
Applied rewrites53.9%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= t -4.4e-75)
(* (* t c) j)
(if (<= t -3.8e-133)
(* (* i a) b)
(if (<= t -3e-293)
(* (* (- j) i) y)
(if (<= t 1.4e-76)
(* (* z x) y)
(if (<= t 3.3e+104) (* (* (- z) c) b) (* (* (- x) a) 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 <= -4.4e-75) {
tmp = (t * c) * j;
} else if (t <= -3.8e-133) {
tmp = (i * a) * b;
} else if (t <= -3e-293) {
tmp = (-j * i) * y;
} else if (t <= 1.4e-76) {
tmp = (z * x) * y;
} else if (t <= 3.3e+104) {
tmp = (-z * c) * b;
} else {
tmp = (-x * a) * t;
}
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-75)) then
tmp = (t * c) * j
else if (t <= (-3.8d-133)) then
tmp = (i * a) * b
else if (t <= (-3d-293)) then
tmp = (-j * i) * y
else if (t <= 1.4d-76) then
tmp = (z * x) * y
else if (t <= 3.3d+104) then
tmp = (-z * c) * b
else
tmp = (-x * a) * t
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-75) {
tmp = (t * c) * j;
} else if (t <= -3.8e-133) {
tmp = (i * a) * b;
} else if (t <= -3e-293) {
tmp = (-j * i) * y;
} else if (t <= 1.4e-76) {
tmp = (z * x) * y;
} else if (t <= 3.3e+104) {
tmp = (-z * c) * b;
} else {
tmp = (-x * a) * t;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if t <= -4.4e-75: tmp = (t * c) * j elif t <= -3.8e-133: tmp = (i * a) * b elif t <= -3e-293: tmp = (-j * i) * y elif t <= 1.4e-76: tmp = (z * x) * y elif t <= 3.3e+104: tmp = (-z * c) * b else: tmp = (-x * a) * t return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (t <= -4.4e-75) tmp = Float64(Float64(t * c) * j); elseif (t <= -3.8e-133) tmp = Float64(Float64(i * a) * b); elseif (t <= -3e-293) tmp = Float64(Float64(Float64(-j) * i) * y); elseif (t <= 1.4e-76) tmp = Float64(Float64(z * x) * y); elseif (t <= 3.3e+104) tmp = Float64(Float64(Float64(-z) * c) * b); else tmp = Float64(Float64(Float64(-x) * a) * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (t <= -4.4e-75) tmp = (t * c) * j; elseif (t <= -3.8e-133) tmp = (i * a) * b; elseif (t <= -3e-293) tmp = (-j * i) * y; elseif (t <= 1.4e-76) tmp = (z * x) * y; elseif (t <= 3.3e+104) tmp = (-z * c) * b; else tmp = (-x * a) * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[t, -4.4e-75], N[(N[(t * c), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[t, -3.8e-133], N[(N[(i * a), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[t, -3e-293], N[(N[((-j) * i), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t, 1.4e-76], N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t, 3.3e+104], N[(N[((-z) * c), $MachinePrecision] * b), $MachinePrecision], N[(N[((-x) * a), $MachinePrecision] * t), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.4 \cdot 10^{-75}:\\
\;\;\;\;\left(t \cdot c\right) \cdot j\\
\mathbf{elif}\;t \leq -3.8 \cdot 10^{-133}:\\
\;\;\;\;\left(i \cdot a\right) \cdot b\\
\mathbf{elif}\;t \leq -3 \cdot 10^{-293}:\\
\;\;\;\;\left(\left(-j\right) \cdot i\right) \cdot y\\
\mathbf{elif}\;t \leq 1.4 \cdot 10^{-76}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y\\
\mathbf{elif}\;t \leq 3.3 \cdot 10^{+104}:\\
\;\;\;\;\left(\left(-z\right) \cdot c\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;\left(\left(-x\right) \cdot a\right) \cdot t\\
\end{array}
\end{array}
if t < -4.40000000000000011e-75Initial program 73.6%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6458.8
Applied rewrites58.8%
Taylor expanded in x around 0
Applied rewrites43.5%
Applied rewrites49.9%
if -4.40000000000000011e-75 < t < -3.8000000000000003e-133Initial program 74.1%
Taylor expanded in b around inf
*-commutativeN/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-outN/A
*-lft-identityN/A
metadata-evalN/A
distribute-lft-neg-inN/A
mul-1-negN/A
distribute-lft-neg-inN/A
distribute-neg-inN/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
lower-*.f64N/A
Applied rewrites58.8%
Taylor expanded in z around 0
Applied rewrites48.7%
if -3.8000000000000003e-133 < t < -3.0000000000000002e-293Initial program 74.8%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6450.4
Applied rewrites50.4%
Taylor expanded in x around 0
Applied rewrites43.6%
if -3.0000000000000002e-293 < t < 1.40000000000000005e-76Initial program 78.5%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6453.0
Applied rewrites53.0%
Taylor expanded in x around inf
Applied rewrites40.3%
if 1.40000000000000005e-76 < t < 3.29999999999999985e104Initial program 87.1%
Taylor expanded in b around inf
*-commutativeN/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-outN/A
*-lft-identityN/A
metadata-evalN/A
distribute-lft-neg-inN/A
mul-1-negN/A
distribute-lft-neg-inN/A
distribute-neg-inN/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
lower-*.f64N/A
Applied rewrites56.7%
Taylor expanded in z around inf
Applied rewrites40.8%
if 3.29999999999999985e104 < t Initial program 66.9%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6473.7
Applied rewrites73.7%
Taylor expanded in x around inf
Applied rewrites51.8%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- (* z y) (* a t)) x)))
(if (<= x -7e-8)
t_1
(if (<= x 3e-95)
(* (fma (- i) y (* c t)) j)
(if (<= x 920000000000.0)
(* (fma (- b) c (* y x)) z)
(if (<= x 1.3e+193) (* (fma (- a) x (* j c)) 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 = ((z * y) - (a * t)) * x;
double tmp;
if (x <= -7e-8) {
tmp = t_1;
} else if (x <= 3e-95) {
tmp = fma(-i, y, (c * t)) * j;
} else if (x <= 920000000000.0) {
tmp = fma(-b, c, (y * x)) * z;
} else if (x <= 1.3e+193) {
tmp = fma(-a, x, (j * c)) * t;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(z * y) - Float64(a * t)) * x) tmp = 0.0 if (x <= -7e-8) tmp = t_1; elseif (x <= 3e-95) tmp = Float64(fma(Float64(-i), y, Float64(c * t)) * j); elseif (x <= 920000000000.0) tmp = Float64(fma(Float64(-b), c, Float64(y * x)) * z); elseif (x <= 1.3e+193) tmp = Float64(fma(Float64(-a), x, Float64(j * c)) * 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[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -7e-8], t$95$1, If[LessEqual[x, 3e-95], N[(N[((-i) * y + N[(c * t), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[x, 920000000000.0], N[(N[((-b) * c + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[x, 1.3e+193], N[(N[((-a) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z \cdot y - a \cdot t\right) \cdot x\\
\mathbf{if}\;x \leq -7 \cdot 10^{-8}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 3 \cdot 10^{-95}:\\
\;\;\;\;\mathsf{fma}\left(-i, y, c \cdot t\right) \cdot j\\
\mathbf{elif}\;x \leq 920000000000:\\
\;\;\;\;\mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\
\mathbf{elif}\;x \leq 1.3 \cdot 10^{+193}:\\
\;\;\;\;\mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -7.00000000000000048e-8 or 1.30000000000000007e193 < x Initial program 73.0%
Taylor expanded in a around 0
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-out--N/A
lower-fma.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
distribute-lft-neg-inN/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6455.1
Applied rewrites55.1%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6468.5
Applied rewrites68.5%
if -7.00000000000000048e-8 < x < 3e-95Initial program 75.7%
Taylor expanded in a around 0
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-out--N/A
lower-fma.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
distribute-lft-neg-inN/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6473.9
Applied rewrites73.9%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
associate-*r*N/A
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6453.4
Applied rewrites53.4%
if 3e-95 < x < 9.2e11Initial program 70.7%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
distribute-lft-neg-inN/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6447.8
Applied rewrites47.8%
if 9.2e11 < x < 1.30000000000000007e193Initial program 83.8%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6468.4
Applied rewrites68.4%
(FPCore (x y z t a b c i j) :precision binary64 (if (or (<= a -3.3e+107) (not (<= a 1.9e+101))) (* (fma (- x) t (* i b)) a) (fma (* c t) j (* (fma (- b) c (* 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 ((a <= -3.3e+107) || !(a <= 1.9e+101)) {
tmp = fma(-x, t, (i * b)) * a;
} else {
tmp = fma((c * t), j, (fma(-b, c, (y * x)) * z));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if ((a <= -3.3e+107) || !(a <= 1.9e+101)) tmp = Float64(fma(Float64(-x), t, Float64(i * b)) * a); else tmp = fma(Float64(c * t), j, Float64(fma(Float64(-b), c, Float64(y * x)) * z)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[a, -3.3e+107], N[Not[LessEqual[a, 1.9e+101]], $MachinePrecision]], N[(N[((-x) * t + N[(i * b), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], N[(N[(c * t), $MachinePrecision] * j + N[(N[((-b) * c + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.3 \cdot 10^{+107} \lor \neg \left(a \leq 1.9 \cdot 10^{+101}\right):\\
\;\;\;\;\mathsf{fma}\left(-x, t, i \cdot b\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(c \cdot t, j, \mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\right)\\
\end{array}
\end{array}
if a < -3.30000000000000032e107 or 1.8999999999999999e101 < a Initial program 64.2%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
*-lft-identityN/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6474.5
Applied rewrites74.5%
if -3.30000000000000032e107 < a < 1.8999999999999999e101Initial program 80.9%
Taylor expanded in a around 0
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-out--N/A
lower-fma.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
distribute-lft-neg-inN/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6478.2
Applied rewrites78.2%
Taylor expanded in y around 0
Applied rewrites65.0%
Final simplification68.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- x) t (* i b)) a)))
(if (<= a -1.5e+96)
t_1
(if (<= a 6e-58)
(* (fma (- i) y (* c t)) j)
(if (<= a 1.9e+101) (* (fma (- a) x (* j c)) 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(-x, t, (i * b)) * a;
double tmp;
if (a <= -1.5e+96) {
tmp = t_1;
} else if (a <= 6e-58) {
tmp = fma(-i, y, (c * t)) * j;
} else if (a <= 1.9e+101) {
tmp = fma(-a, x, (j * c)) * t;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-x), t, Float64(i * b)) * a) tmp = 0.0 if (a <= -1.5e+96) tmp = t_1; elseif (a <= 6e-58) tmp = Float64(fma(Float64(-i), y, Float64(c * t)) * j); elseif (a <= 1.9e+101) tmp = Float64(fma(Float64(-a), x, Float64(j * c)) * 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[((-x) * t + N[(i * b), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[a, -1.5e+96], t$95$1, If[LessEqual[a, 6e-58], N[(N[((-i) * y + N[(c * t), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[a, 1.9e+101], N[(N[((-a) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-x, t, i \cdot b\right) \cdot a\\
\mathbf{if}\;a \leq -1.5 \cdot 10^{+96}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 6 \cdot 10^{-58}:\\
\;\;\;\;\mathsf{fma}\left(-i, y, c \cdot t\right) \cdot j\\
\mathbf{elif}\;a \leq 1.9 \cdot 10^{+101}:\\
\;\;\;\;\mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.5e96 or 1.8999999999999999e101 < a Initial program 65.9%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
*-lft-identityN/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6472.4
Applied rewrites72.4%
if -1.5e96 < a < 6.00000000000000015e-58Initial program 79.7%
Taylor expanded in a around 0
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-out--N/A
lower-fma.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
distribute-lft-neg-inN/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6480.9
Applied rewrites80.9%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
associate-*r*N/A
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6458.4
Applied rewrites58.4%
if 6.00000000000000015e-58 < a < 1.8999999999999999e101Initial program 84.5%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6456.7
Applied rewrites56.7%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- a) x (* j c)) t)))
(if (<= t -1.55e-22)
t_1
(if (<= t 1.05e-122)
(* (fma (- j) i (* z x)) y)
(if (<= t 1.8e-18) (* (fma (- b) c (* y x)) z) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-a, x, (j * c)) * t;
double tmp;
if (t <= -1.55e-22) {
tmp = t_1;
} else if (t <= 1.05e-122) {
tmp = fma(-j, i, (z * x)) * y;
} else if (t <= 1.8e-18) {
tmp = fma(-b, c, (y * x)) * z;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-a), x, Float64(j * c)) * t) tmp = 0.0 if (t <= -1.55e-22) tmp = t_1; elseif (t <= 1.05e-122) tmp = Float64(fma(Float64(-j), i, Float64(z * x)) * y); elseif (t <= 1.8e-18) tmp = Float64(fma(Float64(-b), c, Float64(y * x)) * z); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-a) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -1.55e-22], t$95$1, If[LessEqual[t, 1.05e-122], N[(N[((-j) * i + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t, 1.8e-18], N[(N[((-b) * c + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t\\
\mathbf{if}\;t \leq -1.55 \cdot 10^{-22}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{-122}:\\
\;\;\;\;\mathsf{fma}\left(-j, i, z \cdot x\right) \cdot y\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{-18}:\\
\;\;\;\;\mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.55000000000000006e-22 or 1.80000000000000005e-18 < t Initial program 72.2%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6466.7
Applied rewrites66.7%
if -1.55000000000000006e-22 < t < 1.04999999999999996e-122Initial program 81.5%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6457.1
Applied rewrites57.1%
if 1.04999999999999996e-122 < t < 1.80000000000000005e-18Initial program 63.0%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
distribute-lft-neg-inN/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6445.5
Applied rewrites45.5%
(FPCore (x y z t a b c i j) :precision binary64 (if (or (<= z -5e+58) (not (<= z 7.6e+27))) (* (fma (- b) c (* y x)) z) (* (fma (- a) x (* j c)) t)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if ((z <= -5e+58) || !(z <= 7.6e+27)) {
tmp = fma(-b, c, (y * x)) * z;
} else {
tmp = fma(-a, x, (j * c)) * t;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if ((z <= -5e+58) || !(z <= 7.6e+27)) tmp = Float64(fma(Float64(-b), c, Float64(y * x)) * z); else tmp = Float64(fma(Float64(-a), x, Float64(j * c)) * t); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[z, -5e+58], N[Not[LessEqual[z, 7.6e+27]], $MachinePrecision]], N[(N[((-b) * c + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], N[(N[((-a) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{+58} \lor \neg \left(z \leq 7.6 \cdot 10^{+27}\right):\\
\;\;\;\;\mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t\\
\end{array}
\end{array}
if z < -4.99999999999999986e58 or 7.60000000000000043e27 < z Initial program 59.9%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
distribute-lft-neg-inN/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6460.8
Applied rewrites60.8%
if -4.99999999999999986e58 < z < 7.60000000000000043e27Initial program 85.6%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6450.4
Applied rewrites50.4%
Final simplification54.6%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* (- j) i) y)))
(if (<= i -4.4e+104)
t_1
(if (<= i 3.5e+94)
(* (fma (- a) x (* j c)) t)
(if (<= i 4.9e+274) (* (* b a) 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 = (-j * i) * y;
double tmp;
if (i <= -4.4e+104) {
tmp = t_1;
} else if (i <= 3.5e+94) {
tmp = fma(-a, x, (j * c)) * t;
} else if (i <= 4.9e+274) {
tmp = (b * a) * i;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(-j) * i) * y) tmp = 0.0 if (i <= -4.4e+104) tmp = t_1; elseif (i <= 3.5e+94) tmp = Float64(fma(Float64(-a), x, Float64(j * c)) * t); elseif (i <= 4.9e+274) tmp = Float64(Float64(b * a) * i); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-j) * i), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[i, -4.4e+104], t$95$1, If[LessEqual[i, 3.5e+94], N[(N[((-a) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[i, 4.9e+274], N[(N[(b * a), $MachinePrecision] * i), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(-j\right) \cdot i\right) \cdot y\\
\mathbf{if}\;i \leq -4.4 \cdot 10^{+104}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;i \leq 3.5 \cdot 10^{+94}:\\
\;\;\;\;\mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t\\
\mathbf{elif}\;i \leq 4.9 \cdot 10^{+274}:\\
\;\;\;\;\left(b \cdot a\right) \cdot i\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if i < -4.40000000000000001e104 or 4.90000000000000025e274 < i Initial program 68.5%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6459.1
Applied rewrites59.1%
Taylor expanded in x around 0
Applied rewrites57.1%
if -4.40000000000000001e104 < i < 3.4999999999999997e94Initial program 78.3%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6453.1
Applied rewrites53.1%
if 3.4999999999999997e94 < i < 4.90000000000000025e274Initial program 72.1%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
*-lft-identityN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6464.5
Applied rewrites64.5%
Taylor expanded in y around 0
Applied rewrites51.4%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* (- j) i) y)))
(if (<= i -9e+105)
t_1
(if (<= i 2.3e+141)
(* (- (* z y) (* a t)) x)
(if (<= i 8e+274) (* (* i b) 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 = (-j * i) * y;
double tmp;
if (i <= -9e+105) {
tmp = t_1;
} else if (i <= 2.3e+141) {
tmp = ((z * y) - (a * t)) * x;
} else if (i <= 8e+274) {
tmp = (i * b) * 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 = (-j * i) * y
if (i <= (-9d+105)) then
tmp = t_1
else if (i <= 2.3d+141) then
tmp = ((z * y) - (a * t)) * x
else if (i <= 8d+274) then
tmp = (i * b) * 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 = (-j * i) * y;
double tmp;
if (i <= -9e+105) {
tmp = t_1;
} else if (i <= 2.3e+141) {
tmp = ((z * y) - (a * t)) * x;
} else if (i <= 8e+274) {
tmp = (i * b) * a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (-j * i) * y tmp = 0 if i <= -9e+105: tmp = t_1 elif i <= 2.3e+141: tmp = ((z * y) - (a * t)) * x elif i <= 8e+274: tmp = (i * b) * a else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(-j) * i) * y) tmp = 0.0 if (i <= -9e+105) tmp = t_1; elseif (i <= 2.3e+141) tmp = Float64(Float64(Float64(z * y) - Float64(a * t)) * x); elseif (i <= 8e+274) tmp = Float64(Float64(i * b) * a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (-j * i) * y; tmp = 0.0; if (i <= -9e+105) tmp = t_1; elseif (i <= 2.3e+141) tmp = ((z * y) - (a * t)) * x; elseif (i <= 8e+274) tmp = (i * b) * 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[((-j) * i), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[i, -9e+105], t$95$1, If[LessEqual[i, 2.3e+141], N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[i, 8e+274], N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(-j\right) \cdot i\right) \cdot y\\
\mathbf{if}\;i \leq -9 \cdot 10^{+105}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;i \leq 2.3 \cdot 10^{+141}:\\
\;\;\;\;\left(z \cdot y - a \cdot t\right) \cdot x\\
\mathbf{elif}\;i \leq 8 \cdot 10^{+274}:\\
\;\;\;\;\left(i \cdot b\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if i < -9.0000000000000002e105 or 7.99999999999999937e274 < i Initial program 67.9%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6460.3
Applied rewrites60.3%
Taylor expanded in x around 0
Applied rewrites58.3%
if -9.0000000000000002e105 < i < 2.3000000000000002e141Initial program 78.7%
Taylor expanded in a around 0
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-out--N/A
lower-fma.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
distribute-lft-neg-inN/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6467.1
Applied rewrites67.1%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6444.5
Applied rewrites44.5%
if 2.3000000000000002e141 < i < 7.99999999999999937e274Initial program 68.6%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
*-lft-identityN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6467.3
Applied rewrites67.3%
Taylor expanded in y around 0
Applied rewrites58.0%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= a -6.6e+88)
(* (* i b) a)
(if (<= a -1.2e+24)
(* (* z x) y)
(if (<= a 2.9e+113) (* (* t c) j) (* (* i a) b)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (a <= -6.6e+88) {
tmp = (i * b) * a;
} else if (a <= -1.2e+24) {
tmp = (z * x) * y;
} else if (a <= 2.9e+113) {
tmp = (t * c) * j;
} else {
tmp = (i * a) * b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (a <= (-6.6d+88)) then
tmp = (i * b) * a
else if (a <= (-1.2d+24)) then
tmp = (z * x) * y
else if (a <= 2.9d+113) then
tmp = (t * c) * j
else
tmp = (i * a) * b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (a <= -6.6e+88) {
tmp = (i * b) * a;
} else if (a <= -1.2e+24) {
tmp = (z * x) * y;
} else if (a <= 2.9e+113) {
tmp = (t * c) * j;
} else {
tmp = (i * a) * b;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if a <= -6.6e+88: tmp = (i * b) * a elif a <= -1.2e+24: tmp = (z * x) * y elif a <= 2.9e+113: tmp = (t * c) * j else: tmp = (i * a) * b return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (a <= -6.6e+88) tmp = Float64(Float64(i * b) * a); elseif (a <= -1.2e+24) tmp = Float64(Float64(z * x) * y); elseif (a <= 2.9e+113) tmp = Float64(Float64(t * c) * j); else tmp = Float64(Float64(i * a) * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (a <= -6.6e+88) tmp = (i * b) * a; elseif (a <= -1.2e+24) tmp = (z * x) * y; elseif (a <= 2.9e+113) tmp = (t * c) * j; else tmp = (i * a) * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[a, -6.6e+88], N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[a, -1.2e+24], N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[a, 2.9e+113], N[(N[(t * c), $MachinePrecision] * j), $MachinePrecision], N[(N[(i * a), $MachinePrecision] * b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.6 \cdot 10^{+88}:\\
\;\;\;\;\left(i \cdot b\right) \cdot a\\
\mathbf{elif}\;a \leq -1.2 \cdot 10^{+24}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y\\
\mathbf{elif}\;a \leq 2.9 \cdot 10^{+113}:\\
\;\;\;\;\left(t \cdot c\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;\left(i \cdot a\right) \cdot b\\
\end{array}
\end{array}
if a < -6.6000000000000006e88Initial program 63.3%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
*-lft-identityN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6459.4
Applied rewrites59.4%
Taylor expanded in y around 0
Applied rewrites48.2%
if -6.6000000000000006e88 < a < -1.2e24Initial program 77.3%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6463.0
Applied rewrites63.0%
Taylor expanded in x around inf
Applied rewrites54.7%
if -1.2e24 < a < 2.89999999999999984e113Initial program 81.8%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6444.1
Applied rewrites44.1%
Taylor expanded in x around 0
Applied rewrites34.1%
Applied rewrites37.4%
if 2.89999999999999984e113 < a Initial program 64.7%
Taylor expanded in b around inf
*-commutativeN/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-outN/A
*-lft-identityN/A
metadata-evalN/A
distribute-lft-neg-inN/A
mul-1-negN/A
distribute-lft-neg-inN/A
distribute-neg-inN/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
lower-*.f64N/A
Applied rewrites61.1%
Taylor expanded in z around 0
Applied rewrites52.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* i b) a)))
(if (<= a -6.6e+88)
t_1
(if (<= a -1.2e+24)
(* (* z x) y)
(if (<= a 2.9e+113) (* (* t c) j) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (i * b) * a;
double tmp;
if (a <= -6.6e+88) {
tmp = t_1;
} else if (a <= -1.2e+24) {
tmp = (z * x) * y;
} else if (a <= 2.9e+113) {
tmp = (t * c) * j;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = (i * b) * a
if (a <= (-6.6d+88)) then
tmp = t_1
else if (a <= (-1.2d+24)) then
tmp = (z * x) * y
else if (a <= 2.9d+113) then
tmp = (t * c) * j
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (i * b) * a;
double tmp;
if (a <= -6.6e+88) {
tmp = t_1;
} else if (a <= -1.2e+24) {
tmp = (z * x) * y;
} else if (a <= 2.9e+113) {
tmp = (t * c) * j;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (i * b) * a tmp = 0 if a <= -6.6e+88: tmp = t_1 elif a <= -1.2e+24: tmp = (z * x) * y elif a <= 2.9e+113: tmp = (t * c) * j else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(i * b) * a) tmp = 0.0 if (a <= -6.6e+88) tmp = t_1; elseif (a <= -1.2e+24) tmp = Float64(Float64(z * x) * y); elseif (a <= 2.9e+113) tmp = Float64(Float64(t * c) * j); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (i * b) * a; tmp = 0.0; if (a <= -6.6e+88) tmp = t_1; elseif (a <= -1.2e+24) tmp = (z * x) * y; elseif (a <= 2.9e+113) tmp = (t * c) * j; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[a, -6.6e+88], t$95$1, If[LessEqual[a, -1.2e+24], N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[a, 2.9e+113], N[(N[(t * c), $MachinePrecision] * j), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(i \cdot b\right) \cdot a\\
\mathbf{if}\;a \leq -6.6 \cdot 10^{+88}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -1.2 \cdot 10^{+24}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y\\
\mathbf{elif}\;a \leq 2.9 \cdot 10^{+113}:\\
\;\;\;\;\left(t \cdot c\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -6.6000000000000006e88 or 2.89999999999999984e113 < a Initial program 64.1%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
*-lft-identityN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6458.1
Applied rewrites58.1%
Taylor expanded in y around 0
Applied rewrites49.6%
if -6.6000000000000006e88 < a < -1.2e24Initial program 77.3%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6463.0
Applied rewrites63.0%
Taylor expanded in x around inf
Applied rewrites54.7%
if -1.2e24 < a < 2.89999999999999984e113Initial program 81.8%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6444.1
Applied rewrites44.1%
Taylor expanded in x around 0
Applied rewrites34.1%
Applied rewrites37.4%
(FPCore (x y z t a b c i j) :precision binary64 (if (or (<= a -6.1e+88) (not (<= a 2.9e+113))) (* (* i b) a) (* (* t c) j)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if ((a <= -6.1e+88) || !(a <= 2.9e+113)) {
tmp = (i * b) * a;
} else {
tmp = (t * c) * 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 ((a <= (-6.1d+88)) .or. (.not. (a <= 2.9d+113))) then
tmp = (i * b) * a
else
tmp = (t * c) * 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 ((a <= -6.1e+88) || !(a <= 2.9e+113)) {
tmp = (i * b) * a;
} else {
tmp = (t * c) * j;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if (a <= -6.1e+88) or not (a <= 2.9e+113): tmp = (i * b) * a else: tmp = (t * c) * j return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if ((a <= -6.1e+88) || !(a <= 2.9e+113)) tmp = Float64(Float64(i * b) * a); else tmp = Float64(Float64(t * c) * j); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if ((a <= -6.1e+88) || ~((a <= 2.9e+113))) tmp = (i * b) * a; else tmp = (t * c) * j; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[a, -6.1e+88], N[Not[LessEqual[a, 2.9e+113]], $MachinePrecision]], N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision], N[(N[(t * c), $MachinePrecision] * j), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.1 \cdot 10^{+88} \lor \neg \left(a \leq 2.9 \cdot 10^{+113}\right):\\
\;\;\;\;\left(i \cdot b\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;\left(t \cdot c\right) \cdot j\\
\end{array}
\end{array}
if a < -6.0999999999999998e88 or 2.89999999999999984e113 < a Initial program 64.1%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
*-lft-identityN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6458.1
Applied rewrites58.1%
Taylor expanded in y around 0
Applied rewrites49.6%
if -6.0999999999999998e88 < a < 2.89999999999999984e113Initial program 81.5%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6442.5
Applied rewrites42.5%
Taylor expanded in x around 0
Applied rewrites32.7%
Applied rewrites36.3%
Final simplification41.0%
(FPCore (x y z t a b c i j) :precision binary64 (* (* t c) j))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return (t * c) * j;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = (t * c) * j
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return (t * c) * j;
}
def code(x, y, z, t, a, b, c, i, j): return (t * c) * j
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(t * c) * j) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = (t * c) * j; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(t * c), $MachinePrecision] * j), $MachinePrecision]
\begin{array}{l}
\\
\left(t \cdot c\right) \cdot j
\end{array}
Initial program 75.3%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6443.4
Applied rewrites43.4%
Taylor expanded in x around 0
Applied rewrites25.7%
Applied rewrites28.0%
(FPCore (x y z t a b c i j) :precision binary64 (* (* j t) c))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return (j * t) * 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 * t) * 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 * t) * c;
}
def code(x, y, z, t, a, b, c, i, j): return (j * t) * c
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(j * t) * c) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = (j * t) * c; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision]
\begin{array}{l}
\\
\left(j \cdot t\right) \cdot c
\end{array}
Initial program 75.3%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6443.4
Applied rewrites43.4%
Taylor expanded in x around 0
Applied rewrites25.7%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1
(+
(- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a))))
(/
(* j (- (pow (* c t) 2.0) (pow (* i y) 2.0)))
(+ (* c t) (* i y)))))
(t_2
(-
(* x (- (* z y) (* a t)))
(- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j)))))
(if (< t -8.120978919195912e-33)
t_2
(if (< t -4.712553818218485e-169)
t_1
(if (< t -7.633533346031584e-308)
t_2
(if (< t 1.0535888557455487e-139) 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 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (pow((c * t), 2.0) - pow((i * y), 2.0))) / ((c * t) + (i * y)));
double t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j));
double tmp;
if (t < -8.120978919195912e-33) {
tmp = t_2;
} else if (t < -4.712553818218485e-169) {
tmp = t_1;
} else if (t < -7.633533346031584e-308) {
tmp = t_2;
} else if (t < 1.0535888557455487e-139) {
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 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (((c * t) ** 2.0d0) - ((i * y) ** 2.0d0))) / ((c * t) + (i * y)))
t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j))
if (t < (-8.120978919195912d-33)) then
tmp = t_2
else if (t < (-4.712553818218485d-169)) then
tmp = t_1
else if (t < (-7.633533346031584d-308)) then
tmp = t_2
else if (t < 1.0535888557455487d-139) 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 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (Math.pow((c * t), 2.0) - Math.pow((i * y), 2.0))) / ((c * t) + (i * y)));
double t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j));
double tmp;
if (t < -8.120978919195912e-33) {
tmp = t_2;
} else if (t < -4.712553818218485e-169) {
tmp = t_1;
} else if (t < -7.633533346031584e-308) {
tmp = t_2;
} else if (t < 1.0535888557455487e-139) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (math.pow((c * t), 2.0) - math.pow((i * y), 2.0))) / ((c * t) + (i * y))) t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j)) tmp = 0 if t < -8.120978919195912e-33: tmp = t_2 elif t < -4.712553818218485e-169: tmp = t_1 elif t < -7.633533346031584e-308: tmp = t_2 elif t < 1.0535888557455487e-139: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(i * a)))) + Float64(Float64(j * Float64((Float64(c * t) ^ 2.0) - (Float64(i * y) ^ 2.0))) / Float64(Float64(c * t) + Float64(i * y)))) t_2 = Float64(Float64(x * Float64(Float64(z * y) - Float64(a * t))) - Float64(Float64(b * Float64(Float64(z * c) - Float64(a * i))) - Float64(Float64(Float64(c * t) - Float64(y * i)) * j))) tmp = 0.0 if (t < -8.120978919195912e-33) tmp = t_2; elseif (t < -4.712553818218485e-169) tmp = t_1; elseif (t < -7.633533346031584e-308) tmp = t_2; elseif (t < 1.0535888557455487e-139) 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 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (((c * t) ^ 2.0) - ((i * y) ^ 2.0))) / ((c * t) + (i * y))); t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j)); tmp = 0.0; if (t < -8.120978919195912e-33) tmp = t_2; elseif (t < -4.712553818218485e-169) tmp = t_1; elseif (t < -7.633533346031584e-308) tmp = t_2; elseif (t < 1.0535888557455487e-139) 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[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(j * N[(N[Power[N[(c * t), $MachinePrecision], 2.0], $MachinePrecision] - N[Power[N[(i * y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(c * t), $MachinePrecision] + N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(b * N[(N[(z * c), $MachinePrecision] - N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(c * t), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -8.120978919195912e-33], t$95$2, If[Less[t, -4.712553818218485e-169], t$95$1, If[Less[t, -7.633533346031584e-308], t$95$2, If[Less[t, 1.0535888557455487e-139], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + \frac{j \cdot \left({\left(c \cdot t\right)}^{2} - {\left(i \cdot y\right)}^{2}\right)}{c \cdot t + i \cdot y}\\
t_2 := x \cdot \left(z \cdot y - a \cdot t\right) - \left(b \cdot \left(z \cdot c - a \cdot i\right) - \left(c \cdot t - y \cdot i\right) \cdot j\right)\\
\mathbf{if}\;t < -8.120978919195912 \cdot 10^{-33}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t < -4.712553818218485 \cdot 10^{-169}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t < -7.633533346031584 \cdot 10^{-308}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t < 1.0535888557455487 \cdot 10^{-139}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
herbie shell --seed 2024339
(FPCore (x y z t a b c i j)
:name "Linear.Matrix:det33 from linear-1.19.1.3"
:precision binary64
:alt
(! :herbie-platform default (if (< t -1015122364899489/125000000000000000000000000000000000000000000000) (- (* x (- (* z y) (* a t))) (- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j))) (if (< t -942510763643697/2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (/ (* j (- (pow (* c t) 2) (pow (* i y) 2))) (+ (* c t) (* i y)))) (if (< t -238547917063487/3125000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (* x (- (* z y) (* a t))) (- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j))) (if (< t 10535888557455487/100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (/ (* j (- (pow (* c t) 2) (pow (* i y) 2))) (+ (* c t) (* i y)))) (- (* x (- (* z y) (* a t))) (- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j))))))))
(+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (* j (- (* c t) (* i y)))))