
(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 21 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: y and z 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) y) z) t) (* t (* a 4.0))) (* b c))
(* (* x 4.0) i))
(* (* j 27.0) k))))
(if (<= t_1 (- INFINITY))
(+
(fma
(- x)
(fma i 4.0 (* z (* y (* t -18.0))))
(fma -4.0 (* t a) (* b c)))
(* k (* j -27.0)))
(if (<= t_1 INFINITY) t_1 (* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))))))assert(y < z);
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) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = fma(-x, fma(i, 4.0, (z * (y * (t * -18.0)))), fma(-4.0, (t * a), (b * c))) + (k * (j * -27.0));
} else if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
}
return tmp;
}
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(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)) - Float64(Float64(j * 27.0) * k)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(fma(Float64(-x), fma(i, 4.0, Float64(z * Float64(y * Float64(t * -18.0)))), fma(-4.0, Float64(t * a), Float64(b * c))) + Float64(k * Float64(j * -27.0))); elseif (t_1 <= Inf) tmp = t_1; else tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); end return tmp end
NOTE: y and z 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[(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] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[((-x) * N[(i * 4.0 + N[(z * N[(y * N[(t * -18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], t$95$1, N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := \left(\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\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;\mathsf{fma}\left(-x, \mathsf{fma}\left(i, 4, z \cdot \left(y \cdot \left(t \cdot -18\right)\right)\right), \mathsf{fma}\left(-4, t \cdot a, b \cdot c\right)\right) + k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) < -inf.0Initial program 90.4%
Simplified90.4%
Taylor expanded in x around -inf 96.0%
associate-+r+96.0%
metadata-eval96.0%
cancel-sign-sub-inv96.0%
+-commutative96.0%
associate-+r+96.0%
associate-*r*96.0%
neg-mul-196.0%
fma-def96.0%
Simplified99.9%
if -inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) < +inf.0Initial program 95.2%
if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) Initial program 0.0%
associate-*l*0.0%
associate--l+0.0%
distribute-rgt-out--20.0%
associate-*l*32.0%
associate-*l*32.0%
Simplified32.0%
Taylor expanded in a around 0 28.0%
Taylor expanded in j around 0 32.2%
Taylor expanded in x around inf 60.0%
Final simplification92.7%
NOTE: y and z 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) y) z) t) (* t (* a 4.0))) (* b c))
(* (* x 4.0) i))
(* (* j 27.0) k))))
(if (<= t_1 INFINITY) t_1 (* x (- (* 18.0 (* t (* y z))) (* 4.0 i))))))assert(y < z);
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) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
}
return tmp;
}
assert y < z;
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) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(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)) - Float64(Float64(j * 27.0) * k)) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
tmp = 0.0;
if (t_1 <= Inf)
tmp = t_1;
else
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
end
tmp_2 = tmp;
end
NOTE: y and z 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[(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] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := \left(\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\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) < +inf.0Initial program 94.2%
if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) Initial program 0.0%
associate-*l*0.0%
associate--l+0.0%
distribute-rgt-out--20.0%
associate-*l*32.0%
associate-*l*32.0%
Simplified32.0%
Taylor expanded in a around 0 28.0%
Taylor expanded in j around 0 32.2%
Taylor expanded in x around inf 60.0%
Final simplification90.9%
NOTE: y and z 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) INFINITY)
(-
(+ (* t (- (* (* x 18.0) (* y z)) (* a 4.0))) (- (* b c) (* x (* 4.0 i))))
(* j (* 27.0 k)))
(* b c)))assert(y < z);
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) <= ((double) INFINITY)) {
tmp = ((t * (((x * 18.0) * (y * z)) - (a * 4.0))) + ((b * c) - (x * (4.0 * i)))) - (j * (27.0 * k));
} else {
tmp = b * c;
}
return tmp;
}
assert y < z;
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) <= Double.POSITIVE_INFINITY) {
tmp = ((t * (((x * 18.0) * (y * z)) - (a * 4.0))) + ((b * c) - (x * (4.0 * i)))) - (j * (27.0 * k));
} else {
tmp = b * c;
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= math.inf: tmp = ((t * (((x * 18.0) * (y * z)) - (a * 4.0))) + ((b * c) - (x * (4.0 * i)))) - (j * (27.0 * k)) else: tmp = b * c return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= Inf) 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))); else tmp = Float64(b * c); end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((b * c) <= Inf)
tmp = ((t * (((x * 18.0) * (y * z)) - (a * 4.0))) + ((b * c) - (x * (4.0 * i)))) - (j * (27.0 * k));
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: y and z 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], Infinity], 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], N[(b * c), $MachinePrecision]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq \infty:\\
\;\;\;\;\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)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < +inf.0Initial program 85.0%
associate-*l*85.0%
associate--l+85.0%
distribute-rgt-out--86.9%
associate-*l*87.8%
associate-*l*87.8%
Simplified87.8%
if +inf.0 < (*.f64 b c) Initial program 85.0%
associate-*l*85.0%
associate--l+85.0%
distribute-rgt-out--86.9%
associate-*l*87.8%
associate-*l*87.8%
Simplified87.8%
Taylor expanded in y around 0 77.9%
Taylor expanded in b around inf 23.7%
Final simplification87.8%
NOTE: y and z 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 (* j (* 27.0 k))) (t_2 (* 4.0 (* x i))))
(if (<= y -1.25e+115)
(- (- (+ (* b c) (* 18.0 (* t (* y (* x z))))) t_2) t_1)
(- (- (+ (* b c) (* -4.0 (* t a))) t_2) t_1))))assert(y < z);
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 = j * (27.0 * k);
double t_2 = 4.0 * (x * i);
double tmp;
if (y <= -1.25e+115) {
tmp = (((b * c) + (18.0 * (t * (y * (x * z))))) - t_2) - t_1;
} else {
tmp = (((b * c) + (-4.0 * (t * a))) - t_2) - t_1;
}
return tmp;
}
NOTE: y and z 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 = j * (27.0d0 * k)
t_2 = 4.0d0 * (x * i)
if (y <= (-1.25d+115)) then
tmp = (((b * c) + (18.0d0 * (t * (y * (x * z))))) - t_2) - t_1
else
tmp = (((b * c) + ((-4.0d0) * (t * a))) - t_2) - t_1
end if
code = tmp
end function
assert y < z;
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 = j * (27.0 * k);
double t_2 = 4.0 * (x * i);
double tmp;
if (y <= -1.25e+115) {
tmp = (((b * c) + (18.0 * (t * (y * (x * z))))) - t_2) - t_1;
} else {
tmp = (((b * c) + (-4.0 * (t * a))) - t_2) - t_1;
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (27.0 * k) t_2 = 4.0 * (x * i) tmp = 0 if y <= -1.25e+115: tmp = (((b * c) + (18.0 * (t * (y * (x * z))))) - t_2) - t_1 else: tmp = (((b * c) + (-4.0 * (t * a))) - t_2) - t_1 return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(27.0 * k)) t_2 = Float64(4.0 * Float64(x * i)) tmp = 0.0 if (y <= -1.25e+115) tmp = Float64(Float64(Float64(Float64(b * c) + Float64(18.0 * Float64(t * Float64(y * Float64(x * z))))) - t_2) - t_1); else tmp = Float64(Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - t_2) - t_1); end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (27.0 * k);
t_2 = 4.0 * (x * i);
tmp = 0.0;
if (y <= -1.25e+115)
tmp = (((b * c) + (18.0 * (t * (y * (x * z))))) - t_2) - t_1;
else
tmp = (((b * c) + (-4.0 * (t * a))) - t_2) - t_1;
end
tmp_2 = tmp;
end
NOTE: y and z 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[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.25e+115], N[(N[(N[(N[(b * c), $MachinePrecision] + N[(18.0 * N[(t * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision] - t$95$1), $MachinePrecision]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(27 \cdot k\right)\\
t_2 := 4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;y \leq -1.25 \cdot 10^{+115}:\\
\;\;\;\;\left(\left(b \cdot c + 18 \cdot \left(t \cdot \left(y \cdot \left(x \cdot z\right)\right)\right)\right) - t_2\right) - t_1\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - t_2\right) - t_1\\
\end{array}
\end{array}
if y < -1.25000000000000002e115Initial program 74.9%
associate-*l*74.9%
associate--l+74.9%
distribute-rgt-out--77.2%
associate-*l*77.4%
associate-*l*77.4%
Simplified77.4%
Taylor expanded in a around 0 73.0%
expm1-log1p-u44.8%
expm1-udef44.8%
*-commutative44.8%
Applied egg-rr48.9%
expm1-def44.8%
expm1-log1p66.4%
associate-*r*68.4%
Simplified79.5%
if -1.25000000000000002e115 < y Initial program 87.0%
associate-*l*87.0%
associate--l+87.0%
distribute-rgt-out--88.9%
associate-*l*89.9%
associate-*l*89.9%
Simplified89.9%
Taylor expanded in y around 0 82.5%
Final simplification82.0%
NOTE: y and z 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 (<= c -1.55e-27)
(- (* b c) (* 4.0 (* x i)))
(if (<= c 9.5e-5)
(+ t_1 (* x (* i -4.0)))
(if (<= c 6.4e+103)
(* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))
(if (<= c 4e+109)
(+ t_1 (* -4.0 (* t a)))
(if (<= c 2.5e+200)
(+ (* b c) (* 18.0 (* t (* x (* y z)))))
(+ (* b c) t_1))))))))assert(y < z);
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 (c <= -1.55e-27) {
tmp = (b * c) - (4.0 * (x * i));
} else if (c <= 9.5e-5) {
tmp = t_1 + (x * (i * -4.0));
} else if (c <= 6.4e+103) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (c <= 4e+109) {
tmp = t_1 + (-4.0 * (t * a));
} else if (c <= 2.5e+200) {
tmp = (b * c) + (18.0 * (t * (x * (y * z))));
} else {
tmp = (b * c) + t_1;
}
return tmp;
}
NOTE: y and z 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 (c <= (-1.55d-27)) then
tmp = (b * c) - (4.0d0 * (x * i))
else if (c <= 9.5d-5) then
tmp = t_1 + (x * (i * (-4.0d0)))
else if (c <= 6.4d+103) then
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
else if (c <= 4d+109) then
tmp = t_1 + ((-4.0d0) * (t * a))
else if (c <= 2.5d+200) then
tmp = (b * c) + (18.0d0 * (t * (x * (y * z))))
else
tmp = (b * c) + t_1
end if
code = tmp
end function
assert y < z;
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 (c <= -1.55e-27) {
tmp = (b * c) - (4.0 * (x * i));
} else if (c <= 9.5e-5) {
tmp = t_1 + (x * (i * -4.0));
} else if (c <= 6.4e+103) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (c <= 4e+109) {
tmp = t_1 + (-4.0 * (t * a));
} else if (c <= 2.5e+200) {
tmp = (b * c) + (18.0 * (t * (x * (y * z))));
} else {
tmp = (b * c) + t_1;
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = k * (j * -27.0) tmp = 0 if c <= -1.55e-27: tmp = (b * c) - (4.0 * (x * i)) elif c <= 9.5e-5: tmp = t_1 + (x * (i * -4.0)) elif c <= 6.4e+103: tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) elif c <= 4e+109: tmp = t_1 + (-4.0 * (t * a)) elif c <= 2.5e+200: tmp = (b * c) + (18.0 * (t * (x * (y * z)))) else: tmp = (b * c) + t_1 return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(k * Float64(j * -27.0)) tmp = 0.0 if (c <= -1.55e-27) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); elseif (c <= 9.5e-5) tmp = Float64(t_1 + Float64(x * Float64(i * -4.0))); elseif (c <= 6.4e+103) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); elseif (c <= 4e+109) tmp = Float64(t_1 + Float64(-4.0 * Float64(t * a))); elseif (c <= 2.5e+200) tmp = Float64(Float64(b * c) + Float64(18.0 * Float64(t * Float64(x * Float64(y * z))))); else tmp = Float64(Float64(b * c) + t_1); end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = k * (j * -27.0);
tmp = 0.0;
if (c <= -1.55e-27)
tmp = (b * c) - (4.0 * (x * i));
elseif (c <= 9.5e-5)
tmp = t_1 + (x * (i * -4.0));
elseif (c <= 6.4e+103)
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
elseif (c <= 4e+109)
tmp = t_1 + (-4.0 * (t * a));
elseif (c <= 2.5e+200)
tmp = (b * c) + (18.0 * (t * (x * (y * z))));
else
tmp = (b * c) + t_1;
end
tmp_2 = tmp;
end
NOTE: y and z 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[c, -1.55e-27], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 9.5e-5], N[(t$95$1 + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 6.4e+103], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 4e+109], N[(t$95$1 + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.5e+200], N[(N[(b * c), $MachinePrecision] + N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot -27\right)\\
\mathbf{if}\;c \leq -1.55 \cdot 10^{-27}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;c \leq 9.5 \cdot 10^{-5}:\\
\;\;\;\;t_1 + x \cdot \left(i \cdot -4\right)\\
\mathbf{elif}\;c \leq 6.4 \cdot 10^{+103}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{elif}\;c \leq 4 \cdot 10^{+109}:\\
\;\;\;\;t_1 + -4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;c \leq 2.5 \cdot 10^{+200}:\\
\;\;\;\;b \cdot c + 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + t_1\\
\end{array}
\end{array}
if c < -1.5499999999999999e-27Initial program 81.2%
associate-*l*81.2%
associate--l+81.2%
distribute-rgt-out--84.1%
associate-*l*84.3%
associate-*l*84.3%
Simplified84.3%
Taylor expanded in a around 0 76.0%
Taylor expanded in j around 0 63.5%
Taylor expanded in t around 0 53.2%
if -1.5499999999999999e-27 < c < 9.5000000000000005e-5Initial program 90.0%
Simplified93.2%
Taylor expanded in i around inf 56.8%
associate-*r*56.8%
*-commutative56.8%
Simplified56.8%
if 9.5000000000000005e-5 < c < 6.39999999999999985e103Initial program 85.9%
associate-*l*85.9%
associate--l+85.9%
distribute-rgt-out--85.9%
associate-*l*92.6%
associate-*l*92.6%
Simplified92.6%
Taylor expanded in a around 0 70.4%
Taylor expanded in j around 0 63.4%
Taylor expanded in x around inf 62.0%
if 6.39999999999999985e103 < c < 3.99999999999999993e109Initial program 85.0%
Simplified89.4%
Taylor expanded in a around inf 39.4%
*-commutative39.4%
Simplified39.4%
if 3.99999999999999993e109 < c < 2.50000000000000009e200Initial program 90.3%
associate-*l*90.4%
associate--l+90.4%
distribute-rgt-out--90.4%
associate-*l*85.7%
associate-*l*85.7%
Simplified85.7%
Taylor expanded in a around 0 67.0%
Taylor expanded in j around 0 67.0%
Taylor expanded in i around 0 67.1%
if 2.50000000000000009e200 < c Initial program 66.6%
Simplified81.6%
Taylor expanded in b around inf 71.0%
Final simplification58.5%
NOTE: y and z 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 (<= c -4.1e-15)
(- (* b c) (* 4.0 (* x i)))
(if (<= c 1.9e-5)
(+ t_1 (* x (* i -4.0)))
(if (<= c 1.02e+93)
(* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))
(if (<= c 2.3e+107)
(+ t_1 (* 18.0 (* t (* y (* x z)))))
(if (<= c 1e+201)
(+ (* b c) (* 18.0 (* t (* x (* y z)))))
(+ (* b c) t_1))))))))assert(y < z);
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 (c <= -4.1e-15) {
tmp = (b * c) - (4.0 * (x * i));
} else if (c <= 1.9e-5) {
tmp = t_1 + (x * (i * -4.0));
} else if (c <= 1.02e+93) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (c <= 2.3e+107) {
tmp = t_1 + (18.0 * (t * (y * (x * z))));
} else if (c <= 1e+201) {
tmp = (b * c) + (18.0 * (t * (x * (y * z))));
} else {
tmp = (b * c) + t_1;
}
return tmp;
}
NOTE: y and z 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 (c <= (-4.1d-15)) then
tmp = (b * c) - (4.0d0 * (x * i))
else if (c <= 1.9d-5) then
tmp = t_1 + (x * (i * (-4.0d0)))
else if (c <= 1.02d+93) then
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
else if (c <= 2.3d+107) then
tmp = t_1 + (18.0d0 * (t * (y * (x * z))))
else if (c <= 1d+201) then
tmp = (b * c) + (18.0d0 * (t * (x * (y * z))))
else
tmp = (b * c) + t_1
end if
code = tmp
end function
assert y < z;
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 (c <= -4.1e-15) {
tmp = (b * c) - (4.0 * (x * i));
} else if (c <= 1.9e-5) {
tmp = t_1 + (x * (i * -4.0));
} else if (c <= 1.02e+93) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (c <= 2.3e+107) {
tmp = t_1 + (18.0 * (t * (y * (x * z))));
} else if (c <= 1e+201) {
tmp = (b * c) + (18.0 * (t * (x * (y * z))));
} else {
tmp = (b * c) + t_1;
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = k * (j * -27.0) tmp = 0 if c <= -4.1e-15: tmp = (b * c) - (4.0 * (x * i)) elif c <= 1.9e-5: tmp = t_1 + (x * (i * -4.0)) elif c <= 1.02e+93: tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) elif c <= 2.3e+107: tmp = t_1 + (18.0 * (t * (y * (x * z)))) elif c <= 1e+201: tmp = (b * c) + (18.0 * (t * (x * (y * z)))) else: tmp = (b * c) + t_1 return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(k * Float64(j * -27.0)) tmp = 0.0 if (c <= -4.1e-15) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); elseif (c <= 1.9e-5) tmp = Float64(t_1 + Float64(x * Float64(i * -4.0))); elseif (c <= 1.02e+93) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); elseif (c <= 2.3e+107) tmp = Float64(t_1 + Float64(18.0 * Float64(t * Float64(y * Float64(x * z))))); elseif (c <= 1e+201) tmp = Float64(Float64(b * c) + Float64(18.0 * Float64(t * Float64(x * Float64(y * z))))); else tmp = Float64(Float64(b * c) + t_1); end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = k * (j * -27.0);
tmp = 0.0;
if (c <= -4.1e-15)
tmp = (b * c) - (4.0 * (x * i));
elseif (c <= 1.9e-5)
tmp = t_1 + (x * (i * -4.0));
elseif (c <= 1.02e+93)
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
elseif (c <= 2.3e+107)
tmp = t_1 + (18.0 * (t * (y * (x * z))));
elseif (c <= 1e+201)
tmp = (b * c) + (18.0 * (t * (x * (y * z))));
else
tmp = (b * c) + t_1;
end
tmp_2 = tmp;
end
NOTE: y and z 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[c, -4.1e-15], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.9e-5], N[(t$95$1 + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.02e+93], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.3e+107], N[(t$95$1 + N[(18.0 * N[(t * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1e+201], N[(N[(b * c), $MachinePrecision] + N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot -27\right)\\
\mathbf{if}\;c \leq -4.1 \cdot 10^{-15}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;c \leq 1.9 \cdot 10^{-5}:\\
\;\;\;\;t_1 + x \cdot \left(i \cdot -4\right)\\
\mathbf{elif}\;c \leq 1.02 \cdot 10^{+93}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{elif}\;c \leq 2.3 \cdot 10^{+107}:\\
\;\;\;\;t_1 + 18 \cdot \left(t \cdot \left(y \cdot \left(x \cdot z\right)\right)\right)\\
\mathbf{elif}\;c \leq 10^{+201}:\\
\;\;\;\;b \cdot c + 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + t_1\\
\end{array}
\end{array}
if c < -4.10000000000000036e-15Initial program 81.2%
associate-*l*81.2%
associate--l+81.2%
distribute-rgt-out--84.1%
associate-*l*84.3%
associate-*l*84.3%
Simplified84.3%
Taylor expanded in a around 0 76.0%
Taylor expanded in j around 0 63.5%
Taylor expanded in t around 0 53.2%
if -4.10000000000000036e-15 < c < 1.9000000000000001e-5Initial program 90.0%
Simplified93.2%
Taylor expanded in i around inf 56.8%
associate-*r*56.8%
*-commutative56.8%
Simplified56.8%
if 1.9000000000000001e-5 < c < 1.0200000000000001e93Initial program 83.5%
associate-*l*83.5%
associate--l+83.5%
distribute-rgt-out--83.5%
associate-*l*91.4%
associate-*l*91.4%
Simplified91.4%
Taylor expanded in a around 0 65.1%
Taylor expanded in j around 0 65.3%
Taylor expanded in x around inf 64.1%
if 1.0200000000000001e93 < c < 2.3e107Initial program 99.2%
Simplified99.2%
Taylor expanded in z around inf 99.2%
expm1-log1p-u50.0%
expm1-udef50.0%
*-commutative50.0%
Applied egg-rr50.0%
expm1-def50.0%
expm1-log1p99.2%
associate-*r*99.2%
Simplified99.2%
if 2.3e107 < c < 1.00000000000000004e201Initial program 90.3%
associate-*l*90.4%
associate--l+90.4%
distribute-rgt-out--90.4%
associate-*l*85.7%
associate-*l*85.7%
Simplified85.7%
Taylor expanded in a around 0 67.0%
Taylor expanded in j around 0 67.0%
Taylor expanded in i around 0 67.1%
if 1.00000000000000004e201 < c Initial program 66.6%
Simplified81.6%
Taylor expanded in b around inf 71.0%
Final simplification58.8%
NOTE: y and z 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 (* j (* 27.0 k))))
(if (<= y -1.7e+130)
(- (* x (- (* 18.0 (* t (* y z))) (* 4.0 i))) t_2)
(if (or (<= y -3.1e-137) (and (not (<= y -1.05e-237)) (<= y -6e-304)))
(- (+ (* b c) (* -4.0 (* t a))) t_1)
(- (- (* b c) t_1) t_2)))))assert(y < z);
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 = j * (27.0 * k);
double tmp;
if (y <= -1.7e+130) {
tmp = (x * ((18.0 * (t * (y * z))) - (4.0 * i))) - t_2;
} else if ((y <= -3.1e-137) || (!(y <= -1.05e-237) && (y <= -6e-304))) {
tmp = ((b * c) + (-4.0 * (t * a))) - t_1;
} else {
tmp = ((b * c) - t_1) - t_2;
}
return tmp;
}
NOTE: y and z 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 = j * (27.0d0 * k)
if (y <= (-1.7d+130)) then
tmp = (x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))) - t_2
else if ((y <= (-3.1d-137)) .or. (.not. (y <= (-1.05d-237))) .and. (y <= (-6d-304))) then
tmp = ((b * c) + ((-4.0d0) * (t * a))) - t_1
else
tmp = ((b * c) - t_1) - t_2
end if
code = tmp
end function
assert y < z;
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 = j * (27.0 * k);
double tmp;
if (y <= -1.7e+130) {
tmp = (x * ((18.0 * (t * (y * z))) - (4.0 * i))) - t_2;
} else if ((y <= -3.1e-137) || (!(y <= -1.05e-237) && (y <= -6e-304))) {
tmp = ((b * c) + (-4.0 * (t * a))) - t_1;
} else {
tmp = ((b * c) - t_1) - t_2;
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 4.0 * (x * i) t_2 = j * (27.0 * k) tmp = 0 if y <= -1.7e+130: tmp = (x * ((18.0 * (t * (y * z))) - (4.0 * i))) - t_2 elif (y <= -3.1e-137) or (not (y <= -1.05e-237) and (y <= -6e-304)): tmp = ((b * c) + (-4.0 * (t * a))) - t_1 else: tmp = ((b * c) - t_1) - t_2 return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(4.0 * Float64(x * i)) t_2 = Float64(j * Float64(27.0 * k)) tmp = 0.0 if (y <= -1.7e+130) tmp = Float64(Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))) - t_2); elseif ((y <= -3.1e-137) || (!(y <= -1.05e-237) && (y <= -6e-304))) tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - t_1); else tmp = Float64(Float64(Float64(b * c) - t_1) - t_2); end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 4.0 * (x * i);
t_2 = j * (27.0 * k);
tmp = 0.0;
if (y <= -1.7e+130)
tmp = (x * ((18.0 * (t * (y * z))) - (4.0 * i))) - t_2;
elseif ((y <= -3.1e-137) || (~((y <= -1.05e-237)) && (y <= -6e-304)))
tmp = ((b * c) + (-4.0 * (t * a))) - t_1;
else
tmp = ((b * c) - t_1) - t_2;
end
tmp_2 = tmp;
end
NOTE: y and z 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[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.7e+130], N[(N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], If[Or[LessEqual[y, -3.1e-137], And[N[Not[LessEqual[y, -1.05e-237]], $MachinePrecision], LessEqual[y, -6e-304]]], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := 4 \cdot \left(x \cdot i\right)\\
t_2 := j \cdot \left(27 \cdot k\right)\\
\mathbf{if}\;y \leq -1.7 \cdot 10^{+130}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right) - t_2\\
\mathbf{elif}\;y \leq -3.1 \cdot 10^{-137} \lor \neg \left(y \leq -1.05 \cdot 10^{-237}\right) \land y \leq -6 \cdot 10^{-304}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - t_1\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - t_1\right) - t_2\\
\end{array}
\end{array}
if y < -1.7e130Initial program 75.3%
associate-*l*75.3%
associate--l+75.3%
distribute-rgt-out--77.8%
associate-*l*80.4%
associate-*l*80.4%
Simplified80.4%
Taylor expanded in x around inf 75.8%
if -1.7e130 < y < -3.09999999999999978e-137 or -1.0500000000000001e-237 < y < -6.0000000000000002e-304Initial program 87.0%
associate-*l*87.0%
associate--l+87.0%
distribute-rgt-out--89.9%
associate-*l*88.5%
associate-*l*88.5%
Simplified88.5%
Taylor expanded in y around 0 88.6%
Taylor expanded in j around 0 76.2%
if -3.09999999999999978e-137 < y < -1.0500000000000001e-237 or -6.0000000000000002e-304 < y Initial program 86.7%
associate-*l*86.7%
associate--l+86.7%
distribute-rgt-out--88.0%
associate-*l*89.5%
associate-*l*89.5%
Simplified89.5%
Taylor expanded in t around 0 68.6%
Final simplification71.8%
NOTE: y and z 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) (* -4.0 (* t a))) (* 4.0 (* x i))))
(t_2 (* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))))
(if (<= x -4e+197)
t_2
(if (<= x -9e-52)
t_1
(if (<= x 1.16e-116)
(+ (* b c) (* k (* j -27.0)))
(if (<= x 2.45e+106) t_1 t_2))))))assert(y < z);
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) + (-4.0 * (t * a))) - (4.0 * (x * i));
double t_2 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
double tmp;
if (x <= -4e+197) {
tmp = t_2;
} else if (x <= -9e-52) {
tmp = t_1;
} else if (x <= 1.16e-116) {
tmp = (b * c) + (k * (j * -27.0));
} else if (x <= 2.45e+106) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: y and z 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) + ((-4.0d0) * (t * a))) - (4.0d0 * (x * i))
t_2 = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
if (x <= (-4d+197)) then
tmp = t_2
else if (x <= (-9d-52)) then
tmp = t_1
else if (x <= 1.16d-116) then
tmp = (b * c) + (k * (j * (-27.0d0)))
else if (x <= 2.45d+106) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
assert y < z;
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) + (-4.0 * (t * a))) - (4.0 * (x * i));
double t_2 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
double tmp;
if (x <= -4e+197) {
tmp = t_2;
} else if (x <= -9e-52) {
tmp = t_1;
} else if (x <= 1.16e-116) {
tmp = (b * c) + (k * (j * -27.0));
} else if (x <= 2.45e+106) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = ((b * c) + (-4.0 * (t * a))) - (4.0 * (x * i)) t_2 = x * ((18.0 * (t * (y * z))) - (4.0 * i)) tmp = 0 if x <= -4e+197: tmp = t_2 elif x <= -9e-52: tmp = t_1 elif x <= 1.16e-116: tmp = (b * c) + (k * (j * -27.0)) elif x <= 2.45e+106: tmp = t_1 else: tmp = t_2 return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(4.0 * Float64(x * i))) t_2 = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))) tmp = 0.0 if (x <= -4e+197) tmp = t_2; elseif (x <= -9e-52) tmp = t_1; elseif (x <= 1.16e-116) tmp = Float64(Float64(b * c) + Float64(k * Float64(j * -27.0))); elseif (x <= 2.45e+106) tmp = t_1; else tmp = t_2; end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = ((b * c) + (-4.0 * (t * a))) - (4.0 * (x * i));
t_2 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
tmp = 0.0;
if (x <= -4e+197)
tmp = t_2;
elseif (x <= -9e-52)
tmp = t_1;
elseif (x <= 1.16e-116)
tmp = (b * c) + (k * (j * -27.0));
elseif (x <= 2.45e+106)
tmp = t_1;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: y and z 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[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4e+197], t$95$2, If[LessEqual[x, -9e-52], t$95$1, If[LessEqual[x, 1.16e-116], N[(N[(b * c), $MachinePrecision] + N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.45e+106], t$95$1, t$95$2]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := \left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 4 \cdot \left(x \cdot i\right)\\
t_2 := x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{if}\;x \leq -4 \cdot 10^{+197}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -9 \cdot 10^{-52}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 1.16 \cdot 10^{-116}:\\
\;\;\;\;b \cdot c + k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;x \leq 2.45 \cdot 10^{+106}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if x < -3.9999999999999998e197 or 2.44999999999999999e106 < x Initial program 73.1%
associate-*l*73.1%
associate--l+73.1%
distribute-rgt-out--76.2%
associate-*l*83.5%
associate-*l*83.5%
Simplified83.5%
Taylor expanded in a around 0 79.2%
Taylor expanded in j around 0 73.2%
Taylor expanded in x around inf 76.3%
if -3.9999999999999998e197 < x < -9.0000000000000001e-52 or 1.16e-116 < x < 2.44999999999999999e106Initial program 85.6%
associate-*l*85.6%
associate--l+85.6%
distribute-rgt-out--88.4%
associate-*l*92.8%
associate-*l*92.8%
Simplified92.8%
Taylor expanded in y around 0 84.7%
Taylor expanded in j around 0 72.6%
if -9.0000000000000001e-52 < x < 1.16e-116Initial program 93.8%
Simplified85.8%
Taylor expanded in b around inf 68.9%
Final simplification72.4%
NOTE: y and z 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 (* j (* 27.0 k))))
(if (<= y -9.5e+153)
(- (* x (- (* 18.0 (* t (* y z))) (* 4.0 i))) t_1)
(- (- (+ (* b c) (* -4.0 (* t a))) (* 4.0 (* x i))) t_1))))assert(y < z);
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 = j * (27.0 * k);
double tmp;
if (y <= -9.5e+153) {
tmp = (x * ((18.0 * (t * (y * z))) - (4.0 * i))) - t_1;
} else {
tmp = (((b * c) + (-4.0 * (t * a))) - (4.0 * (x * i))) - t_1;
}
return tmp;
}
NOTE: y and z 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 = j * (27.0d0 * k)
if (y <= (-9.5d+153)) then
tmp = (x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))) - t_1
else
tmp = (((b * c) + ((-4.0d0) * (t * a))) - (4.0d0 * (x * i))) - t_1
end if
code = tmp
end function
assert y < z;
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 = j * (27.0 * k);
double tmp;
if (y <= -9.5e+153) {
tmp = (x * ((18.0 * (t * (y * z))) - (4.0 * i))) - t_1;
} else {
tmp = (((b * c) + (-4.0 * (t * a))) - (4.0 * (x * i))) - t_1;
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (27.0 * k) tmp = 0 if y <= -9.5e+153: tmp = (x * ((18.0 * (t * (y * z))) - (4.0 * i))) - t_1 else: tmp = (((b * c) + (-4.0 * (t * a))) - (4.0 * (x * i))) - t_1 return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(27.0 * k)) tmp = 0.0 if (y <= -9.5e+153) tmp = Float64(Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))) - t_1); else tmp = Float64(Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(4.0 * Float64(x * i))) - t_1); end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (27.0 * k);
tmp = 0.0;
if (y <= -9.5e+153)
tmp = (x * ((18.0 * (t * (y * z))) - (4.0 * i))) - t_1;
else
tmp = (((b * c) + (-4.0 * (t * a))) - (4.0 * (x * i))) - t_1;
end
tmp_2 = tmp;
end
NOTE: y and z 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[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -9.5e+153], N[(N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(27 \cdot k\right)\\
\mathbf{if}\;y \leq -9.5 \cdot 10^{+153}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right) - t_1\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 4 \cdot \left(x \cdot i\right)\right) - t_1\\
\end{array}
\end{array}
if y < -9.4999999999999995e153Initial program 73.9%
associate-*l*73.9%
associate--l+73.9%
distribute-rgt-out--76.9%
associate-*l*79.7%
associate-*l*79.7%
Simplified79.7%
Taylor expanded in x around inf 74.2%
if -9.4999999999999995e153 < y Initial program 86.7%
associate-*l*86.7%
associate--l+86.7%
distribute-rgt-out--88.5%
associate-*l*89.0%
associate-*l*89.0%
Simplified89.0%
Taylor expanded in y around 0 81.9%
Final simplification80.9%
NOTE: y and z 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) (* 4.0 (* x i)))))
(if (<= x -3.2e+247)
(* x (* i -4.0))
(if (<= x -4.8e+148)
(* (* y t) (* 18.0 (* x z)))
(if (<= x -1.6e-42)
t_1
(if (<= x 2e-108)
(+ (* b c) (* k (* j -27.0)))
(if (or (<= x 3.9e+108) (not (<= x 9.6e+168)))
t_1
(* 18.0 (* t (* x (* y z)))))))))))assert(y < z);
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) - (4.0 * (x * i));
double tmp;
if (x <= -3.2e+247) {
tmp = x * (i * -4.0);
} else if (x <= -4.8e+148) {
tmp = (y * t) * (18.0 * (x * z));
} else if (x <= -1.6e-42) {
tmp = t_1;
} else if (x <= 2e-108) {
tmp = (b * c) + (k * (j * -27.0));
} else if ((x <= 3.9e+108) || !(x <= 9.6e+168)) {
tmp = t_1;
} else {
tmp = 18.0 * (t * (x * (y * z)));
}
return tmp;
}
NOTE: y and z 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) - (4.0d0 * (x * i))
if (x <= (-3.2d+247)) then
tmp = x * (i * (-4.0d0))
else if (x <= (-4.8d+148)) then
tmp = (y * t) * (18.0d0 * (x * z))
else if (x <= (-1.6d-42)) then
tmp = t_1
else if (x <= 2d-108) then
tmp = (b * c) + (k * (j * (-27.0d0)))
else if ((x <= 3.9d+108) .or. (.not. (x <= 9.6d+168))) then
tmp = t_1
else
tmp = 18.0d0 * (t * (x * (y * z)))
end if
code = tmp
end function
assert y < z;
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) - (4.0 * (x * i));
double tmp;
if (x <= -3.2e+247) {
tmp = x * (i * -4.0);
} else if (x <= -4.8e+148) {
tmp = (y * t) * (18.0 * (x * z));
} else if (x <= -1.6e-42) {
tmp = t_1;
} else if (x <= 2e-108) {
tmp = (b * c) + (k * (j * -27.0));
} else if ((x <= 3.9e+108) || !(x <= 9.6e+168)) {
tmp = t_1;
} else {
tmp = 18.0 * (t * (x * (y * z)));
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) - (4.0 * (x * i)) tmp = 0 if x <= -3.2e+247: tmp = x * (i * -4.0) elif x <= -4.8e+148: tmp = (y * t) * (18.0 * (x * z)) elif x <= -1.6e-42: tmp = t_1 elif x <= 2e-108: tmp = (b * c) + (k * (j * -27.0)) elif (x <= 3.9e+108) or not (x <= 9.6e+168): tmp = t_1 else: tmp = 18.0 * (t * (x * (y * z))) return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) tmp = 0.0 if (x <= -3.2e+247) tmp = Float64(x * Float64(i * -4.0)); elseif (x <= -4.8e+148) tmp = Float64(Float64(y * t) * Float64(18.0 * Float64(x * z))); elseif (x <= -1.6e-42) tmp = t_1; elseif (x <= 2e-108) tmp = Float64(Float64(b * c) + Float64(k * Float64(j * -27.0))); elseif ((x <= 3.9e+108) || !(x <= 9.6e+168)) tmp = t_1; else tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) - (4.0 * (x * i));
tmp = 0.0;
if (x <= -3.2e+247)
tmp = x * (i * -4.0);
elseif (x <= -4.8e+148)
tmp = (y * t) * (18.0 * (x * z));
elseif (x <= -1.6e-42)
tmp = t_1;
elseif (x <= 2e-108)
tmp = (b * c) + (k * (j * -27.0));
elseif ((x <= 3.9e+108) || ~((x <= 9.6e+168)))
tmp = t_1;
else
tmp = 18.0 * (t * (x * (y * z)));
end
tmp_2 = tmp;
end
NOTE: y and z 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[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.2e+247], N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -4.8e+148], N[(N[(y * t), $MachinePrecision] * N[(18.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.6e-42], t$95$1, If[LessEqual[x, 2e-108], N[(N[(b * c), $MachinePrecision] + N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, 3.9e+108], N[Not[LessEqual[x, 9.6e+168]], $MachinePrecision]], t$95$1, N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;x \leq -3.2 \cdot 10^{+247}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right)\\
\mathbf{elif}\;x \leq -4.8 \cdot 10^{+148}:\\
\;\;\;\;\left(y \cdot t\right) \cdot \left(18 \cdot \left(x \cdot z\right)\right)\\
\mathbf{elif}\;x \leq -1.6 \cdot 10^{-42}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 2 \cdot 10^{-108}:\\
\;\;\;\;b \cdot c + k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;x \leq 3.9 \cdot 10^{+108} \lor \neg \left(x \leq 9.6 \cdot 10^{+168}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\end{array}
\end{array}
if x < -3.20000000000000022e247Initial program 72.7%
associate-*l*72.7%
associate--l+72.7%
distribute-rgt-out--72.7%
associate-*l*81.8%
associate-*l*81.8%
Simplified81.8%
Taylor expanded in y around 0 73.1%
Taylor expanded in i around inf 64.8%
*-commutative64.8%
*-commutative64.8%
associate-*r*64.8%
Simplified64.8%
if -3.20000000000000022e247 < x < -4.79999999999999989e148Initial program 82.1%
associate-*l*82.1%
associate--l+82.1%
distribute-rgt-out--86.6%
associate-*l*95.4%
associate-*l*95.4%
Simplified95.4%
Taylor expanded in a around 0 77.9%
Taylor expanded in j around 0 69.2%
Taylor expanded in x around inf 69.4%
Taylor expanded in t around inf 47.4%
*-commutative47.4%
*-commutative47.4%
*-commutative47.4%
associate-*r*47.3%
*-commutative47.3%
*-commutative47.3%
associate-*r*51.5%
associate-*l*51.5%
Simplified51.5%
if -4.79999999999999989e148 < x < -1.60000000000000012e-42 or 2.00000000000000008e-108 < x < 3.89999999999999985e108 or 9.60000000000000037e168 < x Initial program 81.8%
associate-*l*81.8%
associate--l+81.8%
distribute-rgt-out--84.9%
associate-*l*89.4%
associate-*l*89.4%
Simplified89.4%
Taylor expanded in a around 0 74.7%
Taylor expanded in j around 0 66.7%
Taylor expanded in t around 0 54.6%
if -1.60000000000000012e-42 < x < 2.00000000000000008e-108Initial program 93.8%
Simplified85.8%
Taylor expanded in b around inf 68.9%
if 3.89999999999999985e108 < x < 9.60000000000000037e168Initial program 76.9%
associate-*l*76.9%
associate--l+76.9%
distribute-rgt-out--76.9%
associate-*l*84.6%
associate-*l*84.6%
Simplified84.6%
Taylor expanded in a around 0 77.9%
Taylor expanded in j around 0 55.0%
Taylor expanded in x around inf 70.4%
Taylor expanded in t around inf 63.1%
Final simplification59.7%
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -27.0 (* j k))))
(if (<= (* b c) -5.5e+73)
(* b c)
(if (<= (* b c) -1e-182)
t_1
(if (<= (* b c) 7.5e-256)
(* a (* t -4.0))
(if (<= (* b c) 4.1e+52) t_1 (* b c)))))))assert(y < z);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -27.0 * (j * k);
double tmp;
if ((b * c) <= -5.5e+73) {
tmp = b * c;
} else if ((b * c) <= -1e-182) {
tmp = t_1;
} else if ((b * c) <= 7.5e-256) {
tmp = a * (t * -4.0);
} else if ((b * c) <= 4.1e+52) {
tmp = t_1;
} else {
tmp = b * c;
}
return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (-27.0d0) * (j * k)
if ((b * c) <= (-5.5d+73)) then
tmp = b * c
else if ((b * c) <= (-1d-182)) then
tmp = t_1
else if ((b * c) <= 7.5d-256) then
tmp = a * (t * (-4.0d0))
else if ((b * c) <= 4.1d+52) then
tmp = t_1
else
tmp = b * c
end if
code = tmp
end function
assert y < z;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -27.0 * (j * k);
double tmp;
if ((b * c) <= -5.5e+73) {
tmp = b * c;
} else if ((b * c) <= -1e-182) {
tmp = t_1;
} else if ((b * c) <= 7.5e-256) {
tmp = a * (t * -4.0);
} else if ((b * c) <= 4.1e+52) {
tmp = t_1;
} else {
tmp = b * c;
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = -27.0 * (j * k) tmp = 0 if (b * c) <= -5.5e+73: tmp = b * c elif (b * c) <= -1e-182: tmp = t_1 elif (b * c) <= 7.5e-256: tmp = a * (t * -4.0) elif (b * c) <= 4.1e+52: tmp = t_1 else: tmp = b * c return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-27.0 * Float64(j * k)) tmp = 0.0 if (Float64(b * c) <= -5.5e+73) tmp = Float64(b * c); elseif (Float64(b * c) <= -1e-182) tmp = t_1; elseif (Float64(b * c) <= 7.5e-256) tmp = Float64(a * Float64(t * -4.0)); elseif (Float64(b * c) <= 4.1e+52) tmp = t_1; else tmp = Float64(b * c); end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = -27.0 * (j * k);
tmp = 0.0;
if ((b * c) <= -5.5e+73)
tmp = b * c;
elseif ((b * c) <= -1e-182)
tmp = t_1;
elseif ((b * c) <= 7.5e-256)
tmp = a * (t * -4.0);
elseif ((b * c) <= 4.1e+52)
tmp = t_1;
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -5.5e+73], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -1e-182], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 7.5e-256], N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 4.1e+52], t$95$1, N[(b * c), $MachinePrecision]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := -27 \cdot \left(j \cdot k\right)\\
\mathbf{if}\;b \cdot c \leq -5.5 \cdot 10^{+73}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -1 \cdot 10^{-182}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot c \leq 7.5 \cdot 10^{-256}:\\
\;\;\;\;a \cdot \left(t \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq 4.1 \cdot 10^{+52}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -5.5000000000000003e73 or 4.1e52 < (*.f64 b c) Initial program 80.3%
associate-*l*80.3%
associate--l+80.3%
distribute-rgt-out--81.2%
associate-*l*80.5%
associate-*l*80.5%
Simplified80.5%
Taylor expanded in y around 0 77.9%
Taylor expanded in b around inf 52.1%
if -5.5000000000000003e73 < (*.f64 b c) < -1e-182 or 7.50000000000000005e-256 < (*.f64 b c) < 4.1e52Initial program 86.3%
Simplified91.5%
Taylor expanded in k around inf 33.9%
if -1e-182 < (*.f64 b c) < 7.50000000000000005e-256Initial program 91.4%
associate-*l*91.4%
associate--l+91.4%
distribute-rgt-out--94.8%
associate-*l*95.1%
associate-*l*95.1%
Simplified95.1%
Taylor expanded in y around 0 83.3%
Taylor expanded in a around inf 35.7%
*-commutative35.7%
associate-*l*35.7%
Simplified35.7%
Final simplification41.8%
NOTE: y and z 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 (* j (* k -27.0))))
(if (<= (* b c) -3.5e+73)
(* b c)
(if (<= (* b c) -1.8e-182)
t_1
(if (<= (* b c) 7.8e-258)
(* a (* t -4.0))
(if (<= (* b c) 9.2e+52) t_1 (* b c)))))))assert(y < z);
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 = j * (k * -27.0);
double tmp;
if ((b * c) <= -3.5e+73) {
tmp = b * c;
} else if ((b * c) <= -1.8e-182) {
tmp = t_1;
} else if ((b * c) <= 7.8e-258) {
tmp = a * (t * -4.0);
} else if ((b * c) <= 9.2e+52) {
tmp = t_1;
} else {
tmp = b * c;
}
return tmp;
}
NOTE: y and z 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 = j * (k * (-27.0d0))
if ((b * c) <= (-3.5d+73)) then
tmp = b * c
else if ((b * c) <= (-1.8d-182)) then
tmp = t_1
else if ((b * c) <= 7.8d-258) then
tmp = a * (t * (-4.0d0))
else if ((b * c) <= 9.2d+52) then
tmp = t_1
else
tmp = b * c
end if
code = tmp
end function
assert y < z;
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 = j * (k * -27.0);
double tmp;
if ((b * c) <= -3.5e+73) {
tmp = b * c;
} else if ((b * c) <= -1.8e-182) {
tmp = t_1;
} else if ((b * c) <= 7.8e-258) {
tmp = a * (t * -4.0);
} else if ((b * c) <= 9.2e+52) {
tmp = t_1;
} else {
tmp = b * c;
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) tmp = 0 if (b * c) <= -3.5e+73: tmp = b * c elif (b * c) <= -1.8e-182: tmp = t_1 elif (b * c) <= 7.8e-258: tmp = a * (t * -4.0) elif (b * c) <= 9.2e+52: tmp = t_1 else: tmp = b * c return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) tmp = 0.0 if (Float64(b * c) <= -3.5e+73) tmp = Float64(b * c); elseif (Float64(b * c) <= -1.8e-182) tmp = t_1; elseif (Float64(b * c) <= 7.8e-258) tmp = Float64(a * Float64(t * -4.0)); elseif (Float64(b * c) <= 9.2e+52) tmp = t_1; else tmp = Float64(b * c); end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
tmp = 0.0;
if ((b * c) <= -3.5e+73)
tmp = b * c;
elseif ((b * c) <= -1.8e-182)
tmp = t_1;
elseif ((b * c) <= 7.8e-258)
tmp = a * (t * -4.0);
elseif ((b * c) <= 9.2e+52)
tmp = t_1;
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: y and z 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[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -3.5e+73], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -1.8e-182], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 7.8e-258], N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 9.2e+52], t$95$1, N[(b * c), $MachinePrecision]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;b \cdot c \leq -3.5 \cdot 10^{+73}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -1.8 \cdot 10^{-182}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot c \leq 7.8 \cdot 10^{-258}:\\
\;\;\;\;a \cdot \left(t \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq 9.2 \cdot 10^{+52}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -3.50000000000000002e73 or 9.1999999999999999e52 < (*.f64 b c) Initial program 80.3%
associate-*l*80.3%
associate--l+80.3%
distribute-rgt-out--81.2%
associate-*l*80.5%
associate-*l*80.5%
Simplified80.5%
Taylor expanded in y around 0 77.9%
Taylor expanded in b around inf 52.1%
if -3.50000000000000002e73 < (*.f64 b c) < -1.79999999999999988e-182 or 7.80000000000000008e-258 < (*.f64 b c) < 9.1999999999999999e52Initial program 86.3%
Simplified91.5%
Taylor expanded in k around inf 33.9%
associate-*r*34.0%
*-commutative34.0%
associate-*l*34.0%
Simplified34.0%
if -1.79999999999999988e-182 < (*.f64 b c) < 7.80000000000000008e-258Initial program 91.4%
associate-*l*91.4%
associate--l+91.4%
distribute-rgt-out--94.8%
associate-*l*95.1%
associate-*l*95.1%
Simplified95.1%
Taylor expanded in y around 0 83.3%
Taylor expanded in a around inf 35.7%
*-commutative35.7%
associate-*l*35.7%
Simplified35.7%
Final simplification41.8%
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= y -1.7e+187)
(* (* y t) (* 18.0 (* x z)))
(if (or (<= y -2.15e+98)
(and (not (<= y -8.5e-14))
(or (<= y -2.4e-249) (not (<= y -1.12e-304)))))
(+ (* b c) (* k (* j -27.0)))
(* a (* t -4.0)))))assert(y < z);
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 (y <= -1.7e+187) {
tmp = (y * t) * (18.0 * (x * z));
} else if ((y <= -2.15e+98) || (!(y <= -8.5e-14) && ((y <= -2.4e-249) || !(y <= -1.12e-304)))) {
tmp = (b * c) + (k * (j * -27.0));
} else {
tmp = a * (t * -4.0);
}
return tmp;
}
NOTE: y and z 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 (y <= (-1.7d+187)) then
tmp = (y * t) * (18.0d0 * (x * z))
else if ((y <= (-2.15d+98)) .or. (.not. (y <= (-8.5d-14))) .and. (y <= (-2.4d-249)) .or. (.not. (y <= (-1.12d-304)))) then
tmp = (b * c) + (k * (j * (-27.0d0)))
else
tmp = a * (t * (-4.0d0))
end if
code = tmp
end function
assert y < z;
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 (y <= -1.7e+187) {
tmp = (y * t) * (18.0 * (x * z));
} else if ((y <= -2.15e+98) || (!(y <= -8.5e-14) && ((y <= -2.4e-249) || !(y <= -1.12e-304)))) {
tmp = (b * c) + (k * (j * -27.0));
} else {
tmp = a * (t * -4.0);
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if y <= -1.7e+187: tmp = (y * t) * (18.0 * (x * z)) elif (y <= -2.15e+98) or (not (y <= -8.5e-14) and ((y <= -2.4e-249) or not (y <= -1.12e-304))): tmp = (b * c) + (k * (j * -27.0)) else: tmp = a * (t * -4.0) return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (y <= -1.7e+187) tmp = Float64(Float64(y * t) * Float64(18.0 * Float64(x * z))); elseif ((y <= -2.15e+98) || (!(y <= -8.5e-14) && ((y <= -2.4e-249) || !(y <= -1.12e-304)))) tmp = Float64(Float64(b * c) + Float64(k * Float64(j * -27.0))); else tmp = Float64(a * Float64(t * -4.0)); end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (y <= -1.7e+187)
tmp = (y * t) * (18.0 * (x * z));
elseif ((y <= -2.15e+98) || (~((y <= -8.5e-14)) && ((y <= -2.4e-249) || ~((y <= -1.12e-304)))))
tmp = (b * c) + (k * (j * -27.0));
else
tmp = a * (t * -4.0);
end
tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[y, -1.7e+187], N[(N[(y * t), $MachinePrecision] * N[(18.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -2.15e+98], And[N[Not[LessEqual[y, -8.5e-14]], $MachinePrecision], Or[LessEqual[y, -2.4e-249], N[Not[LessEqual[y, -1.12e-304]], $MachinePrecision]]]], N[(N[(b * c), $MachinePrecision] + N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.7 \cdot 10^{+187}:\\
\;\;\;\;\left(y \cdot t\right) \cdot \left(18 \cdot \left(x \cdot z\right)\right)\\
\mathbf{elif}\;y \leq -2.15 \cdot 10^{+98} \lor \neg \left(y \leq -8.5 \cdot 10^{-14}\right) \land \left(y \leq -2.4 \cdot 10^{-249} \lor \neg \left(y \leq -1.12 \cdot 10^{-304}\right)\right):\\
\;\;\;\;b \cdot c + k \cdot \left(j \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(t \cdot -4\right)\\
\end{array}
\end{array}
if y < -1.7e187Initial program 78.8%
associate-*l*78.8%
associate--l+78.8%
distribute-rgt-out--78.8%
associate-*l*82.3%
associate-*l*82.3%
Simplified82.3%
Taylor expanded in a around 0 75.4%
Taylor expanded in j around 0 64.9%
Taylor expanded in x around inf 65.1%
Taylor expanded in t around inf 65.2%
*-commutative65.2%
*-commutative65.2%
*-commutative65.2%
associate-*r*65.1%
*-commutative65.1%
*-commutative65.1%
associate-*r*58.4%
associate-*l*58.4%
Simplified58.4%
if -1.7e187 < y < -2.1500000000000001e98 or -8.50000000000000038e-14 < y < -2.40000000000000013e-249 or -1.12000000000000006e-304 < y Initial program 86.0%
Simplified89.7%
Taylor expanded in b around inf 46.1%
if -2.1500000000000001e98 < y < -8.50000000000000038e-14 or -2.40000000000000013e-249 < y < -1.12000000000000006e-304Initial program 84.4%
associate-*l*84.4%
associate--l+84.4%
distribute-rgt-out--90.6%
associate-*l*90.6%
associate-*l*90.6%
Simplified90.6%
Taylor expanded in y around 0 87.8%
Taylor expanded in a around inf 57.3%
*-commutative57.3%
associate-*l*57.3%
Simplified57.3%
Final simplification48.9%
NOTE: y and z 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 (<= c -2.55e-18)
(- (* b c) (* 4.0 (* x i)))
(if (<= c 0.02)
(+ t_1 (* x (* i -4.0)))
(if (<= c 1.95e+157)
(* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))
(+ (* b c) t_1))))))assert(y < z);
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 (c <= -2.55e-18) {
tmp = (b * c) - (4.0 * (x * i));
} else if (c <= 0.02) {
tmp = t_1 + (x * (i * -4.0));
} else if (c <= 1.95e+157) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else {
tmp = (b * c) + t_1;
}
return tmp;
}
NOTE: y and z 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 (c <= (-2.55d-18)) then
tmp = (b * c) - (4.0d0 * (x * i))
else if (c <= 0.02d0) then
tmp = t_1 + (x * (i * (-4.0d0)))
else if (c <= 1.95d+157) then
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
else
tmp = (b * c) + t_1
end if
code = tmp
end function
assert y < z;
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 (c <= -2.55e-18) {
tmp = (b * c) - (4.0 * (x * i));
} else if (c <= 0.02) {
tmp = t_1 + (x * (i * -4.0));
} else if (c <= 1.95e+157) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else {
tmp = (b * c) + t_1;
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = k * (j * -27.0) tmp = 0 if c <= -2.55e-18: tmp = (b * c) - (4.0 * (x * i)) elif c <= 0.02: tmp = t_1 + (x * (i * -4.0)) elif c <= 1.95e+157: tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) else: tmp = (b * c) + t_1 return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(k * Float64(j * -27.0)) tmp = 0.0 if (c <= -2.55e-18) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); elseif (c <= 0.02) tmp = Float64(t_1 + Float64(x * Float64(i * -4.0))); elseif (c <= 1.95e+157) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); else tmp = Float64(Float64(b * c) + t_1); end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = k * (j * -27.0);
tmp = 0.0;
if (c <= -2.55e-18)
tmp = (b * c) - (4.0 * (x * i));
elseif (c <= 0.02)
tmp = t_1 + (x * (i * -4.0));
elseif (c <= 1.95e+157)
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
else
tmp = (b * c) + t_1;
end
tmp_2 = tmp;
end
NOTE: y and z 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[c, -2.55e-18], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 0.02], N[(t$95$1 + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.95e+157], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot -27\right)\\
\mathbf{if}\;c \leq -2.55 \cdot 10^{-18}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;c \leq 0.02:\\
\;\;\;\;t_1 + x \cdot \left(i \cdot -4\right)\\
\mathbf{elif}\;c \leq 1.95 \cdot 10^{+157}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + t_1\\
\end{array}
\end{array}
if c < -2.54999999999999991e-18Initial program 81.2%
associate-*l*81.2%
associate--l+81.2%
distribute-rgt-out--84.1%
associate-*l*84.3%
associate-*l*84.3%
Simplified84.3%
Taylor expanded in a around 0 76.0%
Taylor expanded in j around 0 63.5%
Taylor expanded in t around 0 53.2%
if -2.54999999999999991e-18 < c < 0.0200000000000000004Initial program 90.0%
Simplified93.2%
Taylor expanded in i around inf 56.8%
associate-*r*56.8%
*-commutative56.8%
Simplified56.8%
if 0.0200000000000000004 < c < 1.94999999999999985e157Initial program 82.6%
associate-*l*82.6%
associate--l+82.6%
distribute-rgt-out--82.6%
associate-*l*86.5%
associate-*l*86.5%
Simplified86.5%
Taylor expanded in a around 0 68.9%
Taylor expanded in j around 0 64.8%
Taylor expanded in x around inf 64.0%
if 1.94999999999999985e157 < c Initial program 76.8%
Simplified84.7%
Taylor expanded in b around inf 64.7%
Final simplification57.7%
NOTE: y and z 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 (* 4.0 (* x i))))
(if (<= t -155000.0)
(- (+ (* b c) t_1) t_2)
(if (<= t 1.95e+101)
(- (- (* b c) t_2) (* j (* 27.0 k)))
(if (<= t 7.5e+209)
(+ (* b c) (* 18.0 (* t (* x (* y z)))))
(+ (* k (* j -27.0)) t_1))))))assert(y < z);
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 = 4.0 * (x * i);
double tmp;
if (t <= -155000.0) {
tmp = ((b * c) + t_1) - t_2;
} else if (t <= 1.95e+101) {
tmp = ((b * c) - t_2) - (j * (27.0 * k));
} else if (t <= 7.5e+209) {
tmp = (b * c) + (18.0 * (t * (x * (y * z))));
} else {
tmp = (k * (j * -27.0)) + t_1;
}
return tmp;
}
NOTE: y and z 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 = 4.0d0 * (x * i)
if (t <= (-155000.0d0)) then
tmp = ((b * c) + t_1) - t_2
else if (t <= 1.95d+101) then
tmp = ((b * c) - t_2) - (j * (27.0d0 * k))
else if (t <= 7.5d+209) then
tmp = (b * c) + (18.0d0 * (t * (x * (y * z))))
else
tmp = (k * (j * (-27.0d0))) + t_1
end if
code = tmp
end function
assert y < z;
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 = 4.0 * (x * i);
double tmp;
if (t <= -155000.0) {
tmp = ((b * c) + t_1) - t_2;
} else if (t <= 1.95e+101) {
tmp = ((b * c) - t_2) - (j * (27.0 * k));
} else if (t <= 7.5e+209) {
tmp = (b * c) + (18.0 * (t * (x * (y * z))));
} else {
tmp = (k * (j * -27.0)) + t_1;
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = -4.0 * (t * a) t_2 = 4.0 * (x * i) tmp = 0 if t <= -155000.0: tmp = ((b * c) + t_1) - t_2 elif t <= 1.95e+101: tmp = ((b * c) - t_2) - (j * (27.0 * k)) elif t <= 7.5e+209: tmp = (b * c) + (18.0 * (t * (x * (y * z)))) else: tmp = (k * (j * -27.0)) + t_1 return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-4.0 * Float64(t * a)) t_2 = Float64(4.0 * Float64(x * i)) tmp = 0.0 if (t <= -155000.0) tmp = Float64(Float64(Float64(b * c) + t_1) - t_2); elseif (t <= 1.95e+101) tmp = Float64(Float64(Float64(b * c) - t_2) - Float64(j * Float64(27.0 * k))); elseif (t <= 7.5e+209) tmp = Float64(Float64(b * c) + Float64(18.0 * Float64(t * Float64(x * Float64(y * z))))); else tmp = Float64(Float64(k * Float64(j * -27.0)) + t_1); end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = -4.0 * (t * a);
t_2 = 4.0 * (x * i);
tmp = 0.0;
if (t <= -155000.0)
tmp = ((b * c) + t_1) - t_2;
elseif (t <= 1.95e+101)
tmp = ((b * c) - t_2) - (j * (27.0 * k));
elseif (t <= 7.5e+209)
tmp = (b * c) + (18.0 * (t * (x * (y * z))));
else
tmp = (k * (j * -27.0)) + t_1;
end
tmp_2 = tmp;
end
NOTE: y and z 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[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -155000.0], N[(N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[t, 1.95e+101], N[(N[(N[(b * c), $MachinePrecision] - t$95$2), $MachinePrecision] - N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.5e+209], N[(N[(b * c), $MachinePrecision] + N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot a\right)\\
t_2 := 4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;t \leq -155000:\\
\;\;\;\;\left(b \cdot c + t_1\right) - t_2\\
\mathbf{elif}\;t \leq 1.95 \cdot 10^{+101}:\\
\;\;\;\;\left(b \cdot c - t_2\right) - j \cdot \left(27 \cdot k\right)\\
\mathbf{elif}\;t \leq 7.5 \cdot 10^{+209}:\\
\;\;\;\;b \cdot c + 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right) + t_1\\
\end{array}
\end{array}
if t < -155000Initial program 82.6%
associate-*l*82.6%
associate--l+82.6%
distribute-rgt-out--87.4%
associate-*l*88.8%
associate-*l*88.8%
Simplified88.8%
Taylor expanded in y around 0 71.6%
Taylor expanded in j around 0 65.6%
if -155000 < t < 1.95e101Initial program 83.4%
associate-*l*83.4%
associate--l+83.4%
distribute-rgt-out--83.4%
associate-*l*85.4%
associate-*l*85.4%
Simplified85.4%
Taylor expanded in t around 0 78.9%
if 1.95e101 < t < 7.50000000000000055e209Initial program 95.3%
associate-*l*95.3%
associate--l+95.3%
distribute-rgt-out--99.9%
associate-*l*91.8%
associate-*l*91.8%
Simplified91.8%
Taylor expanded in a around 0 78.6%
Taylor expanded in j around 0 69.7%
Taylor expanded in i around 0 69.5%
if 7.50000000000000055e209 < t Initial program 91.5%
Simplified95.6%
Taylor expanded in a around inf 75.9%
*-commutative75.9%
Simplified75.9%
Final simplification74.5%
NOTE: y and z 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 (<= (* b c) -1.05e+89)
(- (* b c) (* 4.0 (* x i)))
(if (<= (* b c) 2000000000.0) (+ t_1 (* -4.0 (* t a))) (+ (* b c) t_1)))))assert(y < z);
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 ((b * c) <= -1.05e+89) {
tmp = (b * c) - (4.0 * (x * i));
} else if ((b * c) <= 2000000000.0) {
tmp = t_1 + (-4.0 * (t * a));
} else {
tmp = (b * c) + t_1;
}
return tmp;
}
NOTE: y and z 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 ((b * c) <= (-1.05d+89)) then
tmp = (b * c) - (4.0d0 * (x * i))
else if ((b * c) <= 2000000000.0d0) then
tmp = t_1 + ((-4.0d0) * (t * a))
else
tmp = (b * c) + t_1
end if
code = tmp
end function
assert y < z;
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 ((b * c) <= -1.05e+89) {
tmp = (b * c) - (4.0 * (x * i));
} else if ((b * c) <= 2000000000.0) {
tmp = t_1 + (-4.0 * (t * a));
} else {
tmp = (b * c) + t_1;
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = k * (j * -27.0) tmp = 0 if (b * c) <= -1.05e+89: tmp = (b * c) - (4.0 * (x * i)) elif (b * c) <= 2000000000.0: tmp = t_1 + (-4.0 * (t * a)) else: tmp = (b * c) + t_1 return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(k * Float64(j * -27.0)) tmp = 0.0 if (Float64(b * c) <= -1.05e+89) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); elseif (Float64(b * c) <= 2000000000.0) tmp = Float64(t_1 + Float64(-4.0 * Float64(t * a))); else tmp = Float64(Float64(b * c) + t_1); end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = k * (j * -27.0);
tmp = 0.0;
if ((b * c) <= -1.05e+89)
tmp = (b * c) - (4.0 * (x * i));
elseif ((b * c) <= 2000000000.0)
tmp = t_1 + (-4.0 * (t * a));
else
tmp = (b * c) + t_1;
end
tmp_2 = tmp;
end
NOTE: y and z 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[N[(b * c), $MachinePrecision], -1.05e+89], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2000000000.0], N[(t$95$1 + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot -27\right)\\
\mathbf{if}\;b \cdot c \leq -1.05 \cdot 10^{+89}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;b \cdot c \leq 2000000000:\\
\;\;\;\;t_1 + -4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + t_1\\
\end{array}
\end{array}
if (*.f64 b c) < -1.04999999999999993e89Initial program 77.3%
associate-*l*77.3%
associate--l+77.3%
distribute-rgt-out--77.3%
associate-*l*81.2%
associate-*l*81.2%
Simplified81.2%
Taylor expanded in a around 0 79.5%
Taylor expanded in j around 0 72.3%
Taylor expanded in t around 0 69.3%
if -1.04999999999999993e89 < (*.f64 b c) < 2e9Initial program 87.9%
Simplified93.3%
Taylor expanded in a around inf 49.9%
*-commutative49.9%
Simplified49.9%
if 2e9 < (*.f64 b c) Initial program 84.6%
Simplified85.0%
Taylor expanded in b around inf 59.5%
Final simplification56.0%
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* x (* i -4.0))))
(if (<= i -5.3e+45)
t_1
(if (<= i -2.2e-277)
(* b c)
(if (<= i 1.2e-261)
(* 18.0 (* (* y z) (* x t)))
(if (<= i 2.4e-166)
(* b c)
(if (<= i 1.15e+148) (* j (* k -27.0)) t_1)))))))assert(y < z);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * (i * -4.0);
double tmp;
if (i <= -5.3e+45) {
tmp = t_1;
} else if (i <= -2.2e-277) {
tmp = b * c;
} else if (i <= 1.2e-261) {
tmp = 18.0 * ((y * z) * (x * t));
} else if (i <= 2.4e-166) {
tmp = b * c;
} else if (i <= 1.15e+148) {
tmp = j * (k * -27.0);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = x * (i * (-4.0d0))
if (i <= (-5.3d+45)) then
tmp = t_1
else if (i <= (-2.2d-277)) then
tmp = b * c
else if (i <= 1.2d-261) then
tmp = 18.0d0 * ((y * z) * (x * t))
else if (i <= 2.4d-166) then
tmp = b * c
else if (i <= 1.15d+148) then
tmp = j * (k * (-27.0d0))
else
tmp = t_1
end if
code = tmp
end function
assert y < z;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * (i * -4.0);
double tmp;
if (i <= -5.3e+45) {
tmp = t_1;
} else if (i <= -2.2e-277) {
tmp = b * c;
} else if (i <= 1.2e-261) {
tmp = 18.0 * ((y * z) * (x * t));
} else if (i <= 2.4e-166) {
tmp = b * c;
} else if (i <= 1.15e+148) {
tmp = j * (k * -27.0);
} else {
tmp = t_1;
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = x * (i * -4.0) tmp = 0 if i <= -5.3e+45: tmp = t_1 elif i <= -2.2e-277: tmp = b * c elif i <= 1.2e-261: tmp = 18.0 * ((y * z) * (x * t)) elif i <= 2.4e-166: tmp = b * c elif i <= 1.15e+148: tmp = j * (k * -27.0) else: tmp = t_1 return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(i * -4.0)) tmp = 0.0 if (i <= -5.3e+45) tmp = t_1; elseif (i <= -2.2e-277) tmp = Float64(b * c); elseif (i <= 1.2e-261) tmp = Float64(18.0 * Float64(Float64(y * z) * Float64(x * t))); elseif (i <= 2.4e-166) tmp = Float64(b * c); elseif (i <= 1.15e+148) tmp = Float64(j * Float64(k * -27.0)); else tmp = t_1; end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = x * (i * -4.0);
tmp = 0.0;
if (i <= -5.3e+45)
tmp = t_1;
elseif (i <= -2.2e-277)
tmp = b * c;
elseif (i <= 1.2e-261)
tmp = 18.0 * ((y * z) * (x * t));
elseif (i <= 2.4e-166)
tmp = b * c;
elseif (i <= 1.15e+148)
tmp = j * (k * -27.0);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -5.3e+45], t$95$1, If[LessEqual[i, -2.2e-277], N[(b * c), $MachinePrecision], If[LessEqual[i, 1.2e-261], N[(18.0 * N[(N[(y * z), $MachinePrecision] * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 2.4e-166], N[(b * c), $MachinePrecision], If[LessEqual[i, 1.15e+148], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(i \cdot -4\right)\\
\mathbf{if}\;i \leq -5.3 \cdot 10^{+45}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;i \leq -2.2 \cdot 10^{-277}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;i \leq 1.2 \cdot 10^{-261}:\\
\;\;\;\;18 \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot t\right)\right)\\
\mathbf{elif}\;i \leq 2.4 \cdot 10^{-166}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;i \leq 1.15 \cdot 10^{+148}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if i < -5.29999999999999991e45 or 1.15e148 < i Initial program 82.3%
associate-*l*82.3%
associate--l+82.3%
distribute-rgt-out--83.4%
associate-*l*84.6%
associate-*l*84.6%
Simplified84.6%
Taylor expanded in y around 0 81.1%
Taylor expanded in i around inf 49.8%
*-commutative49.8%
*-commutative49.8%
associate-*r*49.8%
Simplified49.8%
if -5.29999999999999991e45 < i < -2.19999999999999996e-277 or 1.20000000000000007e-261 < i < 2.3999999999999999e-166Initial program 81.7%
associate-*l*81.6%
associate--l+81.6%
distribute-rgt-out--85.1%
associate-*l*87.6%
associate-*l*87.6%
Simplified87.6%
Taylor expanded in y around 0 76.0%
Taylor expanded in b around inf 39.3%
if -2.19999999999999996e-277 < i < 1.20000000000000007e-261Initial program 94.4%
associate-*l*94.5%
associate--l+94.5%
distribute-rgt-out--94.5%
associate-*l*94.7%
associate-*l*94.7%
Simplified94.7%
Taylor expanded in a around 0 73.7%
Taylor expanded in j around 0 47.6%
Taylor expanded in x around inf 36.2%
Taylor expanded in t around inf 41.0%
associate-*r*51.5%
Simplified51.5%
if 2.3999999999999999e-166 < i < 1.15e148Initial program 90.7%
Simplified90.7%
Taylor expanded in k around inf 36.3%
associate-*r*36.3%
*-commutative36.3%
associate-*l*36.3%
Simplified36.3%
Final simplification43.1%
NOTE: y and z 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 (<= c -1.52e-31)
(- (* b c) (* 4.0 (* x i)))
(if (<= c 4.2e+96) (+ t_1 (* x (* i -4.0))) (+ (* b c) t_1)))))assert(y < z);
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 (c <= -1.52e-31) {
tmp = (b * c) - (4.0 * (x * i));
} else if (c <= 4.2e+96) {
tmp = t_1 + (x * (i * -4.0));
} else {
tmp = (b * c) + t_1;
}
return tmp;
}
NOTE: y and z 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 (c <= (-1.52d-31)) then
tmp = (b * c) - (4.0d0 * (x * i))
else if (c <= 4.2d+96) then
tmp = t_1 + (x * (i * (-4.0d0)))
else
tmp = (b * c) + t_1
end if
code = tmp
end function
assert y < z;
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 (c <= -1.52e-31) {
tmp = (b * c) - (4.0 * (x * i));
} else if (c <= 4.2e+96) {
tmp = t_1 + (x * (i * -4.0));
} else {
tmp = (b * c) + t_1;
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = k * (j * -27.0) tmp = 0 if c <= -1.52e-31: tmp = (b * c) - (4.0 * (x * i)) elif c <= 4.2e+96: tmp = t_1 + (x * (i * -4.0)) else: tmp = (b * c) + t_1 return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(k * Float64(j * -27.0)) tmp = 0.0 if (c <= -1.52e-31) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); elseif (c <= 4.2e+96) tmp = Float64(t_1 + Float64(x * Float64(i * -4.0))); else tmp = Float64(Float64(b * c) + t_1); end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = k * (j * -27.0);
tmp = 0.0;
if (c <= -1.52e-31)
tmp = (b * c) - (4.0 * (x * i));
elseif (c <= 4.2e+96)
tmp = t_1 + (x * (i * -4.0));
else
tmp = (b * c) + t_1;
end
tmp_2 = tmp;
end
NOTE: y and z 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[c, -1.52e-31], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 4.2e+96], N[(t$95$1 + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot -27\right)\\
\mathbf{if}\;c \leq -1.52 \cdot 10^{-31}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;c \leq 4.2 \cdot 10^{+96}:\\
\;\;\;\;t_1 + x \cdot \left(i \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + t_1\\
\end{array}
\end{array}
if c < -1.52000000000000003e-31Initial program 81.7%
associate-*l*81.7%
associate--l+81.7%
distribute-rgt-out--84.6%
associate-*l*84.7%
associate-*l*84.7%
Simplified84.7%
Taylor expanded in a around 0 76.7%
Taylor expanded in j around 0 64.5%
Taylor expanded in t around 0 53.2%
if -1.52000000000000003e-31 < c < 4.2000000000000002e96Initial program 89.3%
Simplified92.9%
Taylor expanded in i around inf 54.7%
associate-*r*54.7%
*-commutative54.7%
Simplified54.7%
if 4.2000000000000002e96 < c Initial program 77.9%
Simplified86.0%
Taylor expanded in b around inf 57.2%
Final simplification54.7%
NOTE: y and z 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) -3.6e+73) (not (<= (* b c) 1.2e+53))) (* b c) (* -27.0 (* j k))))
assert(y < z);
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.6e+73) || !((b * c) <= 1.2e+53)) {
tmp = b * c;
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
NOTE: y and z 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.6d+73)) .or. (.not. ((b * c) <= 1.2d+53))) then
tmp = b * c
else
tmp = (-27.0d0) * (j * k)
end if
code = tmp
end function
assert y < z;
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.6e+73) || !((b * c) <= 1.2e+53)) {
tmp = b * c;
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((b * c) <= -3.6e+73) or not ((b * c) <= 1.2e+53): tmp = b * c else: tmp = -27.0 * (j * k) return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((Float64(b * c) <= -3.6e+73) || !(Float64(b * c) <= 1.2e+53)) tmp = Float64(b * c); else tmp = Float64(-27.0 * Float64(j * k)); end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (((b * c) <= -3.6e+73) || ~(((b * c) <= 1.2e+53)))
tmp = b * c;
else
tmp = -27.0 * (j * k);
end
tmp_2 = tmp;
end
NOTE: y and z 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], -3.6e+73], N[Not[LessEqual[N[(b * c), $MachinePrecision], 1.2e+53]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -3.6 \cdot 10^{+73} \lor \neg \left(b \cdot c \leq 1.2 \cdot 10^{+53}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -3.5999999999999999e73 or 1.2e53 < (*.f64 b c) Initial program 80.3%
associate-*l*80.3%
associate--l+80.3%
distribute-rgt-out--81.2%
associate-*l*80.5%
associate-*l*80.5%
Simplified80.5%
Taylor expanded in y around 0 77.9%
Taylor expanded in b around inf 52.1%
if -3.5999999999999999e73 < (*.f64 b c) < 1.2e53Initial program 88.3%
Simplified92.9%
Taylor expanded in k around inf 28.9%
Final simplification38.4%
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* x (* i -4.0))))
(if (<= i -1.9e+31)
t_1
(if (<= i 7.5e-163) (* b c) (if (<= i 3.2e+147) (* j (* k -27.0)) t_1)))))assert(y < z);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * (i * -4.0);
double tmp;
if (i <= -1.9e+31) {
tmp = t_1;
} else if (i <= 7.5e-163) {
tmp = b * c;
} else if (i <= 3.2e+147) {
tmp = j * (k * -27.0);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = x * (i * (-4.0d0))
if (i <= (-1.9d+31)) then
tmp = t_1
else if (i <= 7.5d-163) then
tmp = b * c
else if (i <= 3.2d+147) then
tmp = j * (k * (-27.0d0))
else
tmp = t_1
end if
code = tmp
end function
assert y < z;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * (i * -4.0);
double tmp;
if (i <= -1.9e+31) {
tmp = t_1;
} else if (i <= 7.5e-163) {
tmp = b * c;
} else if (i <= 3.2e+147) {
tmp = j * (k * -27.0);
} else {
tmp = t_1;
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = x * (i * -4.0) tmp = 0 if i <= -1.9e+31: tmp = t_1 elif i <= 7.5e-163: tmp = b * c elif i <= 3.2e+147: tmp = j * (k * -27.0) else: tmp = t_1 return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(i * -4.0)) tmp = 0.0 if (i <= -1.9e+31) tmp = t_1; elseif (i <= 7.5e-163) tmp = Float64(b * c); elseif (i <= 3.2e+147) tmp = Float64(j * Float64(k * -27.0)); else tmp = t_1; end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = x * (i * -4.0);
tmp = 0.0;
if (i <= -1.9e+31)
tmp = t_1;
elseif (i <= 7.5e-163)
tmp = b * c;
elseif (i <= 3.2e+147)
tmp = j * (k * -27.0);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -1.9e+31], t$95$1, If[LessEqual[i, 7.5e-163], N[(b * c), $MachinePrecision], If[LessEqual[i, 3.2e+147], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(i \cdot -4\right)\\
\mathbf{if}\;i \leq -1.9 \cdot 10^{+31}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;i \leq 7.5 \cdot 10^{-163}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;i \leq 3.2 \cdot 10^{+147}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if i < -1.9000000000000001e31 or 3.19999999999999979e147 < i Initial program 82.3%
associate-*l*82.3%
associate--l+82.3%
distribute-rgt-out--83.4%
associate-*l*84.6%
associate-*l*84.6%
Simplified84.6%
Taylor expanded in y around 0 81.1%
Taylor expanded in i around inf 49.8%
*-commutative49.8%
*-commutative49.8%
associate-*r*49.8%
Simplified49.8%
if -1.9000000000000001e31 < i < 7.49999999999999996e-163Initial program 83.9%
associate-*l*83.9%
associate--l+83.9%
distribute-rgt-out--86.7%
associate-*l*88.8%
associate-*l*88.8%
Simplified88.8%
Taylor expanded in y around 0 72.8%
Taylor expanded in b around inf 34.1%
if 7.49999999999999996e-163 < i < 3.19999999999999979e147Initial program 90.7%
Simplified90.7%
Taylor expanded in k around inf 36.3%
associate-*r*36.3%
*-commutative36.3%
associate-*l*36.3%
Simplified36.3%
Final simplification40.1%
NOTE: y and z 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(y < z);
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: y and z 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 y < z;
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;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): return b * c
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) return Float64(b * c) end
y, z = num2cell(sort([y, z])){:}
function tmp = code(x, y, z, t, a, b, c, i, j, k)
tmp = b * c;
end
NOTE: y and z 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}
[y, z] = \mathsf{sort}([y, z])\\
\\
b \cdot c
\end{array}
Initial program 85.0%
associate-*l*85.0%
associate--l+85.0%
distribute-rgt-out--86.9%
associate-*l*87.8%
associate-*l*87.8%
Simplified87.8%
Taylor expanded in y around 0 77.9%
Taylor expanded in b around inf 23.7%
Final simplification23.7%
(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 2023311
(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)))