
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
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 k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 22 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
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 k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
NOTE: j and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* k (* j 27.0)) -5e+296)
(fma j (* k -27.0) (fma x (* i -4.0) (* b c)))
(+
(fma t (fma (* x 18.0) (* y z) (* -4.0 a)) (fma b c (* i (* x -4.0))))
(* k (* j -27.0)))))assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((k * (j * 27.0)) <= -5e+296) {
tmp = fma(j, (k * -27.0), fma(x, (i * -4.0), (b * c)));
} else {
tmp = fma(t, fma((x * 18.0), (y * z), (-4.0 * a)), fma(b, c, (i * (x * -4.0)))) + (k * (j * -27.0));
}
return tmp;
}
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(k * Float64(j * 27.0)) <= -5e+296) tmp = fma(j, Float64(k * -27.0), fma(x, Float64(i * -4.0), Float64(b * c))); else tmp = Float64(fma(t, fma(Float64(x * 18.0), Float64(y * z), Float64(-4.0 * a)), fma(b, c, Float64(i * Float64(x * -4.0)))) + Float64(k * Float64(j * -27.0))); end return tmp end
NOTE: j and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision], -5e+296], N[(j * N[(k * -27.0), $MachinePrecision] + N[(x * N[(i * -4.0), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t * N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision] + N[(-4.0 * a), $MachinePrecision]), $MachinePrecision] + N[(b * c + N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;k \cdot \left(j \cdot 27\right) \leq -5 \cdot 10^{+296}:\\
\;\;\;\;\mathsf{fma}\left(j, k \cdot -27, \mathsf{fma}\left(x, i \cdot -4, b \cdot c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t, \mathsf{fma}\left(x \cdot 18, y \cdot z, -4 \cdot a\right), \mathsf{fma}\left(b, c, i \cdot \left(x \cdot -4\right)\right)\right) + k \cdot \left(j \cdot -27\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j 27) k) < -5.0000000000000001e296Initial program 63.2%
sub-neg63.2%
+-commutative63.2%
associate-*l*63.1%
distribute-rgt-neg-in63.1%
fma-def68.3%
*-commutative68.3%
distribute-rgt-neg-in68.3%
metadata-eval68.3%
sub-neg68.3%
+-commutative68.3%
associate-*l*68.3%
distribute-rgt-neg-in68.3%
Simplified84.1%
Taylor expanded in t around 0 94.7%
if -5.0000000000000001e296 < (*.f64 (*.f64 j 27) k) Initial program 87.6%
sub-neg87.6%
*-commutative87.6%
distribute-rgt-neg-in87.6%
Simplified93.8%
Final simplification93.9%
NOTE: j and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (fma j (* k -27.0) (fma x (* i -4.0) (fma t (fma x (* 18.0 (* y z)) (* -4.0 a)) (* b c)))))
assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return fma(j, (k * -27.0), fma(x, (i * -4.0), fma(t, fma(x, (18.0 * (y * z)), (-4.0 * a)), (b * c))));
}
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) return fma(j, Float64(k * -27.0), fma(x, Float64(i * -4.0), fma(t, fma(x, Float64(18.0 * Float64(y * z)), Float64(-4.0 * a)), Float64(b * c)))) end
NOTE: j and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(j * N[(k * -27.0), $MachinePrecision] + N[(x * N[(i * -4.0), $MachinePrecision] + N[(t * N[(x * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * a), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\mathsf{fma}\left(j, k \cdot -27, \mathsf{fma}\left(x, i \cdot -4, \mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), -4 \cdot a\right), b \cdot c\right)\right)\right)
\end{array}
Initial program 85.8%
sub-neg85.8%
+-commutative85.8%
associate-*l*85.8%
distribute-rgt-neg-in85.8%
fma-def86.6%
*-commutative86.6%
distribute-rgt-neg-in86.6%
metadata-eval86.6%
sub-neg86.6%
+-commutative86.6%
associate-*l*86.6%
distribute-rgt-neg-in86.6%
Simplified93.5%
Final simplification93.5%
NOTE: j and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<=
(-
(-
(+ (* b c) (- (* t (* z (* y (* x 18.0)))) (* t (* a 4.0))))
(* i (* x 4.0)))
(* k (* j 27.0)))
INFINITY)
(-
(+ (* b c) (* t (- (* (* y z) (* x 18.0)) (* a 4.0))))
(+ (* x (* i 4.0)) (* j (* k 27.0))))
(fma x (fma 18.0 (* t (* y z)) (* i -4.0)) (+ (* b c) (* -27.0 (* j k))))))assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((((b * c) + ((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0)))) - (i * (x * 4.0))) - (k * (j * 27.0))) <= ((double) INFINITY)) {
tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
} else {
tmp = fma(x, fma(18.0, (t * (y * z)), (i * -4.0)), ((b * c) + (-27.0 * (j * k))));
}
return tmp;
}
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(Float64(Float64(Float64(b * c) + Float64(Float64(t * Float64(z * Float64(y * Float64(x * 18.0)))) - Float64(t * Float64(a * 4.0)))) - Float64(i * Float64(x * 4.0))) - Float64(k * Float64(j * 27.0))) <= Inf) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(y * z) * Float64(x * 18.0)) - Float64(a * 4.0)))) - Float64(Float64(x * Float64(i * 4.0)) + Float64(j * Float64(k * 27.0)))); else tmp = fma(x, fma(18.0, Float64(t * Float64(y * z)), Float64(i * -4.0)), Float64(Float64(b * c) + Float64(-27.0 * Float64(j * k)))); end return tmp end
NOTE: j and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(N[(N[(N[(b * c), $MachinePrecision] + N[(N[(t * N[(z * N[(y * N[(x * 18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * N[(x * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(y * z), $MachinePrecision] * N[(x * 18.0), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(i * 4.0), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] + N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;\left(\left(b \cdot c + \left(t \cdot \left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right) - t \cdot \left(a \cdot 4\right)\right)\right) - i \cdot \left(x \cdot 4\right)\right) - k \cdot \left(j \cdot 27\right) \leq \infty:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot 18\right) - a \cdot 4\right)\right) - \left(x \cdot \left(i \cdot 4\right) + j \cdot \left(k \cdot 27\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, \mathsf{fma}\left(18, t \cdot \left(y \cdot z\right), i \cdot -4\right), b \cdot c + -27 \cdot \left(j \cdot k\right)\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) < +inf.0Initial program 94.7%
sub-neg94.7%
associate-+l-94.7%
sub-neg94.7%
sub-neg94.7%
distribute-rgt-out--94.6%
associate-*l*96.7%
distribute-lft-neg-in96.7%
cancel-sign-sub96.7%
associate-*l*96.7%
associate-*l*96.7%
Simplified96.7%
if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) Initial program 0.0%
Simplified50.0%
Taylor expanded in t around 0 66.7%
Final simplification93.9%
NOTE: j and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= i -4.4e+55)
(- (+ (* b c) (* -4.0 (* t a))) (+ (* 4.0 (* x i)) (* 27.0 (* j k))))
(-
(+ (* b c) (* t (- (* (* y z) (* x 18.0)) (* a 4.0))))
(+ (* x (* i 4.0)) (* j (* k 27.0))))))assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (i <= -4.4e+55) {
tmp = ((b * c) + (-4.0 * (t * a))) - ((4.0 * (x * i)) + (27.0 * (j * k)));
} else {
tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
}
return tmp;
}
NOTE: j and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: k
real(8) :: tmp
if (i <= (-4.4d+55)) then
tmp = ((b * c) + ((-4.0d0) * (t * a))) - ((4.0d0 * (x * i)) + (27.0d0 * (j * k)))
else
tmp = ((b * c) + (t * (((y * z) * (x * 18.0d0)) - (a * 4.0d0)))) - ((x * (i * 4.0d0)) + (j * (k * 27.0d0)))
end if
code = tmp
end function
assert j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (i <= -4.4e+55) {
tmp = ((b * c) + (-4.0 * (t * a))) - ((4.0 * (x * i)) + (27.0 * (j * k)));
} else {
tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
}
return tmp;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if i <= -4.4e+55: tmp = ((b * c) + (-4.0 * (t * a))) - ((4.0 * (x * i)) + (27.0 * (j * k))) else: tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0))) return tmp
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (i <= -4.4e+55) tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(Float64(4.0 * Float64(x * i)) + Float64(27.0 * Float64(j * k)))); else tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(y * z) * Float64(x * 18.0)) - Float64(a * 4.0)))) - Float64(Float64(x * Float64(i * 4.0)) + Float64(j * Float64(k * 27.0)))); end return tmp end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (i <= -4.4e+55)
tmp = ((b * c) + (-4.0 * (t * a))) - ((4.0 * (x * i)) + (27.0 * (j * k)));
else
tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
end
tmp_2 = tmp;
end
NOTE: j and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[i, -4.4e+55], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(y * z), $MachinePrecision] * N[(x * 18.0), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(i * 4.0), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;i \leq -4.4 \cdot 10^{+55}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - \left(4 \cdot \left(x \cdot i\right) + 27 \cdot \left(j \cdot k\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot 18\right) - a \cdot 4\right)\right) - \left(x \cdot \left(i \cdot 4\right) + j \cdot \left(k \cdot 27\right)\right)\\
\end{array}
\end{array}
if i < -4.40000000000000021e55Initial program 78.7%
sub-neg78.7%
associate-+l-78.7%
sub-neg78.7%
sub-neg78.7%
distribute-rgt-out--81.1%
associate-*l*81.0%
distribute-lft-neg-in81.0%
cancel-sign-sub81.0%
associate-*l*81.0%
associate-*l*81.0%
Simplified81.0%
Taylor expanded in y around 0 92.9%
if -4.40000000000000021e55 < i Initial program 87.2%
sub-neg87.2%
associate-+l-87.2%
sub-neg87.2%
sub-neg87.2%
distribute-rgt-out--90.4%
associate-*l*93.6%
distribute-lft-neg-in93.6%
cancel-sign-sub93.6%
associate-*l*93.6%
associate-*l*93.6%
Simplified93.6%
Final simplification93.5%
NOTE: j and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* 4.0 (* x i)))
(t_2 (- (* b c) (+ t_1 (* 27.0 (* j k)))))
(t_3 (+ (* b c) (* t (- (* 18.0 (* y (* x z))) (* a 4.0))))))
(if (<= t -5.7e+102)
t_3
(if (<= t -1.66e-46)
t_2
(if (<= t -6e-79)
t_3
(if (<= t -2.6e-114)
(- (+ (* b c) (* -4.0 (* t a))) t_1)
(if (<= t 3.9e+64) t_2 t_3)))))))assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 4.0 * (x * i);
double t_2 = (b * c) - (t_1 + (27.0 * (j * k)));
double t_3 = (b * c) + (t * ((18.0 * (y * (x * z))) - (a * 4.0)));
double tmp;
if (t <= -5.7e+102) {
tmp = t_3;
} else if (t <= -1.66e-46) {
tmp = t_2;
} else if (t <= -6e-79) {
tmp = t_3;
} else if (t <= -2.6e-114) {
tmp = ((b * c) + (-4.0 * (t * a))) - t_1;
} else if (t <= 3.9e+64) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
NOTE: j and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = 4.0d0 * (x * i)
t_2 = (b * c) - (t_1 + (27.0d0 * (j * k)))
t_3 = (b * c) + (t * ((18.0d0 * (y * (x * z))) - (a * 4.0d0)))
if (t <= (-5.7d+102)) then
tmp = t_3
else if (t <= (-1.66d-46)) then
tmp = t_2
else if (t <= (-6d-79)) then
tmp = t_3
else if (t <= (-2.6d-114)) then
tmp = ((b * c) + ((-4.0d0) * (t * a))) - t_1
else if (t <= 3.9d+64) then
tmp = t_2
else
tmp = t_3
end if
code = tmp
end function
assert j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 4.0 * (x * i);
double t_2 = (b * c) - (t_1 + (27.0 * (j * k)));
double t_3 = (b * c) + (t * ((18.0 * (y * (x * z))) - (a * 4.0)));
double tmp;
if (t <= -5.7e+102) {
tmp = t_3;
} else if (t <= -1.66e-46) {
tmp = t_2;
} else if (t <= -6e-79) {
tmp = t_3;
} else if (t <= -2.6e-114) {
tmp = ((b * c) + (-4.0 * (t * a))) - t_1;
} else if (t <= 3.9e+64) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 4.0 * (x * i) t_2 = (b * c) - (t_1 + (27.0 * (j * k))) t_3 = (b * c) + (t * ((18.0 * (y * (x * z))) - (a * 4.0))) tmp = 0 if t <= -5.7e+102: tmp = t_3 elif t <= -1.66e-46: tmp = t_2 elif t <= -6e-79: tmp = t_3 elif t <= -2.6e-114: tmp = ((b * c) + (-4.0 * (t * a))) - t_1 elif t <= 3.9e+64: tmp = t_2 else: tmp = t_3 return tmp
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(4.0 * Float64(x * i)) t_2 = Float64(Float64(b * c) - Float64(t_1 + Float64(27.0 * Float64(j * k)))) t_3 = Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) - Float64(a * 4.0)))) tmp = 0.0 if (t <= -5.7e+102) tmp = t_3; elseif (t <= -1.66e-46) tmp = t_2; elseif (t <= -6e-79) tmp = t_3; elseif (t <= -2.6e-114) tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - t_1); elseif (t <= 3.9e+64) tmp = t_2; else tmp = t_3; end return tmp end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 4.0 * (x * i);
t_2 = (b * c) - (t_1 + (27.0 * (j * k)));
t_3 = (b * c) + (t * ((18.0 * (y * (x * z))) - (a * 4.0)));
tmp = 0.0;
if (t <= -5.7e+102)
tmp = t_3;
elseif (t <= -1.66e-46)
tmp = t_2;
elseif (t <= -6e-79)
tmp = t_3;
elseif (t <= -2.6e-114)
tmp = ((b * c) + (-4.0 * (t * a))) - t_1;
elseif (t <= 3.9e+64)
tmp = t_2;
else
tmp = t_3;
end
tmp_2 = tmp;
end
NOTE: j and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] - N[(t$95$1 + N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.7e+102], t$95$3, If[LessEqual[t, -1.66e-46], t$95$2, If[LessEqual[t, -6e-79], t$95$3, If[LessEqual[t, -2.6e-114], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t, 3.9e+64], t$95$2, t$95$3]]]]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := 4 \cdot \left(x \cdot i\right)\\
t_2 := b \cdot c - \left(t_1 + 27 \cdot \left(j \cdot k\right)\right)\\
t_3 := b \cdot c + t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -5.7 \cdot 10^{+102}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq -1.66 \cdot 10^{-46}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -6 \cdot 10^{-79}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq -2.6 \cdot 10^{-114}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - t_1\\
\mathbf{elif}\;t \leq 3.9 \cdot 10^{+64}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if t < -5.6999999999999999e102 or -1.6599999999999999e-46 < t < -5.99999999999999999e-79 or 3.8999999999999998e64 < t Initial program 84.2%
sub-neg84.2%
associate-+l-84.2%
sub-neg84.2%
sub-neg84.2%
distribute-rgt-out--91.3%
associate-*l*92.0%
distribute-lft-neg-in92.0%
cancel-sign-sub92.0%
associate-*l*92.0%
associate-*l*92.0%
Simplified92.0%
Taylor expanded in i around 0 91.2%
Taylor expanded in k around 0 89.5%
if -5.6999999999999999e102 < t < -1.6599999999999999e-46 or -2.60000000000000013e-114 < t < 3.8999999999999998e64Initial program 86.5%
sub-neg86.5%
associate-+l-86.5%
sub-neg86.5%
sub-neg86.5%
distribute-rgt-out--86.5%
associate-*l*90.8%
distribute-lft-neg-in90.8%
cancel-sign-sub90.8%
associate-*l*90.8%
associate-*l*90.8%
Simplified90.8%
Taylor expanded in t around 0 79.4%
if -5.99999999999999999e-79 < t < -2.60000000000000013e-114Initial program 100.0%
sub-neg100.0%
associate-+l-100.0%
sub-neg100.0%
sub-neg100.0%
distribute-rgt-out--100.0%
associate-*l*100.0%
distribute-lft-neg-in100.0%
cancel-sign-sub100.0%
associate-*l*100.0%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in y around 0 100.0%
Taylor expanded in k around 0 100.0%
Final simplification84.3%
NOTE: j and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* 27.0 (* j k))))
(if (or (<= t -8.4e+74) (not (<= t 2.6e+49)))
(- (+ (* b c) (* t (- (* 18.0 (* y (* x z))) (* a 4.0)))) t_1)
(- (+ (* b c) (* -4.0 (* t a))) (+ (* 4.0 (* x i)) t_1)))))assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 27.0 * (j * k);
double tmp;
if ((t <= -8.4e+74) || !(t <= 2.6e+49)) {
tmp = ((b * c) + (t * ((18.0 * (y * (x * z))) - (a * 4.0)))) - t_1;
} else {
tmp = ((b * c) + (-4.0 * (t * a))) - ((4.0 * (x * i)) + t_1);
}
return tmp;
}
NOTE: j and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = 27.0d0 * (j * k)
if ((t <= (-8.4d+74)) .or. (.not. (t <= 2.6d+49))) then
tmp = ((b * c) + (t * ((18.0d0 * (y * (x * z))) - (a * 4.0d0)))) - t_1
else
tmp = ((b * c) + ((-4.0d0) * (t * a))) - ((4.0d0 * (x * i)) + t_1)
end if
code = tmp
end function
assert j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 27.0 * (j * k);
double tmp;
if ((t <= -8.4e+74) || !(t <= 2.6e+49)) {
tmp = ((b * c) + (t * ((18.0 * (y * (x * z))) - (a * 4.0)))) - t_1;
} else {
tmp = ((b * c) + (-4.0 * (t * a))) - ((4.0 * (x * i)) + t_1);
}
return tmp;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 27.0 * (j * k) tmp = 0 if (t <= -8.4e+74) or not (t <= 2.6e+49): tmp = ((b * c) + (t * ((18.0 * (y * (x * z))) - (a * 4.0)))) - t_1 else: tmp = ((b * c) + (-4.0 * (t * a))) - ((4.0 * (x * i)) + t_1) return tmp
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(27.0 * Float64(j * k)) tmp = 0.0 if ((t <= -8.4e+74) || !(t <= 2.6e+49)) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) - Float64(a * 4.0)))) - t_1); else tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(Float64(4.0 * Float64(x * i)) + t_1)); end return tmp end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 27.0 * (j * k);
tmp = 0.0;
if ((t <= -8.4e+74) || ~((t <= 2.6e+49)))
tmp = ((b * c) + (t * ((18.0 * (y * (x * z))) - (a * 4.0)))) - t_1;
else
tmp = ((b * c) + (-4.0 * (t * a))) - ((4.0 * (x * i)) + t_1);
end
tmp_2 = tmp;
end
NOTE: j and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t, -8.4e+74], N[Not[LessEqual[t, 2.6e+49]], $MachinePrecision]], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := 27 \cdot \left(j \cdot k\right)\\
\mathbf{if}\;t \leq -8.4 \cdot 10^{+74} \lor \neg \left(t \leq 2.6 \cdot 10^{+49}\right):\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\right) - t_1\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - \left(4 \cdot \left(x \cdot i\right) + t_1\right)\\
\end{array}
\end{array}
if t < -8.3999999999999995e74 or 2.59999999999999989e49 < t Initial program 83.8%
sub-neg83.8%
associate-+l-83.8%
sub-neg83.8%
sub-neg83.8%
distribute-rgt-out--90.6%
associate-*l*91.4%
distribute-lft-neg-in91.4%
cancel-sign-sub91.4%
associate-*l*91.4%
associate-*l*91.4%
Simplified91.4%
Taylor expanded in i around 0 90.6%
if -8.3999999999999995e74 < t < 2.59999999999999989e49Initial program 87.5%
sub-neg87.5%
associate-+l-87.5%
sub-neg87.5%
sub-neg87.5%
distribute-rgt-out--87.4%
associate-*l*91.6%
distribute-lft-neg-in91.6%
cancel-sign-sub91.6%
associate-*l*91.6%
associate-*l*91.6%
Simplified91.6%
Taylor expanded in y around 0 90.3%
Final simplification90.4%
NOTE: j and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (* b c) (* 27.0 (* j k))))
(t_2 (* t (- (* 18.0 (* y (* x z))) (* a 4.0)))))
(if (<= t -6e+192)
t_2
(if (<= t -8.5e+144)
t_1
(if (<= t -480000000.0)
t_2
(if (<= t -4.1e-198)
t_1
(if (<= t -9.5e-298)
(* x (* i -4.0))
(if (<= t 1.95e+99) t_1 t_2))))))))assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (27.0 * (j * k));
double t_2 = t * ((18.0 * (y * (x * z))) - (a * 4.0));
double tmp;
if (t <= -6e+192) {
tmp = t_2;
} else if (t <= -8.5e+144) {
tmp = t_1;
} else if (t <= -480000000.0) {
tmp = t_2;
} else if (t <= -4.1e-198) {
tmp = t_1;
} else if (t <= -9.5e-298) {
tmp = x * (i * -4.0);
} else if (t <= 1.95e+99) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: j and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (b * c) - (27.0d0 * (j * k))
t_2 = t * ((18.0d0 * (y * (x * z))) - (a * 4.0d0))
if (t <= (-6d+192)) then
tmp = t_2
else if (t <= (-8.5d+144)) then
tmp = t_1
else if (t <= (-480000000.0d0)) then
tmp = t_2
else if (t <= (-4.1d-198)) then
tmp = t_1
else if (t <= (-9.5d-298)) then
tmp = x * (i * (-4.0d0))
else if (t <= 1.95d+99) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
assert j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (27.0 * (j * k));
double t_2 = t * ((18.0 * (y * (x * z))) - (a * 4.0));
double tmp;
if (t <= -6e+192) {
tmp = t_2;
} else if (t <= -8.5e+144) {
tmp = t_1;
} else if (t <= -480000000.0) {
tmp = t_2;
} else if (t <= -4.1e-198) {
tmp = t_1;
} else if (t <= -9.5e-298) {
tmp = x * (i * -4.0);
} else if (t <= 1.95e+99) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) - (27.0 * (j * k)) t_2 = t * ((18.0 * (y * (x * z))) - (a * 4.0)) tmp = 0 if t <= -6e+192: tmp = t_2 elif t <= -8.5e+144: tmp = t_1 elif t <= -480000000.0: tmp = t_2 elif t <= -4.1e-198: tmp = t_1 elif t <= -9.5e-298: tmp = x * (i * -4.0) elif t <= 1.95e+99: tmp = t_1 else: tmp = t_2 return tmp
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))) t_2 = Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) - Float64(a * 4.0))) tmp = 0.0 if (t <= -6e+192) tmp = t_2; elseif (t <= -8.5e+144) tmp = t_1; elseif (t <= -480000000.0) tmp = t_2; elseif (t <= -4.1e-198) tmp = t_1; elseif (t <= -9.5e-298) tmp = Float64(x * Float64(i * -4.0)); elseif (t <= 1.95e+99) tmp = t_1; else tmp = t_2; end return tmp end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) - (27.0 * (j * k));
t_2 = t * ((18.0 * (y * (x * z))) - (a * 4.0));
tmp = 0.0;
if (t <= -6e+192)
tmp = t_2;
elseif (t <= -8.5e+144)
tmp = t_1;
elseif (t <= -480000000.0)
tmp = t_2;
elseif (t <= -4.1e-198)
tmp = t_1;
elseif (t <= -9.5e-298)
tmp = x * (i * -4.0);
elseif (t <= 1.95e+99)
tmp = t_1;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: j and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6e+192], t$95$2, If[LessEqual[t, -8.5e+144], t$95$1, If[LessEqual[t, -480000000.0], t$95$2, If[LessEqual[t, -4.1e-198], t$95$1, If[LessEqual[t, -9.5e-298], N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.95e+99], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c - 27 \cdot \left(j \cdot k\right)\\
t_2 := t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -6 \cdot 10^{+192}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -8.5 \cdot 10^{+144}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -480000000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -4.1 \cdot 10^{-198}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -9.5 \cdot 10^{-298}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right)\\
\mathbf{elif}\;t \leq 1.95 \cdot 10^{+99}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -6e192 or -8.4999999999999998e144 < t < -4.8e8 or 1.94999999999999997e99 < t Initial program 83.7%
Taylor expanded in i around 0 74.7%
Taylor expanded in t around inf 83.3%
if -6e192 < t < -8.4999999999999998e144 or -4.8e8 < t < -4.10000000000000012e-198 or -9.50000000000000012e-298 < t < 1.94999999999999997e99Initial program 87.2%
Taylor expanded in i around 0 75.5%
Taylor expanded in t around 0 58.3%
if -4.10000000000000012e-198 < t < -9.50000000000000012e-298Initial program 88.4%
sub-neg88.4%
+-commutative88.4%
associate-*l*88.4%
distribute-rgt-neg-in88.4%
fma-def88.4%
*-commutative88.4%
distribute-rgt-neg-in88.4%
metadata-eval88.4%
sub-neg88.4%
+-commutative88.4%
associate-*l*88.4%
distribute-rgt-neg-in88.4%
Simplified94.0%
Taylor expanded in i around inf 55.2%
associate-*r*55.2%
*-commutative55.2%
Simplified55.2%
Final simplification68.8%
NOTE: j and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (* b c) (* 27.0 (* j k))))
(t_2 (* t (- (* 18.0 (* y (* x z))) (* a 4.0)))))
(if (<= t -6.6e+192)
t_2
(if (<= t -8.5e+144)
t_1
(if (<= t -490000000.0)
t_2
(if (<= t -3.8e-198)
t_1
(if (<= t -9.5e-298)
(* x (* i -4.0))
(if (<= t 2.9e+100)
t_1
(* t (- (* 18.0 (* z (* x y))) (* a 4.0)))))))))))assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (27.0 * (j * k));
double t_2 = t * ((18.0 * (y * (x * z))) - (a * 4.0));
double tmp;
if (t <= -6.6e+192) {
tmp = t_2;
} else if (t <= -8.5e+144) {
tmp = t_1;
} else if (t <= -490000000.0) {
tmp = t_2;
} else if (t <= -3.8e-198) {
tmp = t_1;
} else if (t <= -9.5e-298) {
tmp = x * (i * -4.0);
} else if (t <= 2.9e+100) {
tmp = t_1;
} else {
tmp = t * ((18.0 * (z * (x * y))) - (a * 4.0));
}
return tmp;
}
NOTE: j and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (b * c) - (27.0d0 * (j * k))
t_2 = t * ((18.0d0 * (y * (x * z))) - (a * 4.0d0))
if (t <= (-6.6d+192)) then
tmp = t_2
else if (t <= (-8.5d+144)) then
tmp = t_1
else if (t <= (-490000000.0d0)) then
tmp = t_2
else if (t <= (-3.8d-198)) then
tmp = t_1
else if (t <= (-9.5d-298)) then
tmp = x * (i * (-4.0d0))
else if (t <= 2.9d+100) then
tmp = t_1
else
tmp = t * ((18.0d0 * (z * (x * y))) - (a * 4.0d0))
end if
code = tmp
end function
assert j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (27.0 * (j * k));
double t_2 = t * ((18.0 * (y * (x * z))) - (a * 4.0));
double tmp;
if (t <= -6.6e+192) {
tmp = t_2;
} else if (t <= -8.5e+144) {
tmp = t_1;
} else if (t <= -490000000.0) {
tmp = t_2;
} else if (t <= -3.8e-198) {
tmp = t_1;
} else if (t <= -9.5e-298) {
tmp = x * (i * -4.0);
} else if (t <= 2.9e+100) {
tmp = t_1;
} else {
tmp = t * ((18.0 * (z * (x * y))) - (a * 4.0));
}
return tmp;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) - (27.0 * (j * k)) t_2 = t * ((18.0 * (y * (x * z))) - (a * 4.0)) tmp = 0 if t <= -6.6e+192: tmp = t_2 elif t <= -8.5e+144: tmp = t_1 elif t <= -490000000.0: tmp = t_2 elif t <= -3.8e-198: tmp = t_1 elif t <= -9.5e-298: tmp = x * (i * -4.0) elif t <= 2.9e+100: tmp = t_1 else: tmp = t * ((18.0 * (z * (x * y))) - (a * 4.0)) return tmp
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))) t_2 = Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) - Float64(a * 4.0))) tmp = 0.0 if (t <= -6.6e+192) tmp = t_2; elseif (t <= -8.5e+144) tmp = t_1; elseif (t <= -490000000.0) tmp = t_2; elseif (t <= -3.8e-198) tmp = t_1; elseif (t <= -9.5e-298) tmp = Float64(x * Float64(i * -4.0)); elseif (t <= 2.9e+100) tmp = t_1; else tmp = Float64(t * Float64(Float64(18.0 * Float64(z * Float64(x * y))) - Float64(a * 4.0))); end return tmp end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) - (27.0 * (j * k));
t_2 = t * ((18.0 * (y * (x * z))) - (a * 4.0));
tmp = 0.0;
if (t <= -6.6e+192)
tmp = t_2;
elseif (t <= -8.5e+144)
tmp = t_1;
elseif (t <= -490000000.0)
tmp = t_2;
elseif (t <= -3.8e-198)
tmp = t_1;
elseif (t <= -9.5e-298)
tmp = x * (i * -4.0);
elseif (t <= 2.9e+100)
tmp = t_1;
else
tmp = t * ((18.0 * (z * (x * y))) - (a * 4.0));
end
tmp_2 = tmp;
end
NOTE: j and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.6e+192], t$95$2, If[LessEqual[t, -8.5e+144], t$95$1, If[LessEqual[t, -490000000.0], t$95$2, If[LessEqual[t, -3.8e-198], t$95$1, If[LessEqual[t, -9.5e-298], N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.9e+100], t$95$1, N[(t * N[(N[(18.0 * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c - 27 \cdot \left(j \cdot k\right)\\
t_2 := t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -6.6 \cdot 10^{+192}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -8.5 \cdot 10^{+144}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -490000000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -3.8 \cdot 10^{-198}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -9.5 \cdot 10^{-298}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right)\\
\mathbf{elif}\;t \leq 2.9 \cdot 10^{+100}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) - a \cdot 4\right)\\
\end{array}
\end{array}
if t < -6.60000000000000019e192 or -8.4999999999999998e144 < t < -4.9e8Initial program 78.4%
Taylor expanded in i around 0 76.2%
Taylor expanded in t around inf 80.7%
if -6.60000000000000019e192 < t < -8.4999999999999998e144 or -4.9e8 < t < -3.8000000000000002e-198 or -9.50000000000000012e-298 < t < 2.9e100Initial program 87.2%
Taylor expanded in i around 0 75.5%
Taylor expanded in t around 0 58.3%
if -3.8000000000000002e-198 < t < -9.50000000000000012e-298Initial program 88.4%
sub-neg88.4%
+-commutative88.4%
associate-*l*88.4%
distribute-rgt-neg-in88.4%
fma-def88.4%
*-commutative88.4%
distribute-rgt-neg-in88.4%
metadata-eval88.4%
sub-neg88.4%
+-commutative88.4%
associate-*l*88.4%
distribute-rgt-neg-in88.4%
Simplified94.0%
Taylor expanded in i around inf 55.2%
associate-*r*55.2%
*-commutative55.2%
Simplified55.2%
if 2.9e100 < t Initial program 87.5%
Taylor expanded in i around 0 73.6%
Taylor expanded in t around inf 85.1%
pow185.1%
Applied egg-rr85.1%
unpow185.1%
*-commutative85.1%
associate-*l*86.6%
Simplified86.6%
Final simplification69.2%
NOTE: j and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* 27.0 (* j k)))
(t_2 (* t (- (* 18.0 (* y (* x z))) (* a 4.0)))))
(if (<= t -1.02e+86)
(- t_2 t_1)
(if (<= t 1.75e+69)
(- (+ (* b c) (* -4.0 (* t a))) (+ (* 4.0 (* x i)) t_1))
(+ (* b c) t_2)))))assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 27.0 * (j * k);
double t_2 = t * ((18.0 * (y * (x * z))) - (a * 4.0));
double tmp;
if (t <= -1.02e+86) {
tmp = t_2 - t_1;
} else if (t <= 1.75e+69) {
tmp = ((b * c) + (-4.0 * (t * a))) - ((4.0 * (x * i)) + t_1);
} else {
tmp = (b * c) + t_2;
}
return tmp;
}
NOTE: j and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 27.0d0 * (j * k)
t_2 = t * ((18.0d0 * (y * (x * z))) - (a * 4.0d0))
if (t <= (-1.02d+86)) then
tmp = t_2 - t_1
else if (t <= 1.75d+69) then
tmp = ((b * c) + ((-4.0d0) * (t * a))) - ((4.0d0 * (x * i)) + t_1)
else
tmp = (b * c) + t_2
end if
code = tmp
end function
assert j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 27.0 * (j * k);
double t_2 = t * ((18.0 * (y * (x * z))) - (a * 4.0));
double tmp;
if (t <= -1.02e+86) {
tmp = t_2 - t_1;
} else if (t <= 1.75e+69) {
tmp = ((b * c) + (-4.0 * (t * a))) - ((4.0 * (x * i)) + t_1);
} else {
tmp = (b * c) + t_2;
}
return tmp;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 27.0 * (j * k) t_2 = t * ((18.0 * (y * (x * z))) - (a * 4.0)) tmp = 0 if t <= -1.02e+86: tmp = t_2 - t_1 elif t <= 1.75e+69: tmp = ((b * c) + (-4.0 * (t * a))) - ((4.0 * (x * i)) + t_1) else: tmp = (b * c) + t_2 return tmp
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(27.0 * Float64(j * k)) t_2 = Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) - Float64(a * 4.0))) tmp = 0.0 if (t <= -1.02e+86) tmp = Float64(t_2 - t_1); elseif (t <= 1.75e+69) tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(Float64(4.0 * Float64(x * i)) + t_1)); else tmp = Float64(Float64(b * c) + t_2); end return tmp end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 27.0 * (j * k);
t_2 = t * ((18.0 * (y * (x * z))) - (a * 4.0));
tmp = 0.0;
if (t <= -1.02e+86)
tmp = t_2 - t_1;
elseif (t <= 1.75e+69)
tmp = ((b * c) + (-4.0 * (t * a))) - ((4.0 * (x * i)) + t_1);
else
tmp = (b * c) + t_2;
end
tmp_2 = tmp;
end
NOTE: j and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.02e+86], N[(t$95$2 - t$95$1), $MachinePrecision], If[LessEqual[t, 1.75e+69], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + t$95$2), $MachinePrecision]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := 27 \cdot \left(j \cdot k\right)\\
t_2 := t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -1.02 \cdot 10^{+86}:\\
\;\;\;\;t_2 - t_1\\
\mathbf{elif}\;t \leq 1.75 \cdot 10^{+69}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - \left(4 \cdot \left(x \cdot i\right) + t_1\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + t_2\\
\end{array}
\end{array}
if t < -1.01999999999999996e86Initial program 76.2%
sub-neg76.2%
associate-+l-76.2%
sub-neg76.2%
sub-neg76.2%
distribute-rgt-out--78.4%
associate-*l*82.5%
distribute-lft-neg-in82.5%
cancel-sign-sub82.5%
associate-*l*82.5%
associate-*l*82.5%
Simplified82.5%
Taylor expanded in i around 0 82.6%
Taylor expanded in c around 0 80.6%
if -1.01999999999999996e86 < t < 1.74999999999999994e69Initial program 87.7%
sub-neg87.7%
associate-+l-87.7%
sub-neg87.7%
sub-neg87.7%
distribute-rgt-out--87.7%
associate-*l*91.8%
distribute-lft-neg-in91.8%
cancel-sign-sub91.8%
associate-*l*91.8%
associate-*l*91.8%
Simplified91.8%
Taylor expanded in y around 0 89.8%
if 1.74999999999999994e69 < t Initial program 88.2%
sub-neg88.2%
associate-+l-88.2%
sub-neg88.2%
sub-neg88.2%
distribute-rgt-out--98.5%
associate-*l*97.0%
distribute-lft-neg-in97.0%
cancel-sign-sub97.0%
associate-*l*97.0%
associate-*l*97.0%
Simplified97.0%
Taylor expanded in i around 0 95.5%
Taylor expanded in k around 0 94.1%
Final simplification89.3%
NOTE: j and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* 27.0 (* j k)))
(t_2 (- (* b c) t_1))
(t_3 (* x (- (* 18.0 (* y (* t z))) (* i 4.0)))))
(if (<= z -2.2e-198)
t_3
(if (<= z -9.5e-304)
t_2
(if (<= z 1.9e-105)
(- (* -4.0 (* t a)) t_1)
(if (<= z 1.4e-8)
t_3
(if (<= z 3.2e+63)
t_2
(* t (- (* 18.0 (* y (* x z))) (* a 4.0))))))))))assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 27.0 * (j * k);
double t_2 = (b * c) - t_1;
double t_3 = x * ((18.0 * (y * (t * z))) - (i * 4.0));
double tmp;
if (z <= -2.2e-198) {
tmp = t_3;
} else if (z <= -9.5e-304) {
tmp = t_2;
} else if (z <= 1.9e-105) {
tmp = (-4.0 * (t * a)) - t_1;
} else if (z <= 1.4e-8) {
tmp = t_3;
} else if (z <= 3.2e+63) {
tmp = t_2;
} else {
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
}
return tmp;
}
NOTE: j and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = 27.0d0 * (j * k)
t_2 = (b * c) - t_1
t_3 = x * ((18.0d0 * (y * (t * z))) - (i * 4.0d0))
if (z <= (-2.2d-198)) then
tmp = t_3
else if (z <= (-9.5d-304)) then
tmp = t_2
else if (z <= 1.9d-105) then
tmp = ((-4.0d0) * (t * a)) - t_1
else if (z <= 1.4d-8) then
tmp = t_3
else if (z <= 3.2d+63) then
tmp = t_2
else
tmp = t * ((18.0d0 * (y * (x * z))) - (a * 4.0d0))
end if
code = tmp
end function
assert j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 27.0 * (j * k);
double t_2 = (b * c) - t_1;
double t_3 = x * ((18.0 * (y * (t * z))) - (i * 4.0));
double tmp;
if (z <= -2.2e-198) {
tmp = t_3;
} else if (z <= -9.5e-304) {
tmp = t_2;
} else if (z <= 1.9e-105) {
tmp = (-4.0 * (t * a)) - t_1;
} else if (z <= 1.4e-8) {
tmp = t_3;
} else if (z <= 3.2e+63) {
tmp = t_2;
} else {
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
}
return tmp;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 27.0 * (j * k) t_2 = (b * c) - t_1 t_3 = x * ((18.0 * (y * (t * z))) - (i * 4.0)) tmp = 0 if z <= -2.2e-198: tmp = t_3 elif z <= -9.5e-304: tmp = t_2 elif z <= 1.9e-105: tmp = (-4.0 * (t * a)) - t_1 elif z <= 1.4e-8: tmp = t_3 elif z <= 3.2e+63: tmp = t_2 else: tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0)) return tmp
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(27.0 * Float64(j * k)) t_2 = Float64(Float64(b * c) - t_1) t_3 = Float64(x * Float64(Float64(18.0 * Float64(y * Float64(t * z))) - Float64(i * 4.0))) tmp = 0.0 if (z <= -2.2e-198) tmp = t_3; elseif (z <= -9.5e-304) tmp = t_2; elseif (z <= 1.9e-105) tmp = Float64(Float64(-4.0 * Float64(t * a)) - t_1); elseif (z <= 1.4e-8) tmp = t_3; elseif (z <= 3.2e+63) tmp = t_2; else tmp = Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) - Float64(a * 4.0))); end return tmp end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 27.0 * (j * k);
t_2 = (b * c) - t_1;
t_3 = x * ((18.0 * (y * (t * z))) - (i * 4.0));
tmp = 0.0;
if (z <= -2.2e-198)
tmp = t_3;
elseif (z <= -9.5e-304)
tmp = t_2;
elseif (z <= 1.9e-105)
tmp = (-4.0 * (t * a)) - t_1;
elseif (z <= 1.4e-8)
tmp = t_3;
elseif (z <= 3.2e+63)
tmp = t_2;
else
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
end
tmp_2 = tmp;
end
NOTE: j and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] - t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(N[(18.0 * N[(y * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.2e-198], t$95$3, If[LessEqual[z, -9.5e-304], t$95$2, If[LessEqual[z, 1.9e-105], N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[z, 1.4e-8], t$95$3, If[LessEqual[z, 3.2e+63], t$95$2, N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := 27 \cdot \left(j \cdot k\right)\\
t_2 := b \cdot c - t_1\\
t_3 := x \cdot \left(18 \cdot \left(y \cdot \left(t \cdot z\right)\right) - i \cdot 4\right)\\
\mathbf{if}\;z \leq -2.2 \cdot 10^{-198}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq -9.5 \cdot 10^{-304}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{-105}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right) - t_1\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{-8}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{+63}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\
\end{array}
\end{array}
if z < -2.2e-198 or 1.8999999999999999e-105 < z < 1.4e-8Initial program 81.0%
sub-neg81.0%
associate-+l-81.0%
sub-neg81.0%
sub-neg81.0%
distribute-rgt-out--85.8%
associate-*l*86.6%
distribute-lft-neg-in86.6%
cancel-sign-sub86.6%
associate-*l*86.6%
associate-*l*86.6%
Simplified86.6%
Taylor expanded in x around inf 53.3%
if -2.2e-198 < z < -9.50000000000000023e-304 or 1.4e-8 < z < 3.20000000000000011e63Initial program 94.6%
Taylor expanded in i around 0 78.6%
Taylor expanded in t around 0 60.5%
if -9.50000000000000023e-304 < z < 1.8999999999999999e-105Initial program 86.7%
sub-neg86.7%
associate-+l-86.7%
sub-neg86.7%
sub-neg86.7%
distribute-rgt-out--86.7%
associate-*l*97.7%
distribute-lft-neg-in97.7%
cancel-sign-sub97.7%
associate-*l*97.7%
associate-*l*97.7%
Simplified97.7%
Taylor expanded in x around 0 70.7%
Taylor expanded in c around 0 56.6%
if 3.20000000000000011e63 < z Initial program 90.2%
Taylor expanded in i around 0 68.5%
Taylor expanded in t around inf 59.4%
Final simplification56.1%
NOTE: j and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* 27.0 (* j k)))
(t_2 (* t (- (* 18.0 (* y (* x z))) (* a 4.0)))))
(if (<= t -6e+192)
t_2
(if (<= t -8e+144)
(- (* b c) t_1)
(if (<= t -1.45e+107)
t_2
(if (<= t 4.3e+106)
(- (* b c) (+ (* 4.0 (* x i)) t_1))
(* t (- (* 18.0 (* z (* x y))) (* a 4.0)))))))))assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 27.0 * (j * k);
double t_2 = t * ((18.0 * (y * (x * z))) - (a * 4.0));
double tmp;
if (t <= -6e+192) {
tmp = t_2;
} else if (t <= -8e+144) {
tmp = (b * c) - t_1;
} else if (t <= -1.45e+107) {
tmp = t_2;
} else if (t <= 4.3e+106) {
tmp = (b * c) - ((4.0 * (x * i)) + t_1);
} else {
tmp = t * ((18.0 * (z * (x * y))) - (a * 4.0));
}
return tmp;
}
NOTE: j and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 27.0d0 * (j * k)
t_2 = t * ((18.0d0 * (y * (x * z))) - (a * 4.0d0))
if (t <= (-6d+192)) then
tmp = t_2
else if (t <= (-8d+144)) then
tmp = (b * c) - t_1
else if (t <= (-1.45d+107)) then
tmp = t_2
else if (t <= 4.3d+106) then
tmp = (b * c) - ((4.0d0 * (x * i)) + t_1)
else
tmp = t * ((18.0d0 * (z * (x * y))) - (a * 4.0d0))
end if
code = tmp
end function
assert j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 27.0 * (j * k);
double t_2 = t * ((18.0 * (y * (x * z))) - (a * 4.0));
double tmp;
if (t <= -6e+192) {
tmp = t_2;
} else if (t <= -8e+144) {
tmp = (b * c) - t_1;
} else if (t <= -1.45e+107) {
tmp = t_2;
} else if (t <= 4.3e+106) {
tmp = (b * c) - ((4.0 * (x * i)) + t_1);
} else {
tmp = t * ((18.0 * (z * (x * y))) - (a * 4.0));
}
return tmp;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 27.0 * (j * k) t_2 = t * ((18.0 * (y * (x * z))) - (a * 4.0)) tmp = 0 if t <= -6e+192: tmp = t_2 elif t <= -8e+144: tmp = (b * c) - t_1 elif t <= -1.45e+107: tmp = t_2 elif t <= 4.3e+106: tmp = (b * c) - ((4.0 * (x * i)) + t_1) else: tmp = t * ((18.0 * (z * (x * y))) - (a * 4.0)) return tmp
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(27.0 * Float64(j * k)) t_2 = Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) - Float64(a * 4.0))) tmp = 0.0 if (t <= -6e+192) tmp = t_2; elseif (t <= -8e+144) tmp = Float64(Float64(b * c) - t_1); elseif (t <= -1.45e+107) tmp = t_2; elseif (t <= 4.3e+106) tmp = Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(x * i)) + t_1)); else tmp = Float64(t * Float64(Float64(18.0 * Float64(z * Float64(x * y))) - Float64(a * 4.0))); end return tmp end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 27.0 * (j * k);
t_2 = t * ((18.0 * (y * (x * z))) - (a * 4.0));
tmp = 0.0;
if (t <= -6e+192)
tmp = t_2;
elseif (t <= -8e+144)
tmp = (b * c) - t_1;
elseif (t <= -1.45e+107)
tmp = t_2;
elseif (t <= 4.3e+106)
tmp = (b * c) - ((4.0 * (x * i)) + t_1);
else
tmp = t * ((18.0 * (z * (x * y))) - (a * 4.0));
end
tmp_2 = tmp;
end
NOTE: j and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6e+192], t$95$2, If[LessEqual[t, -8e+144], N[(N[(b * c), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t, -1.45e+107], t$95$2, If[LessEqual[t, 4.3e+106], N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(18.0 * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := 27 \cdot \left(j \cdot k\right)\\
t_2 := t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -6 \cdot 10^{+192}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -8 \cdot 10^{+144}:\\
\;\;\;\;b \cdot c - t_1\\
\mathbf{elif}\;t \leq -1.45 \cdot 10^{+107}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 4.3 \cdot 10^{+106}:\\
\;\;\;\;b \cdot c - \left(4 \cdot \left(x \cdot i\right) + t_1\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) - a \cdot 4\right)\\
\end{array}
\end{array}
if t < -6e192 or -8.00000000000000019e144 < t < -1.44999999999999994e107Initial program 75.2%
Taylor expanded in i around 0 75.0%
Taylor expanded in t around inf 89.0%
if -6e192 < t < -8.00000000000000019e144Initial program 80.0%
Taylor expanded in i around 0 80.0%
Taylor expanded in t around 0 100.0%
if -1.44999999999999994e107 < t < 4.3e106Initial program 87.8%
sub-neg87.8%
associate-+l-87.8%
sub-neg87.8%
sub-neg87.8%
distribute-rgt-out--87.8%
associate-*l*91.6%
distribute-lft-neg-in91.6%
cancel-sign-sub91.6%
associate-*l*91.6%
associate-*l*91.6%
Simplified91.6%
Taylor expanded in t around 0 77.8%
if 4.3e106 < t Initial program 87.5%
Taylor expanded in i around 0 73.6%
Taylor expanded in t around inf 85.1%
pow185.1%
Applied egg-rr85.1%
unpow185.1%
*-commutative85.1%
associate-*l*86.6%
Simplified86.6%
Final simplification82.0%
NOTE: j and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* 18.0 (* t (* x (* y z))))) (t_2 (* a (* -4.0 t))))
(if (<= a -1.08e+200)
t_2
(if (<= a -3.5e+187)
(* k (* j -27.0))
(if (<= a -2.1e+45)
t_2
(if (<= a 1.1e-145)
t_1
(if (<= a 5.8e-105)
(* j (* k -27.0))
(if (<= a 0.0092) t_1 (if (<= a 3e+67) (* b c) t_2)))))))))assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 18.0 * (t * (x * (y * z)));
double t_2 = a * (-4.0 * t);
double tmp;
if (a <= -1.08e+200) {
tmp = t_2;
} else if (a <= -3.5e+187) {
tmp = k * (j * -27.0);
} else if (a <= -2.1e+45) {
tmp = t_2;
} else if (a <= 1.1e-145) {
tmp = t_1;
} else if (a <= 5.8e-105) {
tmp = j * (k * -27.0);
} else if (a <= 0.0092) {
tmp = t_1;
} else if (a <= 3e+67) {
tmp = b * c;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: j and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 18.0d0 * (t * (x * (y * z)))
t_2 = a * ((-4.0d0) * t)
if (a <= (-1.08d+200)) then
tmp = t_2
else if (a <= (-3.5d+187)) then
tmp = k * (j * (-27.0d0))
else if (a <= (-2.1d+45)) then
tmp = t_2
else if (a <= 1.1d-145) then
tmp = t_1
else if (a <= 5.8d-105) then
tmp = j * (k * (-27.0d0))
else if (a <= 0.0092d0) then
tmp = t_1
else if (a <= 3d+67) then
tmp = b * c
else
tmp = t_2
end if
code = tmp
end function
assert j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 18.0 * (t * (x * (y * z)));
double t_2 = a * (-4.0 * t);
double tmp;
if (a <= -1.08e+200) {
tmp = t_2;
} else if (a <= -3.5e+187) {
tmp = k * (j * -27.0);
} else if (a <= -2.1e+45) {
tmp = t_2;
} else if (a <= 1.1e-145) {
tmp = t_1;
} else if (a <= 5.8e-105) {
tmp = j * (k * -27.0);
} else if (a <= 0.0092) {
tmp = t_1;
} else if (a <= 3e+67) {
tmp = b * c;
} else {
tmp = t_2;
}
return tmp;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 18.0 * (t * (x * (y * z))) t_2 = a * (-4.0 * t) tmp = 0 if a <= -1.08e+200: tmp = t_2 elif a <= -3.5e+187: tmp = k * (j * -27.0) elif a <= -2.1e+45: tmp = t_2 elif a <= 1.1e-145: tmp = t_1 elif a <= 5.8e-105: tmp = j * (k * -27.0) elif a <= 0.0092: tmp = t_1 elif a <= 3e+67: tmp = b * c else: tmp = t_2 return tmp
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))) t_2 = Float64(a * Float64(-4.0 * t)) tmp = 0.0 if (a <= -1.08e+200) tmp = t_2; elseif (a <= -3.5e+187) tmp = Float64(k * Float64(j * -27.0)); elseif (a <= -2.1e+45) tmp = t_2; elseif (a <= 1.1e-145) tmp = t_1; elseif (a <= 5.8e-105) tmp = Float64(j * Float64(k * -27.0)); elseif (a <= 0.0092) tmp = t_1; elseif (a <= 3e+67) tmp = Float64(b * c); else tmp = t_2; end return tmp end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 18.0 * (t * (x * (y * z)));
t_2 = a * (-4.0 * t);
tmp = 0.0;
if (a <= -1.08e+200)
tmp = t_2;
elseif (a <= -3.5e+187)
tmp = k * (j * -27.0);
elseif (a <= -2.1e+45)
tmp = t_2;
elseif (a <= 1.1e-145)
tmp = t_1;
elseif (a <= 5.8e-105)
tmp = j * (k * -27.0);
elseif (a <= 0.0092)
tmp = t_1;
elseif (a <= 3e+67)
tmp = b * c;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: j and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a * N[(-4.0 * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.08e+200], t$95$2, If[LessEqual[a, -3.5e+187], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -2.1e+45], t$95$2, If[LessEqual[a, 1.1e-145], t$95$1, If[LessEqual[a, 5.8e-105], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 0.0092], t$95$1, If[LessEqual[a, 3e+67], N[(b * c), $MachinePrecision], t$95$2]]]]]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
t_2 := a \cdot \left(-4 \cdot t\right)\\
\mathbf{if}\;a \leq -1.08 \cdot 10^{+200}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq -3.5 \cdot 10^{+187}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;a \leq -2.1 \cdot 10^{+45}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq 1.1 \cdot 10^{-145}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 5.8 \cdot 10^{-105}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;a \leq 0.0092:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 3 \cdot 10^{+67}:\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if a < -1.07999999999999996e200 or -3.4999999999999998e187 < a < -2.09999999999999995e45 or 3.0000000000000001e67 < a Initial program 79.7%
Taylor expanded in i around 0 69.7%
Taylor expanded in t around inf 66.9%
Taylor expanded in y around 0 52.4%
*-commutative52.4%
associate-*r*52.4%
Simplified52.4%
if -1.07999999999999996e200 < a < -3.4999999999999998e187Initial program 80.0%
sub-neg80.0%
associate-+l-80.0%
sub-neg80.0%
sub-neg80.0%
distribute-rgt-out--80.0%
associate-*l*100.0%
distribute-lft-neg-in100.0%
cancel-sign-sub100.0%
associate-*l*100.0%
associate-*l*100.0%
Simplified100.0%
add-cbrt-cube80.0%
*-commutative80.0%
*-commutative80.0%
*-commutative80.0%
Applied egg-rr80.0%
Taylor expanded in j around inf 99.7%
*-commutative99.7%
*-commutative99.7%
*-commutative99.7%
associate-*l*100.0%
Simplified100.0%
if -2.09999999999999995e45 < a < 1.1e-145 or 5.80000000000000007e-105 < a < 0.0091999999999999998Initial program 89.8%
Taylor expanded in i around 0 76.9%
Taylor expanded in t around inf 43.7%
Taylor expanded in y around inf 38.8%
*-commutative38.8%
associate-*l*39.6%
*-commutative39.6%
Simplified39.6%
Taylor expanded in t around 0 38.8%
*-commutative38.8%
*-commutative38.8%
associate-*r*39.6%
associate-*l*39.6%
Simplified39.6%
if 1.1e-145 < a < 5.80000000000000007e-105Initial program 100.0%
sub-neg100.0%
associate-+l-100.0%
sub-neg100.0%
sub-neg100.0%
distribute-rgt-out--100.0%
associate-*l*100.0%
distribute-lft-neg-in100.0%
cancel-sign-sub100.0%
associate-*l*100.0%
associate-*l*99.9%
Simplified99.9%
add-cbrt-cube91.5%
*-commutative91.5%
*-commutative91.5%
*-commutative91.5%
Applied egg-rr91.5%
Taylor expanded in y around 0 99.9%
*-commutative99.9%
*-commutative99.9%
associate-*l*99.9%
Simplified99.9%
Taylor expanded in j around inf 51.2%
associate-*r*59.0%
Simplified59.0%
if 0.0091999999999999998 < a < 3.0000000000000001e67Initial program 84.6%
sub-neg84.6%
associate-+l-84.6%
sub-neg84.6%
sub-neg84.6%
distribute-rgt-out--84.6%
associate-*l*92.3%
distribute-lft-neg-in92.3%
cancel-sign-sub92.3%
associate-*l*92.3%
associate-*l*92.3%
Simplified92.3%
add-cbrt-cube61.8%
*-commutative61.8%
*-commutative61.8%
*-commutative61.8%
Applied egg-rr61.8%
Taylor expanded in b around inf 62.6%
Final simplification48.0%
NOTE: j and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* a (* -4.0 t))))
(if (<= a -1.08e+200)
t_1
(if (<= a -3.5e+187)
(* k (* j -27.0))
(if (<= a -1.15e+46)
t_1
(if (<= a 3.1e-145)
(* 18.0 (* t (* x (* y z))))
(if (<= a 6.6e-101)
(* j (* k -27.0))
(if (<= a 0.0205)
(* 18.0 (* t (* y (* x z))))
(if (<= a 7.5e+67) (* b c) t_1)))))))))assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = a * (-4.0 * t);
double tmp;
if (a <= -1.08e+200) {
tmp = t_1;
} else if (a <= -3.5e+187) {
tmp = k * (j * -27.0);
} else if (a <= -1.15e+46) {
tmp = t_1;
} else if (a <= 3.1e-145) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (a <= 6.6e-101) {
tmp = j * (k * -27.0);
} else if (a <= 0.0205) {
tmp = 18.0 * (t * (y * (x * z)));
} else if (a <= 7.5e+67) {
tmp = b * c;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: j and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = a * ((-4.0d0) * t)
if (a <= (-1.08d+200)) then
tmp = t_1
else if (a <= (-3.5d+187)) then
tmp = k * (j * (-27.0d0))
else if (a <= (-1.15d+46)) then
tmp = t_1
else if (a <= 3.1d-145) then
tmp = 18.0d0 * (t * (x * (y * z)))
else if (a <= 6.6d-101) then
tmp = j * (k * (-27.0d0))
else if (a <= 0.0205d0) then
tmp = 18.0d0 * (t * (y * (x * z)))
else if (a <= 7.5d+67) then
tmp = b * c
else
tmp = t_1
end if
code = tmp
end function
assert j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = a * (-4.0 * t);
double tmp;
if (a <= -1.08e+200) {
tmp = t_1;
} else if (a <= -3.5e+187) {
tmp = k * (j * -27.0);
} else if (a <= -1.15e+46) {
tmp = t_1;
} else if (a <= 3.1e-145) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (a <= 6.6e-101) {
tmp = j * (k * -27.0);
} else if (a <= 0.0205) {
tmp = 18.0 * (t * (y * (x * z)));
} else if (a <= 7.5e+67) {
tmp = b * c;
} else {
tmp = t_1;
}
return tmp;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = a * (-4.0 * t) tmp = 0 if a <= -1.08e+200: tmp = t_1 elif a <= -3.5e+187: tmp = k * (j * -27.0) elif a <= -1.15e+46: tmp = t_1 elif a <= 3.1e-145: tmp = 18.0 * (t * (x * (y * z))) elif a <= 6.6e-101: tmp = j * (k * -27.0) elif a <= 0.0205: tmp = 18.0 * (t * (y * (x * z))) elif a <= 7.5e+67: tmp = b * c else: tmp = t_1 return tmp
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(a * Float64(-4.0 * t)) tmp = 0.0 if (a <= -1.08e+200) tmp = t_1; elseif (a <= -3.5e+187) tmp = Float64(k * Float64(j * -27.0)); elseif (a <= -1.15e+46) tmp = t_1; elseif (a <= 3.1e-145) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); elseif (a <= 6.6e-101) tmp = Float64(j * Float64(k * -27.0)); elseif (a <= 0.0205) tmp = Float64(18.0 * Float64(t * Float64(y * Float64(x * z)))); elseif (a <= 7.5e+67) tmp = Float64(b * c); else tmp = t_1; end return tmp end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = a * (-4.0 * t);
tmp = 0.0;
if (a <= -1.08e+200)
tmp = t_1;
elseif (a <= -3.5e+187)
tmp = k * (j * -27.0);
elseif (a <= -1.15e+46)
tmp = t_1;
elseif (a <= 3.1e-145)
tmp = 18.0 * (t * (x * (y * z)));
elseif (a <= 6.6e-101)
tmp = j * (k * -27.0);
elseif (a <= 0.0205)
tmp = 18.0 * (t * (y * (x * z)));
elseif (a <= 7.5e+67)
tmp = b * c;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: j and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(a * N[(-4.0 * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.08e+200], t$95$1, If[LessEqual[a, -3.5e+187], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.15e+46], t$95$1, If[LessEqual[a, 3.1e-145], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.6e-101], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 0.0205], N[(18.0 * N[(t * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7.5e+67], N[(b * c), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := a \cdot \left(-4 \cdot t\right)\\
\mathbf{if}\;a \leq -1.08 \cdot 10^{+200}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -3.5 \cdot 10^{+187}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;a \leq -1.15 \cdot 10^{+46}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 3.1 \cdot 10^{-145}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;a \leq 6.6 \cdot 10^{-101}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;a \leq 0.0205:\\
\;\;\;\;18 \cdot \left(t \cdot \left(y \cdot \left(x \cdot z\right)\right)\right)\\
\mathbf{elif}\;a \leq 7.5 \cdot 10^{+67}:\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if a < -1.07999999999999996e200 or -3.4999999999999998e187 < a < -1.15e46 or 7.5000000000000005e67 < a Initial program 79.7%
Taylor expanded in i around 0 69.7%
Taylor expanded in t around inf 66.9%
Taylor expanded in y around 0 52.4%
*-commutative52.4%
associate-*r*52.4%
Simplified52.4%
if -1.07999999999999996e200 < a < -3.4999999999999998e187Initial program 80.0%
sub-neg80.0%
associate-+l-80.0%
sub-neg80.0%
sub-neg80.0%
distribute-rgt-out--80.0%
associate-*l*100.0%
distribute-lft-neg-in100.0%
cancel-sign-sub100.0%
associate-*l*100.0%
associate-*l*100.0%
Simplified100.0%
add-cbrt-cube80.0%
*-commutative80.0%
*-commutative80.0%
*-commutative80.0%
Applied egg-rr80.0%
Taylor expanded in j around inf 99.7%
*-commutative99.7%
*-commutative99.7%
*-commutative99.7%
associate-*l*100.0%
Simplified100.0%
if -1.15e46 < a < 3.1e-145Initial program 90.0%
Taylor expanded in i around 0 78.8%
Taylor expanded in t around inf 43.8%
Taylor expanded in y around inf 39.0%
*-commutative39.0%
associate-*l*39.1%
*-commutative39.1%
Simplified39.1%
Taylor expanded in t around 0 39.0%
*-commutative39.0%
*-commutative39.0%
associate-*r*39.1%
associate-*l*39.1%
Simplified39.1%
if 3.1e-145 < a < 6.59999999999999968e-101Initial program 100.0%
sub-neg100.0%
associate-+l-100.0%
sub-neg100.0%
sub-neg100.0%
distribute-rgt-out--100.0%
associate-*l*100.0%
distribute-lft-neg-in100.0%
cancel-sign-sub100.0%
associate-*l*100.0%
associate-*l*99.9%
Simplified99.9%
add-cbrt-cube91.5%
*-commutative91.5%
*-commutative91.5%
*-commutative91.5%
Applied egg-rr91.5%
Taylor expanded in y around 0 99.9%
*-commutative99.9%
*-commutative99.9%
associate-*l*99.9%
Simplified99.9%
Taylor expanded in j around inf 51.2%
associate-*r*59.0%
Simplified59.0%
if 6.59999999999999968e-101 < a < 0.0205000000000000009Initial program 88.2%
Taylor expanded in i around 0 64.6%
Taylor expanded in t around inf 42.8%
Taylor expanded in y around inf 37.5%
*-commutative37.5%
associate-*l*42.8%
*-commutative42.8%
Simplified42.8%
if 0.0205000000000000009 < a < 7.5000000000000005e67Initial program 84.6%
sub-neg84.6%
associate-+l-84.6%
sub-neg84.6%
sub-neg84.6%
distribute-rgt-out--84.6%
associate-*l*92.3%
distribute-lft-neg-in92.3%
cancel-sign-sub92.3%
associate-*l*92.3%
associate-*l*92.3%
Simplified92.3%
add-cbrt-cube61.8%
*-commutative61.8%
*-commutative61.8%
*-commutative61.8%
Applied egg-rr61.8%
Taylor expanded in b around inf 62.6%
Final simplification48.0%
NOTE: j and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* 27.0 (* j k)))
(t_2 (* t (- (* 18.0 (* y (* x z))) (* a 4.0)))))
(if (<= t -2.2e-19)
(- t_2 t_1)
(if (<= t 4.2e+63) (- (* b c) (+ (* 4.0 (* x i)) t_1)) (+ (* b c) t_2)))))assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 27.0 * (j * k);
double t_2 = t * ((18.0 * (y * (x * z))) - (a * 4.0));
double tmp;
if (t <= -2.2e-19) {
tmp = t_2 - t_1;
} else if (t <= 4.2e+63) {
tmp = (b * c) - ((4.0 * (x * i)) + t_1);
} else {
tmp = (b * c) + t_2;
}
return tmp;
}
NOTE: j and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 27.0d0 * (j * k)
t_2 = t * ((18.0d0 * (y * (x * z))) - (a * 4.0d0))
if (t <= (-2.2d-19)) then
tmp = t_2 - t_1
else if (t <= 4.2d+63) then
tmp = (b * c) - ((4.0d0 * (x * i)) + t_1)
else
tmp = (b * c) + t_2
end if
code = tmp
end function
assert j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 27.0 * (j * k);
double t_2 = t * ((18.0 * (y * (x * z))) - (a * 4.0));
double tmp;
if (t <= -2.2e-19) {
tmp = t_2 - t_1;
} else if (t <= 4.2e+63) {
tmp = (b * c) - ((4.0 * (x * i)) + t_1);
} else {
tmp = (b * c) + t_2;
}
return tmp;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 27.0 * (j * k) t_2 = t * ((18.0 * (y * (x * z))) - (a * 4.0)) tmp = 0 if t <= -2.2e-19: tmp = t_2 - t_1 elif t <= 4.2e+63: tmp = (b * c) - ((4.0 * (x * i)) + t_1) else: tmp = (b * c) + t_2 return tmp
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(27.0 * Float64(j * k)) t_2 = Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) - Float64(a * 4.0))) tmp = 0.0 if (t <= -2.2e-19) tmp = Float64(t_2 - t_1); elseif (t <= 4.2e+63) tmp = Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(x * i)) + t_1)); else tmp = Float64(Float64(b * c) + t_2); end return tmp end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 27.0 * (j * k);
t_2 = t * ((18.0 * (y * (x * z))) - (a * 4.0));
tmp = 0.0;
if (t <= -2.2e-19)
tmp = t_2 - t_1;
elseif (t <= 4.2e+63)
tmp = (b * c) - ((4.0 * (x * i)) + t_1);
else
tmp = (b * c) + t_2;
end
tmp_2 = tmp;
end
NOTE: j and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.2e-19], N[(t$95$2 - t$95$1), $MachinePrecision], If[LessEqual[t, 4.2e+63], N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + t$95$2), $MachinePrecision]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := 27 \cdot \left(j \cdot k\right)\\
t_2 := t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -2.2 \cdot 10^{-19}:\\
\;\;\;\;t_2 - t_1\\
\mathbf{elif}\;t \leq 4.2 \cdot 10^{+63}:\\
\;\;\;\;b \cdot c - \left(4 \cdot \left(x \cdot i\right) + t_1\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + t_2\\
\end{array}
\end{array}
if t < -2.1999999999999998e-19Initial program 80.1%
sub-neg80.1%
associate-+l-80.1%
sub-neg80.1%
sub-neg80.1%
distribute-rgt-out--81.9%
associate-*l*85.4%
distribute-lft-neg-in85.4%
cancel-sign-sub85.4%
associate-*l*85.4%
associate-*l*85.3%
Simplified85.3%
Taylor expanded in i around 0 83.7%
Taylor expanded in c around 0 80.2%
if -2.1999999999999998e-19 < t < 4.2000000000000004e63Initial program 86.9%
sub-neg86.9%
associate-+l-86.9%
sub-neg86.9%
sub-neg86.9%
distribute-rgt-out--86.9%
associate-*l*91.2%
distribute-lft-neg-in91.2%
cancel-sign-sub91.2%
associate-*l*91.2%
associate-*l*91.3%
Simplified91.3%
Taylor expanded in t around 0 79.1%
if 4.2000000000000004e63 < t Initial program 88.2%
sub-neg88.2%
associate-+l-88.2%
sub-neg88.2%
sub-neg88.2%
distribute-rgt-out--98.5%
associate-*l*97.0%
distribute-lft-neg-in97.0%
cancel-sign-sub97.0%
associate-*l*97.0%
associate-*l*97.0%
Simplified97.0%
Taylor expanded in i around 0 95.5%
Taylor expanded in k around 0 94.1%
Final simplification83.3%
NOTE: j and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* 27.0 (* j k)))
(t_2 (- (* b c) t_1))
(t_3 (- (* -4.0 (* t a)) t_1)))
(if (<= a -4800000.0)
t_3
(if (<= a 7e-246)
t_2
(if (<= a 7.5e-169)
(* t (* z (* y (* x 18.0))))
(if (<= a 7.2e+67) t_2 t_3))))))assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 27.0 * (j * k);
double t_2 = (b * c) - t_1;
double t_3 = (-4.0 * (t * a)) - t_1;
double tmp;
if (a <= -4800000.0) {
tmp = t_3;
} else if (a <= 7e-246) {
tmp = t_2;
} else if (a <= 7.5e-169) {
tmp = t * (z * (y * (x * 18.0)));
} else if (a <= 7.2e+67) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
NOTE: j and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = 27.0d0 * (j * k)
t_2 = (b * c) - t_1
t_3 = ((-4.0d0) * (t * a)) - t_1
if (a <= (-4800000.0d0)) then
tmp = t_3
else if (a <= 7d-246) then
tmp = t_2
else if (a <= 7.5d-169) then
tmp = t * (z * (y * (x * 18.0d0)))
else if (a <= 7.2d+67) then
tmp = t_2
else
tmp = t_3
end if
code = tmp
end function
assert j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 27.0 * (j * k);
double t_2 = (b * c) - t_1;
double t_3 = (-4.0 * (t * a)) - t_1;
double tmp;
if (a <= -4800000.0) {
tmp = t_3;
} else if (a <= 7e-246) {
tmp = t_2;
} else if (a <= 7.5e-169) {
tmp = t * (z * (y * (x * 18.0)));
} else if (a <= 7.2e+67) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 27.0 * (j * k) t_2 = (b * c) - t_1 t_3 = (-4.0 * (t * a)) - t_1 tmp = 0 if a <= -4800000.0: tmp = t_3 elif a <= 7e-246: tmp = t_2 elif a <= 7.5e-169: tmp = t * (z * (y * (x * 18.0))) elif a <= 7.2e+67: tmp = t_2 else: tmp = t_3 return tmp
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(27.0 * Float64(j * k)) t_2 = Float64(Float64(b * c) - t_1) t_3 = Float64(Float64(-4.0 * Float64(t * a)) - t_1) tmp = 0.0 if (a <= -4800000.0) tmp = t_3; elseif (a <= 7e-246) tmp = t_2; elseif (a <= 7.5e-169) tmp = Float64(t * Float64(z * Float64(y * Float64(x * 18.0)))); elseif (a <= 7.2e+67) tmp = t_2; else tmp = t_3; end return tmp end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 27.0 * (j * k);
t_2 = (b * c) - t_1;
t_3 = (-4.0 * (t * a)) - t_1;
tmp = 0.0;
if (a <= -4800000.0)
tmp = t_3;
elseif (a <= 7e-246)
tmp = t_2;
elseif (a <= 7.5e-169)
tmp = t * (z * (y * (x * 18.0)));
elseif (a <= 7.2e+67)
tmp = t_2;
else
tmp = t_3;
end
tmp_2 = tmp;
end
NOTE: j and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] - t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]}, If[LessEqual[a, -4800000.0], t$95$3, If[LessEqual[a, 7e-246], t$95$2, If[LessEqual[a, 7.5e-169], N[(t * N[(z * N[(y * N[(x * 18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7.2e+67], t$95$2, t$95$3]]]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := 27 \cdot \left(j \cdot k\right)\\
t_2 := b \cdot c - t_1\\
t_3 := -4 \cdot \left(t \cdot a\right) - t_1\\
\mathbf{if}\;a \leq -4800000:\\
\;\;\;\;t_3\\
\mathbf{elif}\;a \leq 7 \cdot 10^{-246}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq 7.5 \cdot 10^{-169}:\\
\;\;\;\;t \cdot \left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right)\\
\mathbf{elif}\;a \leq 7.2 \cdot 10^{+67}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if a < -4.8e6 or 7.1999999999999998e67 < a Initial program 80.3%
sub-neg80.3%
associate-+l-80.3%
sub-neg80.3%
sub-neg80.3%
distribute-rgt-out--87.2%
associate-*l*88.8%
distribute-lft-neg-in88.8%
cancel-sign-sub88.8%
associate-*l*88.8%
associate-*l*88.8%
Simplified88.8%
Taylor expanded in x around 0 69.8%
Taylor expanded in c around 0 60.7%
if -4.8e6 < a < 7.0000000000000003e-246 or 7.49999999999999978e-169 < a < 7.1999999999999998e67Initial program 88.9%
Taylor expanded in i around 0 73.4%
Taylor expanded in t around 0 51.6%
if 7.0000000000000003e-246 < a < 7.49999999999999978e-169Initial program 99.8%
Taylor expanded in i around 0 88.8%
Taylor expanded in y around inf 56.7%
associate-*r*56.8%
*-commutative56.8%
associate-*r*62.1%
associate-*r*62.0%
*-commutative62.0%
associate-*r*62.2%
associate-*r*62.1%
*-commutative62.1%
associate-*l*62.2%
Simplified62.2%
Final simplification56.4%
NOTE: j and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (* b c) (* 27.0 (* j k)))))
(if (<= t -9e+216)
(* a (* -4.0 t))
(if (<= t -3.8e-198)
t_1
(if (<= t -5.2e-298)
(* x (* i -4.0))
(if (<= t 1.6e+111) t_1 (* t (* z (* y (* x 18.0))))))))))assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (27.0 * (j * k));
double tmp;
if (t <= -9e+216) {
tmp = a * (-4.0 * t);
} else if (t <= -3.8e-198) {
tmp = t_1;
} else if (t <= -5.2e-298) {
tmp = x * (i * -4.0);
} else if (t <= 1.6e+111) {
tmp = t_1;
} else {
tmp = t * (z * (y * (x * 18.0)));
}
return tmp;
}
NOTE: j and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (b * c) - (27.0d0 * (j * k))
if (t <= (-9d+216)) then
tmp = a * ((-4.0d0) * t)
else if (t <= (-3.8d-198)) then
tmp = t_1
else if (t <= (-5.2d-298)) then
tmp = x * (i * (-4.0d0))
else if (t <= 1.6d+111) then
tmp = t_1
else
tmp = t * (z * (y * (x * 18.0d0)))
end if
code = tmp
end function
assert j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (27.0 * (j * k));
double tmp;
if (t <= -9e+216) {
tmp = a * (-4.0 * t);
} else if (t <= -3.8e-198) {
tmp = t_1;
} else if (t <= -5.2e-298) {
tmp = x * (i * -4.0);
} else if (t <= 1.6e+111) {
tmp = t_1;
} else {
tmp = t * (z * (y * (x * 18.0)));
}
return tmp;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) - (27.0 * (j * k)) tmp = 0 if t <= -9e+216: tmp = a * (-4.0 * t) elif t <= -3.8e-198: tmp = t_1 elif t <= -5.2e-298: tmp = x * (i * -4.0) elif t <= 1.6e+111: tmp = t_1 else: tmp = t * (z * (y * (x * 18.0))) return tmp
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))) tmp = 0.0 if (t <= -9e+216) tmp = Float64(a * Float64(-4.0 * t)); elseif (t <= -3.8e-198) tmp = t_1; elseif (t <= -5.2e-298) tmp = Float64(x * Float64(i * -4.0)); elseif (t <= 1.6e+111) tmp = t_1; else tmp = Float64(t * Float64(z * Float64(y * Float64(x * 18.0)))); end return tmp end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) - (27.0 * (j * k));
tmp = 0.0;
if (t <= -9e+216)
tmp = a * (-4.0 * t);
elseif (t <= -3.8e-198)
tmp = t_1;
elseif (t <= -5.2e-298)
tmp = x * (i * -4.0);
elseif (t <= 1.6e+111)
tmp = t_1;
else
tmp = t * (z * (y * (x * 18.0)));
end
tmp_2 = tmp;
end
NOTE: j and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9e+216], N[(a * N[(-4.0 * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.8e-198], t$95$1, If[LessEqual[t, -5.2e-298], N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.6e+111], t$95$1, N[(t * N[(z * N[(y * N[(x * 18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{if}\;t \leq -9 \cdot 10^{+216}:\\
\;\;\;\;a \cdot \left(-4 \cdot t\right)\\
\mathbf{elif}\;t \leq -3.8 \cdot 10^{-198}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -5.2 \cdot 10^{-298}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right)\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{+111}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right)\\
\end{array}
\end{array}
if t < -9.0000000000000005e216Initial program 65.1%
Taylor expanded in i around 0 65.0%
Taylor expanded in t around inf 85.0%
Taylor expanded in y around 0 66.2%
*-commutative66.2%
associate-*r*66.2%
Simplified66.2%
if -9.0000000000000005e216 < t < -3.8000000000000002e-198 or -5.1999999999999998e-298 < t < 1.6e111Initial program 87.5%
Taylor expanded in i around 0 77.0%
Taylor expanded in t around 0 52.6%
if -3.8000000000000002e-198 < t < -5.1999999999999998e-298Initial program 88.4%
sub-neg88.4%
+-commutative88.4%
associate-*l*88.4%
distribute-rgt-neg-in88.4%
fma-def88.4%
*-commutative88.4%
distribute-rgt-neg-in88.4%
metadata-eval88.4%
sub-neg88.4%
+-commutative88.4%
associate-*l*88.4%
distribute-rgt-neg-in88.4%
Simplified94.0%
Taylor expanded in i around inf 55.2%
associate-*r*55.2%
*-commutative55.2%
Simplified55.2%
if 1.6e111 < t Initial program 87.5%
Taylor expanded in i around 0 73.6%
Taylor expanded in y around inf 48.4%
associate-*r*48.4%
*-commutative48.4%
associate-*r*51.3%
associate-*r*51.3%
*-commutative51.3%
associate-*r*51.3%
associate-*r*51.3%
*-commutative51.3%
associate-*l*51.4%
Simplified51.4%
Final simplification53.5%
NOTE: j and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* x (* i -4.0))))
(if (<= k -5.3e+53)
(* -27.0 (* j k))
(if (<= k -4.4e-279)
t_1
(if (<= k 9.5e-245)
(* b c)
(if (<= k 3e-166)
t_1
(if (<= k 5.1e+113) (* b c) (* k (* j -27.0)))))))))assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * (i * -4.0);
double tmp;
if (k <= -5.3e+53) {
tmp = -27.0 * (j * k);
} else if (k <= -4.4e-279) {
tmp = t_1;
} else if (k <= 9.5e-245) {
tmp = b * c;
} else if (k <= 3e-166) {
tmp = t_1;
} else if (k <= 5.1e+113) {
tmp = b * c;
} else {
tmp = k * (j * -27.0);
}
return tmp;
}
NOTE: j and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = x * (i * (-4.0d0))
if (k <= (-5.3d+53)) then
tmp = (-27.0d0) * (j * k)
else if (k <= (-4.4d-279)) then
tmp = t_1
else if (k <= 9.5d-245) then
tmp = b * c
else if (k <= 3d-166) then
tmp = t_1
else if (k <= 5.1d+113) then
tmp = b * c
else
tmp = k * (j * (-27.0d0))
end if
code = tmp
end function
assert j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * (i * -4.0);
double tmp;
if (k <= -5.3e+53) {
tmp = -27.0 * (j * k);
} else if (k <= -4.4e-279) {
tmp = t_1;
} else if (k <= 9.5e-245) {
tmp = b * c;
} else if (k <= 3e-166) {
tmp = t_1;
} else if (k <= 5.1e+113) {
tmp = b * c;
} else {
tmp = k * (j * -27.0);
}
return tmp;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = x * (i * -4.0) tmp = 0 if k <= -5.3e+53: tmp = -27.0 * (j * k) elif k <= -4.4e-279: tmp = t_1 elif k <= 9.5e-245: tmp = b * c elif k <= 3e-166: tmp = t_1 elif k <= 5.1e+113: tmp = b * c else: tmp = k * (j * -27.0) return tmp
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(i * -4.0)) tmp = 0.0 if (k <= -5.3e+53) tmp = Float64(-27.0 * Float64(j * k)); elseif (k <= -4.4e-279) tmp = t_1; elseif (k <= 9.5e-245) tmp = Float64(b * c); elseif (k <= 3e-166) tmp = t_1; elseif (k <= 5.1e+113) tmp = Float64(b * c); else tmp = Float64(k * Float64(j * -27.0)); end return tmp end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = x * (i * -4.0);
tmp = 0.0;
if (k <= -5.3e+53)
tmp = -27.0 * (j * k);
elseif (k <= -4.4e-279)
tmp = t_1;
elseif (k <= 9.5e-245)
tmp = b * c;
elseif (k <= 3e-166)
tmp = t_1;
elseif (k <= 5.1e+113)
tmp = b * c;
else
tmp = k * (j * -27.0);
end
tmp_2 = tmp;
end
NOTE: j and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, -5.3e+53], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, -4.4e-279], t$95$1, If[LessEqual[k, 9.5e-245], N[(b * c), $MachinePrecision], If[LessEqual[k, 3e-166], t$95$1, If[LessEqual[k, 5.1e+113], N[(b * c), $MachinePrecision], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(i \cdot -4\right)\\
\mathbf{if}\;k \leq -5.3 \cdot 10^{+53}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;k \leq -4.4 \cdot 10^{-279}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;k \leq 9.5 \cdot 10^{-245}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;k \leq 3 \cdot 10^{-166}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;k \leq 5.1 \cdot 10^{+113}:\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\end{array}
\end{array}
if k < -5.3000000000000002e53Initial program 75.5%
sub-neg75.5%
+-commutative75.5%
associate-*l*75.5%
distribute-rgt-neg-in75.5%
fma-def75.5%
*-commutative75.5%
distribute-rgt-neg-in75.5%
metadata-eval75.5%
sub-neg75.5%
+-commutative75.5%
associate-*l*75.5%
distribute-rgt-neg-in75.5%
Simplified79.6%
Taylor expanded in j around inf 40.6%
if -5.3000000000000002e53 < k < -4.40000000000000001e-279 or 9.5000000000000002e-245 < k < 3.0000000000000003e-166Initial program 87.1%
sub-neg87.1%
+-commutative87.1%
associate-*l*87.1%
distribute-rgt-neg-in87.1%
fma-def87.1%
*-commutative87.1%
distribute-rgt-neg-in87.1%
metadata-eval87.1%
sub-neg87.1%
+-commutative87.1%
associate-*l*87.1%
distribute-rgt-neg-in87.1%
Simplified95.6%
Taylor expanded in i around inf 33.3%
associate-*r*33.3%
*-commutative33.3%
Simplified33.3%
if -4.40000000000000001e-279 < k < 9.5000000000000002e-245 or 3.0000000000000003e-166 < k < 5.09999999999999994e113Initial program 89.8%
sub-neg89.8%
associate-+l-89.8%
sub-neg89.8%
sub-neg89.8%
distribute-rgt-out--92.3%
associate-*l*94.7%
distribute-lft-neg-in94.7%
cancel-sign-sub94.7%
associate-*l*94.7%
associate-*l*94.7%
Simplified94.7%
add-cbrt-cube82.4%
*-commutative82.4%
*-commutative82.4%
*-commutative82.4%
Applied egg-rr82.4%
Taylor expanded in b around inf 30.6%
if 5.09999999999999994e113 < k Initial program 87.6%
sub-neg87.6%
associate-+l-87.6%
sub-neg87.6%
sub-neg87.6%
distribute-rgt-out--90.1%
associate-*l*92.7%
distribute-lft-neg-in92.7%
cancel-sign-sub92.7%
associate-*l*92.7%
associate-*l*92.7%
Simplified92.7%
add-cbrt-cube85.0%
*-commutative85.0%
*-commutative85.0%
*-commutative85.0%
Applied egg-rr85.0%
Taylor expanded in j around inf 46.8%
*-commutative46.8%
*-commutative46.8%
*-commutative46.8%
associate-*l*46.8%
Simplified46.8%
Final simplification35.9%
NOTE: j and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* x (* i -4.0))))
(if (<= k -1.25e+50)
(* -27.0 (* j k))
(if (<= k -4.2e-279)
t_1
(if (<= k 8.6e-245)
(* b c)
(if (<= k 1.65e-168)
t_1
(if (<= k 1.62e+117) (* b c) (* j (* k -27.0)))))))))assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * (i * -4.0);
double tmp;
if (k <= -1.25e+50) {
tmp = -27.0 * (j * k);
} else if (k <= -4.2e-279) {
tmp = t_1;
} else if (k <= 8.6e-245) {
tmp = b * c;
} else if (k <= 1.65e-168) {
tmp = t_1;
} else if (k <= 1.62e+117) {
tmp = b * c;
} else {
tmp = j * (k * -27.0);
}
return tmp;
}
NOTE: j and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = x * (i * (-4.0d0))
if (k <= (-1.25d+50)) then
tmp = (-27.0d0) * (j * k)
else if (k <= (-4.2d-279)) then
tmp = t_1
else if (k <= 8.6d-245) then
tmp = b * c
else if (k <= 1.65d-168) then
tmp = t_1
else if (k <= 1.62d+117) then
tmp = b * c
else
tmp = j * (k * (-27.0d0))
end if
code = tmp
end function
assert j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * (i * -4.0);
double tmp;
if (k <= -1.25e+50) {
tmp = -27.0 * (j * k);
} else if (k <= -4.2e-279) {
tmp = t_1;
} else if (k <= 8.6e-245) {
tmp = b * c;
} else if (k <= 1.65e-168) {
tmp = t_1;
} else if (k <= 1.62e+117) {
tmp = b * c;
} else {
tmp = j * (k * -27.0);
}
return tmp;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = x * (i * -4.0) tmp = 0 if k <= -1.25e+50: tmp = -27.0 * (j * k) elif k <= -4.2e-279: tmp = t_1 elif k <= 8.6e-245: tmp = b * c elif k <= 1.65e-168: tmp = t_1 elif k <= 1.62e+117: tmp = b * c else: tmp = j * (k * -27.0) return tmp
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(i * -4.0)) tmp = 0.0 if (k <= -1.25e+50) tmp = Float64(-27.0 * Float64(j * k)); elseif (k <= -4.2e-279) tmp = t_1; elseif (k <= 8.6e-245) tmp = Float64(b * c); elseif (k <= 1.65e-168) tmp = t_1; elseif (k <= 1.62e+117) tmp = Float64(b * c); else tmp = Float64(j * Float64(k * -27.0)); end return tmp end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = x * (i * -4.0);
tmp = 0.0;
if (k <= -1.25e+50)
tmp = -27.0 * (j * k);
elseif (k <= -4.2e-279)
tmp = t_1;
elseif (k <= 8.6e-245)
tmp = b * c;
elseif (k <= 1.65e-168)
tmp = t_1;
elseif (k <= 1.62e+117)
tmp = b * c;
else
tmp = j * (k * -27.0);
end
tmp_2 = tmp;
end
NOTE: j and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, -1.25e+50], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, -4.2e-279], t$95$1, If[LessEqual[k, 8.6e-245], N[(b * c), $MachinePrecision], If[LessEqual[k, 1.65e-168], t$95$1, If[LessEqual[k, 1.62e+117], N[(b * c), $MachinePrecision], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(i \cdot -4\right)\\
\mathbf{if}\;k \leq -1.25 \cdot 10^{+50}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;k \leq -4.2 \cdot 10^{-279}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;k \leq 8.6 \cdot 10^{-245}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;k \leq 1.65 \cdot 10^{-168}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;k \leq 1.62 \cdot 10^{+117}:\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if k < -1.25e50Initial program 76.5%
sub-neg76.5%
+-commutative76.5%
associate-*l*76.4%
distribute-rgt-neg-in76.4%
fma-def76.4%
*-commutative76.4%
distribute-rgt-neg-in76.4%
metadata-eval76.4%
sub-neg76.4%
+-commutative76.4%
associate-*l*76.4%
distribute-rgt-neg-in76.4%
Simplified80.5%
Taylor expanded in j around inf 39.1%
if -1.25e50 < k < -4.20000000000000011e-279 or 8.60000000000000005e-245 < k < 1.6500000000000001e-168Initial program 86.3%
sub-neg86.3%
+-commutative86.3%
associate-*l*86.4%
distribute-rgt-neg-in86.4%
fma-def86.4%
*-commutative86.4%
distribute-rgt-neg-in86.4%
metadata-eval86.4%
sub-neg86.4%
+-commutative86.4%
associate-*l*86.4%
distribute-rgt-neg-in86.4%
Simplified95.4%
Taylor expanded in i around inf 32.8%
associate-*r*32.8%
*-commutative32.8%
Simplified32.8%
if -4.20000000000000011e-279 < k < 8.60000000000000005e-245 or 1.6500000000000001e-168 < k < 1.61999999999999997e117Initial program 90.1%
sub-neg90.1%
associate-+l-90.1%
sub-neg90.1%
sub-neg90.1%
distribute-rgt-out--92.6%
associate-*l*94.9%
distribute-lft-neg-in94.9%
cancel-sign-sub94.9%
associate-*l*94.9%
associate-*l*94.9%
Simplified94.9%
add-cbrt-cube83.1%
*-commutative83.1%
*-commutative83.1%
*-commutative83.1%
Applied egg-rr83.1%
Taylor expanded in b around inf 29.5%
if 1.61999999999999997e117 < k Initial program 87.6%
sub-neg87.6%
associate-+l-87.6%
sub-neg87.6%
sub-neg87.6%
distribute-rgt-out--90.1%
associate-*l*92.7%
distribute-lft-neg-in92.7%
cancel-sign-sub92.7%
associate-*l*92.7%
associate-*l*92.7%
Simplified92.7%
add-cbrt-cube85.0%
*-commutative85.0%
*-commutative85.0%
*-commutative85.0%
Applied egg-rr85.0%
Taylor expanded in y around 0 79.7%
*-commutative79.7%
*-commutative79.7%
associate-*l*79.7%
Simplified79.7%
Taylor expanded in j around inf 46.8%
associate-*r*51.6%
Simplified51.6%
Final simplification35.8%
NOTE: j and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* x (* i -4.0))))
(if (<= k -3.3e+57)
(* -27.0 (* j k))
(if (<= k -4.2e-279)
t_1
(if (<= k 1.45e-244)
(* b c)
(if (<= k 6e-152)
t_1
(if (<= k 4e+96) (* a (* -4.0 t)) (* j (* k -27.0)))))))))assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * (i * -4.0);
double tmp;
if (k <= -3.3e+57) {
tmp = -27.0 * (j * k);
} else if (k <= -4.2e-279) {
tmp = t_1;
} else if (k <= 1.45e-244) {
tmp = b * c;
} else if (k <= 6e-152) {
tmp = t_1;
} else if (k <= 4e+96) {
tmp = a * (-4.0 * t);
} else {
tmp = j * (k * -27.0);
}
return tmp;
}
NOTE: j and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = x * (i * (-4.0d0))
if (k <= (-3.3d+57)) then
tmp = (-27.0d0) * (j * k)
else if (k <= (-4.2d-279)) then
tmp = t_1
else if (k <= 1.45d-244) then
tmp = b * c
else if (k <= 6d-152) then
tmp = t_1
else if (k <= 4d+96) then
tmp = a * ((-4.0d0) * t)
else
tmp = j * (k * (-27.0d0))
end if
code = tmp
end function
assert j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * (i * -4.0);
double tmp;
if (k <= -3.3e+57) {
tmp = -27.0 * (j * k);
} else if (k <= -4.2e-279) {
tmp = t_1;
} else if (k <= 1.45e-244) {
tmp = b * c;
} else if (k <= 6e-152) {
tmp = t_1;
} else if (k <= 4e+96) {
tmp = a * (-4.0 * t);
} else {
tmp = j * (k * -27.0);
}
return tmp;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = x * (i * -4.0) tmp = 0 if k <= -3.3e+57: tmp = -27.0 * (j * k) elif k <= -4.2e-279: tmp = t_1 elif k <= 1.45e-244: tmp = b * c elif k <= 6e-152: tmp = t_1 elif k <= 4e+96: tmp = a * (-4.0 * t) else: tmp = j * (k * -27.0) return tmp
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(i * -4.0)) tmp = 0.0 if (k <= -3.3e+57) tmp = Float64(-27.0 * Float64(j * k)); elseif (k <= -4.2e-279) tmp = t_1; elseif (k <= 1.45e-244) tmp = Float64(b * c); elseif (k <= 6e-152) tmp = t_1; elseif (k <= 4e+96) tmp = Float64(a * Float64(-4.0 * t)); else tmp = Float64(j * Float64(k * -27.0)); end return tmp end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = x * (i * -4.0);
tmp = 0.0;
if (k <= -3.3e+57)
tmp = -27.0 * (j * k);
elseif (k <= -4.2e-279)
tmp = t_1;
elseif (k <= 1.45e-244)
tmp = b * c;
elseif (k <= 6e-152)
tmp = t_1;
elseif (k <= 4e+96)
tmp = a * (-4.0 * t);
else
tmp = j * (k * -27.0);
end
tmp_2 = tmp;
end
NOTE: j and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, -3.3e+57], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, -4.2e-279], t$95$1, If[LessEqual[k, 1.45e-244], N[(b * c), $MachinePrecision], If[LessEqual[k, 6e-152], t$95$1, If[LessEqual[k, 4e+96], N[(a * N[(-4.0 * t), $MachinePrecision]), $MachinePrecision], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(i \cdot -4\right)\\
\mathbf{if}\;k \leq -3.3 \cdot 10^{+57}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;k \leq -4.2 \cdot 10^{-279}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;k \leq 1.45 \cdot 10^{-244}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;k \leq 6 \cdot 10^{-152}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;k \leq 4 \cdot 10^{+96}:\\
\;\;\;\;a \cdot \left(-4 \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if k < -3.3000000000000001e57Initial program 75.0%
sub-neg75.0%
+-commutative75.0%
associate-*l*74.9%
distribute-rgt-neg-in74.9%
fma-def74.9%
*-commutative74.9%
distribute-rgt-neg-in74.9%
metadata-eval74.9%
sub-neg74.9%
+-commutative74.9%
associate-*l*74.9%
distribute-rgt-neg-in74.9%
Simplified79.2%
Taylor expanded in j around inf 41.5%
if -3.3000000000000001e57 < k < -4.20000000000000011e-279 or 1.44999999999999998e-244 < k < 6e-152Initial program 87.6%
sub-neg87.6%
+-commutative87.6%
associate-*l*87.6%
distribute-rgt-neg-in87.6%
fma-def87.6%
*-commutative87.6%
distribute-rgt-neg-in87.6%
metadata-eval87.6%
sub-neg87.6%
+-commutative87.6%
associate-*l*87.6%
distribute-rgt-neg-in87.6%
Simplified95.8%
Taylor expanded in i around inf 32.0%
associate-*r*32.0%
*-commutative32.0%
Simplified32.0%
if -4.20000000000000011e-279 < k < 1.44999999999999998e-244Initial program 95.8%
sub-neg95.8%
associate-+l-95.8%
sub-neg95.8%
sub-neg95.8%
distribute-rgt-out--95.8%
associate-*l*99.9%
distribute-lft-neg-in99.9%
cancel-sign-sub99.9%
associate-*l*99.9%
associate-*l*99.9%
Simplified99.9%
add-cbrt-cube78.9%
*-commutative78.9%
*-commutative78.9%
*-commutative78.9%
Applied egg-rr78.9%
Taylor expanded in b around inf 38.9%
if 6e-152 < k < 4.0000000000000002e96Initial program 87.8%
Taylor expanded in i around 0 80.0%
Taylor expanded in t around inf 54.9%
Taylor expanded in y around 0 34.6%
*-commutative34.6%
associate-*r*34.6%
Simplified34.6%
if 4.0000000000000002e96 < k Initial program 86.1%
sub-neg86.1%
associate-+l-86.1%
sub-neg86.1%
sub-neg86.1%
distribute-rgt-out--88.5%
associate-*l*93.2%
distribute-lft-neg-in93.2%
cancel-sign-sub93.2%
associate-*l*93.2%
associate-*l*93.2%
Simplified93.2%
add-cbrt-cube81.3%
*-commutative81.3%
*-commutative81.3%
*-commutative81.3%
Applied egg-rr81.3%
Taylor expanded in y around 0 81.1%
*-commutative81.1%
*-commutative81.1%
associate-*l*81.1%
Simplified81.1%
Taylor expanded in j around inf 46.0%
associate-*r*50.5%
Simplified50.5%
Final simplification37.9%
NOTE: j and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (<= b -1.25e+78) (* b c) (if (<= b 5.9e-89) (* -27.0 (* j k)) (* b c))))
assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (b <= -1.25e+78) {
tmp = b * c;
} else if (b <= 5.9e-89) {
tmp = -27.0 * (j * k);
} else {
tmp = b * c;
}
return tmp;
}
NOTE: j and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: k
real(8) :: tmp
if (b <= (-1.25d+78)) then
tmp = b * c
else if (b <= 5.9d-89) then
tmp = (-27.0d0) * (j * k)
else
tmp = b * c
end if
code = tmp
end function
assert j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (b <= -1.25e+78) {
tmp = b * c;
} else if (b <= 5.9e-89) {
tmp = -27.0 * (j * k);
} else {
tmp = b * c;
}
return tmp;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if b <= -1.25e+78: tmp = b * c elif b <= 5.9e-89: tmp = -27.0 * (j * k) else: tmp = b * c return tmp
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (b <= -1.25e+78) tmp = Float64(b * c); elseif (b <= 5.9e-89) tmp = Float64(-27.0 * Float64(j * k)); else tmp = Float64(b * c); end return tmp end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (b <= -1.25e+78)
tmp = b * c;
elseif (b <= 5.9e-89)
tmp = -27.0 * (j * k);
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: j and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[b, -1.25e+78], N[(b * c), $MachinePrecision], If[LessEqual[b, 5.9e-89], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.25 \cdot 10^{+78}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \leq 5.9 \cdot 10^{-89}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if b < -1.24999999999999996e78 or 5.90000000000000021e-89 < b Initial program 87.5%
sub-neg87.5%
associate-+l-87.5%
sub-neg87.5%
sub-neg87.5%
distribute-rgt-out--90.5%
associate-*l*91.1%
distribute-lft-neg-in91.1%
cancel-sign-sub91.1%
associate-*l*91.1%
associate-*l*91.1%
Simplified91.1%
add-cbrt-cube79.6%
*-commutative79.6%
*-commutative79.6%
*-commutative79.6%
Applied egg-rr79.6%
Taylor expanded in b around inf 35.6%
if -1.24999999999999996e78 < b < 5.90000000000000021e-89Initial program 83.9%
sub-neg83.9%
+-commutative83.9%
associate-*l*83.9%
distribute-rgt-neg-in83.9%
fma-def84.7%
*-commutative84.7%
distribute-rgt-neg-in84.7%
metadata-eval84.7%
sub-neg84.7%
+-commutative84.7%
associate-*l*84.7%
distribute-rgt-neg-in84.7%
Simplified92.8%
Taylor expanded in j around inf 24.6%
Final simplification30.4%
NOTE: j and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (<= b -7e+77) (* b c) (if (<= b 2.15e-88) (* k (* j -27.0)) (* b c))))
assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (b <= -7e+77) {
tmp = b * c;
} else if (b <= 2.15e-88) {
tmp = k * (j * -27.0);
} else {
tmp = b * c;
}
return tmp;
}
NOTE: j and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: k
real(8) :: tmp
if (b <= (-7d+77)) then
tmp = b * c
else if (b <= 2.15d-88) then
tmp = k * (j * (-27.0d0))
else
tmp = b * c
end if
code = tmp
end function
assert j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (b <= -7e+77) {
tmp = b * c;
} else if (b <= 2.15e-88) {
tmp = k * (j * -27.0);
} else {
tmp = b * c;
}
return tmp;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if b <= -7e+77: tmp = b * c elif b <= 2.15e-88: tmp = k * (j * -27.0) else: tmp = b * c return tmp
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (b <= -7e+77) tmp = Float64(b * c); elseif (b <= 2.15e-88) tmp = Float64(k * Float64(j * -27.0)); else tmp = Float64(b * c); end return tmp end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (b <= -7e+77)
tmp = b * c;
elseif (b <= 2.15e-88)
tmp = k * (j * -27.0);
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: j and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[b, -7e+77], N[(b * c), $MachinePrecision], If[LessEqual[b, 2.15e-88], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -7 \cdot 10^{+77}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \leq 2.15 \cdot 10^{-88}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if b < -7.0000000000000003e77 or 2.1499999999999999e-88 < b Initial program 87.5%
sub-neg87.5%
associate-+l-87.5%
sub-neg87.5%
sub-neg87.5%
distribute-rgt-out--90.5%
associate-*l*91.1%
distribute-lft-neg-in91.1%
cancel-sign-sub91.1%
associate-*l*91.1%
associate-*l*91.1%
Simplified91.1%
add-cbrt-cube79.6%
*-commutative79.6%
*-commutative79.6%
*-commutative79.6%
Applied egg-rr79.6%
Taylor expanded in b around inf 35.6%
if -7.0000000000000003e77 < b < 2.1499999999999999e-88Initial program 83.9%
sub-neg83.9%
associate-+l-83.9%
sub-neg83.9%
sub-neg83.9%
distribute-rgt-out--87.1%
associate-*l*91.9%
distribute-lft-neg-in91.9%
cancel-sign-sub91.9%
associate-*l*91.9%
associate-*l*92.0%
Simplified92.0%
add-cbrt-cube82.4%
*-commutative82.4%
*-commutative82.4%
*-commutative82.4%
Applied egg-rr82.4%
Taylor expanded in j around inf 24.6%
*-commutative24.6%
*-commutative24.6%
*-commutative24.6%
associate-*l*24.6%
Simplified24.6%
Final simplification30.4%
NOTE: j and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (* b c))
assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
NOTE: j and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: k
code = b * c
end function
assert j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): return b * c
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) return Float64(b * c) end
j, k = num2cell(sort([j, k])){:}
function tmp = code(x, y, z, t, a, b, c, i, j, k)
tmp = b * c;
end
NOTE: j and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(b * c), $MachinePrecision]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
b \cdot c
\end{array}
Initial program 85.8%
sub-neg85.8%
associate-+l-85.8%
sub-neg85.8%
sub-neg85.8%
distribute-rgt-out--88.9%
associate-*l*91.5%
distribute-lft-neg-in91.5%
cancel-sign-sub91.5%
associate-*l*91.5%
associate-*l*91.5%
Simplified91.5%
add-cbrt-cube81.0%
*-commutative81.0%
*-commutative81.0%
*-commutative81.0%
Applied egg-rr81.0%
Taylor expanded in b around inf 22.3%
Final simplification22.3%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (+ (* a t) (* i x)) 4.0))
(t_2
(-
(- (* (* 18.0 t) (* (* x y) z)) t_1)
(- (* (* k j) 27.0) (* c b)))))
(if (< t -1.6210815397541398e-69)
t_2
(if (< t 165.68027943805222)
(+ (- (* (* 18.0 y) (* x (* z t))) t_1) (- (* c b) (* 27.0 (* k j))))
t_2))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((a * t) + (i * x)) * 4.0;
double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
double tmp;
if (t < -1.6210815397541398e-69) {
tmp = t_2;
} else if (t < 165.68027943805222) {
tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((a * t) + (i * x)) * 4.0d0
t_2 = (((18.0d0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0d0) - (c * b))
if (t < (-1.6210815397541398d-69)) then
tmp = t_2
else if (t < 165.68027943805222d0) then
tmp = (((18.0d0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0d0 * (k * j)))
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 k) {
double t_1 = ((a * t) + (i * x)) * 4.0;
double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
double tmp;
if (t < -1.6210815397541398e-69) {
tmp = t_2;
} else if (t < 165.68027943805222) {
tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = ((a * t) + (i * x)) * 4.0 t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b)) tmp = 0 if t < -1.6210815397541398e-69: tmp = t_2 elif t < 165.68027943805222: tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(a * t) + Float64(i * x)) * 4.0) t_2 = Float64(Float64(Float64(Float64(18.0 * t) * Float64(Float64(x * y) * z)) - t_1) - Float64(Float64(Float64(k * j) * 27.0) - Float64(c * b))) tmp = 0.0 if (t < -1.6210815397541398e-69) tmp = t_2; elseif (t < 165.68027943805222) tmp = Float64(Float64(Float64(Float64(18.0 * y) * Float64(x * Float64(z * t))) - t_1) + Float64(Float64(c * b) - Float64(27.0 * Float64(k * j)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = ((a * t) + (i * x)) * 4.0; t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b)); tmp = 0.0; if (t < -1.6210815397541398e-69) tmp = t_2; elseif (t < 165.68027943805222) tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(a * t), $MachinePrecision] + N[(i * x), $MachinePrecision]), $MachinePrecision] * 4.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(18.0 * t), $MachinePrecision] * N[(N[(x * y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - N[(N[(N[(k * j), $MachinePrecision] * 27.0), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.6210815397541398e-69], t$95$2, If[Less[t, 165.68027943805222], N[(N[(N[(N[(18.0 * y), $MachinePrecision] * N[(x * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] + N[(N[(c * b), $MachinePrecision] - N[(27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot t + i \cdot x\right) \cdot 4\\
t_2 := \left(\left(18 \cdot t\right) \cdot \left(\left(x \cdot y\right) \cdot z\right) - t_1\right) - \left(\left(k \cdot j\right) \cdot 27 - c \cdot b\right)\\
\mathbf{if}\;t < -1.6210815397541398 \cdot 10^{-69}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t < 165.68027943805222:\\
\;\;\;\;\left(\left(18 \cdot y\right) \cdot \left(x \cdot \left(z \cdot t\right)\right) - t_1\right) + \left(c \cdot b - 27 \cdot \left(k \cdot j\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
herbie shell --seed 2023230
(FPCore (x y z t a b c i j k)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, E"
:precision binary64
:herbie-target
(if (< t -1.6210815397541398e-69) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b))) (if (< t 165.68027943805222) (+ (- (* (* 18.0 y) (* x (* z t))) (* (+ (* a t) (* i x)) 4.0)) (- (* c b) (* 27.0 (* k j)))) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b)))))
(- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))