
(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 19 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 (* (fma (- a) t (* z y)) x)))
(if (<=
(-
(* (- (* c t) (* i y)) j)
(- (* (- (* a t) (* z y)) x) (* (- (* i a) (* c z)) b)))
INFINITY)
(fma (fma (- y) i (* c t)) j (fma (- b) (fma (- a) i (* c z)) t_1))
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 (((((c * t) - (i * y)) * j) - ((((a * t) - (z * y)) * x) - (((i * a) - (c * z)) * b))) <= ((double) INFINITY)) {
tmp = fma(fma(-y, i, (c * t)), j, fma(-b, fma(-a, i, (c * z)), t_1));
} 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 (Float64(Float64(Float64(Float64(c * t) - Float64(i * y)) * j) - Float64(Float64(Float64(Float64(a * t) - Float64(z * y)) * x) - Float64(Float64(Float64(i * a) - Float64(c * z)) * b))) <= Inf) tmp = fma(fma(Float64(-y), i, Float64(c * t)), j, fma(Float64(-b), fma(Float64(-a), i, Float64(c * z)), t_1)); 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[N[(N[(N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision] - N[(N[(N[(N[(a * t), $MachinePrecision] - N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] - N[(N[(N[(i * a), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[((-y) * i + N[(c * t), $MachinePrecision]), $MachinePrecision] * j + N[((-b) * N[((-a) * i + N[(c * z), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $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}\;\left(c \cdot t - i \cdot y\right) \cdot j - \left(\left(a \cdot t - z \cdot y\right) \cdot x - \left(i \cdot a - c \cdot z\right) \cdot b\right) \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-y, i, c \cdot t\right), j, \mathsf{fma}\left(-b, \mathsf{fma}\left(-a, i, c \cdot z\right), t\_1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\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 91.2%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6491.2
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f6491.2
lift--.f64N/A
sub-negN/A
+-commutativeN/A
Applied rewrites91.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 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-*.f6463.0
Applied rewrites63.0%
Final simplification85.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- a) t (* z y)) x)) (t_2 (* (fma (- b) c (* y x)) z)))
(if (<= z -2.4e+162)
t_2
(if (<= z -5.2e-96)
t_1
(if (<= z -3.2e-218)
(* (* (- i) j) y)
(if (<= z 4.1e-271)
(* (* i b) a)
(if (<= z 5.2e-121)
t_1
(if (<= z 1.1e-22) (* (* (- i) y) j) t_2))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-a, t, (z * y)) * x;
double t_2 = fma(-b, c, (y * x)) * z;
double tmp;
if (z <= -2.4e+162) {
tmp = t_2;
} else if (z <= -5.2e-96) {
tmp = t_1;
} else if (z <= -3.2e-218) {
tmp = (-i * j) * y;
} else if (z <= 4.1e-271) {
tmp = (i * b) * a;
} else if (z <= 5.2e-121) {
tmp = t_1;
} else if (z <= 1.1e-22) {
tmp = (-i * y) * j;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-a), t, Float64(z * y)) * x) t_2 = Float64(fma(Float64(-b), c, Float64(y * x)) * z) tmp = 0.0 if (z <= -2.4e+162) tmp = t_2; elseif (z <= -5.2e-96) tmp = t_1; elseif (z <= -3.2e-218) tmp = Float64(Float64(Float64(-i) * j) * y); elseif (z <= 4.1e-271) tmp = Float64(Float64(i * b) * a); elseif (z <= 5.2e-121) tmp = t_1; elseif (z <= 1.1e-22) tmp = Float64(Float64(Float64(-i) * y) * j); else tmp = t_2; 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]}, Block[{t$95$2 = N[(N[((-b) * c + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -2.4e+162], t$95$2, If[LessEqual[z, -5.2e-96], t$95$1, If[LessEqual[z, -3.2e-218], N[(N[((-i) * j), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[z, 4.1e-271], N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[z, 5.2e-121], t$95$1, If[LessEqual[z, 1.1e-22], N[(N[((-i) * y), $MachinePrecision] * j), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\
t_2 := \mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\
\mathbf{if}\;z \leq -2.4 \cdot 10^{+162}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -5.2 \cdot 10^{-96}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3.2 \cdot 10^{-218}:\\
\;\;\;\;\left(\left(-i\right) \cdot j\right) \cdot y\\
\mathbf{elif}\;z \leq 4.1 \cdot 10^{-271}:\\
\;\;\;\;\left(i \cdot b\right) \cdot a\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-121}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{-22}:\\
\;\;\;\;\left(\left(-i\right) \cdot y\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -2.40000000000000009e162 or 1.1e-22 < z Initial program 66.2%
Taylor expanded in z 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-*.f6465.5
Applied rewrites65.5%
if -2.40000000000000009e162 < z < -5.2000000000000003e-96 or 4.1000000000000003e-271 < z < 5.19999999999999972e-121Initial program 77.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%
if -5.2000000000000003e-96 < z < -3.2000000000000001e-218Initial program 79.6%
Taylor expanded in i 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
*-commutativeN/A
lower-*.f6466.2
Applied rewrites66.2%
Taylor expanded in b around 0
Applied rewrites52.9%
if -3.2000000000000001e-218 < z < 4.1000000000000003e-271Initial program 80.1%
Taylor expanded in i 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
*-commutativeN/A
lower-*.f6456.6
Applied rewrites56.6%
Taylor expanded in b around inf
Applied rewrites51.2%
if 5.19999999999999972e-121 < z < 1.1e-22Initial program 84.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
lower-*.f6473.8
Applied rewrites73.8%
Taylor expanded in c around 0
Applied rewrites51.7%
Final simplification56.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- j) i (* z x)) y)))
(if (<= y -4.4e+33)
t_1
(if (<= y 1.25e+197)
(fma (fma (- x) t (* i b)) a (* (fma (- i) y (* c t)) 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(-j, i, (z * x)) * y;
double tmp;
if (y <= -4.4e+33) {
tmp = t_1;
} else if (y <= 1.25e+197) {
tmp = fma(fma(-x, t, (i * b)), a, (fma(-i, y, (c * t)) * j));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-j), i, Float64(z * x)) * y) tmp = 0.0 if (y <= -4.4e+33) tmp = t_1; elseif (y <= 1.25e+197) tmp = fma(fma(Float64(-x), t, Float64(i * b)), a, Float64(fma(Float64(-i), y, Float64(c * t)) * 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[((-j) * i + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -4.4e+33], t$95$1, If[LessEqual[y, 1.25e+197], N[(N[((-x) * t + N[(i * b), $MachinePrecision]), $MachinePrecision] * a + N[(N[((-i) * y + N[(c * t), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-j, i, z \cdot x\right) \cdot y\\
\mathbf{if}\;y \leq -4.4 \cdot 10^{+33}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.25 \cdot 10^{+197}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-x, t, i \cdot b\right), a, \mathsf{fma}\left(-i, y, c \cdot t\right) \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4.39999999999999988e33 or 1.25000000000000002e197 < y Initial program 56.7%
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-*.f6476.9
Applied rewrites76.9%
if -4.39999999999999988e33 < y < 1.25000000000000002e197Initial program 83.1%
Taylor expanded in z around 0
associate-*r*N/A
mul-1-negN/A
cancel-sign-subN/A
+-commutativeN/A
associate-+l+N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
distribute-lft-inN/A
*-lft-identityN/A
metadata-evalN/A
cancel-sign-sub-invN/A
+-commutativeN/A
Applied rewrites66.8%
Final simplification70.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (fma (fma (- y) i (* c t)) j (* (* (- c) z) b))))
(if (<= j -8.8e-83)
t_1
(if (<= j 1.95e-44) (* (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(fma(-y, i, (c * t)), j, ((-c * z) * b));
double tmp;
if (j <= -8.8e-83) {
tmp = t_1;
} else if (j <= 1.95e-44) {
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 = fma(fma(Float64(-y), i, Float64(c * t)), j, Float64(Float64(Float64(-c) * z) * b)) tmp = 0.0 if (j <= -8.8e-83) tmp = t_1; elseif (j <= 1.95e-44) 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[((-y) * i + N[(c * t), $MachinePrecision]), $MachinePrecision] * j + N[(N[((-c) * z), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -8.8e-83], t$95$1, If[LessEqual[j, 1.95e-44], 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(\mathsf{fma}\left(-y, i, c \cdot t\right), j, \left(\left(-c\right) \cdot z\right) \cdot b\right)\\
\mathbf{if}\;j \leq -8.8 \cdot 10^{-83}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 1.95 \cdot 10^{-44}:\\
\;\;\;\;\mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if j < -8.8000000000000003e-83 or 1.9500000000000001e-44 < j Initial program 76.5%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6479.3
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f6480.0
lift--.f64N/A
sub-negN/A
+-commutativeN/A
Applied rewrites80.7%
Taylor expanded in c around inf
mul-1-negN/A
associate-*r*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6469.8
Applied rewrites69.8%
Applied rewrites71.3%
if -8.8000000000000003e-83 < j < 1.9500000000000001e-44Initial program 71.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-*.f6459.0
Applied rewrites59.0%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (fma (fma (- y) i (* c t)) j (* (* (- c) b) z))))
(if (<= j -9.8e-83)
t_1
(if (<= j 1.15e-44) (* (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(fma(-y, i, (c * t)), j, ((-c * b) * z));
double tmp;
if (j <= -9.8e-83) {
tmp = t_1;
} else if (j <= 1.15e-44) {
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 = fma(fma(Float64(-y), i, Float64(c * t)), j, Float64(Float64(Float64(-c) * b) * z)) tmp = 0.0 if (j <= -9.8e-83) tmp = t_1; elseif (j <= 1.15e-44) 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[((-y) * i + N[(c * t), $MachinePrecision]), $MachinePrecision] * j + N[(N[((-c) * b), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -9.8e-83], t$95$1, If[LessEqual[j, 1.15e-44], 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(\mathsf{fma}\left(-y, i, c \cdot t\right), j, \left(\left(-c\right) \cdot b\right) \cdot z\right)\\
\mathbf{if}\;j \leq -9.8 \cdot 10^{-83}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 1.15 \cdot 10^{-44}:\\
\;\;\;\;\mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if j < -9.8e-83 or 1.14999999999999999e-44 < j Initial program 76.5%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6479.3
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f6480.0
lift--.f64N/A
sub-negN/A
+-commutativeN/A
Applied rewrites80.7%
Taylor expanded in c around inf
mul-1-negN/A
associate-*r*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6469.8
Applied rewrites69.8%
if -9.8e-83 < j < 1.14999999999999999e-44Initial program 71.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-*.f6459.0
Applied rewrites59.0%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- j) i (* z x)) y)))
(if (<= y -6.4e+19)
t_1
(if (<= y -3.9e-54)
(* (fma (- i) y (* c t)) j)
(if (<= y 3.1e-228)
(* (fma (- x) t (* i b)) a)
(if (<= y 4.25e-41) (* (fma (- b) z (* j t)) c) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-j, i, (z * x)) * y;
double tmp;
if (y <= -6.4e+19) {
tmp = t_1;
} else if (y <= -3.9e-54) {
tmp = fma(-i, y, (c * t)) * j;
} else if (y <= 3.1e-228) {
tmp = fma(-x, t, (i * b)) * a;
} else if (y <= 4.25e-41) {
tmp = fma(-b, z, (j * t)) * c;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-j), i, Float64(z * x)) * y) tmp = 0.0 if (y <= -6.4e+19) tmp = t_1; elseif (y <= -3.9e-54) tmp = Float64(fma(Float64(-i), y, Float64(c * t)) * j); elseif (y <= 3.1e-228) tmp = Float64(fma(Float64(-x), t, Float64(i * b)) * a); elseif (y <= 4.25e-41) tmp = Float64(fma(Float64(-b), z, Float64(j * t)) * c); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-j) * i + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -6.4e+19], t$95$1, If[LessEqual[y, -3.9e-54], N[(N[((-i) * y + N[(c * t), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[y, 3.1e-228], N[(N[((-x) * t + N[(i * b), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[y, 4.25e-41], N[(N[((-b) * z + N[(j * t), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-j, i, z \cdot x\right) \cdot y\\
\mathbf{if}\;y \leq -6.4 \cdot 10^{+19}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -3.9 \cdot 10^{-54}:\\
\;\;\;\;\mathsf{fma}\left(-i, y, c \cdot t\right) \cdot j\\
\mathbf{elif}\;y \leq 3.1 \cdot 10^{-228}:\\
\;\;\;\;\mathsf{fma}\left(-x, t, i \cdot b\right) \cdot a\\
\mathbf{elif}\;y \leq 4.25 \cdot 10^{-41}:\\
\;\;\;\;\mathsf{fma}\left(-b, z, j \cdot t\right) \cdot c\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -6.4e19 or 4.2499999999999998e-41 < y Initial program 67.2%
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-*.f6467.7
Applied rewrites67.7%
if -6.4e19 < y < -3.9e-54Initial program 77.3%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
lower-*.f6465.6
Applied rewrites65.6%
if -3.9e-54 < y < 3.0999999999999998e-228Initial program 83.8%
Taylor expanded in a 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-*.f6462.8
Applied rewrites62.8%
if 3.0999999999999998e-228 < y < 4.2499999999999998e-41Initial program 81.3%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6454.5
Applied rewrites54.5%
Final simplification64.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- a) t (* z y)) x)))
(if (<= x -1.5e-43)
t_1
(if (<= x 1.1e-109)
(* (fma (- c) z (* i a)) b)
(if (<= x 3.9e+78) (* (fma (- b) z (* j t)) c) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-a, t, (z * y)) * x;
double tmp;
if (x <= -1.5e-43) {
tmp = t_1;
} else if (x <= 1.1e-109) {
tmp = fma(-c, z, (i * a)) * b;
} else if (x <= 3.9e+78) {
tmp = fma(-b, z, (j * t)) * c;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-a), t, Float64(z * y)) * x) tmp = 0.0 if (x <= -1.5e-43) tmp = t_1; elseif (x <= 1.1e-109) tmp = Float64(fma(Float64(-c), z, Float64(i * a)) * b); elseif (x <= 3.9e+78) tmp = Float64(fma(Float64(-b), z, Float64(j * t)) * c); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -1.5e-43], t$95$1, If[LessEqual[x, 1.1e-109], N[(N[((-c) * z + N[(i * a), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[x, 3.9e+78], N[(N[((-b) * z + N[(j * t), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\
\mathbf{if}\;x \leq -1.5 \cdot 10^{-43}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.1 \cdot 10^{-109}:\\
\;\;\;\;\mathsf{fma}\left(-c, z, i \cdot a\right) \cdot b\\
\mathbf{elif}\;x \leq 3.9 \cdot 10^{+78}:\\
\;\;\;\;\mathsf{fma}\left(-b, z, j \cdot t\right) \cdot c\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.50000000000000002e-43 or 3.9000000000000004e78 < x Initial program 68.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-*.f6462.4
Applied rewrites62.4%
if -1.50000000000000002e-43 < x < 1.1e-109Initial program 81.2%
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
remove-double-negN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
lower-*.f6450.7
Applied rewrites50.7%
if 1.1e-109 < x < 3.9000000000000004e78Initial program 75.2%
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
*-commutativeN/A
lower-*.f6447.5
Applied rewrites47.5%
Final simplification56.0%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= y -0.075)
(* (* z x) y)
(if (<= y -1.45e-48)
(* (* c t) j)
(if (<= y 2.25e-242)
(* (* i b) a)
(if (<= y 1.55e-17) (* (* j c) 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 tmp;
if (y <= -0.075) {
tmp = (z * x) * y;
} else if (y <= -1.45e-48) {
tmp = (c * t) * j;
} else if (y <= 2.25e-242) {
tmp = (i * b) * a;
} else if (y <= 1.55e-17) {
tmp = (j * c) * t;
} else {
tmp = (z * y) * 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 (y <= (-0.075d0)) then
tmp = (z * x) * y
else if (y <= (-1.45d-48)) then
tmp = (c * t) * j
else if (y <= 2.25d-242) then
tmp = (i * b) * a
else if (y <= 1.55d-17) then
tmp = (j * c) * t
else
tmp = (z * y) * 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 (y <= -0.075) {
tmp = (z * x) * y;
} else if (y <= -1.45e-48) {
tmp = (c * t) * j;
} else if (y <= 2.25e-242) {
tmp = (i * b) * a;
} else if (y <= 1.55e-17) {
tmp = (j * c) * t;
} else {
tmp = (z * y) * x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if y <= -0.075: tmp = (z * x) * y elif y <= -1.45e-48: tmp = (c * t) * j elif y <= 2.25e-242: tmp = (i * b) * a elif y <= 1.55e-17: tmp = (j * c) * t else: tmp = (z * y) * x return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (y <= -0.075) tmp = Float64(Float64(z * x) * y); elseif (y <= -1.45e-48) tmp = Float64(Float64(c * t) * j); elseif (y <= 2.25e-242) tmp = Float64(Float64(i * b) * a); elseif (y <= 1.55e-17) tmp = Float64(Float64(j * c) * t); else tmp = Float64(Float64(z * y) * x); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (y <= -0.075) tmp = (z * x) * y; elseif (y <= -1.45e-48) tmp = (c * t) * j; elseif (y <= 2.25e-242) tmp = (i * b) * a; elseif (y <= 1.55e-17) tmp = (j * c) * t; else tmp = (z * y) * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[y, -0.075], N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[y, -1.45e-48], N[(N[(c * t), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[y, 2.25e-242], N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[y, 1.55e-17], N[(N[(j * c), $MachinePrecision] * t), $MachinePrecision], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.075:\\
\;\;\;\;\left(z \cdot x\right) \cdot y\\
\mathbf{elif}\;y \leq -1.45 \cdot 10^{-48}:\\
\;\;\;\;\left(c \cdot t\right) \cdot j\\
\mathbf{elif}\;y \leq 2.25 \cdot 10^{-242}:\\
\;\;\;\;\left(i \cdot b\right) \cdot a\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{-17}:\\
\;\;\;\;\left(j \cdot c\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\
\end{array}
\end{array}
if y < -0.0749999999999999972Initial program 56.6%
Taylor expanded in y around inf
Applied rewrites72.9%
Taylor expanded in z around inf
Applied rewrites52.0%
Taylor expanded in c around 0
Applied rewrites44.7%
if -0.0749999999999999972 < y < -1.4500000000000001e-48Initial program 76.3%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
lower-*.f6475.9
Applied rewrites75.9%
Taylor expanded in c around inf
Applied rewrites67.6%
if -1.4500000000000001e-48 < y < 2.2499999999999999e-242Initial program 83.8%
Taylor expanded in i 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
*-commutativeN/A
lower-*.f6452.9
Applied rewrites52.9%
Taylor expanded in b around inf
Applied rewrites46.9%
if 2.2499999999999999e-242 < y < 1.5499999999999999e-17Initial program 83.2%
Taylor expanded in t 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
lower-*.f6448.4
Applied rewrites48.4%
Taylor expanded in c around inf
Applied rewrites27.4%
if 1.5499999999999999e-17 < y Initial program 75.7%
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-*.f6451.6
Applied rewrites51.6%
Taylor expanded in a around 0
Applied rewrites38.8%
Final simplification41.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* z y) x)))
(if (<= y -0.075)
t_1
(if (<= y -1.45e-48)
(* (* c t) j)
(if (<= y 2.25e-242)
(* (* i b) a)
(if (<= y 1.55e-17) (* (* 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) * x;
double tmp;
if (y <= -0.075) {
tmp = t_1;
} else if (y <= -1.45e-48) {
tmp = (c * t) * j;
} else if (y <= 2.25e-242) {
tmp = (i * b) * a;
} else if (y <= 1.55e-17) {
tmp = (j * c) * t;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = (z * y) * x
if (y <= (-0.075d0)) then
tmp = t_1
else if (y <= (-1.45d-48)) then
tmp = (c * t) * j
else if (y <= 2.25d-242) then
tmp = (i * b) * a
else if (y <= 1.55d-17) then
tmp = (j * c) * t
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (z * y) * x;
double tmp;
if (y <= -0.075) {
tmp = t_1;
} else if (y <= -1.45e-48) {
tmp = (c * t) * j;
} else if (y <= 2.25e-242) {
tmp = (i * b) * a;
} else if (y <= 1.55e-17) {
tmp = (j * c) * t;
} 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 y <= -0.075: tmp = t_1 elif y <= -1.45e-48: tmp = (c * t) * j elif y <= 2.25e-242: tmp = (i * b) * a elif y <= 1.55e-17: tmp = (j * c) * t 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 (y <= -0.075) tmp = t_1; elseif (y <= -1.45e-48) tmp = Float64(Float64(c * t) * j); elseif (y <= 2.25e-242) tmp = Float64(Float64(i * b) * a); elseif (y <= 1.55e-17) tmp = Float64(Float64(j * c) * t); 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 (y <= -0.075) tmp = t_1; elseif (y <= -1.45e-48) tmp = (c * t) * j; elseif (y <= 2.25e-242) tmp = (i * b) * a; elseif (y <= 1.55e-17) tmp = (j * c) * t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[y, -0.075], t$95$1, If[LessEqual[y, -1.45e-48], N[(N[(c * t), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[y, 2.25e-242], N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[y, 1.55e-17], N[(N[(j * c), $MachinePrecision] * t), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z \cdot y\right) \cdot x\\
\mathbf{if}\;y \leq -0.075:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.45 \cdot 10^{-48}:\\
\;\;\;\;\left(c \cdot t\right) \cdot j\\
\mathbf{elif}\;y \leq 2.25 \cdot 10^{-242}:\\
\;\;\;\;\left(i \cdot b\right) \cdot a\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{-17}:\\
\;\;\;\;\left(j \cdot c\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -0.0749999999999999972 or 1.5499999999999999e-17 < y Initial program 66.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-*.f6452.2
Applied rewrites52.2%
Taylor expanded in a around 0
Applied rewrites41.0%
if -0.0749999999999999972 < y < -1.4500000000000001e-48Initial program 76.3%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
lower-*.f6475.9
Applied rewrites75.9%
Taylor expanded in c around inf
Applied rewrites67.6%
if -1.4500000000000001e-48 < y < 2.2499999999999999e-242Initial program 83.8%
Taylor expanded in i 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
*-commutativeN/A
lower-*.f6452.9
Applied rewrites52.9%
Taylor expanded in b around inf
Applied rewrites46.9%
if 2.2499999999999999e-242 < y < 1.5499999999999999e-17Initial program 83.2%
Taylor expanded in t 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
lower-*.f6448.4
Applied rewrites48.4%
Taylor expanded in c around inf
Applied rewrites27.4%
Final simplification41.2%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* (fma (- i) y (* c t)) j))) (if (<= j -8.6e+87) t_1 (if (<= j 7e-49) (* (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(-i, y, (c * t)) * j;
double tmp;
if (j <= -8.6e+87) {
tmp = t_1;
} else if (j <= 7e-49) {
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(Float64(-i), y, Float64(c * t)) * j) tmp = 0.0 if (j <= -8.6e+87) tmp = t_1; elseif (j <= 7e-49) 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[((-i) * y + N[(c * t), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]}, If[LessEqual[j, -8.6e+87], t$95$1, If[LessEqual[j, 7e-49], 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(-i, y, c \cdot t\right) \cdot j\\
\mathbf{if}\;j \leq -8.6 \cdot 10^{+87}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 7 \cdot 10^{-49}:\\
\;\;\;\;\mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if j < -8.6000000000000002e87 or 7.00000000000000012e-49 < j Initial program 79.4%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
lower-*.f6465.0
Applied rewrites65.0%
if -8.6000000000000002e87 < j < 7.00000000000000012e-49Initial program 69.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-*.f6456.6
Applied rewrites56.6%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- a) t (* z y)) x)))
(if (<= x -5.5e-43)
t_1
(if (<= x 3.9e+78) (* (fma (- b) z (* j t)) c) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-a, t, (z * y)) * x;
double tmp;
if (x <= -5.5e-43) {
tmp = t_1;
} else if (x <= 3.9e+78) {
tmp = fma(-b, z, (j * t)) * c;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-a), t, Float64(z * y)) * x) tmp = 0.0 if (x <= -5.5e-43) tmp = t_1; elseif (x <= 3.9e+78) tmp = Float64(fma(Float64(-b), z, Float64(j * t)) * c); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -5.5e-43], t$95$1, If[LessEqual[x, 3.9e+78], N[(N[((-b) * z + N[(j * t), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\
\mathbf{if}\;x \leq -5.5 \cdot 10^{-43}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 3.9 \cdot 10^{+78}:\\
\;\;\;\;\mathsf{fma}\left(-b, z, j \cdot t\right) \cdot c\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -5.50000000000000013e-43 or 3.9000000000000004e78 < x Initial program 68.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-*.f6462.4
Applied rewrites62.4%
if -5.50000000000000013e-43 < x < 3.9000000000000004e78Initial program 79.5%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6444.7
Applied rewrites44.7%
Final simplification53.5%
(FPCore (x y z t a b c i j) :precision binary64 (if (<= j -1.8e+88) (* (* (- i) y) j) (if (<= j 1.05e-28) (* (fma (- a) t (* z y)) 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 (j <= -1.8e+88) {
tmp = (-i * y) * j;
} else if (j <= 1.05e-28) {
tmp = fma(-a, t, (z * y)) * x;
} else {
tmp = (j * c) * t;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (j <= -1.8e+88) tmp = Float64(Float64(Float64(-i) * y) * j); elseif (j <= 1.05e-28) tmp = Float64(fma(Float64(-a), t, Float64(z * y)) * x); else tmp = Float64(Float64(j * c) * t); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[j, -1.8e+88], N[(N[((-i) * y), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[j, 1.05e-28], N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], N[(N[(j * c), $MachinePrecision] * t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;j \leq -1.8 \cdot 10^{+88}:\\
\;\;\;\;\left(\left(-i\right) \cdot y\right) \cdot j\\
\mathbf{elif}\;j \leq 1.05 \cdot 10^{-28}:\\
\;\;\;\;\mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;\left(j \cdot c\right) \cdot t\\
\end{array}
\end{array}
if j < -1.8000000000000001e88Initial 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
lower-*.f6470.9
Applied rewrites70.9%
Taylor expanded in c around 0
Applied rewrites45.6%
if -1.8000000000000001e88 < j < 1.05000000000000003e-28Initial program 69.5%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
+-commutativeN/A
mul-1-negN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6455.5
Applied rewrites55.5%
if 1.05000000000000003e-28 < j Initial program 77.3%
Taylor expanded in t 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
lower-*.f6452.7
Applied rewrites52.7%
Taylor expanded in c around inf
Applied rewrites41.9%
Final simplification50.0%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* z y) x)))
(if (<= y -0.075)
t_1
(if (<= y -1.45e-48)
(* (* c t) j)
(if (<= y 0.000125) (* (* 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 = (z * y) * x;
double tmp;
if (y <= -0.075) {
tmp = t_1;
} else if (y <= -1.45e-48) {
tmp = (c * t) * j;
} else if (y <= 0.000125) {
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 = (z * y) * x
if (y <= (-0.075d0)) then
tmp = t_1
else if (y <= (-1.45d-48)) then
tmp = (c * t) * j
else if (y <= 0.000125d0) 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 = (z * y) * x;
double tmp;
if (y <= -0.075) {
tmp = t_1;
} else if (y <= -1.45e-48) {
tmp = (c * t) * j;
} else if (y <= 0.000125) {
tmp = (i * b) * a;
} 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 y <= -0.075: tmp = t_1 elif y <= -1.45e-48: tmp = (c * t) * j elif y <= 0.000125: 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(z * y) * x) tmp = 0.0 if (y <= -0.075) tmp = t_1; elseif (y <= -1.45e-48) tmp = Float64(Float64(c * t) * j); elseif (y <= 0.000125) 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 = (z * y) * x; tmp = 0.0; if (y <= -0.075) tmp = t_1; elseif (y <= -1.45e-48) tmp = (c * t) * j; elseif (y <= 0.000125) 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[(z * y), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[y, -0.075], t$95$1, If[LessEqual[y, -1.45e-48], N[(N[(c * t), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[y, 0.000125], N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z \cdot y\right) \cdot x\\
\mathbf{if}\;y \leq -0.075:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.45 \cdot 10^{-48}:\\
\;\;\;\;\left(c \cdot t\right) \cdot j\\
\mathbf{elif}\;y \leq 0.000125:\\
\;\;\;\;\left(i \cdot b\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -0.0749999999999999972 or 1.25e-4 < y Initial program 65.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-*.f6453.3
Applied rewrites53.3%
Taylor expanded in a around 0
Applied rewrites41.7%
if -0.0749999999999999972 < y < -1.4500000000000001e-48Initial program 76.3%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
lower-*.f6475.9
Applied rewrites75.9%
Taylor expanded in c around inf
Applied rewrites67.6%
if -1.4500000000000001e-48 < y < 1.25e-4Initial program 84.3%
Taylor expanded in i 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
*-commutativeN/A
lower-*.f6442.5
Applied rewrites42.5%
Taylor expanded in b around inf
Applied rewrites34.0%
Final simplification39.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* z y) x)))
(if (<= y -0.075)
t_1
(if (<= y -1.4e-48)
(* (* j t) c)
(if (<= y 0.000125) (* (* 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 = (z * y) * x;
double tmp;
if (y <= -0.075) {
tmp = t_1;
} else if (y <= -1.4e-48) {
tmp = (j * t) * c;
} else if (y <= 0.000125) {
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 = (z * y) * x
if (y <= (-0.075d0)) then
tmp = t_1
else if (y <= (-1.4d-48)) then
tmp = (j * t) * c
else if (y <= 0.000125d0) 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 = (z * y) * x;
double tmp;
if (y <= -0.075) {
tmp = t_1;
} else if (y <= -1.4e-48) {
tmp = (j * t) * c;
} else if (y <= 0.000125) {
tmp = (i * b) * a;
} 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 y <= -0.075: tmp = t_1 elif y <= -1.4e-48: tmp = (j * t) * c elif y <= 0.000125: 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(z * y) * x) tmp = 0.0 if (y <= -0.075) tmp = t_1; elseif (y <= -1.4e-48) tmp = Float64(Float64(j * t) * c); elseif (y <= 0.000125) 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 = (z * y) * x; tmp = 0.0; if (y <= -0.075) tmp = t_1; elseif (y <= -1.4e-48) tmp = (j * t) * c; elseif (y <= 0.000125) 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[(z * y), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[y, -0.075], t$95$1, If[LessEqual[y, -1.4e-48], N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[y, 0.000125], N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z \cdot y\right) \cdot x\\
\mathbf{if}\;y \leq -0.075:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.4 \cdot 10^{-48}:\\
\;\;\;\;\left(j \cdot t\right) \cdot c\\
\mathbf{elif}\;y \leq 0.000125:\\
\;\;\;\;\left(i \cdot b\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -0.0749999999999999972 or 1.25e-4 < y Initial program 65.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-*.f6453.3
Applied rewrites53.3%
Taylor expanded in a around 0
Applied rewrites41.7%
if -0.0749999999999999972 < y < -1.40000000000000002e-48Initial program 76.3%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
lower-*.f6475.9
Applied rewrites75.9%
Taylor expanded in c around inf
Applied rewrites59.5%
if -1.40000000000000002e-48 < y < 1.25e-4Initial program 84.3%
Taylor expanded in i 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
*-commutativeN/A
lower-*.f6442.5
Applied rewrites42.5%
Taylor expanded in b around inf
Applied rewrites34.0%
Final simplification39.2%
(FPCore (x y z t a b c i j) :precision binary64 (if (<= j -2.05e-22) (* (* (- i) y) j) (if (<= j 9.4e-29) (* (* z y) 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 (j <= -2.05e-22) {
tmp = (-i * y) * j;
} else if (j <= 9.4e-29) {
tmp = (z * y) * x;
} else {
tmp = (j * c) * 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 (j <= (-2.05d-22)) then
tmp = (-i * y) * j
else if (j <= 9.4d-29) then
tmp = (z * y) * x
else
tmp = (j * c) * 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 (j <= -2.05e-22) {
tmp = (-i * y) * j;
} else if (j <= 9.4e-29) {
tmp = (z * y) * x;
} else {
tmp = (j * c) * t;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if j <= -2.05e-22: tmp = (-i * y) * j elif j <= 9.4e-29: tmp = (z * y) * x else: tmp = (j * c) * t return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (j <= -2.05e-22) tmp = Float64(Float64(Float64(-i) * y) * j); elseif (j <= 9.4e-29) tmp = Float64(Float64(z * y) * x); else tmp = Float64(Float64(j * c) * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (j <= -2.05e-22) tmp = (-i * y) * j; elseif (j <= 9.4e-29) tmp = (z * y) * x; else tmp = (j * c) * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[j, -2.05e-22], N[(N[((-i) * y), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[j, 9.4e-29], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], N[(N[(j * c), $MachinePrecision] * t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;j \leq -2.05 \cdot 10^{-22}:\\
\;\;\;\;\left(\left(-i\right) \cdot y\right) \cdot j\\
\mathbf{elif}\;j \leq 9.4 \cdot 10^{-29}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;\left(j \cdot c\right) \cdot t\\
\end{array}
\end{array}
if j < -2.05e-22Initial program 80.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
lower-*.f6467.2
Applied rewrites67.2%
Taylor expanded in c around 0
Applied rewrites44.2%
if -2.05e-22 < j < 9.3999999999999997e-29Initial program 69.5%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
+-commutativeN/A
mul-1-negN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6455.6
Applied rewrites55.6%
Taylor expanded in a around 0
Applied rewrites38.2%
if 9.3999999999999997e-29 < j Initial program 77.3%
Taylor expanded in t 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
lower-*.f6452.7
Applied rewrites52.7%
Taylor expanded in c around inf
Applied rewrites41.9%
Final simplification40.6%
(FPCore (x y z t a b c i j) :precision binary64 (if (<= j -2.05e-22) (* (* (- i) j) y) (if (<= j 9.4e-29) (* (* z y) 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 (j <= -2.05e-22) {
tmp = (-i * j) * y;
} else if (j <= 9.4e-29) {
tmp = (z * y) * x;
} else {
tmp = (j * c) * 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 (j <= (-2.05d-22)) then
tmp = (-i * j) * y
else if (j <= 9.4d-29) then
tmp = (z * y) * x
else
tmp = (j * c) * 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 (j <= -2.05e-22) {
tmp = (-i * j) * y;
} else if (j <= 9.4e-29) {
tmp = (z * y) * x;
} else {
tmp = (j * c) * t;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if j <= -2.05e-22: tmp = (-i * j) * y elif j <= 9.4e-29: tmp = (z * y) * x else: tmp = (j * c) * t return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (j <= -2.05e-22) tmp = Float64(Float64(Float64(-i) * j) * y); elseif (j <= 9.4e-29) tmp = Float64(Float64(z * y) * x); else tmp = Float64(Float64(j * c) * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (j <= -2.05e-22) tmp = (-i * j) * y; elseif (j <= 9.4e-29) tmp = (z * y) * x; else tmp = (j * c) * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[j, -2.05e-22], N[(N[((-i) * j), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[j, 9.4e-29], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], N[(N[(j * c), $MachinePrecision] * t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;j \leq -2.05 \cdot 10^{-22}:\\
\;\;\;\;\left(\left(-i\right) \cdot j\right) \cdot y\\
\mathbf{elif}\;j \leq 9.4 \cdot 10^{-29}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;\left(j \cdot c\right) \cdot t\\
\end{array}
\end{array}
if j < -2.05e-22Initial program 80.0%
Taylor expanded in i 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
*-commutativeN/A
lower-*.f6447.7
Applied rewrites47.7%
Taylor expanded in b around 0
Applied rewrites39.5%
if -2.05e-22 < j < 9.3999999999999997e-29Initial program 69.5%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
+-commutativeN/A
mul-1-negN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6455.6
Applied rewrites55.6%
Taylor expanded in a around 0
Applied rewrites38.2%
if 9.3999999999999997e-29 < j Initial program 77.3%
Taylor expanded in t 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
lower-*.f6452.7
Applied rewrites52.7%
Taylor expanded in c around inf
Applied rewrites41.9%
Final simplification39.5%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* (* j t) c))) (if (<= j -1.15e-52) t_1 (if (<= j 1.65e-35) (* (* 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 * t) * c;
double tmp;
if (j <= -1.15e-52) {
tmp = t_1;
} else if (j <= 1.65e-35) {
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 * t) * c
if (j <= (-1.15d-52)) then
tmp = t_1
else if (j <= 1.65d-35) 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 * t) * c;
double tmp;
if (j <= -1.15e-52) {
tmp = t_1;
} else if (j <= 1.65e-35) {
tmp = (i * b) * a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (j * t) * c tmp = 0 if j <= -1.15e-52: tmp = t_1 elif j <= 1.65e-35: 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(j * t) * c) tmp = 0.0 if (j <= -1.15e-52) tmp = t_1; elseif (j <= 1.65e-35) 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 * t) * c; tmp = 0.0; if (j <= -1.15e-52) tmp = t_1; elseif (j <= 1.65e-35) 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 * t), $MachinePrecision] * c), $MachinePrecision]}, If[LessEqual[j, -1.15e-52], t$95$1, If[LessEqual[j, 1.65e-35], N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(j \cdot t\right) \cdot c\\
\mathbf{if}\;j \leq -1.15 \cdot 10^{-52}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 1.65 \cdot 10^{-35}:\\
\;\;\;\;\left(i \cdot b\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if j < -1.14999999999999997e-52 or 1.65e-35 < j Initial program 77.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
lower-*.f6462.1
Applied rewrites62.1%
Taylor expanded in c around inf
Applied rewrites32.5%
if -1.14999999999999997e-52 < j < 1.65e-35Initial program 70.8%
Taylor expanded in i 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
*-commutativeN/A
lower-*.f6434.9
Applied rewrites34.9%
Taylor expanded in b around inf
Applied rewrites34.1%
Final simplification33.2%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* (* j t) c))) (if (<= j -1.15e-52) t_1 (if (<= j 1.12e-35) (* (* i a) 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 = (j * t) * c;
double tmp;
if (j <= -1.15e-52) {
tmp = t_1;
} else if (j <= 1.12e-35) {
tmp = (i * a) * 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 = (j * t) * c
if (j <= (-1.15d-52)) then
tmp = t_1
else if (j <= 1.12d-35) then
tmp = (i * a) * 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 = (j * t) * c;
double tmp;
if (j <= -1.15e-52) {
tmp = t_1;
} else if (j <= 1.12e-35) {
tmp = (i * a) * b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (j * t) * c tmp = 0 if j <= -1.15e-52: tmp = t_1 elif j <= 1.12e-35: tmp = (i * a) * b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(j * t) * c) tmp = 0.0 if (j <= -1.15e-52) tmp = t_1; elseif (j <= 1.12e-35) tmp = Float64(Float64(i * a) * b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (j * t) * c; tmp = 0.0; if (j <= -1.15e-52) tmp = t_1; elseif (j <= 1.12e-35) tmp = (i * a) * 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[(j * t), $MachinePrecision] * c), $MachinePrecision]}, If[LessEqual[j, -1.15e-52], t$95$1, If[LessEqual[j, 1.12e-35], N[(N[(i * a), $MachinePrecision] * b), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(j \cdot t\right) \cdot c\\
\mathbf{if}\;j \leq -1.15 \cdot 10^{-52}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 1.12 \cdot 10^{-35}:\\
\;\;\;\;\left(i \cdot a\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if j < -1.14999999999999997e-52 or 1.12e-35 < j Initial program 77.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
lower-*.f6462.1
Applied rewrites62.1%
Taylor expanded in c around inf
Applied rewrites32.5%
if -1.14999999999999997e-52 < j < 1.12e-35Initial program 70.8%
Taylor expanded in i 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
*-commutativeN/A
lower-*.f6434.9
Applied rewrites34.9%
Taylor expanded in b around inf
Applied rewrites34.1%
Applied rewrites33.7%
Final simplification33.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 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
lower-*.f6439.3
Applied rewrites39.3%
Taylor expanded in c around inf
Applied rewrites19.9%
Final simplification19.9%
(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 2024270
(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)))))