
(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 16 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 j (/ y t) (- b)) (* (- t) i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (((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(j, (y / t), -b) * (-t * i);
}
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(j, Float64(y / t), Float64(-b)) * Float64(Float64(-t) * i)); 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[(j * N[(y / t), $MachinePrecision] + (-b)), $MachinePrecision] * N[((-t) * i), $MachinePrecision]), $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(j, \frac{y}{t}, -b\right) \cdot \left(\left(-t\right) \cdot i\right)\\
\end{array}
\end{array}
if (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) < +inf.0Initial program 90.7%
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 t around inf
Applied rewrites45.4%
Taylor expanded in i around -inf
Applied rewrites57.3%
Final simplification84.1%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- x) a (* i b)) t)) (t_2 (* (fma (- c) b (* y x)) z)))
(if (<= z -6.8e+34)
t_2
(if (<= z -2.2e-193)
t_1
(if (<= z 1.3e-297)
(* (fma (- i) y (* c a)) j)
(if (<= z 3.8e-195)
t_1
(if (<= z 5.5e+15)
(fma (* b t) i (* (fma (- b) z (* j a)) c))
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(-x, a, (i * b)) * t;
double t_2 = fma(-c, b, (y * x)) * z;
double tmp;
if (z <= -6.8e+34) {
tmp = t_2;
} else if (z <= -2.2e-193) {
tmp = t_1;
} else if (z <= 1.3e-297) {
tmp = fma(-i, y, (c * a)) * j;
} else if (z <= 3.8e-195) {
tmp = t_1;
} else if (z <= 5.5e+15) {
tmp = fma((b * t), i, (fma(-b, z, (j * a)) * c));
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-x), a, Float64(i * b)) * t) t_2 = Float64(fma(Float64(-c), b, Float64(y * x)) * z) tmp = 0.0 if (z <= -6.8e+34) tmp = t_2; elseif (z <= -2.2e-193) tmp = t_1; elseif (z <= 1.3e-297) tmp = Float64(fma(Float64(-i), y, Float64(c * a)) * j); elseif (z <= 3.8e-195) tmp = t_1; elseif (z <= 5.5e+15) tmp = fma(Float64(b * t), i, Float64(fma(Float64(-b), z, Float64(j * a)) * c)); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-x) * a + N[(i * b), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]}, Block[{t$95$2 = N[(N[((-c) * b + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -6.8e+34], t$95$2, If[LessEqual[z, -2.2e-193], t$95$1, If[LessEqual[z, 1.3e-297], N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[z, 3.8e-195], t$95$1, If[LessEqual[z, 5.5e+15], N[(N[(b * t), $MachinePrecision] * i + N[(N[((-b) * z + N[(j * a), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-x, a, i \cdot b\right) \cdot t\\
t_2 := \mathsf{fma}\left(-c, b, y \cdot x\right) \cdot z\\
\mathbf{if}\;z \leq -6.8 \cdot 10^{+34}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -2.2 \cdot 10^{-193}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{-297}:\\
\;\;\;\;\mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{-195}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{+15}:\\
\;\;\;\;\mathsf{fma}\left(b \cdot t, i, \mathsf{fma}\left(-b, z, j \cdot a\right) \cdot c\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -6.7999999999999999e34 or 5.5e15 < z Initial program 73.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-*.f6468.8
Applied rewrites68.8%
if -6.7999999999999999e34 < z < -2.19999999999999977e-193 or 1.3e-297 < z < 3.80000000000000013e-195Initial program 69.8%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
*-commutativeN/A
associate-*r*N/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6463.3
Applied rewrites63.3%
if -2.19999999999999977e-193 < z < 1.3e-297Initial program 78.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-*.f6472.2
Applied rewrites72.2%
if 3.80000000000000013e-195 < z < 5.5e15Initial program 70.4%
Taylor expanded in y 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
distribute-lft-neg-inN/A
neg-mul-1N/A
remove-double-negN/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites74.5%
Taylor expanded in x around 0
Applied rewrites79.7%
Final simplification69.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- c) b (* y x)) z)))
(if (<= z -3e+38)
t_1
(if (<= z 6e+15)
(fma (fma (- c) z (* i t)) b (* (fma (- x) t (* j c)) a))
t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-c, b, (y * x)) * z;
double tmp;
if (z <= -3e+38) {
tmp = t_1;
} else if (z <= 6e+15) {
tmp = fma(fma(-c, z, (i * t)), b, (fma(-x, t, (j * c)) * a));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-c), b, Float64(y * x)) * z) tmp = 0.0 if (z <= -3e+38) tmp = t_1; elseif (z <= 6e+15) tmp = fma(fma(Float64(-c), z, Float64(i * t)), b, Float64(fma(Float64(-x), t, Float64(j * c)) * a)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-c) * b + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -3e+38], t$95$1, If[LessEqual[z, 6e+15], N[(N[((-c) * z + N[(i * t), $MachinePrecision]), $MachinePrecision] * b + N[(N[((-x) * t + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-c, b, y \cdot x\right) \cdot z\\
\mathbf{if}\;z \leq -3 \cdot 10^{+38}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 6 \cdot 10^{+15}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-c, z, i \cdot t\right), b, \mathsf{fma}\left(-x, t, j \cdot c\right) \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.0000000000000001e38 or 6e15 < z Initial program 73.5%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
lower-*.f6468.6
Applied rewrites68.6%
if -3.0000000000000001e38 < z < 6e15Initial program 71.9%
Taylor expanded in y 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
distribute-lft-neg-inN/A
neg-mul-1N/A
remove-double-negN/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites71.4%
Final simplification70.1%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- x) a (* i b)) t)) (t_2 (* (fma (- c) b (* y x)) z)))
(if (<= z -6.8e+34)
t_2
(if (<= z -2.2e-193)
t_1
(if (<= z 1.3e-297)
(* (fma (- i) y (* c a)) j)
(if (<= z 16500000000.0) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-x, a, (i * b)) * t;
double t_2 = fma(-c, b, (y * x)) * z;
double tmp;
if (z <= -6.8e+34) {
tmp = t_2;
} else if (z <= -2.2e-193) {
tmp = t_1;
} else if (z <= 1.3e-297) {
tmp = fma(-i, y, (c * a)) * j;
} else if (z <= 16500000000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-x), a, Float64(i * b)) * t) t_2 = Float64(fma(Float64(-c), b, Float64(y * x)) * z) tmp = 0.0 if (z <= -6.8e+34) tmp = t_2; elseif (z <= -2.2e-193) tmp = t_1; elseif (z <= 1.3e-297) tmp = Float64(fma(Float64(-i), y, Float64(c * a)) * j); elseif (z <= 16500000000.0) tmp = t_1; else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-x) * a + N[(i * b), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]}, Block[{t$95$2 = N[(N[((-c) * b + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -6.8e+34], t$95$2, If[LessEqual[z, -2.2e-193], t$95$1, If[LessEqual[z, 1.3e-297], N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[z, 16500000000.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-x, a, i \cdot b\right) \cdot t\\
t_2 := \mathsf{fma}\left(-c, b, y \cdot x\right) \cdot z\\
\mathbf{if}\;z \leq -6.8 \cdot 10^{+34}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -2.2 \cdot 10^{-193}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{-297}:\\
\;\;\;\;\mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\\
\mathbf{elif}\;z \leq 16500000000:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -6.7999999999999999e34 or 1.65e10 < z Initial program 73.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-*.f6468.8
Applied rewrites68.8%
if -6.7999999999999999e34 < z < -2.19999999999999977e-193 or 1.3e-297 < z < 1.65e10Initial program 70.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
*-commutativeN/A
associate-*r*N/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6461.4
Applied rewrites61.4%
if -2.19999999999999977e-193 < z < 1.3e-297Initial program 78.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-*.f6472.2
Applied rewrites72.2%
Final simplification66.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- a) t (* z y)) x)))
(if (<= x -3.4e+75)
t_1
(if (<= x 1.4e+73) (fma (fma (- c) z (* i t)) b (* (* j c) a)) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-a, t, (z * y)) * x;
double tmp;
if (x <= -3.4e+75) {
tmp = t_1;
} else if (x <= 1.4e+73) {
tmp = fma(fma(-c, z, (i * t)), b, ((j * c) * a));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-a), t, Float64(z * y)) * x) tmp = 0.0 if (x <= -3.4e+75) tmp = t_1; elseif (x <= 1.4e+73) tmp = fma(fma(Float64(-c), z, Float64(i * t)), b, Float64(Float64(j * c) * a)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -3.4e+75], t$95$1, If[LessEqual[x, 1.4e+73], N[(N[((-c) * z + N[(i * t), $MachinePrecision]), $MachinePrecision] * b + N[(N[(j * c), $MachinePrecision] * a), $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}\;x \leq -3.4 \cdot 10^{+75}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.4 \cdot 10^{+73}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-c, z, i \cdot t\right), b, \left(j \cdot c\right) \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -3.40000000000000011e75 or 1.40000000000000004e73 < x Initial program 68.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-*.f6472.4
Applied rewrites72.4%
if -3.40000000000000011e75 < x < 1.40000000000000004e73Initial program 75.5%
Taylor expanded in y 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
distribute-lft-neg-inN/A
neg-mul-1N/A
remove-double-negN/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites67.3%
Taylor expanded in c around inf
Applied rewrites63.5%
Final simplification67.1%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- a) t (* z y)) x)))
(if (<= x -3.4e+75)
t_1
(if (<= x 1.35e+74) (fma (* c a) j (* (fma (- c) z (* i t)) b)) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-a, t, (z * y)) * x;
double tmp;
if (x <= -3.4e+75) {
tmp = t_1;
} else if (x <= 1.35e+74) {
tmp = fma((c * a), j, (fma(-c, z, (i * t)) * b));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-a), t, Float64(z * y)) * x) tmp = 0.0 if (x <= -3.4e+75) tmp = t_1; elseif (x <= 1.35e+74) tmp = fma(Float64(c * a), j, Float64(fma(Float64(-c), z, Float64(i * t)) * b)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -3.4e+75], t$95$1, If[LessEqual[x, 1.35e+74], N[(N[(c * a), $MachinePrecision] * j + N[(N[((-c) * z + N[(i * t), $MachinePrecision]), $MachinePrecision] * b), $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}\;x \leq -3.4 \cdot 10^{+75}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.35 \cdot 10^{+74}:\\
\;\;\;\;\mathsf{fma}\left(c \cdot a, j, \mathsf{fma}\left(-c, z, i \cdot t\right) \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -3.40000000000000011e75 or 1.3499999999999999e74 < x Initial program 68.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-*.f6472.4
Applied rewrites72.4%
if -3.40000000000000011e75 < x < 1.3499999999999999e74Initial program 75.5%
Taylor expanded in y 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
distribute-lft-neg-inN/A
neg-mul-1N/A
remove-double-negN/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites67.3%
Taylor expanded in a around inf
Applied rewrites57.5%
Taylor expanded in x around 0
Applied rewrites62.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- c) b (* y x)) z)))
(if (<= z -7.5e+34)
t_1
(if (<= z 2.2e-143)
(* (fma (- i) y (* c a)) j)
(if (<= z 3.3e+15) (* (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(-c, b, (y * x)) * z;
double tmp;
if (z <= -7.5e+34) {
tmp = t_1;
} else if (z <= 2.2e-143) {
tmp = fma(-i, y, (c * a)) * j;
} else if (z <= 3.3e+15) {
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(-c), b, Float64(y * x)) * z) tmp = 0.0 if (z <= -7.5e+34) tmp = t_1; elseif (z <= 2.2e-143) tmp = Float64(fma(Float64(-i), y, Float64(c * a)) * j); elseif (z <= 3.3e+15) 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[((-c) * b + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -7.5e+34], t$95$1, If[LessEqual[z, 2.2e-143], N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[z, 3.3e+15], 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(-c, b, y \cdot x\right) \cdot z\\
\mathbf{if}\;z \leq -7.5 \cdot 10^{+34}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{-143}:\\
\;\;\;\;\mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\\
\mathbf{elif}\;z \leq 3.3 \cdot 10^{+15}:\\
\;\;\;\;\mathsf{fma}\left(-c, z, i \cdot t\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7.49999999999999976e34 or 3.3e15 < z Initial program 73.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-*.f6468.8
Applied rewrites68.8%
if -7.49999999999999976e34 < z < 2.19999999999999989e-143Initial program 72.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-*.f6450.4
Applied rewrites50.4%
if 2.19999999999999989e-143 < z < 3.3e15Initial program 68.1%
Taylor expanded in b around inf
*-commutativeN/A
sub-negN/A
+-commutativeN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
distribute-lft-neg-inN/A
neg-mul-1N/A
remove-double-negN/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6465.6
Applied rewrites65.6%
Final simplification61.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- a) t (* z y)) x)))
(if (<= x -3.15e+75)
t_1
(if (<= x -5.3e-232)
(* (fma (- b) z (* j a)) c)
(if (<= x 3.3e-32) (* (fma (- c) z (* i t)) b) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-a, t, (z * y)) * x;
double tmp;
if (x <= -3.15e+75) {
tmp = t_1;
} else if (x <= -5.3e-232) {
tmp = fma(-b, z, (j * a)) * c;
} else if (x <= 3.3e-32) {
tmp = fma(-c, z, (i * t)) * b;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-a), t, Float64(z * y)) * x) tmp = 0.0 if (x <= -3.15e+75) tmp = t_1; elseif (x <= -5.3e-232) tmp = Float64(fma(Float64(-b), z, Float64(j * a)) * c); elseif (x <= 3.3e-32) tmp = Float64(fma(Float64(-c), z, Float64(i * t)) * b); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -3.15e+75], t$95$1, If[LessEqual[x, -5.3e-232], N[(N[((-b) * z + N[(j * a), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[x, 3.3e-32], N[(N[((-c) * z + N[(i * t), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\
\mathbf{if}\;x \leq -3.15 \cdot 10^{+75}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -5.3 \cdot 10^{-232}:\\
\;\;\;\;\mathsf{fma}\left(-b, z, j \cdot a\right) \cdot c\\
\mathbf{elif}\;x \leq 3.3 \cdot 10^{-32}:\\
\;\;\;\;\mathsf{fma}\left(-c, z, i \cdot t\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -3.15000000000000018e75 or 3.30000000000000025e-32 < x Initial program 71.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-*.f6468.3
Applied rewrites68.3%
if -3.15000000000000018e75 < x < -5.3000000000000003e-232Initial program 75.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-*.f6452.7
Applied rewrites52.7%
if -5.3000000000000003e-232 < x < 3.30000000000000025e-32Initial program 72.7%
Taylor expanded in b around inf
*-commutativeN/A
sub-negN/A
+-commutativeN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
distribute-lft-neg-inN/A
neg-mul-1N/A
remove-double-negN/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6453.8
Applied rewrites53.8%
Final simplification60.3%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- b) z (* j a)) c)))
(if (<= c -1.05e+84)
t_1
(if (<= c -1.9e-169)
(* (fma (- c) b (* y x)) z)
(if (<= c 6.5e+34) (* (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(-b, z, (j * a)) * c;
double tmp;
if (c <= -1.05e+84) {
tmp = t_1;
} else if (c <= -1.9e-169) {
tmp = fma(-c, b, (y * x)) * z;
} else if (c <= 6.5e+34) {
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(-b), z, Float64(j * a)) * c) tmp = 0.0 if (c <= -1.05e+84) tmp = t_1; elseif (c <= -1.9e-169) tmp = Float64(fma(Float64(-c), b, Float64(y * x)) * z); elseif (c <= 6.5e+34) 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[((-b) * z + N[(j * a), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision]}, If[LessEqual[c, -1.05e+84], t$95$1, If[LessEqual[c, -1.9e-169], N[(N[((-c) * b + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[c, 6.5e+34], 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(-b, z, j \cdot a\right) \cdot c\\
\mathbf{if}\;c \leq -1.05 \cdot 10^{+84}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq -1.9 \cdot 10^{-169}:\\
\;\;\;\;\mathsf{fma}\left(-c, b, y \cdot x\right) \cdot z\\
\mathbf{elif}\;c \leq 6.5 \cdot 10^{+34}:\\
\;\;\;\;\mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -1.05000000000000009e84 or 6.50000000000000017e34 < c Initial program 63.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-*.f6467.9
Applied rewrites67.9%
if -1.05000000000000009e84 < c < -1.9e-169Initial program 77.2%
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.3
Applied rewrites49.3%
if -1.9e-169 < c < 6.50000000000000017e34Initial program 81.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.3
Applied rewrites56.3%
Final simplification60.1%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- a) t (* z y)) x)))
(if (<= x -8.2e-86)
t_1
(if (<= x -3.15e-232)
(* (* j c) a)
(if (<= x 4.3e-162) (* (* i t) b) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-a, t, (z * y)) * x;
double tmp;
if (x <= -8.2e-86) {
tmp = t_1;
} else if (x <= -3.15e-232) {
tmp = (j * c) * a;
} else if (x <= 4.3e-162) {
tmp = (i * t) * b;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-a), t, Float64(z * y)) * x) tmp = 0.0 if (x <= -8.2e-86) tmp = t_1; elseif (x <= -3.15e-232) tmp = Float64(Float64(j * c) * a); elseif (x <= 4.3e-162) tmp = Float64(Float64(i * t) * b); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -8.2e-86], t$95$1, If[LessEqual[x, -3.15e-232], N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[x, 4.3e-162], N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\
\mathbf{if}\;x \leq -8.2 \cdot 10^{-86}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -3.15 \cdot 10^{-232}:\\
\;\;\;\;\left(j \cdot c\right) \cdot a\\
\mathbf{elif}\;x \leq 4.3 \cdot 10^{-162}:\\
\;\;\;\;\left(i \cdot t\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -8.19999999999999959e-86 or 4.29999999999999996e-162 < x Initial program 74.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-*.f6457.2
Applied rewrites57.2%
if -8.19999999999999959e-86 < x < -3.15000000000000005e-232Initial program 69.1%
Taylor expanded in a 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-*.f6446.3
Applied rewrites46.3%
Taylor expanded in c around inf
Applied rewrites40.5%
if -3.15000000000000005e-232 < x < 4.29999999999999996e-162Initial program 70.1%
Taylor expanded in b around inf
*-commutativeN/A
sub-negN/A
+-commutativeN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
distribute-lft-neg-inN/A
neg-mul-1N/A
remove-double-negN/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6461.1
Applied rewrites61.1%
Taylor expanded in c around 0
Applied rewrites42.6%
Final simplification52.4%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* z y) x)))
(if (<= z -3.4e+37)
t_1
(if (<= z -7.5e-183)
(* (* (- x) t) a)
(if (<= z 7e-296) (* (* j c) a) (if (<= z 4e+17) (* (* i t) b) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (z * y) * x;
double tmp;
if (z <= -3.4e+37) {
tmp = t_1;
} else if (z <= -7.5e-183) {
tmp = (-x * t) * a;
} else if (z <= 7e-296) {
tmp = (j * c) * a;
} else if (z <= 4e+17) {
tmp = (i * t) * b;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = (z * y) * x
if (z <= (-3.4d+37)) then
tmp = t_1
else if (z <= (-7.5d-183)) then
tmp = (-x * t) * a
else if (z <= 7d-296) then
tmp = (j * c) * a
else if (z <= 4d+17) then
tmp = (i * t) * b
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (z * y) * x;
double tmp;
if (z <= -3.4e+37) {
tmp = t_1;
} else if (z <= -7.5e-183) {
tmp = (-x * t) * a;
} else if (z <= 7e-296) {
tmp = (j * c) * a;
} else if (z <= 4e+17) {
tmp = (i * t) * b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (z * y) * x tmp = 0 if z <= -3.4e+37: tmp = t_1 elif z <= -7.5e-183: tmp = (-x * t) * a elif z <= 7e-296: tmp = (j * c) * a elif z <= 4e+17: tmp = (i * t) * b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(z * y) * x) tmp = 0.0 if (z <= -3.4e+37) tmp = t_1; elseif (z <= -7.5e-183) tmp = Float64(Float64(Float64(-x) * t) * a); elseif (z <= 7e-296) tmp = Float64(Float64(j * c) * a); elseif (z <= 4e+17) tmp = Float64(Float64(i * t) * b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (z * y) * x; tmp = 0.0; if (z <= -3.4e+37) tmp = t_1; elseif (z <= -7.5e-183) tmp = (-x * t) * a; elseif (z <= 7e-296) tmp = (j * c) * a; elseif (z <= 4e+17) tmp = (i * t) * b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[z, -3.4e+37], t$95$1, If[LessEqual[z, -7.5e-183], N[(N[((-x) * t), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[z, 7e-296], N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[z, 4e+17], N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z \cdot y\right) \cdot x\\
\mathbf{if}\;z \leq -3.4 \cdot 10^{+37}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -7.5 \cdot 10^{-183}:\\
\;\;\;\;\left(\left(-x\right) \cdot t\right) \cdot a\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-296}:\\
\;\;\;\;\left(j \cdot c\right) \cdot a\\
\mathbf{elif}\;z \leq 4 \cdot 10^{+17}:\\
\;\;\;\;\left(i \cdot t\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.40000000000000006e37 or 4e17 < z Initial program 73.3%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
+-commutativeN/A
mul-1-negN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6452.4
Applied rewrites52.4%
Taylor expanded in a around 0
Applied rewrites47.4%
if -3.40000000000000006e37 < z < -7.5000000000000004e-183Initial program 72.1%
Taylor expanded in a 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-*.f6450.3
Applied rewrites50.3%
Taylor expanded in c around 0
Applied rewrites39.9%
if -7.5000000000000004e-183 < z < 6.9999999999999998e-296Initial program 76.1%
Taylor expanded in a 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.4
Applied rewrites52.4%
Taylor expanded in c around inf
Applied rewrites45.1%
if 6.9999999999999998e-296 < z < 4e17Initial program 70.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
neg-mul-1N/A
remove-double-negN/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6452.3
Applied rewrites52.3%
Taylor expanded in c around 0
Applied rewrites40.5%
Final simplification44.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* z y) x)))
(if (<= z -3.4e+37)
t_1
(if (<= z -5.8e-182)
(* (* (- a) t) x)
(if (<= z 7e-296) (* (* j c) a) (if (<= z 4e+17) (* (* i t) b) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (z * y) * x;
double tmp;
if (z <= -3.4e+37) {
tmp = t_1;
} else if (z <= -5.8e-182) {
tmp = (-a * t) * x;
} else if (z <= 7e-296) {
tmp = (j * c) * a;
} else if (z <= 4e+17) {
tmp = (i * t) * b;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = (z * y) * x
if (z <= (-3.4d+37)) then
tmp = t_1
else if (z <= (-5.8d-182)) then
tmp = (-a * t) * x
else if (z <= 7d-296) then
tmp = (j * c) * a
else if (z <= 4d+17) then
tmp = (i * t) * b
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (z * y) * x;
double tmp;
if (z <= -3.4e+37) {
tmp = t_1;
} else if (z <= -5.8e-182) {
tmp = (-a * t) * x;
} else if (z <= 7e-296) {
tmp = (j * c) * a;
} else if (z <= 4e+17) {
tmp = (i * t) * b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (z * y) * x tmp = 0 if z <= -3.4e+37: tmp = t_1 elif z <= -5.8e-182: tmp = (-a * t) * x elif z <= 7e-296: tmp = (j * c) * a elif z <= 4e+17: tmp = (i * t) * b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(z * y) * x) tmp = 0.0 if (z <= -3.4e+37) tmp = t_1; elseif (z <= -5.8e-182) tmp = Float64(Float64(Float64(-a) * t) * x); elseif (z <= 7e-296) tmp = Float64(Float64(j * c) * a); elseif (z <= 4e+17) tmp = Float64(Float64(i * t) * b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (z * y) * x; tmp = 0.0; if (z <= -3.4e+37) tmp = t_1; elseif (z <= -5.8e-182) tmp = (-a * t) * x; elseif (z <= 7e-296) tmp = (j * c) * a; elseif (z <= 4e+17) tmp = (i * t) * b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[z, -3.4e+37], t$95$1, If[LessEqual[z, -5.8e-182], N[(N[((-a) * t), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[z, 7e-296], N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[z, 4e+17], N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z \cdot y\right) \cdot x\\
\mathbf{if}\;z \leq -3.4 \cdot 10^{+37}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -5.8 \cdot 10^{-182}:\\
\;\;\;\;\left(\left(-a\right) \cdot t\right) \cdot x\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-296}:\\
\;\;\;\;\left(j \cdot c\right) \cdot a\\
\mathbf{elif}\;z \leq 4 \cdot 10^{+17}:\\
\;\;\;\;\left(i \cdot t\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.40000000000000006e37 or 4e17 < z Initial program 73.3%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
+-commutativeN/A
mul-1-negN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6452.4
Applied rewrites52.4%
Taylor expanded in a around 0
Applied rewrites47.4%
if -3.40000000000000006e37 < z < -5.79999999999999974e-182Initial program 72.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-*.f6447.2
Applied rewrites47.2%
Taylor expanded in a around inf
Applied rewrites39.9%
if -5.79999999999999974e-182 < z < 6.9999999999999998e-296Initial program 76.1%
Taylor expanded in a 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.4
Applied rewrites52.4%
Taylor expanded in c around inf
Applied rewrites45.1%
if 6.9999999999999998e-296 < z < 4e17Initial program 70.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
neg-mul-1N/A
remove-double-negN/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6452.3
Applied rewrites52.3%
Taylor expanded in c around 0
Applied rewrites40.5%
Final simplification44.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- b) z (* j a)) c)))
(if (<= c -2.15e-52)
t_1
(if (<= c 6.5e+34) (* (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(-b, z, (j * a)) * c;
double tmp;
if (c <= -2.15e-52) {
tmp = t_1;
} else if (c <= 6.5e+34) {
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(-b), z, Float64(j * a)) * c) tmp = 0.0 if (c <= -2.15e-52) tmp = t_1; elseif (c <= 6.5e+34) 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[((-b) * z + N[(j * a), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision]}, If[LessEqual[c, -2.15e-52], t$95$1, If[LessEqual[c, 6.5e+34], 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(-b, z, j \cdot a\right) \cdot c\\
\mathbf{if}\;c \leq -2.15 \cdot 10^{-52}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 6.5 \cdot 10^{+34}:\\
\;\;\;\;\mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -2.1500000000000002e-52 or 6.50000000000000017e34 < c Initial program 65.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 -2.1500000000000002e-52 < c < 6.50000000000000017e34Initial program 81.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-*.f6451.7
Applied rewrites51.7%
Final simplification58.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* z y) x)))
(if (<= z -1.15e-31)
t_1
(if (<= z 7e-296) (* (* j c) a) (if (<= z 4e+17) (* (* i t) b) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (z * y) * x;
double tmp;
if (z <= -1.15e-31) {
tmp = t_1;
} else if (z <= 7e-296) {
tmp = (j * c) * a;
} else if (z <= 4e+17) {
tmp = (i * t) * b;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = (z * y) * x
if (z <= (-1.15d-31)) then
tmp = t_1
else if (z <= 7d-296) then
tmp = (j * c) * a
else if (z <= 4d+17) then
tmp = (i * t) * b
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (z * y) * x;
double tmp;
if (z <= -1.15e-31) {
tmp = t_1;
} else if (z <= 7e-296) {
tmp = (j * c) * a;
} else if (z <= 4e+17) {
tmp = (i * t) * b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (z * y) * x tmp = 0 if z <= -1.15e-31: tmp = t_1 elif z <= 7e-296: tmp = (j * c) * a elif z <= 4e+17: tmp = (i * t) * b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(z * y) * x) tmp = 0.0 if (z <= -1.15e-31) tmp = t_1; elseif (z <= 7e-296) tmp = Float64(Float64(j * c) * a); elseif (z <= 4e+17) tmp = Float64(Float64(i * t) * b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (z * y) * x; tmp = 0.0; if (z <= -1.15e-31) tmp = t_1; elseif (z <= 7e-296) tmp = (j * c) * a; elseif (z <= 4e+17) tmp = (i * t) * b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[z, -1.15e-31], t$95$1, If[LessEqual[z, 7e-296], N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[z, 4e+17], N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z \cdot y\right) \cdot x\\
\mathbf{if}\;z \leq -1.15 \cdot 10^{-31}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-296}:\\
\;\;\;\;\left(j \cdot c\right) \cdot a\\
\mathbf{elif}\;z \leq 4 \cdot 10^{+17}:\\
\;\;\;\;\left(i \cdot t\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.1499999999999999e-31 or 4e17 < z Initial program 73.3%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
+-commutativeN/A
mul-1-negN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6453.0
Applied rewrites53.0%
Taylor expanded in a around 0
Applied rewrites45.0%
if -1.1499999999999999e-31 < z < 6.9999999999999998e-296Initial program 73.8%
Taylor expanded in a 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-*.f6449.9
Applied rewrites49.9%
Taylor expanded in c around inf
Applied rewrites38.3%
if 6.9999999999999998e-296 < z < 4e17Initial program 70.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
neg-mul-1N/A
remove-double-negN/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6452.3
Applied rewrites52.3%
Taylor expanded in c around 0
Applied rewrites40.5%
Final simplification42.5%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* (* z y) x))) (if (<= z -2.5e-10) t_1 (if (<= z 4e+17) (* (* i t) b) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (z * y) * x;
double tmp;
if (z <= -2.5e-10) {
tmp = t_1;
} else if (z <= 4e+17) {
tmp = (i * t) * b;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = (z * y) * x
if (z <= (-2.5d-10)) then
tmp = t_1
else if (z <= 4d+17) then
tmp = (i * t) * b
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (z * y) * x;
double tmp;
if (z <= -2.5e-10) {
tmp = t_1;
} else if (z <= 4e+17) {
tmp = (i * t) * b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (z * y) * x tmp = 0 if z <= -2.5e-10: tmp = t_1 elif z <= 4e+17: tmp = (i * t) * b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(z * y) * x) tmp = 0.0 if (z <= -2.5e-10) tmp = t_1; elseif (z <= 4e+17) tmp = Float64(Float64(i * t) * b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (z * y) * x; tmp = 0.0; if (z <= -2.5e-10) tmp = t_1; elseif (z <= 4e+17) tmp = (i * t) * b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[z, -2.5e-10], t$95$1, If[LessEqual[z, 4e+17], N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z \cdot y\right) \cdot x\\
\mathbf{if}\;z \leq -2.5 \cdot 10^{-10}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4 \cdot 10^{+17}:\\
\;\;\;\;\left(i \cdot t\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.50000000000000016e-10 or 4e17 < z Initial program 73.8%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
+-commutativeN/A
mul-1-negN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6453.0
Applied rewrites53.0%
Taylor expanded in a around 0
Applied rewrites46.9%
if -2.50000000000000016e-10 < z < 4e17Initial program 71.4%
Taylor expanded in b around inf
*-commutativeN/A
sub-negN/A
+-commutativeN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
distribute-lft-neg-inN/A
neg-mul-1N/A
remove-double-negN/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6440.7
Applied rewrites40.7%
Taylor expanded in c around 0
Applied rewrites32.2%
Final simplification39.8%
(FPCore (x y z t a b c i j) :precision binary64 (* (* z y) x))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return (z * y) * x;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = (z * y) * x
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return (z * y) * x;
}
def code(x, y, z, t, a, b, c, i, j): return (z * y) * x
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(z * y) * x) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = (z * y) * x; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision]
\begin{array}{l}
\\
\left(z \cdot y\right) \cdot x
\end{array}
Initial program 72.6%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
+-commutativeN/A
mul-1-negN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6443.5
Applied rewrites43.5%
Taylor expanded in a around 0
Applied rewrites27.7%
(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 2024249
(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)))))