
(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 25 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
(let* ((t_1 (* x (- (* 18.0 (* t (* y z))) (* 4.0 i))))
(t_2 (- (+ (* b c) t_1) (* 4.0 (* t a))))
(t_3
(-
(+ (- (* (* (* (* x 18.0) y) z) t) (* t (* a 4.0))) (* b c))
(* (* x 4.0) i))))
(if (<= t_3 (- INFINITY))
t_2
(if (<= t_3 2e+286)
(- t_3 (* (* j 27.0) k))
(if (<= t_3 INFINITY) t_2 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 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
double t_2 = ((b * c) + t_1) - (4.0 * (t * a));
double t_3 = ((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i);
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = t_2;
} else if (t_3 <= 2e+286) {
tmp = t_3 - ((j * 27.0) * k);
} else if (t_3 <= ((double) INFINITY)) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
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 * ((18.0 * (t * (y * z))) - (4.0 * i));
double t_2 = ((b * c) + t_1) - (4.0 * (t * a));
double t_3 = ((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i);
double tmp;
if (t_3 <= -Double.POSITIVE_INFINITY) {
tmp = t_2;
} else if (t_3 <= 2e+286) {
tmp = t_3 - ((j * 27.0) * k);
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = t_2;
} 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 = x * ((18.0 * (t * (y * z))) - (4.0 * i)) t_2 = ((b * c) + t_1) - (4.0 * (t * a)) t_3 = ((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i) tmp = 0 if t_3 <= -math.inf: tmp = t_2 elif t_3 <= 2e+286: tmp = t_3 - ((j * 27.0) * k) elif t_3 <= math.inf: tmp = t_2 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(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))) t_2 = Float64(Float64(Float64(b * c) + t_1) - Float64(4.0 * Float64(t * a))) t_3 = Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = t_2; elseif (t_3 <= 2e+286) tmp = Float64(t_3 - Float64(Float64(j * 27.0) * k)); elseif (t_3 <= Inf) tmp = t_2; 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 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
t_2 = ((b * c) + t_1) - (4.0 * (t * a));
t_3 = ((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i);
tmp = 0.0;
if (t_3 <= -Inf)
tmp = t_2;
elseif (t_3 <= 2e+286)
tmp = t_3 - ((j * 27.0) * k);
elseif (t_3 <= Inf)
tmp = t_2;
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[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], t$95$2, If[LessEqual[t$95$3, 2e+286], N[(t$95$3 - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], t$95$2, t$95$1]]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
t_2 := \left(b \cdot c + t_1\right) - 4 \cdot \left(t \cdot a\right)\\
t_3 := \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\\
\mathbf{if}\;t_3 \leq -\infty:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_3 \leq 2 \cdot 10^{+286}:\\
\;\;\;\;t_3 - \left(j \cdot 27\right) \cdot k\\
\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (-.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)) < -inf.0 or 2.00000000000000007e286 < (-.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)) < +inf.0Initial program 84.2%
Taylor expanded in x around 0 89.9%
Taylor expanded in j around 0 95.0%
if -inf.0 < (-.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)) < 2.00000000000000007e286Initial program 99.8%
if +inf.0 < (-.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)) Initial program 0.0%
associate-*l*0.0%
associate--l+0.0%
distribute-rgt-out--21.1%
associate-*l*21.1%
associate-*l*21.1%
Simplified21.1%
Taylor expanded in x around inf 63.6%
Final simplification95.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
(if (<= t -1.52e+112)
(* t (- (* 18.0 (* y (* x z))) (* a 4.0)))
(-
(+ (* t (- (* (* x 18.0) (* y z)) (* a 4.0))) (- (* b c) (* x (* 4.0 i))))
(* j (* 27.0 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 (t <= -1.52e+112) {
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
} else {
tmp = ((t * (((x * 18.0) * (y * z)) - (a * 4.0))) + ((b * c) - (x * (4.0 * i)))) - (j * (27.0 * k));
}
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 (t <= (-1.52d+112)) then
tmp = t * ((18.0d0 * (y * (x * z))) - (a * 4.0d0))
else
tmp = ((t * (((x * 18.0d0) * (y * z)) - (a * 4.0d0))) + ((b * c) - (x * (4.0d0 * i)))) - (j * (27.0d0 * k))
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 (t <= -1.52e+112) {
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
} else {
tmp = ((t * (((x * 18.0) * (y * z)) - (a * 4.0))) + ((b * c) - (x * (4.0 * i)))) - (j * (27.0 * k));
}
return tmp;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if t <= -1.52e+112: tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0)) else: tmp = ((t * (((x * 18.0) * (y * z)) - (a * 4.0))) + ((b * c) - (x * (4.0 * i)))) - (j * (27.0 * k)) return tmp
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (t <= -1.52e+112) tmp = Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) - Float64(a * 4.0))); else tmp = Float64(Float64(Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) - Float64(a * 4.0))) + Float64(Float64(b * c) - Float64(x * Float64(4.0 * i)))) - Float64(j * Float64(27.0 * k))); 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 (t <= -1.52e+112)
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
else
tmp = ((t * (((x * 18.0) * (y * z)) - (a * 4.0))) + ((b * c) - (x * (4.0 * i)))) - (j * (27.0 * k));
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[t, -1.52e+112], N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.52 \cdot 10^{+112}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right)\\
\end{array}
\end{array}
if t < -1.5199999999999999e112Initial program 68.5%
associate-*l*68.5%
associate--l+68.5%
distribute-rgt-out--71.4%
associate-*l*68.8%
associate-*l*68.8%
Simplified68.8%
Taylor expanded in t around inf 83.6%
expm1-log1p-u48.9%
expm1-udef49.0%
associate-*r*51.3%
Applied egg-rr51.3%
expm1-def51.2%
expm1-log1p86.2%
*-commutative86.2%
associate-*l*83.7%
Simplified83.7%
if -1.5199999999999999e112 < t Initial program 89.2%
associate-*l*89.2%
associate--l+89.2%
distribute-rgt-out--90.6%
associate-*l*89.7%
associate-*l*89.7%
Simplified89.7%
Final simplification88.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 (<= t -4.2e+110)
(* t (- (* 18.0 (* y (* x z))) (* a 4.0)))
(-
(- (+ (* b c) (* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))) (* 4.0 (* t a)))
(* (* j 27.0) 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 (t <= -4.2e+110) {
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
} else {
tmp = (((b * c) + (x * ((18.0 * (t * (y * z))) - (4.0 * i)))) - (4.0 * (t * a))) - ((j * 27.0) * k);
}
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 (t <= (-4.2d+110)) then
tmp = t * ((18.0d0 * (y * (x * z))) - (a * 4.0d0))
else
tmp = (((b * c) + (x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i)))) - (4.0d0 * (t * a))) - ((j * 27.0d0) * k)
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 (t <= -4.2e+110) {
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
} else {
tmp = (((b * c) + (x * ((18.0 * (t * (y * z))) - (4.0 * i)))) - (4.0 * (t * a))) - ((j * 27.0) * k);
}
return tmp;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if t <= -4.2e+110: tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0)) else: tmp = (((b * c) + (x * ((18.0 * (t * (y * z))) - (4.0 * i)))) - (4.0 * (t * a))) - ((j * 27.0) * k) return tmp
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (t <= -4.2e+110) tmp = Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) - Float64(a * 4.0))); else tmp = Float64(Float64(Float64(Float64(b * c) + Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i)))) - Float64(4.0 * Float64(t * a))) - Float64(Float64(j * 27.0) * k)); 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 (t <= -4.2e+110)
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
else
tmp = (((b * c) + (x * ((18.0 * (t * (y * z))) - (4.0 * i)))) - (4.0 * (t * a))) - ((j * 27.0) * k);
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[t, -4.2e+110], N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(b * c), $MachinePrecision] + N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.2 \cdot 10^{+110}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b \cdot c + x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\right) - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\
\end{array}
\end{array}
if t < -4.2000000000000003e110Initial program 66.6%
associate-*l*66.6%
associate--l+66.6%
distribute-rgt-out--72.2%
associate-*l*69.6%
associate-*l*69.6%
Simplified69.6%
Taylor expanded in t around inf 84.0%
expm1-log1p-u47.6%
expm1-udef47.6%
associate-*r*49.9%
Applied egg-rr49.9%
expm1-def49.8%
expm1-log1p86.6%
*-commutative86.6%
associate-*l*84.2%
Simplified84.2%
if -4.2000000000000003e110 < t Initial program 89.6%
Taylor expanded in x around 0 90.5%
Final simplification89.6%
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 (* k (* j -27.0)))
(t_3 (- (+ (* b c) (* t (* a -4.0))) t_1)))
(if (<= t -3.5e+62)
(* t (- (* 18.0 (* y (* x z))) (* a 4.0)))
(if (<= t 9e-37)
(- (- (* b c) t_1) (* j (* 27.0 k)))
(if (<= t 1.35e+93)
t_3
(if (<= t 4.8e+105)
(+ (* b c) t_2)
(if (<= t 1.02e+183)
(* t (- (* 18.0 (* x (* y z))) (* a 4.0)))
(if (or (<= t 1.1e+232) (not (<= t 1.65e+261)))
t_3
(+ t_2 (* (* 18.0 t) (* z (* x y))))))))))))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 = k * (j * -27.0);
double t_3 = ((b * c) + (t * (a * -4.0))) - t_1;
double tmp;
if (t <= -3.5e+62) {
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
} else if (t <= 9e-37) {
tmp = ((b * c) - t_1) - (j * (27.0 * k));
} else if (t <= 1.35e+93) {
tmp = t_3;
} else if (t <= 4.8e+105) {
tmp = (b * c) + t_2;
} else if (t <= 1.02e+183) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if ((t <= 1.1e+232) || !(t <= 1.65e+261)) {
tmp = t_3;
} else {
tmp = t_2 + ((18.0 * t) * (z * (x * y)));
}
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 = k * (j * (-27.0d0))
t_3 = ((b * c) + (t * (a * (-4.0d0)))) - t_1
if (t <= (-3.5d+62)) then
tmp = t * ((18.0d0 * (y * (x * z))) - (a * 4.0d0))
else if (t <= 9d-37) then
tmp = ((b * c) - t_1) - (j * (27.0d0 * k))
else if (t <= 1.35d+93) then
tmp = t_3
else if (t <= 4.8d+105) then
tmp = (b * c) + t_2
else if (t <= 1.02d+183) then
tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
else if ((t <= 1.1d+232) .or. (.not. (t <= 1.65d+261))) then
tmp = t_3
else
tmp = t_2 + ((18.0d0 * t) * (z * (x * y)))
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 = k * (j * -27.0);
double t_3 = ((b * c) + (t * (a * -4.0))) - t_1;
double tmp;
if (t <= -3.5e+62) {
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
} else if (t <= 9e-37) {
tmp = ((b * c) - t_1) - (j * (27.0 * k));
} else if (t <= 1.35e+93) {
tmp = t_3;
} else if (t <= 4.8e+105) {
tmp = (b * c) + t_2;
} else if (t <= 1.02e+183) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if ((t <= 1.1e+232) || !(t <= 1.65e+261)) {
tmp = t_3;
} else {
tmp = t_2 + ((18.0 * t) * (z * (x * y)));
}
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 = k * (j * -27.0) t_3 = ((b * c) + (t * (a * -4.0))) - t_1 tmp = 0 if t <= -3.5e+62: tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0)) elif t <= 9e-37: tmp = ((b * c) - t_1) - (j * (27.0 * k)) elif t <= 1.35e+93: tmp = t_3 elif t <= 4.8e+105: tmp = (b * c) + t_2 elif t <= 1.02e+183: tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) elif (t <= 1.1e+232) or not (t <= 1.65e+261): tmp = t_3 else: tmp = t_2 + ((18.0 * t) * (z * (x * y))) 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(k * Float64(j * -27.0)) t_3 = Float64(Float64(Float64(b * c) + Float64(t * Float64(a * -4.0))) - t_1) tmp = 0.0 if (t <= -3.5e+62) tmp = Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) - Float64(a * 4.0))); elseif (t <= 9e-37) tmp = Float64(Float64(Float64(b * c) - t_1) - Float64(j * Float64(27.0 * k))); elseif (t <= 1.35e+93) tmp = t_3; elseif (t <= 4.8e+105) tmp = Float64(Float64(b * c) + t_2); elseif (t <= 1.02e+183) tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); elseif ((t <= 1.1e+232) || !(t <= 1.65e+261)) tmp = t_3; else tmp = Float64(t_2 + Float64(Float64(18.0 * t) * Float64(z * Float64(x * y)))); 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 = k * (j * -27.0);
t_3 = ((b * c) + (t * (a * -4.0))) - t_1;
tmp = 0.0;
if (t <= -3.5e+62)
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
elseif (t <= 9e-37)
tmp = ((b * c) - t_1) - (j * (27.0 * k));
elseif (t <= 1.35e+93)
tmp = t_3;
elseif (t <= 4.8e+105)
tmp = (b * c) + t_2;
elseif (t <= 1.02e+183)
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
elseif ((t <= 1.1e+232) || ~((t <= 1.65e+261)))
tmp = t_3;
else
tmp = t_2 + ((18.0 * t) * (z * (x * y)));
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[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]}, If[LessEqual[t, -3.5e+62], N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9e-37], N[(N[(N[(b * c), $MachinePrecision] - t$95$1), $MachinePrecision] - N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.35e+93], t$95$3, If[LessEqual[t, 4.8e+105], N[(N[(b * c), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[t, 1.02e+183], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 1.1e+232], N[Not[LessEqual[t, 1.65e+261]], $MachinePrecision]], t$95$3, N[(t$95$2 + N[(N[(18.0 * t), $MachinePrecision] * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := 4 \cdot \left(x \cdot i\right)\\
t_2 := k \cdot \left(j \cdot -27\right)\\
t_3 := \left(b \cdot c + t \cdot \left(a \cdot -4\right)\right) - t_1\\
\mathbf{if}\;t \leq -3.5 \cdot 10^{+62}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;t \leq 9 \cdot 10^{-37}:\\
\;\;\;\;\left(b \cdot c - t_1\right) - j \cdot \left(27 \cdot k\right)\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{+93}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq 4.8 \cdot 10^{+105}:\\
\;\;\;\;b \cdot c + t_2\\
\mathbf{elif}\;t \leq 1.02 \cdot 10^{+183}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{+232} \lor \neg \left(t \leq 1.65 \cdot 10^{+261}\right):\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_2 + \left(18 \cdot t\right) \cdot \left(z \cdot \left(x \cdot y\right)\right)\\
\end{array}
\end{array}
if t < -3.49999999999999984e62Initial program 75.4%
associate-*l*75.4%
associate--l+75.4%
distribute-rgt-out--79.5%
associate-*l*77.6%
associate-*l*77.6%
Simplified77.6%
Taylor expanded in t around inf 79.1%
expm1-log1p-u48.0%
expm1-udef48.1%
associate-*r*49.8%
Applied egg-rr49.8%
expm1-def49.7%
expm1-log1p80.9%
*-commutative80.9%
associate-*l*77.4%
Simplified77.4%
if -3.49999999999999984e62 < t < 9.00000000000000081e-37Initial program 91.1%
associate-*l*91.2%
associate--l+91.2%
distribute-rgt-out--91.2%
associate-*l*91.9%
associate-*l*91.9%
Simplified91.9%
Taylor expanded in t around 0 82.4%
if 9.00000000000000081e-37 < t < 1.35e93 or 1.02000000000000002e183 < t < 1.1e232 or 1.65e261 < t Initial program 91.7%
associate-*l*91.7%
associate--l+91.7%
distribute-rgt-out--93.8%
associate-*l*87.8%
associate-*l*87.8%
Simplified87.8%
Taylor expanded in j around 0 85.7%
Taylor expanded in x around 0 82.3%
if 1.35e93 < t < 4.7999999999999995e105Initial program 100.0%
Simplified100.0%
Taylor expanded in b around inf 100.0%
if 4.7999999999999995e105 < t < 1.02000000000000002e183Initial program 73.2%
associate-*l*73.2%
associate--l+73.2%
distribute-rgt-out--80.0%
associate-*l*80.0%
associate-*l*80.0%
Simplified80.0%
Taylor expanded in t around inf 66.9%
if 1.1e232 < t < 1.65e261Initial program 62.3%
Simplified62.3%
Taylor expanded in z around inf 99.6%
associate-*r*99.8%
associate-*r*99.6%
Simplified99.6%
Final simplification81.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 (* k (* j -27.0))) (t_2 (+ (* b c) t_1)))
(if (<= t -4.8e+60)
(* t (- (* 18.0 (* y (* x z))) (* a 4.0)))
(if (<= t -2.8e-72)
t_2
(if (<= t -6e-112)
(* -4.0 (+ (* t a) (* x i)))
(if (<= t -4.2e-214)
t_2
(if (<= t 1e+26)
(- (* b c) (* 4.0 (* x i)))
(if (<= t 8e+232)
(- (* b c) (* 4.0 (* t a)))
(if (<= t 3.1e+264)
(+ t_1 (* (* 18.0 t) (* z (* x y))))
(* t (- (* 18.0 (* x (* y 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 = k * (j * -27.0);
double t_2 = (b * c) + t_1;
double tmp;
if (t <= -4.8e+60) {
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
} else if (t <= -2.8e-72) {
tmp = t_2;
} else if (t <= -6e-112) {
tmp = -4.0 * ((t * a) + (x * i));
} else if (t <= -4.2e-214) {
tmp = t_2;
} else if (t <= 1e+26) {
tmp = (b * c) - (4.0 * (x * i));
} else if (t <= 8e+232) {
tmp = (b * c) - (4.0 * (t * a));
} else if (t <= 3.1e+264) {
tmp = t_1 + ((18.0 * t) * (z * (x * y)));
} else {
tmp = t * ((18.0 * (x * (y * 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) :: tmp
t_1 = k * (j * (-27.0d0))
t_2 = (b * c) + t_1
if (t <= (-4.8d+60)) then
tmp = t * ((18.0d0 * (y * (x * z))) - (a * 4.0d0))
else if (t <= (-2.8d-72)) then
tmp = t_2
else if (t <= (-6d-112)) then
tmp = (-4.0d0) * ((t * a) + (x * i))
else if (t <= (-4.2d-214)) then
tmp = t_2
else if (t <= 1d+26) then
tmp = (b * c) - (4.0d0 * (x * i))
else if (t <= 8d+232) then
tmp = (b * c) - (4.0d0 * (t * a))
else if (t <= 3.1d+264) then
tmp = t_1 + ((18.0d0 * t) * (z * (x * y)))
else
tmp = t * ((18.0d0 * (x * (y * 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 = k * (j * -27.0);
double t_2 = (b * c) + t_1;
double tmp;
if (t <= -4.8e+60) {
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
} else if (t <= -2.8e-72) {
tmp = t_2;
} else if (t <= -6e-112) {
tmp = -4.0 * ((t * a) + (x * i));
} else if (t <= -4.2e-214) {
tmp = t_2;
} else if (t <= 1e+26) {
tmp = (b * c) - (4.0 * (x * i));
} else if (t <= 8e+232) {
tmp = (b * c) - (4.0 * (t * a));
} else if (t <= 3.1e+264) {
tmp = t_1 + ((18.0 * t) * (z * (x * y)));
} else {
tmp = t * ((18.0 * (x * (y * 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 = k * (j * -27.0) t_2 = (b * c) + t_1 tmp = 0 if t <= -4.8e+60: tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0)) elif t <= -2.8e-72: tmp = t_2 elif t <= -6e-112: tmp = -4.0 * ((t * a) + (x * i)) elif t <= -4.2e-214: tmp = t_2 elif t <= 1e+26: tmp = (b * c) - (4.0 * (x * i)) elif t <= 8e+232: tmp = (b * c) - (4.0 * (t * a)) elif t <= 3.1e+264: tmp = t_1 + ((18.0 * t) * (z * (x * y))) else: tmp = t * ((18.0 * (x * (y * 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(k * Float64(j * -27.0)) t_2 = Float64(Float64(b * c) + t_1) tmp = 0.0 if (t <= -4.8e+60) tmp = Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) - Float64(a * 4.0))); elseif (t <= -2.8e-72) tmp = t_2; elseif (t <= -6e-112) tmp = Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i))); elseif (t <= -4.2e-214) tmp = t_2; elseif (t <= 1e+26) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); elseif (t <= 8e+232) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))); elseif (t <= 3.1e+264) tmp = Float64(t_1 + Float64(Float64(18.0 * t) * Float64(z * Float64(x * y)))); else tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * 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 = k * (j * -27.0);
t_2 = (b * c) + t_1;
tmp = 0.0;
if (t <= -4.8e+60)
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
elseif (t <= -2.8e-72)
tmp = t_2;
elseif (t <= -6e-112)
tmp = -4.0 * ((t * a) + (x * i));
elseif (t <= -4.2e-214)
tmp = t_2;
elseif (t <= 1e+26)
tmp = (b * c) - (4.0 * (x * i));
elseif (t <= 8e+232)
tmp = (b * c) - (4.0 * (t * a));
elseif (t <= 3.1e+264)
tmp = t_1 + ((18.0 * t) * (z * (x * y)));
else
tmp = t * ((18.0 * (x * (y * 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[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[LessEqual[t, -4.8e+60], 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.8e-72], t$95$2, If[LessEqual[t, -6e-112], N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.2e-214], t$95$2, If[LessEqual[t, 1e+26], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8e+232], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.1e+264], N[(t$95$1 + N[(N[(18.0 * t), $MachinePrecision] * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(18.0 * N[(x * N[(y * 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 := k \cdot \left(j \cdot -27\right)\\
t_2 := b \cdot c + t_1\\
\mathbf{if}\;t \leq -4.8 \cdot 10^{+60}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;t \leq -2.8 \cdot 10^{-72}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -6 \cdot 10^{-112}:\\
\;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\
\mathbf{elif}\;t \leq -4.2 \cdot 10^{-214}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 10^{+26}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;t \leq 8 \cdot 10^{+232}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;t \leq 3.1 \cdot 10^{+264}:\\
\;\;\;\;t_1 + \left(18 \cdot t\right) \cdot \left(z \cdot \left(x \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\end{array}
\end{array}
if t < -4.8e60Initial program 75.4%
associate-*l*75.4%
associate--l+75.4%
distribute-rgt-out--79.5%
associate-*l*77.6%
associate-*l*77.6%
Simplified77.6%
Taylor expanded in t around inf 79.1%
expm1-log1p-u48.0%
expm1-udef48.1%
associate-*r*49.8%
Applied egg-rr49.8%
expm1-def49.7%
expm1-log1p80.9%
*-commutative80.9%
associate-*l*77.4%
Simplified77.4%
if -4.8e60 < t < -2.7999999999999998e-72 or -6.0000000000000002e-112 < t < -4.19999999999999984e-214Initial program 93.4%
Simplified95.4%
Taylor expanded in b around inf 65.4%
if -2.7999999999999998e-72 < t < -6.0000000000000002e-112Initial program 87.5%
associate-*l*87.5%
associate--l+87.5%
distribute-rgt-out--87.5%
associate-*l*100.0%
associate-*l*100.0%
Simplified100.0%
associate--l+100.0%
*-commutative100.0%
fma-def100.0%
associate-*l*100.0%
fma-neg100.0%
*-commutative100.0%
associate-*r*100.0%
*-commutative100.0%
associate-*r*100.0%
*-commutative100.0%
Applied egg-rr100.0%
Taylor expanded in x around 0 100.0%
Taylor expanded in k around 0 100.0%
Taylor expanded in b around 0 87.9%
cancel-sign-sub-inv87.9%
metadata-eval87.9%
*-commutative87.9%
distribute-lft-out87.9%
*-commutative87.9%
Simplified87.9%
if -4.19999999999999984e-214 < t < 1.00000000000000005e26Initial program 89.2%
associate-*l*89.2%
associate--l+89.2%
distribute-rgt-out--89.2%
associate-*l*88.2%
associate-*l*88.2%
Simplified88.2%
Taylor expanded in j around 0 75.5%
Taylor expanded in t around 0 71.2%
if 1.00000000000000005e26 < t < 8.00000000000000045e232Initial program 87.1%
Taylor expanded in x around 0 68.9%
Taylor expanded in j around 0 65.0%
if 8.00000000000000045e232 < t < 3.09999999999999981e264Initial program 69.7%
Simplified69.7%
Taylor expanded in z around inf 79.9%
associate-*r*80.0%
associate-*r*79.9%
Simplified79.9%
if 3.09999999999999981e264 < t Initial program 100.0%
associate-*l*100.0%
associate--l+100.0%
distribute-rgt-out--100.0%
associate-*l*100.0%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in t around inf 100.0%
Final simplification71.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
(if (<= t -4.75e+89)
(* t (- (* 18.0 (* y (* x z))) (* a 4.0)))
(if (<= t 1.8e+45)
(- (- (+ (* b c) (* -4.0 (* x i))) (* 4.0 (* t a))) (* (* j 27.0) k))
(-
(+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))
(* 4.0 (* x i))))))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 (t <= -4.75e+89) {
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
} else if (t <= 1.8e+45) {
tmp = (((b * c) + (-4.0 * (x * i))) - (4.0 * (t * a))) - ((j * 27.0) * k);
} else {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i));
}
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 (t <= (-4.75d+89)) then
tmp = t * ((18.0d0 * (y * (x * z))) - (a * 4.0d0))
else if (t <= 1.8d+45) then
tmp = (((b * c) + ((-4.0d0) * (x * i))) - (4.0d0 * (t * a))) - ((j * 27.0d0) * k)
else
tmp = ((b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))) - (4.0d0 * (x * i))
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 (t <= -4.75e+89) {
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
} else if (t <= 1.8e+45) {
tmp = (((b * c) + (-4.0 * (x * i))) - (4.0 * (t * a))) - ((j * 27.0) * k);
} else {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i));
}
return tmp;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if t <= -4.75e+89: tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0)) elif t <= 1.8e+45: tmp = (((b * c) + (-4.0 * (x * i))) - (4.0 * (t * a))) - ((j * 27.0) * k) else: tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i)) return tmp
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (t <= -4.75e+89) tmp = Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) - Float64(a * 4.0))); elseif (t <= 1.8e+45) tmp = Float64(Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(x * i))) - Float64(4.0 * Float64(t * a))) - Float64(Float64(j * 27.0) * k)); else tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))) - Float64(4.0 * Float64(x * i))); 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 (t <= -4.75e+89)
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
elseif (t <= 1.8e+45)
tmp = (((b * c) + (-4.0 * (x * i))) - (4.0 * (t * a))) - ((j * 27.0) * k);
else
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i));
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[t, -4.75e+89], 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.8e+45], N[(N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.75 \cdot 10^{+89}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{+45}:\\
\;\;\;\;\left(\left(b \cdot c + -4 \cdot \left(x \cdot i\right)\right) - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\right) - 4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if t < -4.7500000000000002e89Initial program 69.2%
associate-*l*69.2%
associate--l+69.2%
distribute-rgt-out--74.3%
associate-*l*72.0%
associate-*l*72.0%
Simplified72.0%
Taylor expanded in t around inf 85.2%
expm1-log1p-u49.0%
expm1-udef49.1%
associate-*r*51.2%
Applied egg-rr51.2%
expm1-def51.1%
expm1-log1p87.6%
*-commutative87.6%
associate-*l*85.4%
Simplified85.4%
if -4.7500000000000002e89 < t < 1.8e45Initial program 91.4%
Taylor expanded in x around 0 93.7%
Taylor expanded in y around 0 88.8%
if 1.8e45 < t Initial program 83.8%
associate-*l*83.8%
associate--l+83.8%
distribute-rgt-out--87.4%
associate-*l*84.0%
associate-*l*84.0%
Simplified84.0%
Taylor expanded in j around 0 80.4%
Final simplification86.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 (* 4.0 (* t a)))
(t_2 (+ (* b c) (* x (- (* 18.0 (* t (* y z))) (* 4.0 i))))))
(if (<= x -1.35e-12)
t_2
(if (<= x 1.16e+103)
(- (- (+ (* b c) (* -4.0 (* x i))) t_1) (* (* j 27.0) k))
(- t_2 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 = 4.0 * (t * a);
double t_2 = (b * c) + (x * ((18.0 * (t * (y * z))) - (4.0 * i)));
double tmp;
if (x <= -1.35e-12) {
tmp = t_2;
} else if (x <= 1.16e+103) {
tmp = (((b * c) + (-4.0 * (x * i))) - t_1) - ((j * 27.0) * k);
} else {
tmp = t_2 - 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) :: t_2
real(8) :: tmp
t_1 = 4.0d0 * (t * a)
t_2 = (b * c) + (x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i)))
if (x <= (-1.35d-12)) then
tmp = t_2
else if (x <= 1.16d+103) then
tmp = (((b * c) + ((-4.0d0) * (x * i))) - t_1) - ((j * 27.0d0) * k)
else
tmp = t_2 - 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 = 4.0 * (t * a);
double t_2 = (b * c) + (x * ((18.0 * (t * (y * z))) - (4.0 * i)));
double tmp;
if (x <= -1.35e-12) {
tmp = t_2;
} else if (x <= 1.16e+103) {
tmp = (((b * c) + (-4.0 * (x * i))) - t_1) - ((j * 27.0) * k);
} else {
tmp = t_2 - t_1;
}
return tmp;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 4.0 * (t * a) t_2 = (b * c) + (x * ((18.0 * (t * (y * z))) - (4.0 * i))) tmp = 0 if x <= -1.35e-12: tmp = t_2 elif x <= 1.16e+103: tmp = (((b * c) + (-4.0 * (x * i))) - t_1) - ((j * 27.0) * k) else: tmp = t_2 - t_1 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(t * a)) t_2 = Float64(Float64(b * c) + Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i)))) tmp = 0.0 if (x <= -1.35e-12) tmp = t_2; elseif (x <= 1.16e+103) tmp = Float64(Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(x * i))) - t_1) - Float64(Float64(j * 27.0) * k)); else tmp = Float64(t_2 - 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 = 4.0 * (t * a);
t_2 = (b * c) + (x * ((18.0 * (t * (y * z))) - (4.0 * i)));
tmp = 0.0;
if (x <= -1.35e-12)
tmp = t_2;
elseif (x <= 1.16e+103)
tmp = (((b * c) + (-4.0 * (x * i))) - t_1) - ((j * 27.0) * k);
else
tmp = t_2 - 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[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] + N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.35e-12], t$95$2, If[LessEqual[x, 1.16e+103], N[(N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], N[(t$95$2 - t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := 4 \cdot \left(t \cdot a\right)\\
t_2 := b \cdot c + x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{if}\;x \leq -1.35 \cdot 10^{-12}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 1.16 \cdot 10^{+103}:\\
\;\;\;\;\left(\left(b \cdot c + -4 \cdot \left(x \cdot i\right)\right) - t_1\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;t_2 - t_1\\
\end{array}
\end{array}
if x < -1.3499999999999999e-12Initial program 75.8%
Taylor expanded in x around 0 86.8%
Taylor expanded in j around 0 88.5%
Taylor expanded in a around 0 88.8%
if -1.3499999999999999e-12 < x < 1.1600000000000001e103Initial program 93.4%
Taylor expanded in x around 0 87.3%
Taylor expanded in y around 0 86.3%
if 1.1600000000000001e103 < x Initial program 75.1%
Taylor expanded in x around 0 87.3%
Taylor expanded in j around 0 87.5%
Final simplification87.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 (* -4.0 (+ (* t a) (* x i)))))
(if (<= (* b c) -1e+118)
(* b c)
(if (<= (* b c) -2.8e-55)
t_1
(if (<= (* b c) -7.5e-110)
(* 18.0 (* x (* z (* y t))))
(if (<= (* b c) 3.4e+119) t_1 (* 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 t_1 = -4.0 * ((t * a) + (x * i));
double tmp;
if ((b * c) <= -1e+118) {
tmp = b * c;
} else if ((b * c) <= -2.8e-55) {
tmp = t_1;
} else if ((b * c) <= -7.5e-110) {
tmp = 18.0 * (x * (z * (y * t)));
} else if ((b * c) <= 3.4e+119) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (-4.0d0) * ((t * a) + (x * i))
if ((b * c) <= (-1d+118)) then
tmp = b * c
else if ((b * c) <= (-2.8d-55)) then
tmp = t_1
else if ((b * c) <= (-7.5d-110)) then
tmp = 18.0d0 * (x * (z * (y * t)))
else if ((b * c) <= 3.4d+119) then
tmp = t_1
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 t_1 = -4.0 * ((t * a) + (x * i));
double tmp;
if ((b * c) <= -1e+118) {
tmp = b * c;
} else if ((b * c) <= -2.8e-55) {
tmp = t_1;
} else if ((b * c) <= -7.5e-110) {
tmp = 18.0 * (x * (z * (y * t)));
} else if ((b * c) <= 3.4e+119) {
tmp = t_1;
} else {
tmp = b * c;
}
return tmp;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = -4.0 * ((t * a) + (x * i)) tmp = 0 if (b * c) <= -1e+118: tmp = b * c elif (b * c) <= -2.8e-55: tmp = t_1 elif (b * c) <= -7.5e-110: tmp = 18.0 * (x * (z * (y * t))) elif (b * c) <= 3.4e+119: tmp = t_1 else: tmp = b * c 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(Float64(t * a) + Float64(x * i))) tmp = 0.0 if (Float64(b * c) <= -1e+118) tmp = Float64(b * c); elseif (Float64(b * c) <= -2.8e-55) tmp = t_1; elseif (Float64(b * c) <= -7.5e-110) tmp = Float64(18.0 * Float64(x * Float64(z * Float64(y * t)))); elseif (Float64(b * c) <= 3.4e+119) tmp = t_1; 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)
t_1 = -4.0 * ((t * a) + (x * i));
tmp = 0.0;
if ((b * c) <= -1e+118)
tmp = b * c;
elseif ((b * c) <= -2.8e-55)
tmp = t_1;
elseif ((b * c) <= -7.5e-110)
tmp = 18.0 * (x * (z * (y * t)));
elseif ((b * c) <= 3.4e+119)
tmp = t_1;
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_] := Block[{t$95$1 = N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -1e+118], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -2.8e-55], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], -7.5e-110], N[(18.0 * N[(x * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 3.4e+119], t$95$1, N[(b * c), $MachinePrecision]]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot a + x \cdot i\right)\\
\mathbf{if}\;b \cdot c \leq -1 \cdot 10^{+118}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -2.8 \cdot 10^{-55}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot c \leq -7.5 \cdot 10^{-110}:\\
\;\;\;\;18 \cdot \left(x \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\
\mathbf{elif}\;b \cdot c \leq 3.4 \cdot 10^{+119}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -9.99999999999999967e117 or 3.40000000000000013e119 < (*.f64 b c) Initial program 86.8%
associate-*l*86.8%
associate--l+86.8%
distribute-rgt-out--86.8%
associate-*l*84.2%
associate-*l*84.2%
Simplified84.2%
associate--l+84.2%
*-commutative84.2%
fma-def85.5%
associate-*l*85.5%
fma-neg85.5%
*-commutative85.5%
associate-*r*85.5%
*-commutative85.5%
associate-*r*85.5%
*-commutative85.5%
Applied egg-rr85.5%
Taylor expanded in b around inf 70.4%
if -9.99999999999999967e117 < (*.f64 b c) < -2.79999999999999984e-55 or -7.50000000000000053e-110 < (*.f64 b c) < 3.40000000000000013e119Initial program 86.9%
associate-*l*87.0%
associate--l+87.0%
distribute-rgt-out--88.8%
associate-*l*88.3%
associate-*l*88.3%
Simplified88.3%
associate--l+88.3%
*-commutative88.3%
fma-def90.1%
associate-*l*90.1%
fma-neg90.1%
*-commutative90.1%
associate-*r*90.1%
*-commutative90.1%
associate-*r*90.0%
*-commutative90.0%
Applied egg-rr90.0%
Taylor expanded in x around 0 77.3%
Taylor expanded in k around 0 60.6%
Taylor expanded in b around 0 49.7%
cancel-sign-sub-inv49.7%
metadata-eval49.7%
*-commutative49.7%
distribute-lft-out49.7%
*-commutative49.7%
Simplified49.7%
if -2.79999999999999984e-55 < (*.f64 b c) < -7.50000000000000053e-110Initial program 75.4%
associate-*l*75.4%
associate--l+75.4%
distribute-rgt-out--83.7%
associate-*l*83.7%
associate-*l*83.7%
Simplified83.7%
associate--l+83.7%
*-commutative83.7%
fma-def92.0%
associate-*l*92.0%
fma-neg92.0%
*-commutative92.0%
associate-*r*92.0%
*-commutative92.0%
associate-*r*92.0%
*-commutative92.0%
Applied egg-rr92.0%
Taylor expanded in z around inf 43.1%
*-commutative43.1%
*-commutative43.1%
associate-*r*43.1%
*-commutative43.1%
associate-*r*51.1%
Simplified51.1%
Final simplification56.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
(if (<= t -5.6e+89)
(* t (- (* 18.0 (* y (* x z))) (* a 4.0)))
(if (<= t 5.8e+45)
(- (- (+ (* b c) (* (* t a) -4.0)) (* 4.0 (* x i))) (* j (* 27.0 k)))
(+ (* b c) (* t (- (* 18.0 (* x (* y 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 tmp;
if (t <= -5.6e+89) {
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
} else if (t <= 5.8e+45) {
tmp = (((b * c) + ((t * a) * -4.0)) - (4.0 * (x * i))) - (j * (27.0 * k));
} else {
tmp = (b * c) + (t * ((18.0 * (x * (y * 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) :: tmp
if (t <= (-5.6d+89)) then
tmp = t * ((18.0d0 * (y * (x * z))) - (a * 4.0d0))
else if (t <= 5.8d+45) then
tmp = (((b * c) + ((t * a) * (-4.0d0))) - (4.0d0 * (x * i))) - (j * (27.0d0 * k))
else
tmp = (b * c) + (t * ((18.0d0 * (x * (y * 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 tmp;
if (t <= -5.6e+89) {
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
} else if (t <= 5.8e+45) {
tmp = (((b * c) + ((t * a) * -4.0)) - (4.0 * (x * i))) - (j * (27.0 * k));
} else {
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
}
return tmp;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if t <= -5.6e+89: tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0)) elif t <= 5.8e+45: tmp = (((b * c) + ((t * a) * -4.0)) - (4.0 * (x * i))) - (j * (27.0 * k)) else: tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0))) return tmp
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (t <= -5.6e+89) tmp = Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) - Float64(a * 4.0))); elseif (t <= 5.8e+45) tmp = Float64(Float64(Float64(Float64(b * c) + Float64(Float64(t * a) * -4.0)) - Float64(4.0 * Float64(x * i))) - Float64(j * Float64(27.0 * k))); else tmp = Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * 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)
tmp = 0.0;
if (t <= -5.6e+89)
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
elseif (t <= 5.8e+45)
tmp = (((b * c) + ((t * a) * -4.0)) - (4.0 * (x * i))) - (j * (27.0 * k));
else
tmp = (b * c) + (t * ((18.0 * (x * (y * 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_] := If[LessEqual[t, -5.6e+89], N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.8e+45], N[(N[(N[(N[(b * c), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.6 \cdot 10^{+89}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;t \leq 5.8 \cdot 10^{+45}:\\
\;\;\;\;\left(\left(b \cdot c + \left(t \cdot a\right) \cdot -4\right) - 4 \cdot \left(x \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\end{array}
\end{array}
if t < -5.5999999999999996e89Initial program 69.2%
associate-*l*69.2%
associate--l+69.2%
distribute-rgt-out--74.3%
associate-*l*72.0%
associate-*l*72.0%
Simplified72.0%
Taylor expanded in t around inf 85.2%
expm1-log1p-u49.0%
expm1-udef49.1%
associate-*r*51.2%
Applied egg-rr51.2%
expm1-def51.1%
expm1-log1p87.6%
*-commutative87.6%
associate-*l*85.4%
Simplified85.4%
if -5.5999999999999996e89 < t < 5.7999999999999994e45Initial program 91.4%
associate-*l*91.5%
associate--l+91.5%
distribute-rgt-out--91.5%
associate-*l*91.4%
associate-*l*91.4%
Simplified91.4%
Taylor expanded in y around 0 88.8%
if 5.7999999999999994e45 < t Initial program 83.8%
associate-*l*83.8%
associate--l+83.8%
distribute-rgt-out--87.4%
associate-*l*84.0%
associate-*l*84.0%
Simplified84.0%
Taylor expanded in j around 0 80.4%
Taylor expanded in i around 0 79.9%
Final simplification86.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
(if (<= t -5.5e+89)
(* t (- (* 18.0 (* y (* x z))) (* a 4.0)))
(if (<= t 2.7e+46)
(- (- (+ (* b c) (* -4.0 (* x i))) (* 4.0 (* t a))) (* (* j 27.0) k))
(+ (* b c) (* t (- (* 18.0 (* x (* y 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 tmp;
if (t <= -5.5e+89) {
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
} else if (t <= 2.7e+46) {
tmp = (((b * c) + (-4.0 * (x * i))) - (4.0 * (t * a))) - ((j * 27.0) * k);
} else {
tmp = (b * c) + (t * ((18.0 * (x * (y * 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) :: tmp
if (t <= (-5.5d+89)) then
tmp = t * ((18.0d0 * (y * (x * z))) - (a * 4.0d0))
else if (t <= 2.7d+46) then
tmp = (((b * c) + ((-4.0d0) * (x * i))) - (4.0d0 * (t * a))) - ((j * 27.0d0) * k)
else
tmp = (b * c) + (t * ((18.0d0 * (x * (y * 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 tmp;
if (t <= -5.5e+89) {
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
} else if (t <= 2.7e+46) {
tmp = (((b * c) + (-4.0 * (x * i))) - (4.0 * (t * a))) - ((j * 27.0) * k);
} else {
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
}
return tmp;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if t <= -5.5e+89: tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0)) elif t <= 2.7e+46: tmp = (((b * c) + (-4.0 * (x * i))) - (4.0 * (t * a))) - ((j * 27.0) * k) else: tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0))) return tmp
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (t <= -5.5e+89) tmp = Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) - Float64(a * 4.0))); elseif (t <= 2.7e+46) tmp = Float64(Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(x * i))) - Float64(4.0 * Float64(t * a))) - Float64(Float64(j * 27.0) * k)); else tmp = Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * 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)
tmp = 0.0;
if (t <= -5.5e+89)
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
elseif (t <= 2.7e+46)
tmp = (((b * c) + (-4.0 * (x * i))) - (4.0 * (t * a))) - ((j * 27.0) * k);
else
tmp = (b * c) + (t * ((18.0 * (x * (y * 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_] := If[LessEqual[t, -5.5e+89], 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.7e+46], N[(N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.5 \cdot 10^{+89}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;t \leq 2.7 \cdot 10^{+46}:\\
\;\;\;\;\left(\left(b \cdot c + -4 \cdot \left(x \cdot i\right)\right) - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\end{array}
\end{array}
if t < -5.49999999999999976e89Initial program 69.2%
associate-*l*69.2%
associate--l+69.2%
distribute-rgt-out--74.3%
associate-*l*72.0%
associate-*l*72.0%
Simplified72.0%
Taylor expanded in t around inf 85.2%
expm1-log1p-u49.0%
expm1-udef49.1%
associate-*r*51.2%
Applied egg-rr51.2%
expm1-def51.1%
expm1-log1p87.6%
*-commutative87.6%
associate-*l*85.4%
Simplified85.4%
if -5.49999999999999976e89 < t < 2.7000000000000002e46Initial program 91.4%
Taylor expanded in x around 0 93.7%
Taylor expanded in y around 0 88.8%
if 2.7000000000000002e46 < t Initial program 83.8%
associate-*l*83.8%
associate--l+83.8%
distribute-rgt-out--87.4%
associate-*l*84.0%
associate-*l*84.0%
Simplified84.0%
Taylor expanded in j around 0 80.4%
Taylor expanded in i around 0 79.9%
Final simplification86.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 (* -4.0 (+ (* t a) (* x i)))) (t_2 (+ (* b c) (* k (* j -27.0)))))
(if (<= t -6.5e+245)
(* t (* a -4.0))
(if (<= t -4.75e+89)
(* t (* 18.0 (* y (* x z))))
(if (<= t -4e+61)
t_1
(if (<= t -1.75e-72)
t_2
(if (<= t -3.7e-112)
t_1
(if (<= t -7.6e-214)
t_2
(if (<= t 3.1e+26)
(- (* b c) (* 4.0 (* x i)))
(- (* b c) (* 4.0 (* t a))))))))))))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 * ((t * a) + (x * i));
double t_2 = (b * c) + (k * (j * -27.0));
double tmp;
if (t <= -6.5e+245) {
tmp = t * (a * -4.0);
} else if (t <= -4.75e+89) {
tmp = t * (18.0 * (y * (x * z)));
} else if (t <= -4e+61) {
tmp = t_1;
} else if (t <= -1.75e-72) {
tmp = t_2;
} else if (t <= -3.7e-112) {
tmp = t_1;
} else if (t <= -7.6e-214) {
tmp = t_2;
} else if (t <= 3.1e+26) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = (b * c) - (4.0 * (t * a));
}
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 = (-4.0d0) * ((t * a) + (x * i))
t_2 = (b * c) + (k * (j * (-27.0d0)))
if (t <= (-6.5d+245)) then
tmp = t * (a * (-4.0d0))
else if (t <= (-4.75d+89)) then
tmp = t * (18.0d0 * (y * (x * z)))
else if (t <= (-4d+61)) then
tmp = t_1
else if (t <= (-1.75d-72)) then
tmp = t_2
else if (t <= (-3.7d-112)) then
tmp = t_1
else if (t <= (-7.6d-214)) then
tmp = t_2
else if (t <= 3.1d+26) then
tmp = (b * c) - (4.0d0 * (x * i))
else
tmp = (b * c) - (4.0d0 * (t * a))
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 * ((t * a) + (x * i));
double t_2 = (b * c) + (k * (j * -27.0));
double tmp;
if (t <= -6.5e+245) {
tmp = t * (a * -4.0);
} else if (t <= -4.75e+89) {
tmp = t * (18.0 * (y * (x * z)));
} else if (t <= -4e+61) {
tmp = t_1;
} else if (t <= -1.75e-72) {
tmp = t_2;
} else if (t <= -3.7e-112) {
tmp = t_1;
} else if (t <= -7.6e-214) {
tmp = t_2;
} else if (t <= 3.1e+26) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = (b * c) - (4.0 * (t * a));
}
return tmp;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = -4.0 * ((t * a) + (x * i)) t_2 = (b * c) + (k * (j * -27.0)) tmp = 0 if t <= -6.5e+245: tmp = t * (a * -4.0) elif t <= -4.75e+89: tmp = t * (18.0 * (y * (x * z))) elif t <= -4e+61: tmp = t_1 elif t <= -1.75e-72: tmp = t_2 elif t <= -3.7e-112: tmp = t_1 elif t <= -7.6e-214: tmp = t_2 elif t <= 3.1e+26: tmp = (b * c) - (4.0 * (x * i)) else: tmp = (b * c) - (4.0 * (t * a)) 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(Float64(t * a) + Float64(x * i))) t_2 = Float64(Float64(b * c) + Float64(k * Float64(j * -27.0))) tmp = 0.0 if (t <= -6.5e+245) tmp = Float64(t * Float64(a * -4.0)); elseif (t <= -4.75e+89) tmp = Float64(t * Float64(18.0 * Float64(y * Float64(x * z)))); elseif (t <= -4e+61) tmp = t_1; elseif (t <= -1.75e-72) tmp = t_2; elseif (t <= -3.7e-112) tmp = t_1; elseif (t <= -7.6e-214) tmp = t_2; elseif (t <= 3.1e+26) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); else tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))); 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 * ((t * a) + (x * i));
t_2 = (b * c) + (k * (j * -27.0));
tmp = 0.0;
if (t <= -6.5e+245)
tmp = t * (a * -4.0);
elseif (t <= -4.75e+89)
tmp = t * (18.0 * (y * (x * z)));
elseif (t <= -4e+61)
tmp = t_1;
elseif (t <= -1.75e-72)
tmp = t_2;
elseif (t <= -3.7e-112)
tmp = t_1;
elseif (t <= -7.6e-214)
tmp = t_2;
elseif (t <= 3.1e+26)
tmp = (b * c) - (4.0 * (x * i));
else
tmp = (b * c) - (4.0 * (t * a));
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[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] + N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.5e+245], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.75e+89], N[(t * N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4e+61], t$95$1, If[LessEqual[t, -1.75e-72], t$95$2, If[LessEqual[t, -3.7e-112], t$95$1, If[LessEqual[t, -7.6e-214], t$95$2, If[LessEqual[t, 3.1e+26], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot a + x \cdot i\right)\\
t_2 := b \cdot c + k \cdot \left(j \cdot -27\right)\\
\mathbf{if}\;t \leq -6.5 \cdot 10^{+245}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{elif}\;t \leq -4.75 \cdot 10^{+89}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right)\right)\\
\mathbf{elif}\;t \leq -4 \cdot 10^{+61}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -1.75 \cdot 10^{-72}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -3.7 \cdot 10^{-112}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -7.6 \cdot 10^{-214}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 3.1 \cdot 10^{+26}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\
\end{array}
\end{array}
if t < -6.50000000000000035e245Initial program 70.0%
associate-*l*70.0%
associate--l+70.0%
distribute-rgt-out--70.0%
associate-*l*70.0%
associate-*l*70.0%
Simplified70.0%
associate--l+70.0%
*-commutative70.0%
fma-def80.0%
associate-*l*80.0%
fma-neg80.0%
*-commutative80.0%
associate-*r*80.0%
*-commutative80.0%
associate-*r*80.0%
*-commutative80.0%
Applied egg-rr80.0%
Taylor expanded in a around inf 70.6%
*-commutative70.6%
metadata-eval70.6%
distribute-rgt-neg-in70.6%
*-commutative70.6%
associate-*r*70.6%
distribute-rgt-neg-in70.6%
*-commutative70.6%
distribute-lft-neg-in70.6%
metadata-eval70.6%
Simplified70.6%
if -6.50000000000000035e245 < t < -4.7500000000000002e89Initial program 68.9%
associate-*l*68.9%
associate--l+68.9%
distribute-rgt-out--75.8%
associate-*l*72.6%
associate-*l*72.6%
Simplified72.6%
Taylor expanded in t around inf 83.6%
Taylor expanded in x around inf 73.0%
*-commutative73.0%
associate-*r*75.9%
associate-*l*76.0%
*-commutative76.0%
*-commutative76.0%
associate-*l*73.2%
Simplified73.2%
if -4.7500000000000002e89 < t < -3.9999999999999998e61 or -1.75e-72 < t < -3.6999999999999998e-112Initial program 94.4%
associate-*l*94.4%
associate--l+94.4%
distribute-rgt-out--94.4%
associate-*l*99.8%
associate-*l*99.8%
Simplified99.8%
associate--l+99.8%
*-commutative99.8%
fma-def99.9%
associate-*l*99.9%
fma-neg99.9%
*-commutative99.9%
associate-*r*99.9%
*-commutative99.9%
associate-*r*99.9%
*-commutative99.9%
Applied egg-rr99.9%
Taylor expanded in x around 0 89.5%
Taylor expanded in k around 0 81.1%
Taylor expanded in b around 0 75.8%
cancel-sign-sub-inv75.8%
metadata-eval75.8%
*-commutative75.8%
distribute-lft-out75.8%
*-commutative75.8%
Simplified75.8%
if -3.9999999999999998e61 < t < -1.75e-72 or -3.6999999999999998e-112 < t < -7.6000000000000006e-214Initial program 93.4%
Simplified95.4%
Taylor expanded in b around inf 65.4%
if -7.6000000000000006e-214 < t < 3.1e26Initial program 89.2%
associate-*l*89.2%
associate--l+89.2%
distribute-rgt-out--89.2%
associate-*l*88.2%
associate-*l*88.2%
Simplified88.2%
Taylor expanded in j around 0 75.5%
Taylor expanded in t around 0 71.2%
if 3.1e26 < t Initial program 85.5%
Taylor expanded in x around 0 66.0%
Taylor expanded in j around 0 61.5%
Final simplification68.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 (+ (* b c) (* k (* j -27.0))))
(t_2 (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))))
(if (<= t -1.9e+61)
t_2
(if (<= t -3e-72)
t_1
(if (<= t -4.6e-112)
(* -4.0 (+ (* t a) (* x i)))
(if (<= t -2.1e-214)
t_1
(if (<= t 8.2e+78) (- (* b c) (* 4.0 (* x i))) 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) + (k * (j * -27.0));
double t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -1.9e+61) {
tmp = t_2;
} else if (t <= -3e-72) {
tmp = t_1;
} else if (t <= -4.6e-112) {
tmp = -4.0 * ((t * a) + (x * i));
} else if (t <= -2.1e-214) {
tmp = t_1;
} else if (t <= 8.2e+78) {
tmp = (b * c) - (4.0 * (x * i));
} 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) + (k * (j * (-27.0d0)))
t_2 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
if (t <= (-1.9d+61)) then
tmp = t_2
else if (t <= (-3d-72)) then
tmp = t_1
else if (t <= (-4.6d-112)) then
tmp = (-4.0d0) * ((t * a) + (x * i))
else if (t <= (-2.1d-214)) then
tmp = t_1
else if (t <= 8.2d+78) then
tmp = (b * c) - (4.0d0 * (x * i))
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) + (k * (j * -27.0));
double t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -1.9e+61) {
tmp = t_2;
} else if (t <= -3e-72) {
tmp = t_1;
} else if (t <= -4.6e-112) {
tmp = -4.0 * ((t * a) + (x * i));
} else if (t <= -2.1e-214) {
tmp = t_1;
} else if (t <= 8.2e+78) {
tmp = (b * c) - (4.0 * (x * i));
} 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) + (k * (j * -27.0)) t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0)) tmp = 0 if t <= -1.9e+61: tmp = t_2 elif t <= -3e-72: tmp = t_1 elif t <= -4.6e-112: tmp = -4.0 * ((t * a) + (x * i)) elif t <= -2.1e-214: tmp = t_1 elif t <= 8.2e+78: tmp = (b * c) - (4.0 * (x * i)) 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(k * Float64(j * -27.0))) t_2 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))) tmp = 0.0 if (t <= -1.9e+61) tmp = t_2; elseif (t <= -3e-72) tmp = t_1; elseif (t <= -4.6e-112) tmp = Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i))); elseif (t <= -2.1e-214) tmp = t_1; elseif (t <= 8.2e+78) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); 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) + (k * (j * -27.0));
t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
tmp = 0.0;
if (t <= -1.9e+61)
tmp = t_2;
elseif (t <= -3e-72)
tmp = t_1;
elseif (t <= -4.6e-112)
tmp = -4.0 * ((t * a) + (x * i));
elseif (t <= -2.1e-214)
tmp = t_1;
elseif (t <= 8.2e+78)
tmp = (b * c) - (4.0 * (x * i));
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[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.9e+61], t$95$2, If[LessEqual[t, -3e-72], t$95$1, If[LessEqual[t, -4.6e-112], N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.1e-214], t$95$1, If[LessEqual[t, 8.2e+78], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c + k \cdot \left(j \cdot -27\right)\\
t_2 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -1.9 \cdot 10^{+61}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -3 \cdot 10^{-72}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -4.6 \cdot 10^{-112}:\\
\;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\
\mathbf{elif}\;t \leq -2.1 \cdot 10^{-214}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 8.2 \cdot 10^{+78}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -1.89999999999999998e61 or 8.1999999999999994e78 < t Initial program 78.6%
associate-*l*78.6%
associate--l+78.6%
distribute-rgt-out--82.9%
associate-*l*80.8%
associate-*l*80.8%
Simplified80.8%
Taylor expanded in t around inf 71.0%
if -1.89999999999999998e61 < t < -3e-72 or -4.59999999999999981e-112 < t < -2.09999999999999992e-214Initial program 93.4%
Simplified95.4%
Taylor expanded in b around inf 65.4%
if -3e-72 < t < -4.59999999999999981e-112Initial program 87.5%
associate-*l*87.5%
associate--l+87.5%
distribute-rgt-out--87.5%
associate-*l*100.0%
associate-*l*100.0%
Simplified100.0%
associate--l+100.0%
*-commutative100.0%
fma-def100.0%
associate-*l*100.0%
fma-neg100.0%
*-commutative100.0%
associate-*r*100.0%
*-commutative100.0%
associate-*r*100.0%
*-commutative100.0%
Applied egg-rr100.0%
Taylor expanded in x around 0 100.0%
Taylor expanded in k around 0 100.0%
Taylor expanded in b around 0 87.9%
cancel-sign-sub-inv87.9%
metadata-eval87.9%
*-commutative87.9%
distribute-lft-out87.9%
*-commutative87.9%
Simplified87.9%
if -2.09999999999999992e-214 < t < 8.1999999999999994e78Initial program 90.0%
associate-*l*90.1%
associate--l+90.1%
distribute-rgt-out--90.1%
associate-*l*87.5%
associate-*l*87.5%
Simplified87.5%
Taylor expanded in j around 0 76.0%
Taylor expanded in t around 0 69.8%
Final simplification70.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 (+ (* b c) (* k (* j -27.0))))
(t_2 (* t (- (* 18.0 (* y (* x z))) (* a 4.0)))))
(if (<= t -5.2e+60)
t_2
(if (<= t -6.2e-72)
t_1
(if (<= t -1.9e-112)
(* -4.0 (+ (* t a) (* x i)))
(if (<= t -7.2e-214)
t_1
(if (<= t 3.9e+77) (- (* b c) (* 4.0 (* x i))) 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) + (k * (j * -27.0));
double t_2 = t * ((18.0 * (y * (x * z))) - (a * 4.0));
double tmp;
if (t <= -5.2e+60) {
tmp = t_2;
} else if (t <= -6.2e-72) {
tmp = t_1;
} else if (t <= -1.9e-112) {
tmp = -4.0 * ((t * a) + (x * i));
} else if (t <= -7.2e-214) {
tmp = t_1;
} else if (t <= 3.9e+77) {
tmp = (b * c) - (4.0 * (x * i));
} 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) + (k * (j * (-27.0d0)))
t_2 = t * ((18.0d0 * (y * (x * z))) - (a * 4.0d0))
if (t <= (-5.2d+60)) then
tmp = t_2
else if (t <= (-6.2d-72)) then
tmp = t_1
else if (t <= (-1.9d-112)) then
tmp = (-4.0d0) * ((t * a) + (x * i))
else if (t <= (-7.2d-214)) then
tmp = t_1
else if (t <= 3.9d+77) then
tmp = (b * c) - (4.0d0 * (x * i))
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) + (k * (j * -27.0));
double t_2 = t * ((18.0 * (y * (x * z))) - (a * 4.0));
double tmp;
if (t <= -5.2e+60) {
tmp = t_2;
} else if (t <= -6.2e-72) {
tmp = t_1;
} else if (t <= -1.9e-112) {
tmp = -4.0 * ((t * a) + (x * i));
} else if (t <= -7.2e-214) {
tmp = t_1;
} else if (t <= 3.9e+77) {
tmp = (b * c) - (4.0 * (x * i));
} 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) + (k * (j * -27.0)) t_2 = t * ((18.0 * (y * (x * z))) - (a * 4.0)) tmp = 0 if t <= -5.2e+60: tmp = t_2 elif t <= -6.2e-72: tmp = t_1 elif t <= -1.9e-112: tmp = -4.0 * ((t * a) + (x * i)) elif t <= -7.2e-214: tmp = t_1 elif t <= 3.9e+77: tmp = (b * c) - (4.0 * (x * i)) 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(k * Float64(j * -27.0))) t_2 = Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) - Float64(a * 4.0))) tmp = 0.0 if (t <= -5.2e+60) tmp = t_2; elseif (t <= -6.2e-72) tmp = t_1; elseif (t <= -1.9e-112) tmp = Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i))); elseif (t <= -7.2e-214) tmp = t_1; elseif (t <= 3.9e+77) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); 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) + (k * (j * -27.0));
t_2 = t * ((18.0 * (y * (x * z))) - (a * 4.0));
tmp = 0.0;
if (t <= -5.2e+60)
tmp = t_2;
elseif (t <= -6.2e-72)
tmp = t_1;
elseif (t <= -1.9e-112)
tmp = -4.0 * ((t * a) + (x * i));
elseif (t <= -7.2e-214)
tmp = t_1;
elseif (t <= 3.9e+77)
tmp = (b * c) - (4.0 * (x * i));
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[(k * N[(j * -27.0), $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, -5.2e+60], t$95$2, If[LessEqual[t, -6.2e-72], t$95$1, If[LessEqual[t, -1.9e-112], N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -7.2e-214], t$95$1, If[LessEqual[t, 3.9e+77], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c + k \cdot \left(j \cdot -27\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 -5.2 \cdot 10^{+60}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -6.2 \cdot 10^{-72}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -1.9 \cdot 10^{-112}:\\
\;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\
\mathbf{elif}\;t \leq -7.2 \cdot 10^{-214}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 3.9 \cdot 10^{+77}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -5.20000000000000016e60 or 3.8999999999999998e77 < t Initial program 78.6%
associate-*l*78.6%
associate--l+78.6%
distribute-rgt-out--82.9%
associate-*l*80.8%
associate-*l*80.8%
Simplified80.8%
Taylor expanded in t around inf 71.0%
expm1-log1p-u50.5%
expm1-udef48.2%
associate-*r*50.1%
Applied egg-rr50.1%
expm1-def52.4%
expm1-log1p73.1%
*-commutative73.1%
associate-*l*69.4%
Simplified69.4%
if -5.20000000000000016e60 < t < -6.1999999999999996e-72 or -1.89999999999999997e-112 < t < -7.2e-214Initial program 93.4%
Simplified95.4%
Taylor expanded in b around inf 65.4%
if -6.1999999999999996e-72 < t < -1.89999999999999997e-112Initial program 87.5%
associate-*l*87.5%
associate--l+87.5%
distribute-rgt-out--87.5%
associate-*l*100.0%
associate-*l*100.0%
Simplified100.0%
associate--l+100.0%
*-commutative100.0%
fma-def100.0%
associate-*l*100.0%
fma-neg100.0%
*-commutative100.0%
associate-*r*100.0%
*-commutative100.0%
associate-*r*100.0%
*-commutative100.0%
Applied egg-rr100.0%
Taylor expanded in x around 0 100.0%
Taylor expanded in k around 0 100.0%
Taylor expanded in b around 0 87.9%
cancel-sign-sub-inv87.9%
metadata-eval87.9%
*-commutative87.9%
distribute-lft-out87.9%
*-commutative87.9%
Simplified87.9%
if -7.2e-214 < t < 3.8999999999999998e77Initial program 90.0%
associate-*l*90.1%
associate--l+90.1%
distribute-rgt-out--90.1%
associate-*l*87.5%
associate-*l*87.5%
Simplified87.5%
Taylor expanded in j around 0 76.0%
Taylor expanded in t around 0 69.8%
Final simplification69.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 (* k (* j -27.0))))
(if (<= t -6e+244)
(* t (* a -4.0))
(if (<= t -5.8e+89)
(* t (* 18.0 (* y (* x z))))
(if (<= t -2e+62)
(* -4.0 (+ (* t a) (* x i)))
(if (<= t -1.9e-47)
(+ (* b c) t_1)
(if (<= t -6.3e-214)
(+ t_1 (* x (* i -4.0)))
(if (<= t 3.45e+25)
(- (* b c) (* 4.0 (* x i)))
(- (* b c) (* 4.0 (* t a)))))))))))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 = k * (j * -27.0);
double tmp;
if (t <= -6e+244) {
tmp = t * (a * -4.0);
} else if (t <= -5.8e+89) {
tmp = t * (18.0 * (y * (x * z)));
} else if (t <= -2e+62) {
tmp = -4.0 * ((t * a) + (x * i));
} else if (t <= -1.9e-47) {
tmp = (b * c) + t_1;
} else if (t <= -6.3e-214) {
tmp = t_1 + (x * (i * -4.0));
} else if (t <= 3.45e+25) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = (b * c) - (4.0 * (t * a));
}
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 = k * (j * (-27.0d0))
if (t <= (-6d+244)) then
tmp = t * (a * (-4.0d0))
else if (t <= (-5.8d+89)) then
tmp = t * (18.0d0 * (y * (x * z)))
else if (t <= (-2d+62)) then
tmp = (-4.0d0) * ((t * a) + (x * i))
else if (t <= (-1.9d-47)) then
tmp = (b * c) + t_1
else if (t <= (-6.3d-214)) then
tmp = t_1 + (x * (i * (-4.0d0)))
else if (t <= 3.45d+25) then
tmp = (b * c) - (4.0d0 * (x * i))
else
tmp = (b * c) - (4.0d0 * (t * a))
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 = k * (j * -27.0);
double tmp;
if (t <= -6e+244) {
tmp = t * (a * -4.0);
} else if (t <= -5.8e+89) {
tmp = t * (18.0 * (y * (x * z)));
} else if (t <= -2e+62) {
tmp = -4.0 * ((t * a) + (x * i));
} else if (t <= -1.9e-47) {
tmp = (b * c) + t_1;
} else if (t <= -6.3e-214) {
tmp = t_1 + (x * (i * -4.0));
} else if (t <= 3.45e+25) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = (b * c) - (4.0 * (t * a));
}
return tmp;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = k * (j * -27.0) tmp = 0 if t <= -6e+244: tmp = t * (a * -4.0) elif t <= -5.8e+89: tmp = t * (18.0 * (y * (x * z))) elif t <= -2e+62: tmp = -4.0 * ((t * a) + (x * i)) elif t <= -1.9e-47: tmp = (b * c) + t_1 elif t <= -6.3e-214: tmp = t_1 + (x * (i * -4.0)) elif t <= 3.45e+25: tmp = (b * c) - (4.0 * (x * i)) else: tmp = (b * c) - (4.0 * (t * a)) return tmp
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(k * Float64(j * -27.0)) tmp = 0.0 if (t <= -6e+244) tmp = Float64(t * Float64(a * -4.0)); elseif (t <= -5.8e+89) tmp = Float64(t * Float64(18.0 * Float64(y * Float64(x * z)))); elseif (t <= -2e+62) tmp = Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i))); elseif (t <= -1.9e-47) tmp = Float64(Float64(b * c) + t_1); elseif (t <= -6.3e-214) tmp = Float64(t_1 + Float64(x * Float64(i * -4.0))); elseif (t <= 3.45e+25) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); else tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))); 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 = k * (j * -27.0);
tmp = 0.0;
if (t <= -6e+244)
tmp = t * (a * -4.0);
elseif (t <= -5.8e+89)
tmp = t * (18.0 * (y * (x * z)));
elseif (t <= -2e+62)
tmp = -4.0 * ((t * a) + (x * i));
elseif (t <= -1.9e-47)
tmp = (b * c) + t_1;
elseif (t <= -6.3e-214)
tmp = t_1 + (x * (i * -4.0));
elseif (t <= 3.45e+25)
tmp = (b * c) - (4.0 * (x * i));
else
tmp = (b * c) - (4.0 * (t * a));
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[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6e+244], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5.8e+89], N[(t * N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2e+62], N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.9e-47], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t, -6.3e-214], N[(t$95$1 + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.45e+25], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot -27\right)\\
\mathbf{if}\;t \leq -6 \cdot 10^{+244}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{elif}\;t \leq -5.8 \cdot 10^{+89}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right)\right)\\
\mathbf{elif}\;t \leq -2 \cdot 10^{+62}:\\
\;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\
\mathbf{elif}\;t \leq -1.9 \cdot 10^{-47}:\\
\;\;\;\;b \cdot c + t_1\\
\mathbf{elif}\;t \leq -6.3 \cdot 10^{-214}:\\
\;\;\;\;t_1 + x \cdot \left(i \cdot -4\right)\\
\mathbf{elif}\;t \leq 3.45 \cdot 10^{+25}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\
\end{array}
\end{array}
if t < -5.9999999999999995e244Initial program 70.0%
associate-*l*70.0%
associate--l+70.0%
distribute-rgt-out--70.0%
associate-*l*70.0%
associate-*l*70.0%
Simplified70.0%
associate--l+70.0%
*-commutative70.0%
fma-def80.0%
associate-*l*80.0%
fma-neg80.0%
*-commutative80.0%
associate-*r*80.0%
*-commutative80.0%
associate-*r*80.0%
*-commutative80.0%
Applied egg-rr80.0%
Taylor expanded in a around inf 70.6%
*-commutative70.6%
metadata-eval70.6%
distribute-rgt-neg-in70.6%
*-commutative70.6%
associate-*r*70.6%
distribute-rgt-neg-in70.6%
*-commutative70.6%
distribute-lft-neg-in70.6%
metadata-eval70.6%
Simplified70.6%
if -5.9999999999999995e244 < t < -5.80000000000000051e89Initial program 68.9%
associate-*l*68.9%
associate--l+68.9%
distribute-rgt-out--75.8%
associate-*l*72.6%
associate-*l*72.6%
Simplified72.6%
Taylor expanded in t around inf 83.6%
Taylor expanded in x around inf 73.0%
*-commutative73.0%
associate-*r*75.9%
associate-*l*76.0%
*-commutative76.0%
*-commutative76.0%
associate-*l*73.2%
Simplified73.2%
if -5.80000000000000051e89 < t < -2.00000000000000007e62Initial program 99.8%
associate-*l*99.8%
associate--l+99.8%
distribute-rgt-out--99.8%
associate-*l*99.7%
associate-*l*99.7%
Simplified99.7%
associate--l+99.7%
*-commutative99.7%
fma-def99.8%
associate-*l*99.8%
fma-neg99.8%
*-commutative99.8%
associate-*r*99.8%
*-commutative99.8%
associate-*r*99.8%
*-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 81.1%
Taylor expanded in k around 0 66.1%
Taylor expanded in b around 0 66.1%
cancel-sign-sub-inv66.1%
metadata-eval66.1%
*-commutative66.1%
distribute-lft-out66.1%
*-commutative66.1%
Simplified66.1%
if -2.00000000000000007e62 < t < -1.90000000000000007e-47Initial program 85.5%
Simplified94.6%
Taylor expanded in b around inf 70.2%
if -1.90000000000000007e-47 < t < -6.3000000000000002e-214Initial program 96.8%
Simplified97.0%
Taylor expanded in i around inf 62.0%
associate-*r*62.0%
*-commutative62.0%
Simplified62.0%
if -6.3000000000000002e-214 < t < 3.4499999999999999e25Initial program 89.2%
associate-*l*89.2%
associate--l+89.2%
distribute-rgt-out--89.2%
associate-*l*88.2%
associate-*l*88.2%
Simplified88.2%
Taylor expanded in j around 0 75.5%
Taylor expanded in t around 0 71.2%
if 3.4499999999999999e25 < t Initial program 85.5%
Taylor expanded in x around 0 66.0%
Taylor expanded in j around 0 61.5%
Final simplification67.6%
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) -3.8e+66)
(* b c)
(if (<= (* b c) 7.2e-278)
(* t (* a -4.0))
(if (<= (* b c) 3.8e+58)
(* i (* x -4.0))
(if (<= (* b c) 5e+186) (* -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 * c) <= -3.8e+66) {
tmp = b * c;
} else if ((b * c) <= 7.2e-278) {
tmp = t * (a * -4.0);
} else if ((b * c) <= 3.8e+58) {
tmp = i * (x * -4.0);
} else if ((b * c) <= 5e+186) {
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 * c) <= (-3.8d+66)) then
tmp = b * c
else if ((b * c) <= 7.2d-278) then
tmp = t * (a * (-4.0d0))
else if ((b * c) <= 3.8d+58) then
tmp = i * (x * (-4.0d0))
else if ((b * c) <= 5d+186) 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 * c) <= -3.8e+66) {
tmp = b * c;
} else if ((b * c) <= 7.2e-278) {
tmp = t * (a * -4.0);
} else if ((b * c) <= 3.8e+58) {
tmp = i * (x * -4.0);
} else if ((b * c) <= 5e+186) {
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 * c) <= -3.8e+66: tmp = b * c elif (b * c) <= 7.2e-278: tmp = t * (a * -4.0) elif (b * c) <= 3.8e+58: tmp = i * (x * -4.0) elif (b * c) <= 5e+186: 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 (Float64(b * c) <= -3.8e+66) tmp = Float64(b * c); elseif (Float64(b * c) <= 7.2e-278) tmp = Float64(t * Float64(a * -4.0)); elseif (Float64(b * c) <= 3.8e+58) tmp = Float64(i * Float64(x * -4.0)); elseif (Float64(b * c) <= 5e+186) 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 * c) <= -3.8e+66)
tmp = b * c;
elseif ((b * c) <= 7.2e-278)
tmp = t * (a * -4.0);
elseif ((b * c) <= 3.8e+58)
tmp = i * (x * -4.0);
elseif ((b * c) <= 5e+186)
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[N[(b * c), $MachinePrecision], -3.8e+66], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 7.2e-278], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 3.8e+58], N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 5e+186], 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 \cdot c \leq -3.8 \cdot 10^{+66}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq 7.2 \cdot 10^{-278}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq 3.8 \cdot 10^{+58}:\\
\;\;\;\;i \cdot \left(x \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{+186}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -3.8000000000000002e66 or 4.99999999999999954e186 < (*.f64 b c) Initial program 88.3%
associate-*l*88.3%
associate--l+88.3%
distribute-rgt-out--88.3%
associate-*l*86.0%
associate-*l*86.0%
Simplified86.0%
associate--l+86.0%
*-commutative86.0%
fma-def87.1%
associate-*l*87.2%
fma-neg87.2%
*-commutative87.2%
associate-*r*87.2%
*-commutative87.2%
associate-*r*87.1%
*-commutative87.1%
Applied egg-rr87.1%
Taylor expanded in b around inf 67.1%
if -3.8000000000000002e66 < (*.f64 b c) < 7.19999999999999993e-278Initial program 87.6%
associate-*l*87.6%
associate--l+87.6%
distribute-rgt-out--88.7%
associate-*l*85.7%
associate-*l*85.7%
Simplified85.7%
associate--l+85.7%
*-commutative85.7%
fma-def88.9%
associate-*l*88.9%
fma-neg88.9%
*-commutative88.9%
associate-*r*88.9%
*-commutative88.9%
associate-*r*88.8%
*-commutative88.8%
Applied egg-rr88.8%
Taylor expanded in a around inf 31.7%
*-commutative31.7%
metadata-eval31.7%
distribute-rgt-neg-in31.7%
*-commutative31.7%
associate-*r*31.7%
distribute-rgt-neg-in31.7%
*-commutative31.7%
distribute-lft-neg-in31.7%
metadata-eval31.7%
Simplified31.7%
if 7.19999999999999993e-278 < (*.f64 b c) < 3.7999999999999999e58Initial program 81.0%
associate-*l*80.9%
associate--l+80.9%
distribute-rgt-out--84.5%
associate-*l*86.3%
associate-*l*86.3%
Simplified86.3%
associate--l+86.3%
*-commutative86.3%
fma-def88.1%
associate-*l*88.1%
fma-neg88.1%
*-commutative88.1%
associate-*r*88.1%
*-commutative88.1%
associate-*r*88.1%
*-commutative88.1%
Applied egg-rr88.1%
Taylor expanded in i around inf 36.3%
associate-*r*36.3%
*-commutative36.3%
associate-*r*36.3%
Simplified36.3%
if 3.7999999999999999e58 < (*.f64 b c) < 4.99999999999999954e186Initial program 87.7%
Simplified99.8%
Taylor expanded in k around inf 45.4%
Final simplification45.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 (- (+ (* b c) (* t (* a -4.0))) (* 4.0 (* x i)))))
(if (<= k 1.36e-27)
t_1
(if (<= k 4.6e+58)
(* t (- (* 18.0 (* x (* y z))) (* a 4.0)))
(if (<= k 6.1e+217) t_1 (+ (* 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 = ((b * c) + (t * (a * -4.0))) - (4.0 * (x * i));
double tmp;
if (k <= 1.36e-27) {
tmp = t_1;
} else if (k <= 4.6e+58) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (k <= 6.1e+217) {
tmp = t_1;
} else {
tmp = (b * c) + (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 = ((b * c) + (t * (a * (-4.0d0)))) - (4.0d0 * (x * i))
if (k <= 1.36d-27) then
tmp = t_1
else if (k <= 4.6d+58) then
tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
else if (k <= 6.1d+217) then
tmp = t_1
else
tmp = (b * c) + (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 = ((b * c) + (t * (a * -4.0))) - (4.0 * (x * i));
double tmp;
if (k <= 1.36e-27) {
tmp = t_1;
} else if (k <= 4.6e+58) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (k <= 6.1e+217) {
tmp = t_1;
} else {
tmp = (b * c) + (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 = ((b * c) + (t * (a * -4.0))) - (4.0 * (x * i)) tmp = 0 if k <= 1.36e-27: tmp = t_1 elif k <= 4.6e+58: tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) elif k <= 6.1e+217: tmp = t_1 else: tmp = (b * c) + (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(Float64(Float64(b * c) + Float64(t * Float64(a * -4.0))) - Float64(4.0 * Float64(x * i))) tmp = 0.0 if (k <= 1.36e-27) tmp = t_1; elseif (k <= 4.6e+58) tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); elseif (k <= 6.1e+217) tmp = t_1; else tmp = Float64(Float64(b * c) + 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 = ((b * c) + (t * (a * -4.0))) - (4.0 * (x * i));
tmp = 0.0;
if (k <= 1.36e-27)
tmp = t_1;
elseif (k <= 4.6e+58)
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
elseif (k <= 6.1e+217)
tmp = t_1;
else
tmp = (b * c) + (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[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, 1.36e-27], t$95$1, If[LessEqual[k, 4.6e+58], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 6.1e+217], t$95$1, N[(N[(b * c), $MachinePrecision] + N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := \left(b \cdot c + t \cdot \left(a \cdot -4\right)\right) - 4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;k \leq 1.36 \cdot 10^{-27}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;k \leq 4.6 \cdot 10^{+58}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;k \leq 6.1 \cdot 10^{+217}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + k \cdot \left(j \cdot -27\right)\\
\end{array}
\end{array}
if k < 1.36e-27 or 4.60000000000000005e58 < k < 6.10000000000000041e217Initial program 88.0%
associate-*l*88.0%
associate--l+88.0%
distribute-rgt-out--89.8%
associate-*l*88.5%
associate-*l*88.5%
Simplified88.5%
Taylor expanded in j around 0 77.6%
Taylor expanded in x around 0 64.7%
if 1.36e-27 < k < 4.60000000000000005e58Initial program 84.5%
associate-*l*84.4%
associate--l+84.4%
distribute-rgt-out--84.4%
associate-*l*84.5%
associate-*l*84.5%
Simplified84.5%
Taylor expanded in t around inf 69.7%
if 6.10000000000000041e217 < k Initial program 61.4%
Simplified61.4%
Taylor expanded in b around inf 62.1%
Final simplification65.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 (* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))))
(if (<= x -20000.0)
t_1
(if (<= x 2.35e-203)
(- (- (* b c) (* 4.0 (* t a))) (* (* j 27.0) k))
(if (<= x 1.42e+200)
(- (+ (* b c) (* t (* a -4.0))) (* 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 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
double tmp;
if (x <= -20000.0) {
tmp = t_1;
} else if (x <= 2.35e-203) {
tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
} else if (x <= 1.42e+200) {
tmp = ((b * c) + (t * (a * -4.0))) - (4.0 * (x * i));
} 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 = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
if (x <= (-20000.0d0)) then
tmp = t_1
else if (x <= 2.35d-203) then
tmp = ((b * c) - (4.0d0 * (t * a))) - ((j * 27.0d0) * k)
else if (x <= 1.42d+200) then
tmp = ((b * c) + (t * (a * (-4.0d0)))) - (4.0d0 * (x * i))
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 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
double tmp;
if (x <= -20000.0) {
tmp = t_1;
} else if (x <= 2.35e-203) {
tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
} else if (x <= 1.42e+200) {
tmp = ((b * c) + (t * (a * -4.0))) - (4.0 * (x * i));
} 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 = x * ((18.0 * (t * (y * z))) - (4.0 * i)) tmp = 0 if x <= -20000.0: tmp = t_1 elif x <= 2.35e-203: tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k) elif x <= 1.42e+200: tmp = ((b * c) + (t * (a * -4.0))) - (4.0 * (x * i)) 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(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))) tmp = 0.0 if (x <= -20000.0) tmp = t_1; elseif (x <= 2.35e-203) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - Float64(Float64(j * 27.0) * k)); elseif (x <= 1.42e+200) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(a * -4.0))) - Float64(4.0 * Float64(x * i))); 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 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
tmp = 0.0;
if (x <= -20000.0)
tmp = t_1;
elseif (x <= 2.35e-203)
tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
elseif (x <= 1.42e+200)
tmp = ((b * c) + (t * (a * -4.0))) - (4.0 * (x * i));
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[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -20000.0], t$95$1, If[LessEqual[x, 2.35e-203], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.42e+200], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{if}\;x \leq -20000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 2.35 \cdot 10^{-203}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{elif}\;x \leq 1.42 \cdot 10^{+200}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(a \cdot -4\right)\right) - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -2e4 or 1.42e200 < x Initial program 74.3%
associate-*l*74.3%
associate--l+74.3%
distribute-rgt-out--76.9%
associate-*l*83.2%
associate-*l*83.2%
Simplified83.2%
Taylor expanded in x around inf 72.1%
if -2e4 < x < 2.35000000000000003e-203Initial program 94.6%
Taylor expanded in x around 0 80.0%
if 2.35000000000000003e-203 < x < 1.42e200Initial program 88.0%
associate-*l*88.0%
associate--l+88.0%
distribute-rgt-out--89.2%
associate-*l*84.7%
associate-*l*84.7%
Simplified84.7%
Taylor expanded in j around 0 72.4%
Taylor expanded in x around 0 66.9%
Final simplification73.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 (<= t -3.4e+62)
(* t (- (* 18.0 (* y (* x z))) (* a 4.0)))
(if (<= t 1.8e+45)
(- (- (* b c) (* 4.0 (* x i))) (* j (* 27.0 k)))
(+ (* b c) (* t (- (* 18.0 (* x (* y 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 tmp;
if (t <= -3.4e+62) {
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
} else if (t <= 1.8e+45) {
tmp = ((b * c) - (4.0 * (x * i))) - (j * (27.0 * k));
} else {
tmp = (b * c) + (t * ((18.0 * (x * (y * 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) :: tmp
if (t <= (-3.4d+62)) then
tmp = t * ((18.0d0 * (y * (x * z))) - (a * 4.0d0))
else if (t <= 1.8d+45) then
tmp = ((b * c) - (4.0d0 * (x * i))) - (j * (27.0d0 * k))
else
tmp = (b * c) + (t * ((18.0d0 * (x * (y * 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 tmp;
if (t <= -3.4e+62) {
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
} else if (t <= 1.8e+45) {
tmp = ((b * c) - (4.0 * (x * i))) - (j * (27.0 * k));
} else {
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
}
return tmp;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if t <= -3.4e+62: tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0)) elif t <= 1.8e+45: tmp = ((b * c) - (4.0 * (x * i))) - (j * (27.0 * k)) else: tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0))) return tmp
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (t <= -3.4e+62) tmp = Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) - Float64(a * 4.0))); elseif (t <= 1.8e+45) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) - Float64(j * Float64(27.0 * k))); else tmp = Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * 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)
tmp = 0.0;
if (t <= -3.4e+62)
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
elseif (t <= 1.8e+45)
tmp = ((b * c) - (4.0 * (x * i))) - (j * (27.0 * k));
else
tmp = (b * c) + (t * ((18.0 * (x * (y * 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_] := If[LessEqual[t, -3.4e+62], 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.8e+45], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.4 \cdot 10^{+62}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{+45}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\end{array}
\end{array}
if t < -3.40000000000000014e62Initial program 75.4%
associate-*l*75.4%
associate--l+75.4%
distribute-rgt-out--79.5%
associate-*l*77.6%
associate-*l*77.6%
Simplified77.6%
Taylor expanded in t around inf 79.1%
expm1-log1p-u48.0%
expm1-udef48.1%
associate-*r*49.8%
Applied egg-rr49.8%
expm1-def49.7%
expm1-log1p80.9%
*-commutative80.9%
associate-*l*77.4%
Simplified77.4%
if -3.40000000000000014e62 < t < 1.8e45Initial program 90.9%
associate-*l*90.9%
associate--l+90.9%
distribute-rgt-out--90.9%
associate-*l*90.9%
associate-*l*90.9%
Simplified90.9%
Taylor expanded in t around 0 81.1%
if 1.8e45 < t Initial program 83.8%
associate-*l*83.8%
associate--l+83.8%
distribute-rgt-out--87.4%
associate-*l*84.0%
associate-*l*84.0%
Simplified84.0%
Taylor expanded in j around 0 80.4%
Taylor expanded in i around 0 79.9%
Final simplification80.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 (* 4.0 (* x i))) (t_2 (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))))
(if (<= t -3.1e+62)
(- t_2 t_1)
(if (<= t 1.8e+46)
(- (- (* b c) t_1) (* j (* 27.0 k)))
(+ (* 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 = 4.0 * (x * i);
double t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -3.1e+62) {
tmp = t_2 - t_1;
} else if (t <= 1.8e+46) {
tmp = ((b * c) - t_1) - (j * (27.0 * k));
} 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 = 4.0d0 * (x * i)
t_2 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
if (t <= (-3.1d+62)) then
tmp = t_2 - t_1
else if (t <= 1.8d+46) then
tmp = ((b * c) - t_1) - (j * (27.0d0 * k))
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 = 4.0 * (x * i);
double t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -3.1e+62) {
tmp = t_2 - t_1;
} else if (t <= 1.8e+46) {
tmp = ((b * c) - t_1) - (j * (27.0 * k));
} 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 = 4.0 * (x * i) t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0)) tmp = 0 if t <= -3.1e+62: tmp = t_2 - t_1 elif t <= 1.8e+46: tmp = ((b * c) - t_1) - (j * (27.0 * k)) 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(4.0 * Float64(x * i)) t_2 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))) tmp = 0.0 if (t <= -3.1e+62) tmp = Float64(t_2 - t_1); elseif (t <= 1.8e+46) tmp = Float64(Float64(Float64(b * c) - t_1) - Float64(j * Float64(27.0 * k))); 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 = 4.0 * (x * i);
t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
tmp = 0.0;
if (t <= -3.1e+62)
tmp = t_2 - t_1;
elseif (t <= 1.8e+46)
tmp = ((b * c) - t_1) - (j * (27.0 * k));
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[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.1e+62], N[(t$95$2 - t$95$1), $MachinePrecision], If[LessEqual[t, 1.8e+46], N[(N[(N[(b * c), $MachinePrecision] - t$95$1), $MachinePrecision] - N[(j * N[(27.0 * k), $MachinePrecision]), $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 := 4 \cdot \left(x \cdot i\right)\\
t_2 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -3.1 \cdot 10^{+62}:\\
\;\;\;\;t_2 - t_1\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{+46}:\\
\;\;\;\;\left(b \cdot c - t_1\right) - j \cdot \left(27 \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + t_2\\
\end{array}
\end{array}
if t < -3.10000000000000014e62Initial program 75.4%
associate-*l*75.4%
associate--l+75.4%
distribute-rgt-out--79.5%
associate-*l*77.6%
associate-*l*77.6%
Simplified77.6%
Taylor expanded in j around 0 80.8%
Taylor expanded in b around 0 83.1%
if -3.10000000000000014e62 < t < 1.7999999999999999e46Initial program 90.9%
associate-*l*90.9%
associate--l+90.9%
distribute-rgt-out--90.9%
associate-*l*90.9%
associate-*l*90.9%
Simplified90.9%
Taylor expanded in t around 0 81.1%
if 1.7999999999999999e46 < t Initial program 83.8%
associate-*l*83.8%
associate--l+83.8%
distribute-rgt-out--87.4%
associate-*l*84.0%
associate-*l*84.0%
Simplified84.0%
Taylor expanded in j around 0 80.4%
Taylor expanded in i around 0 79.9%
Final simplification81.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 (if (or (<= (* b c) -8.4e+117) (not (<= (* b c) 6e+122))) (* b c) (* -4.0 (+ (* t a) (* x i)))))
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) <= -8.4e+117) || !((b * c) <= 6e+122)) {
tmp = b * c;
} else {
tmp = -4.0 * ((t * a) + (x * i));
}
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 * c) <= (-8.4d+117)) .or. (.not. ((b * c) <= 6d+122))) then
tmp = b * c
else
tmp = (-4.0d0) * ((t * a) + (x * i))
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 * c) <= -8.4e+117) || !((b * c) <= 6e+122)) {
tmp = b * c;
} else {
tmp = -4.0 * ((t * a) + (x * i));
}
return tmp;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((b * c) <= -8.4e+117) or not ((b * c) <= 6e+122): tmp = b * c else: tmp = -4.0 * ((t * a) + (x * i)) return tmp
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((Float64(b * c) <= -8.4e+117) || !(Float64(b * c) <= 6e+122)) tmp = Float64(b * c); else tmp = Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i))); 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 * c) <= -8.4e+117) || ~(((b * c) <= 6e+122)))
tmp = b * c;
else
tmp = -4.0 * ((t * a) + (x * i));
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[Or[LessEqual[N[(b * c), $MachinePrecision], -8.4e+117], N[Not[LessEqual[N[(b * c), $MachinePrecision], 6e+122]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -8.4 \cdot 10^{+117} \lor \neg \left(b \cdot c \leq 6 \cdot 10^{+122}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -8.4000000000000005e117 or 5.99999999999999972e122 < (*.f64 b c) Initial program 86.8%
associate-*l*86.8%
associate--l+86.8%
distribute-rgt-out--86.8%
associate-*l*84.2%
associate-*l*84.2%
Simplified84.2%
associate--l+84.2%
*-commutative84.2%
fma-def85.5%
associate-*l*85.5%
fma-neg85.5%
*-commutative85.5%
associate-*r*85.5%
*-commutative85.5%
associate-*r*85.5%
*-commutative85.5%
Applied egg-rr85.5%
Taylor expanded in b around inf 70.4%
if -8.4000000000000005e117 < (*.f64 b c) < 5.99999999999999972e122Initial program 86.2%
associate-*l*86.2%
associate--l+86.2%
distribute-rgt-out--88.4%
associate-*l*88.0%
associate-*l*88.0%
Simplified88.0%
associate--l+88.0%
*-commutative88.0%
fma-def90.2%
associate-*l*90.2%
fma-neg90.2%
*-commutative90.2%
associate-*r*90.2%
*-commutative90.2%
associate-*r*90.2%
*-commutative90.2%
Applied egg-rr90.2%
Taylor expanded in x around 0 75.6%
Taylor expanded in k around 0 58.3%
Taylor expanded in b around 0 47.6%
cancel-sign-sub-inv47.6%
metadata-eval47.6%
*-commutative47.6%
distribute-lft-out47.6%
*-commutative47.6%
Simplified47.6%
Final simplification54.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 (* i (* x -4.0))))
(if (<= i -1.05e+60)
t_1
(if (<= i 8.8e-194)
(* b c)
(if (<= i 6.8e-162)
(* -27.0 (* j k))
(if (<= i 4.6e+49) (* 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 = i * (x * -4.0);
double tmp;
if (i <= -1.05e+60) {
tmp = t_1;
} else if (i <= 8.8e-194) {
tmp = b * c;
} else if (i <= 6.8e-162) {
tmp = -27.0 * (j * k);
} else if (i <= 4.6e+49) {
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 = i * (x * (-4.0d0))
if (i <= (-1.05d+60)) then
tmp = t_1
else if (i <= 8.8d-194) then
tmp = b * c
else if (i <= 6.8d-162) then
tmp = (-27.0d0) * (j * k)
else if (i <= 4.6d+49) 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 = i * (x * -4.0);
double tmp;
if (i <= -1.05e+60) {
tmp = t_1;
} else if (i <= 8.8e-194) {
tmp = b * c;
} else if (i <= 6.8e-162) {
tmp = -27.0 * (j * k);
} else if (i <= 4.6e+49) {
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 = i * (x * -4.0) tmp = 0 if i <= -1.05e+60: tmp = t_1 elif i <= 8.8e-194: tmp = b * c elif i <= 6.8e-162: tmp = -27.0 * (j * k) elif i <= 4.6e+49: 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(i * Float64(x * -4.0)) tmp = 0.0 if (i <= -1.05e+60) tmp = t_1; elseif (i <= 8.8e-194) tmp = Float64(b * c); elseif (i <= 6.8e-162) tmp = Float64(-27.0 * Float64(j * k)); elseif (i <= 4.6e+49) 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 = i * (x * -4.0);
tmp = 0.0;
if (i <= -1.05e+60)
tmp = t_1;
elseif (i <= 8.8e-194)
tmp = b * c;
elseif (i <= 6.8e-162)
tmp = -27.0 * (j * k);
elseif (i <= 4.6e+49)
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[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -1.05e+60], t$95$1, If[LessEqual[i, 8.8e-194], N[(b * c), $MachinePrecision], If[LessEqual[i, 6.8e-162], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 4.6e+49], N[(b * c), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := i \cdot \left(x \cdot -4\right)\\
\mathbf{if}\;i \leq -1.05 \cdot 10^{+60}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;i \leq 8.8 \cdot 10^{-194}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;i \leq 6.8 \cdot 10^{-162}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;i \leq 4.6 \cdot 10^{+49}:\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if i < -1.0500000000000001e60 or 4.60000000000000004e49 < i Initial program 80.9%
associate-*l*80.9%
associate--l+80.9%
distribute-rgt-out--83.4%
associate-*l*82.6%
associate-*l*82.6%
Simplified82.6%
associate--l+82.6%
*-commutative82.6%
fma-def85.1%
associate-*l*85.1%
fma-neg85.1%
*-commutative85.1%
associate-*r*85.1%
*-commutative85.1%
associate-*r*85.1%
*-commutative85.1%
Applied egg-rr85.1%
Taylor expanded in i around inf 41.8%
associate-*r*41.8%
*-commutative41.8%
associate-*r*41.8%
Simplified41.8%
if -1.0500000000000001e60 < i < 8.8000000000000005e-194 or 6.8e-162 < i < 4.60000000000000004e49Initial program 92.9%
associate-*l*92.9%
associate--l+92.9%
distribute-rgt-out--93.7%
associate-*l*90.7%
associate-*l*90.7%
Simplified90.7%
associate--l+90.7%
*-commutative90.7%
fma-def91.5%
associate-*l*91.6%
fma-neg91.6%
*-commutative91.6%
associate-*r*91.6%
*-commutative91.6%
associate-*r*91.5%
*-commutative91.5%
Applied egg-rr91.5%
Taylor expanded in b around inf 44.2%
if 8.8000000000000005e-194 < i < 6.8e-162Initial program 66.8%
Simplified88.2%
Taylor expanded in k around inf 56.7%
Final simplification43.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 (* i (* x -4.0))))
(if (<= i -3e+57)
t_1
(if (<= i 8.5e-194)
(* b c)
(if (<= i 2.4e-162)
(* j (* k -27.0))
(if (<= i 1.35e+50) (* 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 = i * (x * -4.0);
double tmp;
if (i <= -3e+57) {
tmp = t_1;
} else if (i <= 8.5e-194) {
tmp = b * c;
} else if (i <= 2.4e-162) {
tmp = j * (k * -27.0);
} else if (i <= 1.35e+50) {
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 = i * (x * (-4.0d0))
if (i <= (-3d+57)) then
tmp = t_1
else if (i <= 8.5d-194) then
tmp = b * c
else if (i <= 2.4d-162) then
tmp = j * (k * (-27.0d0))
else if (i <= 1.35d+50) 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 = i * (x * -4.0);
double tmp;
if (i <= -3e+57) {
tmp = t_1;
} else if (i <= 8.5e-194) {
tmp = b * c;
} else if (i <= 2.4e-162) {
tmp = j * (k * -27.0);
} else if (i <= 1.35e+50) {
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 = i * (x * -4.0) tmp = 0 if i <= -3e+57: tmp = t_1 elif i <= 8.5e-194: tmp = b * c elif i <= 2.4e-162: tmp = j * (k * -27.0) elif i <= 1.35e+50: 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(i * Float64(x * -4.0)) tmp = 0.0 if (i <= -3e+57) tmp = t_1; elseif (i <= 8.5e-194) tmp = Float64(b * c); elseif (i <= 2.4e-162) tmp = Float64(j * Float64(k * -27.0)); elseif (i <= 1.35e+50) 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 = i * (x * -4.0);
tmp = 0.0;
if (i <= -3e+57)
tmp = t_1;
elseif (i <= 8.5e-194)
tmp = b * c;
elseif (i <= 2.4e-162)
tmp = j * (k * -27.0);
elseif (i <= 1.35e+50)
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[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -3e+57], t$95$1, If[LessEqual[i, 8.5e-194], N[(b * c), $MachinePrecision], If[LessEqual[i, 2.4e-162], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 1.35e+50], N[(b * c), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := i \cdot \left(x \cdot -4\right)\\
\mathbf{if}\;i \leq -3 \cdot 10^{+57}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;i \leq 8.5 \cdot 10^{-194}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;i \leq 2.4 \cdot 10^{-162}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;i \leq 1.35 \cdot 10^{+50}:\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if i < -3e57 or 1.35e50 < i Initial program 80.9%
associate-*l*80.9%
associate--l+80.9%
distribute-rgt-out--83.4%
associate-*l*82.6%
associate-*l*82.6%
Simplified82.6%
associate--l+82.6%
*-commutative82.6%
fma-def85.1%
associate-*l*85.1%
fma-neg85.1%
*-commutative85.1%
associate-*r*85.1%
*-commutative85.1%
associate-*r*85.1%
*-commutative85.1%
Applied egg-rr85.1%
Taylor expanded in i around inf 41.8%
associate-*r*41.8%
*-commutative41.8%
associate-*r*41.8%
Simplified41.8%
if -3e57 < i < 8.5000000000000005e-194 or 2.4000000000000002e-162 < i < 1.35e50Initial program 92.9%
associate-*l*92.9%
associate--l+92.9%
distribute-rgt-out--93.7%
associate-*l*90.7%
associate-*l*90.7%
Simplified90.7%
associate--l+90.7%
*-commutative90.7%
fma-def91.5%
associate-*l*91.6%
fma-neg91.6%
*-commutative91.6%
associate-*r*91.6%
*-commutative91.6%
associate-*r*91.5%
*-commutative91.5%
Applied egg-rr91.5%
Taylor expanded in b around inf 44.2%
if 8.5000000000000005e-194 < i < 2.4000000000000002e-162Initial program 66.8%
associate-*l*67.1%
associate--l+67.1%
distribute-rgt-out--67.1%
associate-*l*88.5%
associate-*l*88.5%
Simplified88.5%
associate--l+88.5%
*-commutative88.5%
fma-def99.7%
associate-*l*99.7%
fma-neg99.7%
*-commutative99.7%
associate-*r*99.7%
*-commutative99.7%
associate-*r*99.3%
*-commutative99.3%
Applied egg-rr99.3%
Taylor expanded in k around inf 56.7%
*-commutative56.7%
metadata-eval56.7%
distribute-lft-neg-in56.7%
associate-*r*57.0%
*-commutative57.0%
distribute-rgt-neg-in57.0%
*-commutative57.0%
distribute-rgt-neg-in57.0%
metadata-eval57.0%
Simplified57.0%
Final simplification43.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 (or (<= i -1.4e+58) (not (<= i 1.1e+23))) (* -4.0 (+ (* t a) (* x i))) (+ (* 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 tmp;
if ((i <= -1.4e+58) || !(i <= 1.1e+23)) {
tmp = -4.0 * ((t * a) + (x * i));
} else {
tmp = (b * c) + (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) :: tmp
if ((i <= (-1.4d+58)) .or. (.not. (i <= 1.1d+23))) then
tmp = (-4.0d0) * ((t * a) + (x * i))
else
tmp = (b * c) + (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 tmp;
if ((i <= -1.4e+58) || !(i <= 1.1e+23)) {
tmp = -4.0 * ((t * a) + (x * i));
} else {
tmp = (b * c) + (k * (j * -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 <= -1.4e+58) or not (i <= 1.1e+23): tmp = -4.0 * ((t * a) + (x * i)) else: tmp = (b * c) + (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 ((i <= -1.4e+58) || !(i <= 1.1e+23)) tmp = Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i))); else tmp = Float64(Float64(b * c) + 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)
tmp = 0.0;
if ((i <= -1.4e+58) || ~((i <= 1.1e+23)))
tmp = -4.0 * ((t * a) + (x * i));
else
tmp = (b * c) + (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_] := If[Or[LessEqual[i, -1.4e+58], N[Not[LessEqual[i, 1.1e+23]], $MachinePrecision]], N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;i \leq -1.4 \cdot 10^{+58} \lor \neg \left(i \leq 1.1 \cdot 10^{+23}\right):\\
\;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + k \cdot \left(j \cdot -27\right)\\
\end{array}
\end{array}
if i < -1.3999999999999999e58 or 1.10000000000000004e23 < i Initial program 81.5%
associate-*l*81.5%
associate--l+81.5%
distribute-rgt-out--83.9%
associate-*l*83.1%
associate-*l*83.1%
Simplified83.1%
associate--l+83.1%
*-commutative83.1%
fma-def85.5%
associate-*l*85.5%
fma-neg85.5%
*-commutative85.5%
associate-*r*85.5%
*-commutative85.5%
associate-*r*85.5%
*-commutative85.5%
Applied egg-rr85.5%
Taylor expanded in x around 0 75.9%
Taylor expanded in k around 0 68.2%
Taylor expanded in b around 0 57.6%
cancel-sign-sub-inv57.6%
metadata-eval57.6%
*-commutative57.6%
distribute-lft-out57.6%
*-commutative57.6%
Simplified57.6%
if -1.3999999999999999e58 < i < 1.10000000000000004e23Initial program 90.9%
Simplified91.1%
Taylor expanded in b around inf 60.7%
Final simplification59.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 (if (or (<= c -2.4e-50) (not (<= c 4.9e-20))) (* 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 ((c <= -2.4e-50) || !(c <= 4.9e-20)) {
tmp = b * c;
} else {
tmp = -27.0 * (j * k);
}
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 ((c <= (-2.4d-50)) .or. (.not. (c <= 4.9d-20))) then
tmp = b * c
else
tmp = (-27.0d0) * (j * k)
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 ((c <= -2.4e-50) || !(c <= 4.9e-20)) {
tmp = b * c;
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (c <= -2.4e-50) or not (c <= 4.9e-20): tmp = b * c else: tmp = -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 ((c <= -2.4e-50) || !(c <= 4.9e-20)) tmp = Float64(b * c); else tmp = Float64(-27.0 * Float64(j * k)); 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 ((c <= -2.4e-50) || ~((c <= 4.9e-20)))
tmp = b * c;
else
tmp = -27.0 * (j * k);
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[Or[LessEqual[c, -2.4e-50], N[Not[LessEqual[c, 4.9e-20]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;c \leq -2.4 \cdot 10^{-50} \lor \neg \left(c \leq 4.9 \cdot 10^{-20}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if c < -2.40000000000000002e-50 or 4.9000000000000002e-20 < c Initial program 86.5%
associate-*l*86.4%
associate--l+86.4%
distribute-rgt-out--87.2%
associate-*l*84.9%
associate-*l*84.9%
Simplified84.9%
associate--l+84.9%
*-commutative84.9%
fma-def87.9%
associate-*l*87.9%
fma-neg87.9%
*-commutative87.9%
associate-*r*87.9%
*-commutative87.9%
associate-*r*87.9%
*-commutative87.9%
Applied egg-rr87.9%
Taylor expanded in b around inf 46.9%
if -2.40000000000000002e-50 < c < 4.9000000000000002e-20Initial program 86.3%
Simplified88.8%
Taylor expanded in k around inf 25.3%
Final simplification36.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 86.4%
associate-*l*86.4%
associate--l+86.4%
distribute-rgt-out--88.0%
associate-*l*86.8%
associate-*l*86.8%
Simplified86.8%
associate--l+86.8%
*-commutative86.8%
fma-def88.8%
associate-*l*88.8%
fma-neg88.8%
*-commutative88.8%
associate-*r*88.8%
*-commutative88.8%
associate-*r*88.8%
*-commutative88.8%
Applied egg-rr88.8%
Taylor expanded in b around inf 28.8%
Final simplification28.8%
(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 2023309
(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)))