
(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 15 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}
(FPCore (x y z t a b c i j k) :precision binary64 (fma j (* k -27.0) (fma x (* i -4.0) (fma t (fma x (* 18.0 (* y z)) (* -4.0 a)) (* b c)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return fma(j, (k * -27.0), fma(x, (i * -4.0), fma(t, fma(x, (18.0 * (y * z)), (-4.0 * a)), (b * c))));
}
function code(x, y, z, t, a, b, c, i, j, k) return fma(j, Float64(k * -27.0), fma(x, Float64(i * -4.0), fma(t, fma(x, Float64(18.0 * Float64(y * z)), Float64(-4.0 * a)), Float64(b * c)))) end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(j * N[(k * -27.0), $MachinePrecision] + N[(x * N[(i * -4.0), $MachinePrecision] + N[(t * N[(x * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * a), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(j, k \cdot -27, \mathsf{fma}\left(x, i \cdot -4, \mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), -4 \cdot a\right), b \cdot c\right)\right)\right)
\end{array}
Initial program 81.7%
sub-neg81.7%
+-commutative81.7%
associate-*l*82.5%
distribute-rgt-neg-in82.5%
fma-def84.1%
*-commutative84.1%
distribute-rgt-neg-in84.1%
metadata-eval84.1%
sub-neg84.1%
+-commutative84.1%
associate-*l*84.1%
distribute-rgt-neg-in84.1%
Simplified91.5%
Final simplification91.5%
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<=
(-
(-
(+ (- (* t (* z (* y (* x 18.0)))) (* t (* a 4.0))) (* b c))
(* i (* x 4.0)))
(* k (* j 27.0)))
INFINITY)
(-
(+ (* t (- (* (* y z) (* x 18.0)) (* a 4.0))) (* b c))
(+ (* x (* i 4.0)) (* j (* k 27.0))))
(* t (- (* 18.0 (* y (* x z))) (* a 4.0)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((((((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0))) + (b * c)) - (i * (x * 4.0))) - (k * (j * 27.0))) <= ((double) INFINITY)) {
tmp = ((t * (((y * z) * (x * 18.0)) - (a * 4.0))) + (b * c)) - ((x * (i * 4.0)) + (j * (k * 27.0)));
} else {
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((((((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0))) + (b * c)) - (i * (x * 4.0))) - (k * (j * 27.0))) <= Double.POSITIVE_INFINITY) {
tmp = ((t * (((y * z) * (x * 18.0)) - (a * 4.0))) + (b * c)) - ((x * (i * 4.0)) + (j * (k * 27.0)));
} else {
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (((((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0))) + (b * c)) - (i * (x * 4.0))) - (k * (j * 27.0))) <= math.inf: tmp = ((t * (((y * z) * (x * 18.0)) - (a * 4.0))) + (b * c)) - ((x * (i * 4.0)) + (j * (k * 27.0))) else: tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0)) return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(t * Float64(z * Float64(y * Float64(x * 18.0)))) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(i * Float64(x * 4.0))) - Float64(k * Float64(j * 27.0))) <= Inf) tmp = Float64(Float64(Float64(t * Float64(Float64(Float64(y * z) * Float64(x * 18.0)) - Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * Float64(i * 4.0)) + Float64(j * Float64(k * 27.0)))); else tmp = Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) - Float64(a * 4.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0; if ((((((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0))) + (b * c)) - (i * (x * 4.0))) - (k * (j * 27.0))) <= Inf) tmp = ((t * (((y * z) * (x * 18.0)) - (a * 4.0))) + (b * c)) - ((x * (i * 4.0)) + (j * (k * 27.0))); else tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(N[(N[(N[(N[(t * N[(z * N[(y * N[(x * 18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(i * N[(x * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(t * N[(N[(N[(y * z), $MachinePrecision] * N[(x * 18.0), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(i * 4.0), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\left(\left(\left(t \cdot \left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right) - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - i \cdot \left(x \cdot 4\right)\right) - k \cdot \left(j \cdot 27\right) \leq \infty:\\
\;\;\;\;\left(t \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot 18\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(i \cdot 4\right) + j \cdot \left(k \cdot 27\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\
\end{array}
\end{array}
if (-.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.3%
sub-neg94.3%
associate-+l-94.3%
sub-neg94.3%
sub-neg94.3%
distribute-rgt-out--94.3%
associate-*l*95.1%
distribute-lft-neg-in95.1%
cancel-sign-sub95.1%
associate-*l*95.1%
associate-*l*96.0%
Simplified96.0%
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%
sub-neg0.0%
associate-+l-0.0%
sub-neg0.0%
sub-neg0.0%
distribute-rgt-out--20.6%
associate-*l*23.5%
distribute-lft-neg-in23.5%
cancel-sign-sub23.5%
associate-*l*23.5%
associate-*l*23.5%
Simplified23.5%
Taylor expanded in t around inf 56.1%
Final simplification90.7%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (* a (* -4.0 t)) (* j (* k 27.0))))
(t_2 (* k (* j 27.0)))
(t_3 (+ (* b c) (* -4.0 (* t a)))))
(if (<= t_2 -5e+16)
t_1
(if (<= t_2 -5e-159)
t_3
(if (<= t_2 -5e-281)
(* x (- (* 18.0 (* y (* t z))) (* i 4.0)))
(if (<= t_2 5e-38)
t_3
(if (<= t_2 2e+44)
t_1
(if (<= t_2 5e+141)
(- (* b c) (* x (* i 4.0)))
(- (* b c) 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 * (-4.0 * t)) - (j * (k * 27.0));
double t_2 = k * (j * 27.0);
double t_3 = (b * c) + (-4.0 * (t * a));
double tmp;
if (t_2 <= -5e+16) {
tmp = t_1;
} else if (t_2 <= -5e-159) {
tmp = t_3;
} else if (t_2 <= -5e-281) {
tmp = x * ((18.0 * (y * (t * z))) - (i * 4.0));
} else if (t_2 <= 5e-38) {
tmp = t_3;
} else if (t_2 <= 2e+44) {
tmp = t_1;
} else if (t_2 <= 5e+141) {
tmp = (b * c) - (x * (i * 4.0));
} else {
tmp = (b * c) - 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) :: t_3
real(8) :: tmp
t_1 = (a * ((-4.0d0) * t)) - (j * (k * 27.0d0))
t_2 = k * (j * 27.0d0)
t_3 = (b * c) + ((-4.0d0) * (t * a))
if (t_2 <= (-5d+16)) then
tmp = t_1
else if (t_2 <= (-5d-159)) then
tmp = t_3
else if (t_2 <= (-5d-281)) then
tmp = x * ((18.0d0 * (y * (t * z))) - (i * 4.0d0))
else if (t_2 <= 5d-38) then
tmp = t_3
else if (t_2 <= 2d+44) then
tmp = t_1
else if (t_2 <= 5d+141) then
tmp = (b * c) - (x * (i * 4.0d0))
else
tmp = (b * c) - 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 * (-4.0 * t)) - (j * (k * 27.0));
double t_2 = k * (j * 27.0);
double t_3 = (b * c) + (-4.0 * (t * a));
double tmp;
if (t_2 <= -5e+16) {
tmp = t_1;
} else if (t_2 <= -5e-159) {
tmp = t_3;
} else if (t_2 <= -5e-281) {
tmp = x * ((18.0 * (y * (t * z))) - (i * 4.0));
} else if (t_2 <= 5e-38) {
tmp = t_3;
} else if (t_2 <= 2e+44) {
tmp = t_1;
} else if (t_2 <= 5e+141) {
tmp = (b * c) - (x * (i * 4.0));
} else {
tmp = (b * c) - t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = (a * (-4.0 * t)) - (j * (k * 27.0)) t_2 = k * (j * 27.0) t_3 = (b * c) + (-4.0 * (t * a)) tmp = 0 if t_2 <= -5e+16: tmp = t_1 elif t_2 <= -5e-159: tmp = t_3 elif t_2 <= -5e-281: tmp = x * ((18.0 * (y * (t * z))) - (i * 4.0)) elif t_2 <= 5e-38: tmp = t_3 elif t_2 <= 2e+44: tmp = t_1 elif t_2 <= 5e+141: tmp = (b * c) - (x * (i * 4.0)) else: tmp = (b * c) - t_2 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(a * Float64(-4.0 * t)) - Float64(j * Float64(k * 27.0))) t_2 = Float64(k * Float64(j * 27.0)) t_3 = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) tmp = 0.0 if (t_2 <= -5e+16) tmp = t_1; elseif (t_2 <= -5e-159) tmp = t_3; elseif (t_2 <= -5e-281) tmp = Float64(x * Float64(Float64(18.0 * Float64(y * Float64(t * z))) - Float64(i * 4.0))); elseif (t_2 <= 5e-38) tmp = t_3; elseif (t_2 <= 2e+44) tmp = t_1; elseif (t_2 <= 5e+141) tmp = Float64(Float64(b * c) - Float64(x * Float64(i * 4.0))); else tmp = Float64(Float64(b * c) - t_2); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = (a * (-4.0 * t)) - (j * (k * 27.0)); t_2 = k * (j * 27.0); t_3 = (b * c) + (-4.0 * (t * a)); tmp = 0.0; if (t_2 <= -5e+16) tmp = t_1; elseif (t_2 <= -5e-159) tmp = t_3; elseif (t_2 <= -5e-281) tmp = x * ((18.0 * (y * (t * z))) - (i * 4.0)); elseif (t_2 <= 5e-38) tmp = t_3; elseif (t_2 <= 2e+44) tmp = t_1; elseif (t_2 <= 5e+141) tmp = (b * c) - (x * (i * 4.0)); else tmp = (b * c) - t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(a * N[(-4.0 * t), $MachinePrecision]), $MachinePrecision] - N[(j * N[(k * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+16], t$95$1, If[LessEqual[t$95$2, -5e-159], t$95$3, If[LessEqual[t$95$2, -5e-281], N[(x * N[(N[(18.0 * N[(y * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e-38], t$95$3, If[LessEqual[t$95$2, 2e+44], t$95$1, If[LessEqual[t$95$2, 5e+141], N[(N[(b * c), $MachinePrecision] - N[(x * N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(-4 \cdot t\right) - j \cdot \left(k \cdot 27\right)\\
t_2 := k \cdot \left(j \cdot 27\right)\\
t_3 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;t_2 \leq -5 \cdot 10^{+16}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_2 \leq -5 \cdot 10^{-159}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t_2 \leq -5 \cdot 10^{-281}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(t \cdot z\right)\right) - i \cdot 4\right)\\
\mathbf{elif}\;t_2 \leq 5 \cdot 10^{-38}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t_2 \leq 2 \cdot 10^{+44}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+141}:\\
\;\;\;\;b \cdot c - x \cdot \left(i \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - t_2\\
\end{array}
\end{array}
if (*.f64 (*.f64 j 27) k) < -5e16 or 5.00000000000000033e-38 < (*.f64 (*.f64 j 27) k) < 2.0000000000000002e44Initial program 79.1%
distribute-rgt-out--84.6%
associate-*r*84.6%
add-cube-cbrt84.4%
Applied egg-rr84.4%
Taylor expanded in a around inf 66.0%
*-commutative66.0%
associate-*l*66.0%
Simplified66.0%
Taylor expanded in j around 0 67.4%
associate-*r*67.4%
Simplified67.4%
if -5e16 < (*.f64 (*.f64 j 27) k) < -5.00000000000000032e-159 or -4.9999999999999998e-281 < (*.f64 (*.f64 j 27) k) < 5.00000000000000033e-38Initial program 83.1%
Taylor expanded in y around 0 77.4%
Taylor expanded in i around 0 64.8%
fma-neg65.8%
+-commutative65.8%
*-commutative65.8%
*-commutative65.8%
associate-*r*65.8%
distribute-neg-in65.8%
distribute-lft-neg-in65.8%
metadata-eval65.8%
*-commutative65.8%
*-commutative65.8%
associate-*l*65.8%
associate-*r*65.8%
distribute-rgt-neg-in65.8%
metadata-eval65.8%
*-commutative65.8%
associate-*l*65.8%
Simplified65.8%
Taylor expanded in j around 0 62.9%
if -5.00000000000000032e-159 < (*.f64 (*.f64 j 27) k) < -4.9999999999999998e-281Initial program 85.6%
sub-neg85.6%
associate-+l-85.6%
sub-neg85.6%
sub-neg85.6%
distribute-rgt-out--85.6%
associate-*l*90.5%
distribute-lft-neg-in90.5%
cancel-sign-sub90.5%
associate-*l*90.5%
associate-*l*90.5%
Simplified90.5%
Taylor expanded in x around inf 71.5%
if 2.0000000000000002e44 < (*.f64 (*.f64 j 27) k) < 5.00000000000000025e141Initial program 84.6%
sub-neg84.6%
associate-+l-84.6%
sub-neg84.6%
sub-neg84.6%
distribute-rgt-out--92.3%
associate-*l*100.0%
distribute-lft-neg-in100.0%
cancel-sign-sub100.0%
associate-*l*100.0%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in t around 0 86.0%
Taylor expanded in i around inf 86.0%
associate-*r*86.0%
*-commutative86.0%
Simplified86.0%
if 5.00000000000000025e141 < (*.f64 (*.f64 j 27) k) Initial program 80.7%
distribute-rgt-out--82.6%
associate-*r*86.5%
add-cube-cbrt86.5%
Applied egg-rr86.5%
Taylor expanded in b around inf 82.1%
Final simplification69.9%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (* a (* -4.0 t)) (* j (* k 27.0)))) (t_2 (* k (* j 27.0))))
(if (<= t_2 -5e+16)
t_1
(if (<= t_2 5e-38)
(+ (* b c) (* -4.0 (* t a)))
(if (<= t_2 2e+44)
t_1
(if (<= t_2 5e+141) (- (* b c) (* x (* i 4.0))) (- (* b c) 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 * (-4.0 * t)) - (j * (k * 27.0));
double t_2 = k * (j * 27.0);
double tmp;
if (t_2 <= -5e+16) {
tmp = t_1;
} else if (t_2 <= 5e-38) {
tmp = (b * c) + (-4.0 * (t * a));
} else if (t_2 <= 2e+44) {
tmp = t_1;
} else if (t_2 <= 5e+141) {
tmp = (b * c) - (x * (i * 4.0));
} else {
tmp = (b * c) - 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 * ((-4.0d0) * t)) - (j * (k * 27.0d0))
t_2 = k * (j * 27.0d0)
if (t_2 <= (-5d+16)) then
tmp = t_1
else if (t_2 <= 5d-38) then
tmp = (b * c) + ((-4.0d0) * (t * a))
else if (t_2 <= 2d+44) then
tmp = t_1
else if (t_2 <= 5d+141) then
tmp = (b * c) - (x * (i * 4.0d0))
else
tmp = (b * c) - 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 * (-4.0 * t)) - (j * (k * 27.0));
double t_2 = k * (j * 27.0);
double tmp;
if (t_2 <= -5e+16) {
tmp = t_1;
} else if (t_2 <= 5e-38) {
tmp = (b * c) + (-4.0 * (t * a));
} else if (t_2 <= 2e+44) {
tmp = t_1;
} else if (t_2 <= 5e+141) {
tmp = (b * c) - (x * (i * 4.0));
} else {
tmp = (b * c) - t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = (a * (-4.0 * t)) - (j * (k * 27.0)) t_2 = k * (j * 27.0) tmp = 0 if t_2 <= -5e+16: tmp = t_1 elif t_2 <= 5e-38: tmp = (b * c) + (-4.0 * (t * a)) elif t_2 <= 2e+44: tmp = t_1 elif t_2 <= 5e+141: tmp = (b * c) - (x * (i * 4.0)) else: tmp = (b * c) - t_2 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(a * Float64(-4.0 * t)) - Float64(j * Float64(k * 27.0))) t_2 = Float64(k * Float64(j * 27.0)) tmp = 0.0 if (t_2 <= -5e+16) tmp = t_1; elseif (t_2 <= 5e-38) tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))); elseif (t_2 <= 2e+44) tmp = t_1; elseif (t_2 <= 5e+141) tmp = Float64(Float64(b * c) - Float64(x * Float64(i * 4.0))); else tmp = Float64(Float64(b * c) - t_2); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = (a * (-4.0 * t)) - (j * (k * 27.0)); t_2 = k * (j * 27.0); tmp = 0.0; if (t_2 <= -5e+16) tmp = t_1; elseif (t_2 <= 5e-38) tmp = (b * c) + (-4.0 * (t * a)); elseif (t_2 <= 2e+44) tmp = t_1; elseif (t_2 <= 5e+141) tmp = (b * c) - (x * (i * 4.0)); else tmp = (b * c) - t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(a * N[(-4.0 * t), $MachinePrecision]), $MachinePrecision] - N[(j * N[(k * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+16], t$95$1, If[LessEqual[t$95$2, 5e-38], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+44], t$95$1, If[LessEqual[t$95$2, 5e+141], N[(N[(b * c), $MachinePrecision] - N[(x * N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(-4 \cdot t\right) - j \cdot \left(k \cdot 27\right)\\
t_2 := k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t_2 \leq -5 \cdot 10^{+16}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_2 \leq 5 \cdot 10^{-38}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;t_2 \leq 2 \cdot 10^{+44}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+141}:\\
\;\;\;\;b \cdot c - x \cdot \left(i \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - t_2\\
\end{array}
\end{array}
if (*.f64 (*.f64 j 27) k) < -5e16 or 5.00000000000000033e-38 < (*.f64 (*.f64 j 27) k) < 2.0000000000000002e44Initial program 79.1%
distribute-rgt-out--84.6%
associate-*r*84.6%
add-cube-cbrt84.4%
Applied egg-rr84.4%
Taylor expanded in a around inf 66.0%
*-commutative66.0%
associate-*l*66.0%
Simplified66.0%
Taylor expanded in j around 0 67.4%
associate-*r*67.4%
Simplified67.4%
if -5e16 < (*.f64 (*.f64 j 27) k) < 5.00000000000000033e-38Initial program 83.5%
Taylor expanded in y around 0 75.7%
Taylor expanded in i around 0 60.2%
fma-neg61.0%
+-commutative61.0%
*-commutative61.0%
*-commutative61.0%
associate-*r*61.0%
distribute-neg-in61.0%
distribute-lft-neg-in61.0%
metadata-eval61.0%
*-commutative61.0%
*-commutative61.0%
associate-*l*61.0%
associate-*r*61.0%
distribute-rgt-neg-in61.0%
metadata-eval61.0%
*-commutative61.0%
associate-*l*61.0%
Simplified61.0%
Taylor expanded in j around 0 58.6%
if 2.0000000000000002e44 < (*.f64 (*.f64 j 27) k) < 5.00000000000000025e141Initial program 84.6%
sub-neg84.6%
associate-+l-84.6%
sub-neg84.6%
sub-neg84.6%
distribute-rgt-out--92.3%
associate-*l*100.0%
distribute-lft-neg-in100.0%
cancel-sign-sub100.0%
associate-*l*100.0%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in t around 0 86.0%
Taylor expanded in i around inf 86.0%
associate-*r*86.0%
*-commutative86.0%
Simplified86.0%
if 5.00000000000000025e141 < (*.f64 (*.f64 j 27) k) Initial program 80.7%
distribute-rgt-out--82.6%
associate-*r*86.5%
add-cube-cbrt86.5%
Applied egg-rr86.5%
Taylor expanded in b around inf 82.1%
Final simplification67.3%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* k (* j 27.0))) (t_2 (- (* b c) t_1)))
(if (<= t_1 -5e+32)
t_2
(if (<= t_1 2e+44)
(+ (* b c) (* -4.0 (* t a)))
(if (<= t_1 5e+141) (- (* b c) (* x (* i 4.0))) 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 = k * (j * 27.0);
double t_2 = (b * c) - t_1;
double tmp;
if (t_1 <= -5e+32) {
tmp = t_2;
} else if (t_1 <= 2e+44) {
tmp = (b * c) + (-4.0 * (t * a));
} else if (t_1 <= 5e+141) {
tmp = (b * c) - (x * (i * 4.0));
} 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 = k * (j * 27.0d0)
t_2 = (b * c) - t_1
if (t_1 <= (-5d+32)) then
tmp = t_2
else if (t_1 <= 2d+44) then
tmp = (b * c) + ((-4.0d0) * (t * a))
else if (t_1 <= 5d+141) then
tmp = (b * c) - (x * (i * 4.0d0))
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 = k * (j * 27.0);
double t_2 = (b * c) - t_1;
double tmp;
if (t_1 <= -5e+32) {
tmp = t_2;
} else if (t_1 <= 2e+44) {
tmp = (b * c) + (-4.0 * (t * a));
} else if (t_1 <= 5e+141) {
tmp = (b * c) - (x * (i * 4.0));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = k * (j * 27.0) t_2 = (b * c) - t_1 tmp = 0 if t_1 <= -5e+32: tmp = t_2 elif t_1 <= 2e+44: tmp = (b * c) + (-4.0 * (t * a)) elif t_1 <= 5e+141: tmp = (b * c) - (x * (i * 4.0)) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(k * Float64(j * 27.0)) t_2 = Float64(Float64(b * c) - t_1) tmp = 0.0 if (t_1 <= -5e+32) tmp = t_2; elseif (t_1 <= 2e+44) tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))); elseif (t_1 <= 5e+141) tmp = Float64(Float64(b * c) - Float64(x * Float64(i * 4.0))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = k * (j * 27.0); t_2 = (b * c) - t_1; tmp = 0.0; if (t_1 <= -5e+32) tmp = t_2; elseif (t_1 <= 2e+44) tmp = (b * c) + (-4.0 * (t * a)); elseif (t_1 <= 5e+141) tmp = (b * c) - (x * (i * 4.0)); 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[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] - t$95$1), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+32], t$95$2, If[LessEqual[t$95$1, 2e+44], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+141], N[(N[(b * c), $MachinePrecision] - N[(x * N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot 27\right)\\
t_2 := b \cdot c - t_1\\
\mathbf{if}\;t_1 \leq -5 \cdot 10^{+32}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+44}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+141}:\\
\;\;\;\;b \cdot c - x \cdot \left(i \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if (*.f64 (*.f64 j 27) k) < -4.9999999999999997e32 or 5.00000000000000025e141 < (*.f64 (*.f64 j 27) k) Initial program 77.8%
distribute-rgt-out--81.6%
associate-*r*83.5%
add-cube-cbrt83.5%
Applied egg-rr83.5%
Taylor expanded in b around inf 70.9%
if -4.9999999999999997e32 < (*.f64 (*.f64 j 27) k) < 2.0000000000000002e44Initial program 84.5%
Taylor expanded in y around 0 77.8%
Taylor expanded in i around 0 61.0%
fma-neg61.7%
+-commutative61.7%
*-commutative61.7%
*-commutative61.7%
associate-*r*61.7%
distribute-neg-in61.7%
distribute-lft-neg-in61.7%
metadata-eval61.7%
*-commutative61.7%
*-commutative61.7%
associate-*l*61.7%
associate-*r*61.7%
distribute-rgt-neg-in61.7%
metadata-eval61.7%
*-commutative61.7%
associate-*l*61.7%
Simplified61.7%
Taylor expanded in j around 0 55.5%
if 2.0000000000000002e44 < (*.f64 (*.f64 j 27) k) < 5.00000000000000025e141Initial program 84.6%
sub-neg84.6%
associate-+l-84.6%
sub-neg84.6%
sub-neg84.6%
distribute-rgt-out--92.3%
associate-*l*100.0%
distribute-lft-neg-in100.0%
cancel-sign-sub100.0%
associate-*l*100.0%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in t around 0 86.0%
Taylor expanded in i around inf 86.0%
associate-*r*86.0%
*-commutative86.0%
Simplified86.0%
Final simplification63.3%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* k (* j 27.0))))
(if (<= t_1 -2e+132)
(- (* a (* -4.0 t)) (* j (* k 27.0)))
(if (<= t_1 5e+141)
(- (* b c) (+ (* 4.0 (* x i)) (* 4.0 (* t a))))
(- (* b c) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * 27.0);
double tmp;
if (t_1 <= -2e+132) {
tmp = (a * (-4.0 * t)) - (j * (k * 27.0));
} else if (t_1 <= 5e+141) {
tmp = (b * c) - ((4.0 * (x * i)) + (4.0 * (t * a)));
} else {
tmp = (b * c) - t_1;
}
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) :: tmp
t_1 = k * (j * 27.0d0)
if (t_1 <= (-2d+132)) then
tmp = (a * ((-4.0d0) * t)) - (j * (k * 27.0d0))
else if (t_1 <= 5d+141) then
tmp = (b * c) - ((4.0d0 * (x * i)) + (4.0d0 * (t * a)))
else
tmp = (b * c) - t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * 27.0);
double tmp;
if (t_1 <= -2e+132) {
tmp = (a * (-4.0 * t)) - (j * (k * 27.0));
} else if (t_1 <= 5e+141) {
tmp = (b * c) - ((4.0 * (x * i)) + (4.0 * (t * a)));
} else {
tmp = (b * c) - t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = k * (j * 27.0) tmp = 0 if t_1 <= -2e+132: tmp = (a * (-4.0 * t)) - (j * (k * 27.0)) elif t_1 <= 5e+141: tmp = (b * c) - ((4.0 * (x * i)) + (4.0 * (t * a))) else: tmp = (b * c) - t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(k * Float64(j * 27.0)) tmp = 0.0 if (t_1 <= -2e+132) tmp = Float64(Float64(a * Float64(-4.0 * t)) - Float64(j * Float64(k * 27.0))); elseif (t_1 <= 5e+141) tmp = Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(x * i)) + Float64(4.0 * Float64(t * a)))); else tmp = Float64(Float64(b * c) - t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = k * (j * 27.0); tmp = 0.0; if (t_1 <= -2e+132) tmp = (a * (-4.0 * t)) - (j * (k * 27.0)); elseif (t_1 <= 5e+141) tmp = (b * c) - ((4.0 * (x * i)) + (4.0 * (t * a))); else tmp = (b * c) - t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+132], N[(N[(a * N[(-4.0 * t), $MachinePrecision]), $MachinePrecision] - N[(j * N[(k * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+141], N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t_1 \leq -2 \cdot 10^{+132}:\\
\;\;\;\;a \cdot \left(-4 \cdot t\right) - j \cdot \left(k \cdot 27\right)\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+141}:\\
\;\;\;\;b \cdot c - \left(4 \cdot \left(x \cdot i\right) + 4 \cdot \left(t \cdot a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - t_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 j 27) k) < -1.99999999999999998e132Initial program 70.6%
distribute-rgt-out--77.9%
associate-*r*77.9%
add-cube-cbrt77.9%
Applied egg-rr77.9%
Taylor expanded in a around inf 73.4%
*-commutative73.4%
associate-*l*73.4%
Simplified73.4%
Taylor expanded in j around 0 75.8%
associate-*r*75.9%
Simplified75.9%
if -1.99999999999999998e132 < (*.f64 (*.f64 j 27) k) < 5.00000000000000025e141Initial program 84.9%
Taylor expanded in y around 0 78.1%
Taylor expanded in j around 0 71.9%
if 5.00000000000000025e141 < (*.f64 (*.f64 j 27) k) Initial program 80.7%
distribute-rgt-out--82.6%
associate-*r*86.5%
add-cube-cbrt86.5%
Applied egg-rr86.5%
Taylor expanded in b around inf 82.1%
Final simplification74.6%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* 4.0 (* x i))) (t_2 (* k (* j 27.0))))
(if (<= t_2 -2e+132)
(- (* a (* -4.0 t)) (* j (* k 27.0)))
(if (<= t_2 5e+36)
(- (* b c) (+ t_1 (* 4.0 (* t a))))
(- (* b c) (+ t_1 (* 27.0 (* j k))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 4.0 * (x * i);
double t_2 = k * (j * 27.0);
double tmp;
if (t_2 <= -2e+132) {
tmp = (a * (-4.0 * t)) - (j * (k * 27.0));
} else if (t_2 <= 5e+36) {
tmp = (b * c) - (t_1 + (4.0 * (t * a)));
} else {
tmp = (b * c) - (t_1 + (27.0 * (j * k)));
}
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 = 4.0d0 * (x * i)
t_2 = k * (j * 27.0d0)
if (t_2 <= (-2d+132)) then
tmp = (a * ((-4.0d0) * t)) - (j * (k * 27.0d0))
else if (t_2 <= 5d+36) then
tmp = (b * c) - (t_1 + (4.0d0 * (t * a)))
else
tmp = (b * c) - (t_1 + (27.0d0 * (j * k)))
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 = 4.0 * (x * i);
double t_2 = k * (j * 27.0);
double tmp;
if (t_2 <= -2e+132) {
tmp = (a * (-4.0 * t)) - (j * (k * 27.0));
} else if (t_2 <= 5e+36) {
tmp = (b * c) - (t_1 + (4.0 * (t * a)));
} else {
tmp = (b * c) - (t_1 + (27.0 * (j * k)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = 4.0 * (x * i) t_2 = k * (j * 27.0) tmp = 0 if t_2 <= -2e+132: tmp = (a * (-4.0 * t)) - (j * (k * 27.0)) elif t_2 <= 5e+36: tmp = (b * c) - (t_1 + (4.0 * (t * a))) else: tmp = (b * c) - (t_1 + (27.0 * (j * k))) return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(4.0 * Float64(x * i)) t_2 = Float64(k * Float64(j * 27.0)) tmp = 0.0 if (t_2 <= -2e+132) tmp = Float64(Float64(a * Float64(-4.0 * t)) - Float64(j * Float64(k * 27.0))); elseif (t_2 <= 5e+36) tmp = Float64(Float64(b * c) - Float64(t_1 + Float64(4.0 * Float64(t * a)))); else tmp = Float64(Float64(b * c) - Float64(t_1 + Float64(27.0 * Float64(j * k)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = 4.0 * (x * i); t_2 = k * (j * 27.0); tmp = 0.0; if (t_2 <= -2e+132) tmp = (a * (-4.0 * t)) - (j * (k * 27.0)); elseif (t_2 <= 5e+36) tmp = (b * c) - (t_1 + (4.0 * (t * a))); else tmp = (b * c) - (t_1 + (27.0 * (j * k))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+132], N[(N[(a * N[(-4.0 * t), $MachinePrecision]), $MachinePrecision] - N[(j * N[(k * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+36], N[(N[(b * c), $MachinePrecision] - N[(t$95$1 + N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(t$95$1 + N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 4 \cdot \left(x \cdot i\right)\\
t_2 := k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t_2 \leq -2 \cdot 10^{+132}:\\
\;\;\;\;a \cdot \left(-4 \cdot t\right) - j \cdot \left(k \cdot 27\right)\\
\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+36}:\\
\;\;\;\;b \cdot c - \left(t_1 + 4 \cdot \left(t \cdot a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - \left(t_1 + 27 \cdot \left(j \cdot k\right)\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j 27) k) < -1.99999999999999998e132Initial program 70.6%
distribute-rgt-out--77.9%
associate-*r*77.9%
add-cube-cbrt77.9%
Applied egg-rr77.9%
Taylor expanded in a around inf 73.4%
*-commutative73.4%
associate-*l*73.4%
Simplified73.4%
Taylor expanded in j around 0 75.8%
associate-*r*75.9%
Simplified75.9%
if -1.99999999999999998e132 < (*.f64 (*.f64 j 27) k) < 4.99999999999999977e36Initial program 85.2%
Taylor expanded in y around 0 77.0%
Taylor expanded in j around 0 71.5%
if 4.99999999999999977e36 < (*.f64 (*.f64 j 27) k) Initial program 80.9%
sub-neg80.9%
associate-+l-80.9%
sub-neg80.9%
sub-neg80.9%
distribute-rgt-out--83.8%
associate-*l*89.6%
distribute-lft-neg-in89.6%
cancel-sign-sub89.6%
associate-*l*89.6%
associate-*l*91.0%
Simplified91.0%
Taylor expanded in t around 0 84.2%
Final simplification75.6%
(FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= x -1.3e+133) (not (<= x 1.6e+174))) (* x (- (* y (* 18.0 (* t z))) (* i 4.0))) (- (- (* b c) (+ (* 4.0 (* x i)) (* 4.0 (* t a)))) (* k (* j 27.0)))))
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 ((x <= -1.3e+133) || !(x <= 1.6e+174)) {
tmp = x * ((y * (18.0 * (t * z))) - (i * 4.0));
} else {
tmp = ((b * c) - ((4.0 * (x * i)) + (4.0 * (t * a)))) - (k * (j * 27.0));
}
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) :: tmp
if ((x <= (-1.3d+133)) .or. (.not. (x <= 1.6d+174))) then
tmp = x * ((y * (18.0d0 * (t * z))) - (i * 4.0d0))
else
tmp = ((b * c) - ((4.0d0 * (x * i)) + (4.0d0 * (t * a)))) - (k * (j * 27.0d0))
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 tmp;
if ((x <= -1.3e+133) || !(x <= 1.6e+174)) {
tmp = x * ((y * (18.0 * (t * z))) - (i * 4.0));
} else {
tmp = ((b * c) - ((4.0 * (x * i)) + (4.0 * (t * a)))) - (k * (j * 27.0));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (x <= -1.3e+133) or not (x <= 1.6e+174): tmp = x * ((y * (18.0 * (t * z))) - (i * 4.0)) else: tmp = ((b * c) - ((4.0 * (x * i)) + (4.0 * (t * a)))) - (k * (j * 27.0)) return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((x <= -1.3e+133) || !(x <= 1.6e+174)) tmp = Float64(x * Float64(Float64(y * Float64(18.0 * Float64(t * z))) - Float64(i * 4.0))); else tmp = Float64(Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(x * i)) + Float64(4.0 * Float64(t * a)))) - Float64(k * Float64(j * 27.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0; if ((x <= -1.3e+133) || ~((x <= 1.6e+174))) tmp = x * ((y * (18.0 * (t * z))) - (i * 4.0)); else tmp = ((b * c) - ((4.0 * (x * i)) + (4.0 * (t * a)))) - (k * (j * 27.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[x, -1.3e+133], N[Not[LessEqual[x, 1.6e+174]], $MachinePrecision]], N[(x * N[(N[(y * N[(18.0 * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.3 \cdot 10^{+133} \lor \neg \left(x \leq 1.6 \cdot 10^{+174}\right):\\
\;\;\;\;x \cdot \left(y \cdot \left(18 \cdot \left(t \cdot z\right)\right) - i \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - \left(4 \cdot \left(x \cdot i\right) + 4 \cdot \left(t \cdot a\right)\right)\right) - k \cdot \left(j \cdot 27\right)\\
\end{array}
\end{array}
if x < -1.2999999999999999e133 or 1.6e174 < x Initial program 66.0%
sub-neg66.0%
associate-+l-66.0%
sub-neg66.0%
sub-neg66.0%
distribute-rgt-out--70.7%
associate-*l*78.2%
distribute-lft-neg-in78.2%
cancel-sign-sub78.2%
associate-*l*78.2%
associate-*l*78.1%
Simplified78.1%
Taylor expanded in x around inf 81.6%
pow181.6%
Applied egg-rr81.6%
unpow181.6%
*-commutative81.6%
*-commutative81.6%
associate-*l*81.7%
Simplified81.7%
Taylor expanded in t around 0 81.6%
*-commutative81.6%
associate-*l*81.7%
Simplified81.7%
if -1.2999999999999999e133 < x < 1.6e174Initial program 87.0%
Taylor expanded in y around 0 87.3%
Final simplification85.9%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* t (* -4.0 a))) (t_2 (* -27.0 (* j k))))
(if (<= k -2.4e-93)
t_2
(if (<= k -3.9e-231)
(* b c)
(if (<= k 1.25e-132)
t_1
(if (<= k 6e-57)
(* b c)
(if (<= k 1.65e+70)
(* 18.0 (* y (* t (* x z))))
(if (<= k 8e+119)
(* k (* j -27.0))
(if (<= k 1.85e+143) t_1 t_2)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * (-4.0 * a);
double t_2 = -27.0 * (j * k);
double tmp;
if (k <= -2.4e-93) {
tmp = t_2;
} else if (k <= -3.9e-231) {
tmp = b * c;
} else if (k <= 1.25e-132) {
tmp = t_1;
} else if (k <= 6e-57) {
tmp = b * c;
} else if (k <= 1.65e+70) {
tmp = 18.0 * (y * (t * (x * z)));
} else if (k <= 8e+119) {
tmp = k * (j * -27.0);
} else if (k <= 1.85e+143) {
tmp = t_1;
} 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 = t * ((-4.0d0) * a)
t_2 = (-27.0d0) * (j * k)
if (k <= (-2.4d-93)) then
tmp = t_2
else if (k <= (-3.9d-231)) then
tmp = b * c
else if (k <= 1.25d-132) then
tmp = t_1
else if (k <= 6d-57) then
tmp = b * c
else if (k <= 1.65d+70) then
tmp = 18.0d0 * (y * (t * (x * z)))
else if (k <= 8d+119) then
tmp = k * (j * (-27.0d0))
else if (k <= 1.85d+143) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * (-4.0 * a);
double t_2 = -27.0 * (j * k);
double tmp;
if (k <= -2.4e-93) {
tmp = t_2;
} else if (k <= -3.9e-231) {
tmp = b * c;
} else if (k <= 1.25e-132) {
tmp = t_1;
} else if (k <= 6e-57) {
tmp = b * c;
} else if (k <= 1.65e+70) {
tmp = 18.0 * (y * (t * (x * z)));
} else if (k <= 8e+119) {
tmp = k * (j * -27.0);
} else if (k <= 1.85e+143) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = t * (-4.0 * a) t_2 = -27.0 * (j * k) tmp = 0 if k <= -2.4e-93: tmp = t_2 elif k <= -3.9e-231: tmp = b * c elif k <= 1.25e-132: tmp = t_1 elif k <= 6e-57: tmp = b * c elif k <= 1.65e+70: tmp = 18.0 * (y * (t * (x * z))) elif k <= 8e+119: tmp = k * (j * -27.0) elif k <= 1.85e+143: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(t * Float64(-4.0 * a)) t_2 = Float64(-27.0 * Float64(j * k)) tmp = 0.0 if (k <= -2.4e-93) tmp = t_2; elseif (k <= -3.9e-231) tmp = Float64(b * c); elseif (k <= 1.25e-132) tmp = t_1; elseif (k <= 6e-57) tmp = Float64(b * c); elseif (k <= 1.65e+70) tmp = Float64(18.0 * Float64(y * Float64(t * Float64(x * z)))); elseif (k <= 8e+119) tmp = Float64(k * Float64(j * -27.0)); elseif (k <= 1.85e+143) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = t * (-4.0 * a); t_2 = -27.0 * (j * k); tmp = 0.0; if (k <= -2.4e-93) tmp = t_2; elseif (k <= -3.9e-231) tmp = b * c; elseif (k <= 1.25e-132) tmp = t_1; elseif (k <= 6e-57) tmp = b * c; elseif (k <= 1.65e+70) tmp = 18.0 * (y * (t * (x * z))); elseif (k <= 8e+119) tmp = k * (j * -27.0); elseif (k <= 1.85e+143) tmp = t_1; 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[(t * N[(-4.0 * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, -2.4e-93], t$95$2, If[LessEqual[k, -3.9e-231], N[(b * c), $MachinePrecision], If[LessEqual[k, 1.25e-132], t$95$1, If[LessEqual[k, 6e-57], N[(b * c), $MachinePrecision], If[LessEqual[k, 1.65e+70], N[(18.0 * N[(y * N[(t * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 8e+119], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.85e+143], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(-4 \cdot a\right)\\
t_2 := -27 \cdot \left(j \cdot k\right)\\
\mathbf{if}\;k \leq -2.4 \cdot 10^{-93}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;k \leq -3.9 \cdot 10^{-231}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;k \leq 1.25 \cdot 10^{-132}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;k \leq 6 \cdot 10^{-57}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;k \leq 1.65 \cdot 10^{+70}:\\
\;\;\;\;18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\\
\mathbf{elif}\;k \leq 8 \cdot 10^{+119}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;k \leq 1.85 \cdot 10^{+143}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if k < -2.4000000000000001e-93 or 1.8500000000000001e143 < k Initial program 80.3%
sub-neg80.3%
+-commutative80.3%
associate-*l*80.4%
distribute-rgt-neg-in80.4%
fma-def83.5%
*-commutative83.5%
distribute-rgt-neg-in83.5%
metadata-eval83.5%
sub-neg83.5%
+-commutative83.5%
associate-*l*83.5%
distribute-rgt-neg-in83.5%
Simplified93.6%
Taylor expanded in j around inf 48.8%
if -2.4000000000000001e-93 < k < -3.8999999999999998e-231 or 1.25e-132 < k < 6.00000000000000001e-57Initial program 85.4%
distribute-rgt-out--87.9%
associate-*r*90.5%
add-cube-cbrt90.4%
Applied egg-rr90.4%
Taylor expanded in i around 0 77.1%
Taylor expanded in c around inf 40.8%
if -3.8999999999999998e-231 < k < 1.25e-132 or 7.99999999999999955e119 < k < 1.8500000000000001e143Initial program 81.7%
sub-neg81.7%
associate-+l-81.7%
sub-neg81.7%
sub-neg81.7%
distribute-rgt-out--81.7%
associate-*l*81.7%
distribute-lft-neg-in81.7%
cancel-sign-sub81.7%
associate-*l*81.7%
associate-*l*83.4%
Simplified83.4%
Taylor expanded in t around inf 52.5%
Taylor expanded in y around 0 41.9%
if 6.00000000000000001e-57 < k < 1.65000000000000008e70Initial program 82.0%
sub-neg82.0%
associate-+l-82.0%
sub-neg82.0%
sub-neg82.0%
distribute-rgt-out--82.0%
associate-*l*81.8%
distribute-lft-neg-in81.8%
cancel-sign-sub81.8%
associate-*l*81.8%
associate-*l*86.1%
Simplified86.1%
Taylor expanded in t around inf 41.4%
Taylor expanded in y around inf 25.5%
if 1.65000000000000008e70 < k < 7.99999999999999955e119Initial program 85.5%
distribute-rgt-out--85.5%
associate-*r*85.5%
add-cube-cbrt85.5%
Applied egg-rr85.5%
Taylor expanded in i around 0 57.4%
Taylor expanded in j around inf 58.7%
*-commutative58.7%
associate-*r*58.7%
Simplified58.7%
Final simplification44.3%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (* b c) (* x (* i 4.0)))))
(if (<= j -1.26e+159)
(* -27.0 (* j k))
(if (<= j -5.6e-226)
(+ (* b c) (* -4.0 (* t a)))
(if (<= j 1.3e-256)
t_1
(if (<= j 5.4e-173)
(* t (* -4.0 a))
(if (<= j 9.5e+45) t_1 (* j (* k -27.0)))))))))
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) - (x * (i * 4.0));
double tmp;
if (j <= -1.26e+159) {
tmp = -27.0 * (j * k);
} else if (j <= -5.6e-226) {
tmp = (b * c) + (-4.0 * (t * a));
} else if (j <= 1.3e-256) {
tmp = t_1;
} else if (j <= 5.4e-173) {
tmp = t * (-4.0 * a);
} else if (j <= 9.5e+45) {
tmp = t_1;
} else {
tmp = j * (k * -27.0);
}
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) :: tmp
t_1 = (b * c) - (x * (i * 4.0d0))
if (j <= (-1.26d+159)) then
tmp = (-27.0d0) * (j * k)
else if (j <= (-5.6d-226)) then
tmp = (b * c) + ((-4.0d0) * (t * a))
else if (j <= 1.3d-256) then
tmp = t_1
else if (j <= 5.4d-173) then
tmp = t * ((-4.0d0) * a)
else if (j <= 9.5d+45) then
tmp = t_1
else
tmp = j * (k * (-27.0d0))
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 = (b * c) - (x * (i * 4.0));
double tmp;
if (j <= -1.26e+159) {
tmp = -27.0 * (j * k);
} else if (j <= -5.6e-226) {
tmp = (b * c) + (-4.0 * (t * a));
} else if (j <= 1.3e-256) {
tmp = t_1;
} else if (j <= 5.4e-173) {
tmp = t * (-4.0 * a);
} else if (j <= 9.5e+45) {
tmp = t_1;
} else {
tmp = j * (k * -27.0);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) - (x * (i * 4.0)) tmp = 0 if j <= -1.26e+159: tmp = -27.0 * (j * k) elif j <= -5.6e-226: tmp = (b * c) + (-4.0 * (t * a)) elif j <= 1.3e-256: tmp = t_1 elif j <= 5.4e-173: tmp = t * (-4.0 * a) elif j <= 9.5e+45: tmp = t_1 else: tmp = j * (k * -27.0) return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) - Float64(x * Float64(i * 4.0))) tmp = 0.0 if (j <= -1.26e+159) tmp = Float64(-27.0 * Float64(j * k)); elseif (j <= -5.6e-226) tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))); elseif (j <= 1.3e-256) tmp = t_1; elseif (j <= 5.4e-173) tmp = Float64(t * Float64(-4.0 * a)); elseif (j <= 9.5e+45) tmp = t_1; else tmp = Float64(j * Float64(k * -27.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = (b * c) - (x * (i * 4.0)); tmp = 0.0; if (j <= -1.26e+159) tmp = -27.0 * (j * k); elseif (j <= -5.6e-226) tmp = (b * c) + (-4.0 * (t * a)); elseif (j <= 1.3e-256) tmp = t_1; elseif (j <= 5.4e-173) tmp = t * (-4.0 * a); elseif (j <= 9.5e+45) tmp = t_1; else tmp = j * (k * -27.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] - N[(x * N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -1.26e+159], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, -5.6e-226], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 1.3e-256], t$95$1, If[LessEqual[j, 5.4e-173], N[(t * N[(-4.0 * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 9.5e+45], t$95$1, N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot c - x \cdot \left(i \cdot 4\right)\\
\mathbf{if}\;j \leq -1.26 \cdot 10^{+159}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;j \leq -5.6 \cdot 10^{-226}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;j \leq 1.3 \cdot 10^{-256}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;j \leq 5.4 \cdot 10^{-173}:\\
\;\;\;\;t \cdot \left(-4 \cdot a\right)\\
\mathbf{elif}\;j \leq 9.5 \cdot 10^{+45}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if j < -1.2599999999999999e159Initial program 75.9%
sub-neg75.9%
+-commutative75.9%
associate-*l*79.0%
distribute-rgt-neg-in79.0%
fma-def82.0%
*-commutative82.0%
distribute-rgt-neg-in82.0%
metadata-eval82.0%
sub-neg82.0%
+-commutative82.0%
associate-*l*82.0%
distribute-rgt-neg-in82.0%
Simplified97.1%
Taylor expanded in j around inf 52.6%
if -1.2599999999999999e159 < j < -5.60000000000000016e-226Initial program 90.1%
Taylor expanded in y around 0 81.3%
Taylor expanded in i around 0 72.8%
fma-neg72.8%
+-commutative72.8%
*-commutative72.8%
*-commutative72.8%
associate-*r*72.8%
distribute-neg-in72.8%
distribute-lft-neg-in72.8%
metadata-eval72.8%
*-commutative72.8%
*-commutative72.8%
associate-*l*72.8%
associate-*r*72.8%
distribute-rgt-neg-in72.8%
metadata-eval72.8%
*-commutative72.8%
associate-*l*72.8%
Simplified72.8%
Taylor expanded in j around 0 49.5%
if -5.60000000000000016e-226 < j < 1.3e-256 or 5.3999999999999999e-173 < j < 9.4999999999999998e45Initial program 81.8%
sub-neg81.8%
associate-+l-81.8%
sub-neg81.8%
sub-neg81.8%
distribute-rgt-out--83.2%
associate-*l*83.0%
distribute-lft-neg-in83.0%
cancel-sign-sub83.0%
associate-*l*83.0%
associate-*l*83.0%
Simplified83.0%
Taylor expanded in t around 0 68.6%
Taylor expanded in i around inf 55.4%
associate-*r*55.4%
*-commutative55.4%
Simplified55.4%
if 1.3e-256 < j < 5.3999999999999999e-173Initial program 82.3%
sub-neg82.3%
associate-+l-82.3%
sub-neg82.3%
sub-neg82.3%
distribute-rgt-out--88.2%
associate-*l*87.9%
distribute-lft-neg-in87.9%
cancel-sign-sub87.9%
associate-*l*87.9%
associate-*l*88.0%
Simplified88.0%
Taylor expanded in t around inf 59.6%
Taylor expanded in y around 0 42.7%
if 9.4999999999999998e45 < j Initial program 75.2%
Taylor expanded in y around 0 78.2%
Taylor expanded in j around inf 47.9%
*-commutative47.9%
*-commutative47.9%
associate-*l*47.9%
Simplified47.9%
Final simplification50.7%
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -9.5e+132)
(* x (- (* y (* 18.0 (* t z))) (* i 4.0)))
(if (<= x 1.95e+87)
(- (- (* b c) (* 4.0 (* t a))) (* k (* j 27.0)))
(* x (- (* 18.0 (* y (* t z))) (* i 4.0))))))
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 (x <= -9.5e+132) {
tmp = x * ((y * (18.0 * (t * z))) - (i * 4.0));
} else if (x <= 1.95e+87) {
tmp = ((b * c) - (4.0 * (t * a))) - (k * (j * 27.0));
} else {
tmp = x * ((18.0 * (y * (t * z))) - (i * 4.0));
}
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) :: tmp
if (x <= (-9.5d+132)) then
tmp = x * ((y * (18.0d0 * (t * z))) - (i * 4.0d0))
else if (x <= 1.95d+87) then
tmp = ((b * c) - (4.0d0 * (t * a))) - (k * (j * 27.0d0))
else
tmp = x * ((18.0d0 * (y * (t * z))) - (i * 4.0d0))
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 tmp;
if (x <= -9.5e+132) {
tmp = x * ((y * (18.0 * (t * z))) - (i * 4.0));
} else if (x <= 1.95e+87) {
tmp = ((b * c) - (4.0 * (t * a))) - (k * (j * 27.0));
} else {
tmp = x * ((18.0 * (y * (t * z))) - (i * 4.0));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if x <= -9.5e+132: tmp = x * ((y * (18.0 * (t * z))) - (i * 4.0)) elif x <= 1.95e+87: tmp = ((b * c) - (4.0 * (t * a))) - (k * (j * 27.0)) else: tmp = x * ((18.0 * (y * (t * z))) - (i * 4.0)) return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -9.5e+132) tmp = Float64(x * Float64(Float64(y * Float64(18.0 * Float64(t * z))) - Float64(i * 4.0))); elseif (x <= 1.95e+87) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - Float64(k * Float64(j * 27.0))); else tmp = Float64(x * Float64(Float64(18.0 * Float64(y * Float64(t * z))) - Float64(i * 4.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0; if (x <= -9.5e+132) tmp = x * ((y * (18.0 * (t * z))) - (i * 4.0)); elseif (x <= 1.95e+87) tmp = ((b * c) - (4.0 * (t * a))) - (k * (j * 27.0)); else tmp = x * ((18.0 * (y * (t * z))) - (i * 4.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -9.5e+132], N[(x * N[(N[(y * N[(18.0 * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.95e+87], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(18.0 * N[(y * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.5 \cdot 10^{+132}:\\
\;\;\;\;x \cdot \left(y \cdot \left(18 \cdot \left(t \cdot z\right)\right) - i \cdot 4\right)\\
\mathbf{elif}\;x \leq 1.95 \cdot 10^{+87}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - k \cdot \left(j \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(t \cdot z\right)\right) - i \cdot 4\right)\\
\end{array}
\end{array}
if x < -9.5000000000000005e132Initial program 70.1%
sub-neg70.1%
associate-+l-70.1%
sub-neg70.1%
sub-neg70.1%
distribute-rgt-out--73.1%
associate-*l*82.0%
distribute-lft-neg-in82.0%
cancel-sign-sub82.0%
associate-*l*82.0%
associate-*l*82.0%
Simplified82.0%
Taylor expanded in x around inf 79.3%
pow179.3%
Applied egg-rr79.3%
unpow179.3%
*-commutative79.3%
*-commutative79.3%
associate-*l*79.3%
Simplified79.3%
Taylor expanded in t around 0 79.3%
*-commutative79.3%
associate-*l*79.4%
Simplified79.4%
if -9.5000000000000005e132 < x < 1.9500000000000001e87Initial program 88.5%
Taylor expanded in x around 0 81.5%
if 1.9500000000000001e87 < x Initial program 65.7%
sub-neg65.7%
associate-+l-65.7%
sub-neg65.7%
sub-neg65.7%
distribute-rgt-out--69.7%
associate-*l*77.5%
distribute-lft-neg-in77.5%
cancel-sign-sub77.5%
associate-*l*77.5%
associate-*l*77.5%
Simplified77.5%
Taylor expanded in x around inf 76.3%
Final simplification80.2%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* t (* -4.0 a))) (t_2 (* -27.0 (* j k))))
(if (<= k -2.1e-98)
t_2
(if (<= k -1.45e-230)
(* b c)
(if (<= k 4e-135)
t_1
(if (<= k 1.22e-54)
(* b c)
(if (<= k 3.2e+120)
(* k (* j -27.0))
(if (<= k 2e+143) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * (-4.0 * a);
double t_2 = -27.0 * (j * k);
double tmp;
if (k <= -2.1e-98) {
tmp = t_2;
} else if (k <= -1.45e-230) {
tmp = b * c;
} else if (k <= 4e-135) {
tmp = t_1;
} else if (k <= 1.22e-54) {
tmp = b * c;
} else if (k <= 3.2e+120) {
tmp = k * (j * -27.0);
} else if (k <= 2e+143) {
tmp = t_1;
} 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 = t * ((-4.0d0) * a)
t_2 = (-27.0d0) * (j * k)
if (k <= (-2.1d-98)) then
tmp = t_2
else if (k <= (-1.45d-230)) then
tmp = b * c
else if (k <= 4d-135) then
tmp = t_1
else if (k <= 1.22d-54) then
tmp = b * c
else if (k <= 3.2d+120) then
tmp = k * (j * (-27.0d0))
else if (k <= 2d+143) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * (-4.0 * a);
double t_2 = -27.0 * (j * k);
double tmp;
if (k <= -2.1e-98) {
tmp = t_2;
} else if (k <= -1.45e-230) {
tmp = b * c;
} else if (k <= 4e-135) {
tmp = t_1;
} else if (k <= 1.22e-54) {
tmp = b * c;
} else if (k <= 3.2e+120) {
tmp = k * (j * -27.0);
} else if (k <= 2e+143) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = t * (-4.0 * a) t_2 = -27.0 * (j * k) tmp = 0 if k <= -2.1e-98: tmp = t_2 elif k <= -1.45e-230: tmp = b * c elif k <= 4e-135: tmp = t_1 elif k <= 1.22e-54: tmp = b * c elif k <= 3.2e+120: tmp = k * (j * -27.0) elif k <= 2e+143: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(t * Float64(-4.0 * a)) t_2 = Float64(-27.0 * Float64(j * k)) tmp = 0.0 if (k <= -2.1e-98) tmp = t_2; elseif (k <= -1.45e-230) tmp = Float64(b * c); elseif (k <= 4e-135) tmp = t_1; elseif (k <= 1.22e-54) tmp = Float64(b * c); elseif (k <= 3.2e+120) tmp = Float64(k * Float64(j * -27.0)); elseif (k <= 2e+143) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = t * (-4.0 * a); t_2 = -27.0 * (j * k); tmp = 0.0; if (k <= -2.1e-98) tmp = t_2; elseif (k <= -1.45e-230) tmp = b * c; elseif (k <= 4e-135) tmp = t_1; elseif (k <= 1.22e-54) tmp = b * c; elseif (k <= 3.2e+120) tmp = k * (j * -27.0); elseif (k <= 2e+143) tmp = t_1; 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[(t * N[(-4.0 * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, -2.1e-98], t$95$2, If[LessEqual[k, -1.45e-230], N[(b * c), $MachinePrecision], If[LessEqual[k, 4e-135], t$95$1, If[LessEqual[k, 1.22e-54], N[(b * c), $MachinePrecision], If[LessEqual[k, 3.2e+120], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 2e+143], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(-4 \cdot a\right)\\
t_2 := -27 \cdot \left(j \cdot k\right)\\
\mathbf{if}\;k \leq -2.1 \cdot 10^{-98}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;k \leq -1.45 \cdot 10^{-230}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;k \leq 4 \cdot 10^{-135}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;k \leq 1.22 \cdot 10^{-54}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;k \leq 3.2 \cdot 10^{+120}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;k \leq 2 \cdot 10^{+143}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if k < -2.09999999999999992e-98 or 2e143 < k Initial program 79.9%
sub-neg79.9%
+-commutative79.9%
associate-*l*80.0%
distribute-rgt-neg-in80.0%
fma-def83.1%
*-commutative83.1%
distribute-rgt-neg-in83.1%
metadata-eval83.1%
sub-neg83.1%
+-commutative83.1%
associate-*l*83.1%
distribute-rgt-neg-in83.1%
Simplified93.0%
Taylor expanded in j around inf 48.0%
if -2.09999999999999992e-98 < k < -1.45000000000000003e-230 or 4.0000000000000002e-135 < k < 1.22e-54Initial program 85.1%
distribute-rgt-out--87.6%
associate-*r*90.3%
add-cube-cbrt90.2%
Applied egg-rr90.2%
Taylor expanded in i around 0 76.5%
Taylor expanded in c around inf 41.8%
if -1.45000000000000003e-230 < k < 4.0000000000000002e-135 or 3.19999999999999982e120 < k < 2e143Initial program 81.7%
sub-neg81.7%
associate-+l-81.7%
sub-neg81.7%
sub-neg81.7%
distribute-rgt-out--81.7%
associate-*l*81.7%
distribute-lft-neg-in81.7%
cancel-sign-sub81.7%
associate-*l*81.7%
associate-*l*83.4%
Simplified83.4%
Taylor expanded in t around inf 52.5%
Taylor expanded in y around 0 41.9%
if 1.22e-54 < k < 3.19999999999999982e120Initial program 85.7%
distribute-rgt-out--85.7%
associate-*r*85.5%
add-cube-cbrt85.2%
Applied egg-rr85.2%
Taylor expanded in i around 0 68.7%
Taylor expanded in j around inf 23.7%
*-commutative23.7%
associate-*r*23.7%
Simplified23.7%
Final simplification43.1%
(FPCore (x y z t a b c i j k) :precision binary64 (if (<= j -5.1e+154) (* -27.0 (* j k)) (if (<= j 1.16e+60) (+ (* b c) (* -4.0 (* t a))) (* j (* k -27.0)))))
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 (j <= -5.1e+154) {
tmp = -27.0 * (j * k);
} else if (j <= 1.16e+60) {
tmp = (b * c) + (-4.0 * (t * a));
} else {
tmp = j * (k * -27.0);
}
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) :: tmp
if (j <= (-5.1d+154)) then
tmp = (-27.0d0) * (j * k)
else if (j <= 1.16d+60) then
tmp = (b * c) + ((-4.0d0) * (t * a))
else
tmp = j * (k * (-27.0d0))
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 tmp;
if (j <= -5.1e+154) {
tmp = -27.0 * (j * k);
} else if (j <= 1.16e+60) {
tmp = (b * c) + (-4.0 * (t * a));
} else {
tmp = j * (k * -27.0);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if j <= -5.1e+154: tmp = -27.0 * (j * k) elif j <= 1.16e+60: tmp = (b * c) + (-4.0 * (t * a)) else: tmp = j * (k * -27.0) return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (j <= -5.1e+154) tmp = Float64(-27.0 * Float64(j * k)); elseif (j <= 1.16e+60) tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))); else tmp = Float64(j * Float64(k * -27.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0; if (j <= -5.1e+154) tmp = -27.0 * (j * k); elseif (j <= 1.16e+60) tmp = (b * c) + (-4.0 * (t * a)); else tmp = j * (k * -27.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[j, -5.1e+154], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 1.16e+60], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;j \leq -5.1 \cdot 10^{+154}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;j \leq 1.16 \cdot 10^{+60}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if j < -5.0999999999999999e154Initial program 76.6%
sub-neg76.6%
+-commutative76.6%
associate-*l*79.6%
distribute-rgt-neg-in79.6%
fma-def82.5%
*-commutative82.5%
distribute-rgt-neg-in82.5%
metadata-eval82.5%
sub-neg82.5%
+-commutative82.5%
associate-*l*82.5%
distribute-rgt-neg-in82.5%
Simplified97.2%
Taylor expanded in j around inf 54.0%
if -5.0999999999999999e154 < j < 1.15999999999999996e60Initial program 85.7%
Taylor expanded in y around 0 81.2%
Taylor expanded in i around 0 66.4%
fma-neg66.4%
+-commutative66.4%
*-commutative66.4%
*-commutative66.4%
associate-*r*66.4%
distribute-neg-in66.4%
distribute-lft-neg-in66.4%
metadata-eval66.4%
*-commutative66.4%
*-commutative66.4%
associate-*l*66.4%
associate-*r*66.4%
distribute-rgt-neg-in66.4%
metadata-eval66.4%
*-commutative66.4%
associate-*l*66.4%
Simplified66.4%
Taylor expanded in j around 0 50.1%
if 1.15999999999999996e60 < j Initial program 74.4%
Taylor expanded in y around 0 77.7%
Taylor expanded in j around inf 49.4%
*-commutative49.4%
*-commutative49.4%
associate-*l*49.4%
Simplified49.4%
Final simplification50.5%
(FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= k -4.25e-98) (not (<= k 1.35e-55))) (* -27.0 (* j k)) (* b c)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((k <= -4.25e-98) || !(k <= 1.35e-55)) {
tmp = -27.0 * (j * k);
} else {
tmp = b * c;
}
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) :: tmp
if ((k <= (-4.25d-98)) .or. (.not. (k <= 1.35d-55))) then
tmp = (-27.0d0) * (j * k)
else
tmp = b * c
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 tmp;
if ((k <= -4.25e-98) || !(k <= 1.35e-55)) {
tmp = -27.0 * (j * k);
} else {
tmp = b * c;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (k <= -4.25e-98) or not (k <= 1.35e-55): tmp = -27.0 * (j * k) else: tmp = b * c return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((k <= -4.25e-98) || !(k <= 1.35e-55)) tmp = Float64(-27.0 * Float64(j * k)); else tmp = Float64(b * c); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0; if ((k <= -4.25e-98) || ~((k <= 1.35e-55))) tmp = -27.0 * (j * k); else tmp = b * c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[k, -4.25e-98], N[Not[LessEqual[k, 1.35e-55]], $MachinePrecision]], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq -4.25 \cdot 10^{-98} \lor \neg \left(k \leq 1.35 \cdot 10^{-55}\right):\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if k < -4.2499999999999999e-98 or 1.35000000000000002e-55 < k Initial program 80.0%
sub-neg80.0%
+-commutative80.0%
associate-*l*80.1%
distribute-rgt-neg-in80.1%
fma-def82.5%
*-commutative82.5%
distribute-rgt-neg-in82.5%
metadata-eval82.5%
sub-neg82.5%
+-commutative82.5%
associate-*l*82.5%
distribute-rgt-neg-in82.5%
Simplified90.9%
Taylor expanded in j around inf 42.6%
if -4.2499999999999999e-98 < k < 1.35000000000000002e-55Initial program 84.9%
distribute-rgt-out--86.0%
associate-*r*87.1%
add-cube-cbrt86.8%
Applied egg-rr86.8%
Taylor expanded in i around 0 68.1%
Taylor expanded in c around inf 28.2%
Final simplification37.5%
(FPCore (x y z t a b c i j k) :precision binary64 (* b c))
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;
}
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
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;
}
def code(x, y, z, t, a, b, c, i, j, k): return b * c
function code(x, y, z, t, a, b, c, i, j, k) return Float64(b * c) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = b * c; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(b * c), $MachinePrecision]
\begin{array}{l}
\\
b \cdot c
\end{array}
Initial program 81.7%
distribute-rgt-out--84.5%
associate-*r*85.6%
add-cube-cbrt85.4%
Applied egg-rr85.4%
Taylor expanded in i around 0 75.9%
Taylor expanded in c around inf 22.5%
Final simplification22.5%
(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 2023200
(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)))