
(FPCore (x y z t a b c i j) :precision binary64 (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i)))) (* j (- (* c a) (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
def code(x, y, z, t, a, b, c, i, j): return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(t * i)))) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i))); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j) :precision binary64 (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i)))) (* j (- (* c a) (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
def code(x, y, z, t, a, b, c, i, j): return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(t * i)))) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i))); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)
\end{array}
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1
(-
(* (- (* c a) (* i y)) j)
(- (* (- (* a t) (* z y)) x) (* (- (* i t) (* c z)) b)))))
(if (<= t_1 INFINITY) t_1 (* (fma (- t) a (* z y)) x))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (((c * a) - (i * y)) * j) - ((((a * t) - (z * y)) * x) - (((i * t) - (c * z)) * b));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = fma(-t, a, (z * y)) * x;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(Float64(c * a) - Float64(i * y)) * j) - Float64(Float64(Float64(Float64(a * t) - Float64(z * y)) * x) - Float64(Float64(Float64(i * t) - Float64(c * z)) * b))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(fma(Float64(-t), a, Float64(z * y)) * x); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(N[(c * a), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision] - N[(N[(N[(N[(a * t), $MachinePrecision] - N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] - N[(N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(N[((-t) * a + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(c \cdot a - i \cdot y\right) \cdot j - \left(\left(a \cdot t - z \cdot y\right) \cdot x - \left(i \cdot t - c \cdot z\right) \cdot b\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-t, a, z \cdot y\right) \cdot x\\
\end{array}
\end{array}
if (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) < +inf.0Initial program 91.2%
if +inf.0 < (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) Initial program 0.0%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6453.4
Applied rewrites53.4%
Final simplification83.6%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- b) z (* j a)) c)))
(if (<= c -7.5e+126)
t_1
(if (<= c 6.5e+135)
(fma
(fma (- c) z (* i t))
b
(fma (fma (- x) t (* j c)) a (* (fma (- j) i (* z x)) y)))
t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-b, z, (j * a)) * c;
double tmp;
if (c <= -7.5e+126) {
tmp = t_1;
} else if (c <= 6.5e+135) {
tmp = fma(fma(-c, z, (i * t)), b, fma(fma(-x, t, (j * c)), a, (fma(-j, i, (z * x)) * y)));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-b), z, Float64(j * a)) * c) tmp = 0.0 if (c <= -7.5e+126) tmp = t_1; elseif (c <= 6.5e+135) tmp = fma(fma(Float64(-c), z, Float64(i * t)), b, fma(fma(Float64(-x), t, Float64(j * c)), a, Float64(fma(Float64(-j), i, Float64(z * x)) * y))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-b) * z + N[(j * a), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision]}, If[LessEqual[c, -7.5e+126], t$95$1, If[LessEqual[c, 6.5e+135], N[(N[((-c) * z + N[(i * t), $MachinePrecision]), $MachinePrecision] * b + N[(N[((-x) * t + N[(j * c), $MachinePrecision]), $MachinePrecision] * a + N[(N[((-j) * i + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-b, z, j \cdot a\right) \cdot c\\
\mathbf{if}\;c \leq -7.5 \cdot 10^{+126}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 6.5 \cdot 10^{+135}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-c, z, i \cdot t\right), b, \mathsf{fma}\left(\mathsf{fma}\left(-x, t, j \cdot c\right), a, \mathsf{fma}\left(-j, i, z \cdot x\right) \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -7.5000000000000006e126 or 6.5000000000000003e135 < c Initial program 61.3%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
lower-*.f6480.6
Applied rewrites80.6%
if -7.5000000000000006e126 < c < 6.5000000000000003e135Initial program 76.7%
Taylor expanded in y around 0
Applied rewrites79.4%
Final simplification79.7%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= x -4e+86)
(* (fma (- t) a (* z y)) x)
(if (<= x -1.26e-64)
(* (fma (- j) y (* b t)) i)
(if (<= x -3e-105)
(* (fma (- c) b (* y x)) z)
(if (<= x -2.7e-262)
(* (fma (- i) y (* c a)) j)
(if (<= x 8.2e+55)
(* (fma (- c) z (* i t)) b)
(/ x (/ 1.0 (fma t (- a) (* z y))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (x <= -4e+86) {
tmp = fma(-t, a, (z * y)) * x;
} else if (x <= -1.26e-64) {
tmp = fma(-j, y, (b * t)) * i;
} else if (x <= -3e-105) {
tmp = fma(-c, b, (y * x)) * z;
} else if (x <= -2.7e-262) {
tmp = fma(-i, y, (c * a)) * j;
} else if (x <= 8.2e+55) {
tmp = fma(-c, z, (i * t)) * b;
} else {
tmp = x / (1.0 / fma(t, -a, (z * y)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (x <= -4e+86) tmp = Float64(fma(Float64(-t), a, Float64(z * y)) * x); elseif (x <= -1.26e-64) tmp = Float64(fma(Float64(-j), y, Float64(b * t)) * i); elseif (x <= -3e-105) tmp = Float64(fma(Float64(-c), b, Float64(y * x)) * z); elseif (x <= -2.7e-262) tmp = Float64(fma(Float64(-i), y, Float64(c * a)) * j); elseif (x <= 8.2e+55) tmp = Float64(fma(Float64(-c), z, Float64(i * t)) * b); else tmp = Float64(x / Float64(1.0 / fma(t, Float64(-a), Float64(z * y)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[x, -4e+86], N[(N[((-t) * a + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[x, -1.26e-64], N[(N[((-j) * y + N[(b * t), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision], If[LessEqual[x, -3e-105], N[(N[((-c) * b + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[x, -2.7e-262], N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[x, 8.2e+55], N[(N[((-c) * z + N[(i * t), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], N[(x / N[(1.0 / N[(t * (-a) + N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4 \cdot 10^{+86}:\\
\;\;\;\;\mathsf{fma}\left(-t, a, z \cdot y\right) \cdot x\\
\mathbf{elif}\;x \leq -1.26 \cdot 10^{-64}:\\
\;\;\;\;\mathsf{fma}\left(-j, y, b \cdot t\right) \cdot i\\
\mathbf{elif}\;x \leq -3 \cdot 10^{-105}:\\
\;\;\;\;\mathsf{fma}\left(-c, b, y \cdot x\right) \cdot z\\
\mathbf{elif}\;x \leq -2.7 \cdot 10^{-262}:\\
\;\;\;\;\mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\\
\mathbf{elif}\;x \leq 8.2 \cdot 10^{+55}:\\
\;\;\;\;\mathsf{fma}\left(-c, z, i \cdot t\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{1}{\mathsf{fma}\left(t, -a, z \cdot y\right)}}\\
\end{array}
\end{array}
if x < -4.0000000000000001e86Initial program 71.2%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6468.1
Applied rewrites68.1%
if -4.0000000000000001e86 < x < -1.2599999999999999e-64Initial program 67.7%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/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-*.f6453.8
Applied rewrites53.8%
if -1.2599999999999999e-64 < x < -3.0000000000000001e-105Initial program 47.0%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
lower-*.f6484.8
Applied rewrites84.8%
if -3.0000000000000001e-105 < x < -2.7000000000000001e-262Initial program 77.8%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6459.8
Applied rewrites59.8%
if -2.7000000000000001e-262 < x < 8.19999999999999962e55Initial program 78.6%
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
remove-double-negN/A
distribute-lft-neg-inN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6461.0
Applied rewrites61.0%
if 8.19999999999999962e55 < x Initial program 70.0%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6470.5
Applied rewrites70.5%
Applied rewrites70.6%
Final simplification64.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- b) z (* j a)) c)))
(if (<= c -6.5e+126)
t_1
(if (<= c 1.3e+121)
(fma (fma (- c) z (* i t)) b (* (fma (- j) i (* z x)) y))
t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-b, z, (j * a)) * c;
double tmp;
if (c <= -6.5e+126) {
tmp = t_1;
} else if (c <= 1.3e+121) {
tmp = fma(fma(-c, z, (i * t)), b, (fma(-j, i, (z * x)) * y));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-b), z, Float64(j * a)) * c) tmp = 0.0 if (c <= -6.5e+126) tmp = t_1; elseif (c <= 1.3e+121) tmp = fma(fma(Float64(-c), z, Float64(i * t)), b, Float64(fma(Float64(-j), i, Float64(z * x)) * y)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-b) * z + N[(j * a), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision]}, If[LessEqual[c, -6.5e+126], t$95$1, If[LessEqual[c, 1.3e+121], N[(N[((-c) * z + N[(i * t), $MachinePrecision]), $MachinePrecision] * b + N[(N[((-j) * i + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-b, z, j \cdot a\right) \cdot c\\
\mathbf{if}\;c \leq -6.5 \cdot 10^{+126}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 1.3 \cdot 10^{+121}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-c, z, i \cdot t\right), b, \mathsf{fma}\left(-j, i, z \cdot x\right) \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -6.5000000000000005e126 or 1.2999999999999999e121 < c Initial program 61.3%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
lower-*.f6480.6
Applied rewrites80.6%
if -6.5000000000000005e126 < c < 1.2999999999999999e121Initial program 76.7%
Taylor expanded in a around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
remove-double-negN/A
distribute-lft-neg-inN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites65.4%
Final simplification69.0%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- t) a (* z y)) x)))
(if (<= x -4e+86)
t_1
(if (<= x -1.26e-64)
(* (fma (- j) y (* b t)) i)
(if (<= x -3e-105)
(* (fma (- c) b (* y x)) z)
(if (<= x -2.7e-262)
(* (fma (- i) y (* c a)) j)
(if (<= x 8.2e+55) (* (fma (- c) z (* i t)) b) t_1)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-t, a, (z * y)) * x;
double tmp;
if (x <= -4e+86) {
tmp = t_1;
} else if (x <= -1.26e-64) {
tmp = fma(-j, y, (b * t)) * i;
} else if (x <= -3e-105) {
tmp = fma(-c, b, (y * x)) * z;
} else if (x <= -2.7e-262) {
tmp = fma(-i, y, (c * a)) * j;
} else if (x <= 8.2e+55) {
tmp = fma(-c, z, (i * t)) * b;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-t), a, Float64(z * y)) * x) tmp = 0.0 if (x <= -4e+86) tmp = t_1; elseif (x <= -1.26e-64) tmp = Float64(fma(Float64(-j), y, Float64(b * t)) * i); elseif (x <= -3e-105) tmp = Float64(fma(Float64(-c), b, Float64(y * x)) * z); elseif (x <= -2.7e-262) tmp = Float64(fma(Float64(-i), y, Float64(c * a)) * j); elseif (x <= 8.2e+55) tmp = Float64(fma(Float64(-c), z, Float64(i * t)) * b); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-t) * a + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -4e+86], t$95$1, If[LessEqual[x, -1.26e-64], N[(N[((-j) * y + N[(b * t), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision], If[LessEqual[x, -3e-105], N[(N[((-c) * b + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[x, -2.7e-262], N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[x, 8.2e+55], N[(N[((-c) * z + N[(i * t), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-t, a, z \cdot y\right) \cdot x\\
\mathbf{if}\;x \leq -4 \cdot 10^{+86}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -1.26 \cdot 10^{-64}:\\
\;\;\;\;\mathsf{fma}\left(-j, y, b \cdot t\right) \cdot i\\
\mathbf{elif}\;x \leq -3 \cdot 10^{-105}:\\
\;\;\;\;\mathsf{fma}\left(-c, b, y \cdot x\right) \cdot z\\
\mathbf{elif}\;x \leq -2.7 \cdot 10^{-262}:\\
\;\;\;\;\mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\\
\mathbf{elif}\;x \leq 8.2 \cdot 10^{+55}:\\
\;\;\;\;\mathsf{fma}\left(-c, z, i \cdot t\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -4.0000000000000001e86 or 8.19999999999999962e55 < x Initial program 70.6%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6469.4
Applied rewrites69.4%
if -4.0000000000000001e86 < x < -1.2599999999999999e-64Initial program 67.7%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/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-*.f6453.8
Applied rewrites53.8%
if -1.2599999999999999e-64 < x < -3.0000000000000001e-105Initial program 47.0%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
lower-*.f6484.8
Applied rewrites84.8%
if -3.0000000000000001e-105 < x < -2.7000000000000001e-262Initial program 77.8%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6459.8
Applied rewrites59.8%
if -2.7000000000000001e-262 < x < 8.19999999999999962e55Initial program 78.6%
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
remove-double-negN/A
distribute-lft-neg-inN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6461.0
Applied rewrites61.0%
Final simplification64.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- c) z (* i t)) b)))
(if (<= t -5.8e+27)
t_1
(if (<= t -4.7e-301)
(* (fma (- c) b (* y x)) z)
(if (<= t 3.2e+36) (* (fma (- b) z (* j a)) c) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-c, z, (i * t)) * b;
double tmp;
if (t <= -5.8e+27) {
tmp = t_1;
} else if (t <= -4.7e-301) {
tmp = fma(-c, b, (y * x)) * z;
} else if (t <= 3.2e+36) {
tmp = fma(-b, z, (j * a)) * c;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-c), z, Float64(i * t)) * b) tmp = 0.0 if (t <= -5.8e+27) tmp = t_1; elseif (t <= -4.7e-301) tmp = Float64(fma(Float64(-c), b, Float64(y * x)) * z); elseif (t <= 3.2e+36) tmp = Float64(fma(Float64(-b), z, Float64(j * a)) * c); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-c) * z + N[(i * t), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[t, -5.8e+27], t$95$1, If[LessEqual[t, -4.7e-301], N[(N[((-c) * b + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[t, 3.2e+36], N[(N[((-b) * z + N[(j * a), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-c, z, i \cdot t\right) \cdot b\\
\mathbf{if}\;t \leq -5.8 \cdot 10^{+27}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -4.7 \cdot 10^{-301}:\\
\;\;\;\;\mathsf{fma}\left(-c, b, y \cdot x\right) \cdot z\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{+36}:\\
\;\;\;\;\mathsf{fma}\left(-b, z, j \cdot a\right) \cdot c\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -5.8000000000000002e27 or 3.1999999999999999e36 < t Initial program 64.4%
Taylor expanded in b around inf
*-commutativeN/A
sub-negN/A
+-commutativeN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
remove-double-negN/A
distribute-lft-neg-inN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6453.8
Applied rewrites53.8%
if -5.8000000000000002e27 < t < -4.6999999999999997e-301Initial program 78.6%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
lower-*.f6454.9
Applied rewrites54.9%
if -4.6999999999999997e-301 < t < 3.1999999999999999e36Initial program 82.9%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
lower-*.f6461.3
Applied rewrites61.3%
Final simplification56.1%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- b) z (* j a)) c)))
(if (<= c -6.5e+111)
t_1
(if (<= c 5.8e-257)
(* (fma (- c) b (* y x)) z)
(if (<= c 1.35e-46) (* (* (- a) t) x) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-b, z, (j * a)) * c;
double tmp;
if (c <= -6.5e+111) {
tmp = t_1;
} else if (c <= 5.8e-257) {
tmp = fma(-c, b, (y * x)) * z;
} else if (c <= 1.35e-46) {
tmp = (-a * t) * x;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-b), z, Float64(j * a)) * c) tmp = 0.0 if (c <= -6.5e+111) tmp = t_1; elseif (c <= 5.8e-257) tmp = Float64(fma(Float64(-c), b, Float64(y * x)) * z); elseif (c <= 1.35e-46) tmp = Float64(Float64(Float64(-a) * t) * 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[((-b) * z + N[(j * a), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision]}, If[LessEqual[c, -6.5e+111], t$95$1, If[LessEqual[c, 5.8e-257], N[(N[((-c) * b + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[c, 1.35e-46], N[(N[((-a) * t), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-b, z, j \cdot a\right) \cdot c\\
\mathbf{if}\;c \leq -6.5 \cdot 10^{+111}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 5.8 \cdot 10^{-257}:\\
\;\;\;\;\mathsf{fma}\left(-c, b, y \cdot x\right) \cdot z\\
\mathbf{elif}\;c \leq 1.35 \cdot 10^{-46}:\\
\;\;\;\;\left(\left(-a\right) \cdot t\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -6.5000000000000002e111 or 1.35e-46 < c Initial program 64.1%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
lower-*.f6464.6
Applied rewrites64.6%
if -6.5000000000000002e111 < c < 5.8000000000000003e-257Initial program 77.7%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
lower-*.f6445.9
Applied rewrites45.9%
if 5.8000000000000003e-257 < c < 1.35e-46Initial program 80.8%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6445.6
Applied rewrites45.6%
Taylor expanded in t around inf
Applied rewrites36.8%
Final simplification51.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- b) z (* j a)) c)))
(if (<= c -5.5e-53)
t_1
(if (<= c 5.8e-257)
(* (* y x) z)
(if (<= c 1.35e-46) (* (* (- a) t) x) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-b, z, (j * a)) * c;
double tmp;
if (c <= -5.5e-53) {
tmp = t_1;
} else if (c <= 5.8e-257) {
tmp = (y * x) * z;
} else if (c <= 1.35e-46) {
tmp = (-a * t) * x;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-b), z, Float64(j * a)) * c) tmp = 0.0 if (c <= -5.5e-53) tmp = t_1; elseif (c <= 5.8e-257) tmp = Float64(Float64(y * x) * z); elseif (c <= 1.35e-46) tmp = Float64(Float64(Float64(-a) * t) * 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[((-b) * z + N[(j * a), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision]}, If[LessEqual[c, -5.5e-53], t$95$1, If[LessEqual[c, 5.8e-257], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[c, 1.35e-46], N[(N[((-a) * t), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-b, z, j \cdot a\right) \cdot c\\
\mathbf{if}\;c \leq -5.5 \cdot 10^{-53}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 5.8 \cdot 10^{-257}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\mathbf{elif}\;c \leq 1.35 \cdot 10^{-46}:\\
\;\;\;\;\left(\left(-a\right) \cdot t\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -5.50000000000000023e-53 or 1.35e-46 < c Initial program 67.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
lower-*.f6460.4
Applied rewrites60.4%
if -5.50000000000000023e-53 < c < 5.8000000000000003e-257Initial program 79.2%
lift-*.f64N/A
lift--.f64N/A
flip--N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-/.f6479.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.f6479.2
lift-*.f64N/A
*-commutativeN/A
lower-*.f6479.2
Applied rewrites79.2%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6439.7
Applied rewrites39.7%
Taylor expanded in c around 0
Applied rewrites32.8%
if 5.8000000000000003e-257 < c < 1.35e-46Initial program 80.8%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6445.6
Applied rewrites45.6%
Taylor expanded in t around inf
Applied rewrites36.8%
Final simplification48.4%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= y -3.5e+79)
(* (* (- i) y) j)
(if (<= y 1.85e-289)
(* (* j a) c)
(if (<= y 2.7e+41) (* (* (- c) b) z) (* (* 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 (y <= -3.5e+79) {
tmp = (-i * y) * j;
} else if (y <= 1.85e-289) {
tmp = (j * a) * c;
} else if (y <= 2.7e+41) {
tmp = (-c * b) * z;
} else {
tmp = (y * x) * z;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (y <= (-3.5d+79)) then
tmp = (-i * y) * j
else if (y <= 1.85d-289) then
tmp = (j * a) * c
else if (y <= 2.7d+41) then
tmp = (-c * b) * z
else
tmp = (y * x) * z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (y <= -3.5e+79) {
tmp = (-i * y) * j;
} else if (y <= 1.85e-289) {
tmp = (j * a) * c;
} else if (y <= 2.7e+41) {
tmp = (-c * b) * z;
} else {
tmp = (y * x) * z;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if y <= -3.5e+79: tmp = (-i * y) * j elif y <= 1.85e-289: tmp = (j * a) * c elif y <= 2.7e+41: tmp = (-c * b) * z else: tmp = (y * x) * z return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (y <= -3.5e+79) tmp = Float64(Float64(Float64(-i) * y) * j); elseif (y <= 1.85e-289) tmp = Float64(Float64(j * a) * c); elseif (y <= 2.7e+41) tmp = Float64(Float64(Float64(-c) * b) * z); else tmp = Float64(Float64(y * x) * z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (y <= -3.5e+79) tmp = (-i * y) * j; elseif (y <= 1.85e-289) tmp = (j * a) * c; elseif (y <= 2.7e+41) tmp = (-c * b) * z; else tmp = (y * x) * z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[y, -3.5e+79], N[(N[((-i) * y), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[y, 1.85e-289], N[(N[(j * a), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[y, 2.7e+41], N[(N[((-c) * b), $MachinePrecision] * z), $MachinePrecision], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.5 \cdot 10^{+79}:\\
\;\;\;\;\left(\left(-i\right) \cdot y\right) \cdot j\\
\mathbf{elif}\;y \leq 1.85 \cdot 10^{-289}:\\
\;\;\;\;\left(j \cdot a\right) \cdot c\\
\mathbf{elif}\;y \leq 2.7 \cdot 10^{+41}:\\
\;\;\;\;\left(\left(-c\right) \cdot b\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\end{array}
\end{array}
if y < -3.4999999999999998e79Initial program 66.1%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6454.0
Applied rewrites54.0%
Taylor expanded in i around inf
Applied rewrites46.3%
if -3.4999999999999998e79 < y < 1.84999999999999994e-289Initial program 82.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
lower-*.f6446.4
Applied rewrites46.4%
Taylor expanded in b around 0
Applied rewrites32.3%
if 1.84999999999999994e-289 < y < 2.7e41Initial program 81.5%
lift-*.f64N/A
lift--.f64N/A
flip--N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-/.f6481.5
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f6481.5
lift-*.f64N/A
*-commutativeN/A
lower-*.f6481.5
Applied rewrites81.5%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6446.8
Applied rewrites46.8%
Taylor expanded in c around inf
Applied rewrites38.9%
if 2.7e41 < y Initial program 53.9%
lift-*.f64N/A
lift--.f64N/A
flip--N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-/.f6453.9
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f6453.9
lift-*.f64N/A
*-commutativeN/A
lower-*.f6453.9
Applied rewrites53.9%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6454.1
Applied rewrites54.1%
Taylor expanded in c around 0
Applied rewrites45.9%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= y -3.5e+79)
(* (* (- i) y) j)
(if (<= y 2.3e-288)
(* (* j a) c)
(if (<= y 2.3e-66) (* (* (- c) z) b) (* (* y x) z)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (y <= -3.5e+79) {
tmp = (-i * y) * j;
} else if (y <= 2.3e-288) {
tmp = (j * a) * c;
} else if (y <= 2.3e-66) {
tmp = (-c * z) * b;
} else {
tmp = (y * x) * z;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (y <= (-3.5d+79)) then
tmp = (-i * y) * j
else if (y <= 2.3d-288) then
tmp = (j * a) * c
else if (y <= 2.3d-66) then
tmp = (-c * z) * b
else
tmp = (y * x) * z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (y <= -3.5e+79) {
tmp = (-i * y) * j;
} else if (y <= 2.3e-288) {
tmp = (j * a) * c;
} else if (y <= 2.3e-66) {
tmp = (-c * z) * b;
} else {
tmp = (y * x) * z;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if y <= -3.5e+79: tmp = (-i * y) * j elif y <= 2.3e-288: tmp = (j * a) * c elif y <= 2.3e-66: tmp = (-c * z) * b else: tmp = (y * x) * z return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (y <= -3.5e+79) tmp = Float64(Float64(Float64(-i) * y) * j); elseif (y <= 2.3e-288) tmp = Float64(Float64(j * a) * c); elseif (y <= 2.3e-66) tmp = Float64(Float64(Float64(-c) * z) * b); else tmp = Float64(Float64(y * x) * z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (y <= -3.5e+79) tmp = (-i * y) * j; elseif (y <= 2.3e-288) tmp = (j * a) * c; elseif (y <= 2.3e-66) tmp = (-c * z) * b; else tmp = (y * x) * z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[y, -3.5e+79], N[(N[((-i) * y), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[y, 2.3e-288], N[(N[(j * a), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[y, 2.3e-66], N[(N[((-c) * z), $MachinePrecision] * b), $MachinePrecision], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.5 \cdot 10^{+79}:\\
\;\;\;\;\left(\left(-i\right) \cdot y\right) \cdot j\\
\mathbf{elif}\;y \leq 2.3 \cdot 10^{-288}:\\
\;\;\;\;\left(j \cdot a\right) \cdot c\\
\mathbf{elif}\;y \leq 2.3 \cdot 10^{-66}:\\
\;\;\;\;\left(\left(-c\right) \cdot z\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\end{array}
\end{array}
if y < -3.4999999999999998e79Initial program 66.1%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6454.0
Applied rewrites54.0%
Taylor expanded in i around inf
Applied rewrites46.3%
if -3.4999999999999998e79 < y < 2.3e-288Initial program 82.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
lower-*.f6446.4
Applied rewrites46.4%
Taylor expanded in b around 0
Applied rewrites32.3%
if 2.3e-288 < y < 2.29999999999999992e-66Initial program 82.6%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
lower-*.f6445.2
Applied rewrites45.2%
Taylor expanded in b around inf
Applied rewrites38.4%
if 2.29999999999999992e-66 < y Initial program 57.7%
lift-*.f64N/A
lift--.f64N/A
flip--N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-/.f6457.7
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f6457.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6457.7
Applied rewrites57.7%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6453.5
Applied rewrites53.5%
Taylor expanded in c around 0
Applied rewrites42.8%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= y -3.5e+79)
(* (* (- y) j) i)
(if (<= y 2.3e-288)
(* (* j a) c)
(if (<= y 2.3e-66) (* (* (- c) z) b) (* (* y x) z)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (y <= -3.5e+79) {
tmp = (-y * j) * i;
} else if (y <= 2.3e-288) {
tmp = (j * a) * c;
} else if (y <= 2.3e-66) {
tmp = (-c * z) * b;
} else {
tmp = (y * x) * z;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (y <= (-3.5d+79)) then
tmp = (-y * j) * i
else if (y <= 2.3d-288) then
tmp = (j * a) * c
else if (y <= 2.3d-66) then
tmp = (-c * z) * b
else
tmp = (y * x) * z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (y <= -3.5e+79) {
tmp = (-y * j) * i;
} else if (y <= 2.3e-288) {
tmp = (j * a) * c;
} else if (y <= 2.3e-66) {
tmp = (-c * z) * b;
} else {
tmp = (y * x) * z;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if y <= -3.5e+79: tmp = (-y * j) * i elif y <= 2.3e-288: tmp = (j * a) * c elif y <= 2.3e-66: tmp = (-c * z) * b else: tmp = (y * x) * z return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (y <= -3.5e+79) tmp = Float64(Float64(Float64(-y) * j) * i); elseif (y <= 2.3e-288) tmp = Float64(Float64(j * a) * c); elseif (y <= 2.3e-66) tmp = Float64(Float64(Float64(-c) * z) * b); else tmp = Float64(Float64(y * x) * z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (y <= -3.5e+79) tmp = (-y * j) * i; elseif (y <= 2.3e-288) tmp = (j * a) * c; elseif (y <= 2.3e-66) tmp = (-c * z) * b; else tmp = (y * x) * z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[y, -3.5e+79], N[(N[((-y) * j), $MachinePrecision] * i), $MachinePrecision], If[LessEqual[y, 2.3e-288], N[(N[(j * a), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[y, 2.3e-66], N[(N[((-c) * z), $MachinePrecision] * b), $MachinePrecision], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.5 \cdot 10^{+79}:\\
\;\;\;\;\left(\left(-y\right) \cdot j\right) \cdot i\\
\mathbf{elif}\;y \leq 2.3 \cdot 10^{-288}:\\
\;\;\;\;\left(j \cdot a\right) \cdot c\\
\mathbf{elif}\;y \leq 2.3 \cdot 10^{-66}:\\
\;\;\;\;\left(\left(-c\right) \cdot z\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\end{array}
\end{array}
if y < -3.4999999999999998e79Initial program 66.1%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6454.0
Applied rewrites54.0%
Taylor expanded in i around inf
Applied rewrites43.6%
if -3.4999999999999998e79 < y < 2.3e-288Initial program 82.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
lower-*.f6446.4
Applied rewrites46.4%
Taylor expanded in b around 0
Applied rewrites32.3%
if 2.3e-288 < y < 2.29999999999999992e-66Initial program 82.6%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
lower-*.f6445.2
Applied rewrites45.2%
Taylor expanded in b around inf
Applied rewrites38.4%
if 2.29999999999999992e-66 < y Initial program 57.7%
lift-*.f64N/A
lift--.f64N/A
flip--N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-/.f6457.7
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f6457.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6457.7
Applied rewrites57.7%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6453.5
Applied rewrites53.5%
Taylor expanded in c around 0
Applied rewrites42.8%
Final simplification38.3%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= y -1.72e+50)
(* (* z y) x)
(if (<= y 2.3e-288)
(* (* j a) c)
(if (<= y 2.3e-66) (* (* (- c) z) b) (* (* y x) z)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (y <= -1.72e+50) {
tmp = (z * y) * x;
} else if (y <= 2.3e-288) {
tmp = (j * a) * c;
} else if (y <= 2.3e-66) {
tmp = (-c * z) * b;
} else {
tmp = (y * x) * z;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (y <= (-1.72d+50)) then
tmp = (z * y) * x
else if (y <= 2.3d-288) then
tmp = (j * a) * c
else if (y <= 2.3d-66) then
tmp = (-c * z) * b
else
tmp = (y * x) * z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (y <= -1.72e+50) {
tmp = (z * y) * x;
} else if (y <= 2.3e-288) {
tmp = (j * a) * c;
} else if (y <= 2.3e-66) {
tmp = (-c * z) * b;
} else {
tmp = (y * x) * z;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if y <= -1.72e+50: tmp = (z * y) * x elif y <= 2.3e-288: tmp = (j * a) * c elif y <= 2.3e-66: tmp = (-c * z) * b else: tmp = (y * x) * z return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (y <= -1.72e+50) tmp = Float64(Float64(z * y) * x); elseif (y <= 2.3e-288) tmp = Float64(Float64(j * a) * c); elseif (y <= 2.3e-66) tmp = Float64(Float64(Float64(-c) * z) * b); else tmp = Float64(Float64(y * x) * z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (y <= -1.72e+50) tmp = (z * y) * x; elseif (y <= 2.3e-288) tmp = (j * a) * c; elseif (y <= 2.3e-66) tmp = (-c * z) * b; else tmp = (y * x) * z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[y, -1.72e+50], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[y, 2.3e-288], N[(N[(j * a), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[y, 2.3e-66], N[(N[((-c) * z), $MachinePrecision] * b), $MachinePrecision], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.72 \cdot 10^{+50}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\
\mathbf{elif}\;y \leq 2.3 \cdot 10^{-288}:\\
\;\;\;\;\left(j \cdot a\right) \cdot c\\
\mathbf{elif}\;y \leq 2.3 \cdot 10^{-66}:\\
\;\;\;\;\left(\left(-c\right) \cdot z\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\end{array}
\end{array}
if y < -1.72e50Initial program 66.9%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6442.1
Applied rewrites42.1%
Taylor expanded in t around 0
Applied rewrites34.9%
if -1.72e50 < y < 2.3e-288Initial program 82.6%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
lower-*.f6447.3
Applied rewrites47.3%
Taylor expanded in b around 0
Applied rewrites32.6%
if 2.3e-288 < y < 2.29999999999999992e-66Initial program 82.6%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
lower-*.f6445.2
Applied rewrites45.2%
Taylor expanded in b around inf
Applied rewrites38.4%
if 2.29999999999999992e-66 < y Initial program 57.7%
lift-*.f64N/A
lift--.f64N/A
flip--N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-/.f6457.7
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f6457.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6457.7
Applied rewrites57.7%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6453.5
Applied rewrites53.5%
Taylor expanded in c around 0
Applied rewrites42.8%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- j) y (* b t)) i)))
(if (<= i -6.5e+18)
t_1
(if (<= i 1.05e+61) (* (fma (- c) b (* 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(-j, y, (b * t)) * i;
double tmp;
if (i <= -6.5e+18) {
tmp = t_1;
} else if (i <= 1.05e+61) {
tmp = fma(-c, b, (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(-j), y, Float64(b * t)) * i) tmp = 0.0 if (i <= -6.5e+18) tmp = t_1; elseif (i <= 1.05e+61) tmp = Float64(fma(Float64(-c), b, 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[((-j) * y + N[(b * t), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[i, -6.5e+18], t$95$1, If[LessEqual[i, 1.05e+61], N[(N[((-c) * b + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-j, y, b \cdot t\right) \cdot i\\
\mathbf{if}\;i \leq -6.5 \cdot 10^{+18}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;i \leq 1.05 \cdot 10^{+61}:\\
\;\;\;\;\mathsf{fma}\left(-c, b, y \cdot x\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if i < -6.5e18 or 1.0500000000000001e61 < i Initial program 63.7%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/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-*.f6468.0
Applied rewrites68.0%
if -6.5e18 < i < 1.0500000000000001e61Initial program 79.6%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
lower-*.f6449.7
Applied rewrites49.7%
Final simplification57.3%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* (fma (- j) i (* z x)) y))) (if (<= y -5e-8) t_1 (if (<= y 3.2e+41) (* (fma (- c) z (* i t)) b) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-j, i, (z * x)) * y;
double tmp;
if (y <= -5e-8) {
tmp = t_1;
} else if (y <= 3.2e+41) {
tmp = fma(-c, z, (i * t)) * b;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-j), i, Float64(z * x)) * y) tmp = 0.0 if (y <= -5e-8) tmp = t_1; elseif (y <= 3.2e+41) tmp = Float64(fma(Float64(-c), z, Float64(i * t)) * b); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-j) * i + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -5e-8], t$95$1, If[LessEqual[y, 3.2e+41], N[(N[((-c) * z + N[(i * t), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-j, i, z \cdot x\right) \cdot y\\
\mathbf{if}\;y \leq -5 \cdot 10^{-8}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 3.2 \cdot 10^{+41}:\\
\;\;\;\;\mathsf{fma}\left(-c, z, i \cdot t\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4.9999999999999998e-8 or 3.2000000000000001e41 < y Initial program 61.3%
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
lower-*.f6465.4
Applied rewrites65.4%
if -4.9999999999999998e-8 < y < 3.2000000000000001e41Initial program 81.8%
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
remove-double-negN/A
distribute-lft-neg-inN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6450.7
Applied rewrites50.7%
Final simplification57.1%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- i) y (* c a)) j)))
(if (<= j -4.7e-9)
t_1
(if (<= j 3.3e+137) (* (fma (- c) z (* i t)) b) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-i, y, (c * a)) * j;
double tmp;
if (j <= -4.7e-9) {
tmp = t_1;
} else if (j <= 3.3e+137) {
tmp = fma(-c, z, (i * t)) * b;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-i), y, Float64(c * a)) * j) tmp = 0.0 if (j <= -4.7e-9) tmp = t_1; elseif (j <= 3.3e+137) tmp = Float64(fma(Float64(-c), z, Float64(i * t)) * b); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]}, If[LessEqual[j, -4.7e-9], t$95$1, If[LessEqual[j, 3.3e+137], N[(N[((-c) * z + N[(i * t), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\\
\mathbf{if}\;j \leq -4.7 \cdot 10^{-9}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 3.3 \cdot 10^{+137}:\\
\;\;\;\;\mathsf{fma}\left(-c, z, i \cdot t\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if j < -4.6999999999999999e-9 or 3.30000000000000003e137 < j Initial program 71.7%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6461.9
Applied rewrites61.9%
if -4.6999999999999999e-9 < j < 3.30000000000000003e137Initial program 73.9%
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
remove-double-negN/A
distribute-lft-neg-inN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6452.2
Applied rewrites52.2%
Final simplification56.1%
(FPCore (x y z t a b c i j) :precision binary64 (if (<= c -1.3e+102) (* (* j c) a) (if (<= c 7.5e-29) (* (* y x) z) (* (* c a) j))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (c <= -1.3e+102) {
tmp = (j * c) * a;
} else if (c <= 7.5e-29) {
tmp = (y * x) * z;
} else {
tmp = (c * a) * j;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (c <= (-1.3d+102)) then
tmp = (j * c) * a
else if (c <= 7.5d-29) then
tmp = (y * x) * z
else
tmp = (c * a) * j
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (c <= -1.3e+102) {
tmp = (j * c) * a;
} else if (c <= 7.5e-29) {
tmp = (y * x) * z;
} else {
tmp = (c * a) * j;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if c <= -1.3e+102: tmp = (j * c) * a elif c <= 7.5e-29: tmp = (y * x) * z else: tmp = (c * a) * j return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (c <= -1.3e+102) tmp = Float64(Float64(j * c) * a); elseif (c <= 7.5e-29) tmp = Float64(Float64(y * x) * z); else tmp = Float64(Float64(c * a) * j); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (c <= -1.3e+102) tmp = (j * c) * a; elseif (c <= 7.5e-29) tmp = (y * x) * z; else tmp = (c * a) * j; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[c, -1.3e+102], N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[c, 7.5e-29], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision], N[(N[(c * a), $MachinePrecision] * j), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -1.3 \cdot 10^{+102}:\\
\;\;\;\;\left(j \cdot c\right) \cdot a\\
\mathbf{elif}\;c \leq 7.5 \cdot 10^{-29}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;\left(c \cdot a\right) \cdot j\\
\end{array}
\end{array}
if c < -1.30000000000000003e102Initial program 62.4%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6450.4
Applied rewrites50.4%
Taylor expanded in i around 0
Applied rewrites44.9%
if -1.30000000000000003e102 < c < 7.50000000000000006e-29Initial program 78.4%
lift-*.f64N/A
lift--.f64N/A
flip--N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-/.f6478.4
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f6478.4
lift-*.f64N/A
*-commutativeN/A
lower-*.f6478.4
Applied rewrites78.4%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6440.5
Applied rewrites40.5%
Taylor expanded in c around 0
Applied rewrites27.8%
if 7.50000000000000006e-29 < c Initial program 65.2%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6447.4
Applied rewrites47.4%
Taylor expanded in i around 0
Applied rewrites40.6%
Final simplification33.2%
(FPCore (x y z t a b c i j) :precision binary64 (if (<= c -1.8e+102) (* (* j c) a) (if (<= c 7.5e-29) (* (* z y) x) (* (* c a) j))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (c <= -1.8e+102) {
tmp = (j * c) * a;
} else if (c <= 7.5e-29) {
tmp = (z * y) * x;
} else {
tmp = (c * a) * j;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (c <= (-1.8d+102)) then
tmp = (j * c) * a
else if (c <= 7.5d-29) then
tmp = (z * y) * x
else
tmp = (c * a) * j
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (c <= -1.8e+102) {
tmp = (j * c) * a;
} else if (c <= 7.5e-29) {
tmp = (z * y) * x;
} else {
tmp = (c * a) * j;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if c <= -1.8e+102: tmp = (j * c) * a elif c <= 7.5e-29: tmp = (z * y) * x else: tmp = (c * a) * j return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (c <= -1.8e+102) tmp = Float64(Float64(j * c) * a); elseif (c <= 7.5e-29) tmp = Float64(Float64(z * y) * x); else tmp = Float64(Float64(c * a) * j); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (c <= -1.8e+102) tmp = (j * c) * a; elseif (c <= 7.5e-29) tmp = (z * y) * x; else tmp = (c * a) * j; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[c, -1.8e+102], N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[c, 7.5e-29], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], N[(N[(c * a), $MachinePrecision] * j), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -1.8 \cdot 10^{+102}:\\
\;\;\;\;\left(j \cdot c\right) \cdot a\\
\mathbf{elif}\;c \leq 7.5 \cdot 10^{-29}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;\left(c \cdot a\right) \cdot j\\
\end{array}
\end{array}
if c < -1.8000000000000001e102Initial program 62.4%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6450.4
Applied rewrites50.4%
Taylor expanded in i around 0
Applied rewrites44.9%
if -1.8000000000000001e102 < c < 7.50000000000000006e-29Initial program 78.4%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6446.1
Applied rewrites46.1%
Taylor expanded in t around 0
Applied rewrites27.1%
if 7.50000000000000006e-29 < c Initial program 65.2%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6447.4
Applied rewrites47.4%
Taylor expanded in i around 0
Applied rewrites40.6%
Final simplification32.8%
(FPCore (x y z t a b c i j) :precision binary64 (* (* c a) j))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return (c * a) * 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 = (c * a) * 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 (c * a) * j;
}
def code(x, y, z, t, a, b, c, i, j): return (c * a) * j
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(c * a) * j) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = (c * a) * j; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(c * a), $MachinePrecision] * j), $MachinePrecision]
\begin{array}{l}
\\
\left(c \cdot a\right) \cdot j
\end{array}
Initial program 73.0%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6435.2
Applied rewrites35.2%
Taylor expanded in i around 0
Applied rewrites22.6%
(FPCore (x y z t a b c i j) :precision binary64 (* (* j a) c))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return (j * a) * c;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = (j * a) * c
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return (j * a) * c;
}
def code(x, y, z, t, a, b, c, i, j): return (j * a) * c
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(j * a) * c) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = (j * a) * c; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(j * a), $MachinePrecision] * c), $MachinePrecision]
\begin{array}{l}
\\
\left(j \cdot a\right) \cdot c
\end{array}
Initial program 73.0%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
lower-*.f6438.6
Applied rewrites38.6%
Taylor expanded in b around 0
Applied rewrites22.1%
(FPCore (x y z t a b c i j) :precision binary64 (* (* j c) a))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return (j * c) * a;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = (j * c) * a
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return (j * c) * a;
}
def code(x, y, z, t, a, b, c, i, j): return (j * c) * a
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(j * c) * a) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = (j * c) * a; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision]
\begin{array}{l}
\\
\left(j \cdot c\right) \cdot a
\end{array}
Initial program 73.0%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6435.2
Applied rewrites35.2%
Taylor expanded in i around 0
Applied rewrites20.8%
Final simplification20.8%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* j (- (* c a) (* y i))))
(t_2
(+
(-
(* x (- (* y z) (* t a)))
(/
(* b (- (pow (* c z) 2.0) (pow (* t i) 2.0)))
(+ (* c z) (* t i))))
t_1)))
(if (< x -1.469694296777705e-64)
t_2
(if (< x 3.2113527362226803e-147)
(- (* (- (* b i) (* x a)) t) (- (* z (* c b)) t_1))
t_2))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = j * ((c * a) - (y * i));
double t_2 = ((x * ((y * z) - (t * a))) - ((b * (pow((c * z), 2.0) - pow((t * i), 2.0))) / ((c * z) + (t * i)))) + t_1;
double tmp;
if (x < -1.469694296777705e-64) {
tmp = t_2;
} else if (x < 3.2113527362226803e-147) {
tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1);
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = j * ((c * a) - (y * i))
t_2 = ((x * ((y * z) - (t * a))) - ((b * (((c * z) ** 2.0d0) - ((t * i) ** 2.0d0))) / ((c * z) + (t * i)))) + t_1
if (x < (-1.469694296777705d-64)) then
tmp = t_2
else if (x < 3.2113527362226803d-147) then
tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1)
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = j * ((c * a) - (y * i));
double t_2 = ((x * ((y * z) - (t * a))) - ((b * (Math.pow((c * z), 2.0) - Math.pow((t * i), 2.0))) / ((c * z) + (t * i)))) + t_1;
double tmp;
if (x < -1.469694296777705e-64) {
tmp = t_2;
} else if (x < 3.2113527362226803e-147) {
tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = j * ((c * a) - (y * i)) t_2 = ((x * ((y * z) - (t * a))) - ((b * (math.pow((c * z), 2.0) - math.pow((t * i), 2.0))) / ((c * z) + (t * i)))) + t_1 tmp = 0 if x < -1.469694296777705e-64: tmp = t_2 elif x < 3.2113527362226803e-147: tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(j * Float64(Float64(c * a) - Float64(y * i))) t_2 = Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(Float64(b * Float64((Float64(c * z) ^ 2.0) - (Float64(t * i) ^ 2.0))) / Float64(Float64(c * z) + Float64(t * i)))) + t_1) tmp = 0.0 if (x < -1.469694296777705e-64) tmp = t_2; elseif (x < 3.2113527362226803e-147) tmp = Float64(Float64(Float64(Float64(b * i) - Float64(x * a)) * t) - Float64(Float64(z * Float64(c * b)) - t_1)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = j * ((c * a) - (y * i)); t_2 = ((x * ((y * z) - (t * a))) - ((b * (((c * z) ^ 2.0) - ((t * i) ^ 2.0))) / ((c * z) + (t * i)))) + t_1; tmp = 0.0; if (x < -1.469694296777705e-64) tmp = t_2; elseif (x < 3.2113527362226803e-147) tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(b * N[(N[Power[N[(c * z), $MachinePrecision], 2.0], $MachinePrecision] - N[Power[N[(t * i), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(c * z), $MachinePrecision] + N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[Less[x, -1.469694296777705e-64], t$95$2, If[Less[x, 3.2113527362226803e-147], N[(N[(N[(N[(b * i), $MachinePrecision] - N[(x * a), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision] - N[(N[(z * N[(c * b), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot \left(c \cdot a - y \cdot i\right)\\
t_2 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - \frac{b \cdot \left({\left(c \cdot z\right)}^{2} - {\left(t \cdot i\right)}^{2}\right)}{c \cdot z + t \cdot i}\right) + t\_1\\
\mathbf{if}\;x < -1.469694296777705 \cdot 10^{-64}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x < 3.2113527362226803 \cdot 10^{-147}:\\
\;\;\;\;\left(b \cdot i - x \cdot a\right) \cdot t - \left(z \cdot \left(c \cdot b\right) - t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
herbie shell --seed 2024235
(FPCore (x y z t a b c i j)
:name "Data.Colour.Matrix:determinant from colour-2.3.3, A"
:precision binary64
:alt
(! :herbie-platform default (if (< x -293938859355541/2000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (* x (- (* y z) (* t a))) (/ (* b (- (pow (* c z) 2) (pow (* t i) 2))) (+ (* c z) (* t i)))) (* j (- (* c a) (* y i)))) (if (< x 32113527362226803/10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (* (- (* b i) (* x a)) t) (- (* z (* c b)) (* j (- (* c a) (* y i))))) (+ (- (* x (- (* y z) (* t a))) (/ (* b (- (pow (* c z) 2) (pow (* t i) 2))) (+ (* c z) (* t i)))) (* j (- (* c a) (* y i)))))))
(+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i)))) (* j (- (* c a) (* y i)))))