
(FPCore (x y z t a b c i) :precision binary64 (* 2.0 (- (+ (* x y) (* z t)) (* (* (+ a (* b c)) c) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i));
}
real(8) function code(x, y, z, t, a, b, c, i)
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
code = 2.0d0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i));
}
def code(x, y, z, t, a, b, c, i): return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i))
function code(x, y, z, t, a, b, c, i) return Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(Float64(Float64(a + Float64(b * c)) * c) * i))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i)); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i) :precision binary64 (* 2.0 (- (+ (* x y) (* z t)) (* (* (+ a (* b c)) c) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i));
}
real(8) function code(x, y, z, t, a, b, c, i)
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
code = 2.0d0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i));
}
def code(x, y, z, t, a, b, c, i): return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i))
function code(x, y, z, t, a, b, c, i) return Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(Float64(Float64(a + Float64(b * c)) * c) * i))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i)); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right)
\end{array}
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (* b c))))
(if (<= (- (+ (* x y) (* z t)) (* (* c t_1) i)) INFINITY)
(* 2.0 (- (fma x y (* z t)) (* t_1 (* c i))))
(* 2.0 (* y (- x (* c (* i (/ (fma c b a) y)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double tmp;
if ((((x * y) + (z * t)) - ((c * t_1) * i)) <= ((double) INFINITY)) {
tmp = 2.0 * (fma(x, y, (z * t)) - (t_1 * (c * i)));
} else {
tmp = 2.0 * (y * (x - (c * (i * (fma(c, b, a) / y)))));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(b * c)) tmp = 0.0 if (Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(Float64(c * t_1) * i)) <= Inf) tmp = Float64(2.0 * Float64(fma(x, y, Float64(z * t)) - Float64(t_1 * Float64(c * i)))); else tmp = Float64(2.0 * Float64(y * Float64(x - Float64(c * Float64(i * Float64(fma(c, b, a) / y)))))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(c * t$95$1), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision], Infinity], N[(2.0 * N[(N[(x * y + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(t$95$1 * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(y * N[(x - N[(c * N[(i * N[(N[(c * b + a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + b \cdot c\\
\mathbf{if}\;\left(x \cdot y + z \cdot t\right) - \left(c \cdot t\_1\right) \cdot i \leq \infty:\\
\;\;\;\;2 \cdot \left(\mathsf{fma}\left(x, y, z \cdot t\right) - t\_1 \cdot \left(c \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(y \cdot \left(x - c \cdot \left(i \cdot \frac{\mathsf{fma}\left(c, b, a\right)}{y}\right)\right)\right)\\
\end{array}
\end{array}
if (-.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)) < +inf.0Initial program 95.0%
fma-define95.0%
associate-*l*98.4%
Simplified98.4%
if +inf.0 < (-.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)) Initial program 0.0%
Taylor expanded in z around 0 38.5%
Taylor expanded in y around inf 61.5%
mul-1-neg61.5%
unsub-neg61.5%
associate-/l*69.2%
+-commutative69.2%
*-commutative69.2%
fma-undefine69.2%
associate-/l*69.2%
Simplified69.2%
Final simplification96.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* c (+ a (* b c)))))
(if (or (<= t_1 (- INFINITY)) (not (<= t_1 5e+302)))
(* 2.0 (* y (- x (* c (* i (/ (fma c b a) y))))))
(* (- (+ (* x y) (* z t)) (* t_1 i)) 2.0))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = c * (a + (b * c));
double tmp;
if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 5e+302)) {
tmp = 2.0 * (y * (x - (c * (i * (fma(c, b, a) / y)))));
} else {
tmp = (((x * y) + (z * t)) - (t_1 * i)) * 2.0;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(c * Float64(a + Float64(b * c))) tmp = 0.0 if ((t_1 <= Float64(-Inf)) || !(t_1 <= 5e+302)) tmp = Float64(2.0 * Float64(y * Float64(x - Float64(c * Float64(i * Float64(fma(c, b, a) / y)))))); else tmp = Float64(Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(t_1 * i)) * 2.0); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(c * N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 5e+302]], $MachinePrecision]], N[(2.0 * N[(y * N[(x - N[(c * N[(i * N[(N[(c * b + a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(t$95$1 * i), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot \left(a + b \cdot c\right)\\
\mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 5 \cdot 10^{+302}\right):\\
\;\;\;\;2 \cdot \left(y \cdot \left(x - c \cdot \left(i \cdot \frac{\mathsf{fma}\left(c, b, a\right)}{y}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(x \cdot y + z \cdot t\right) - t\_1 \cdot i\right) \cdot 2\\
\end{array}
\end{array}
if (*.f64 (+.f64 a (*.f64 b c)) c) < -inf.0 or 5e302 < (*.f64 (+.f64 a (*.f64 b c)) c) Initial program 68.7%
Taylor expanded in z around 0 86.1%
Taylor expanded in y around inf 89.0%
mul-1-neg89.0%
unsub-neg89.0%
associate-/l*90.4%
+-commutative90.4%
*-commutative90.4%
fma-undefine90.4%
associate-/l*90.4%
Simplified90.4%
if -inf.0 < (*.f64 (+.f64 a (*.f64 b c)) c) < 5e302Initial program 98.4%
Final simplification96.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (* b c))) (t_2 (* c t_1)))
(if (<= t_2 (- INFINITY))
(* (* c (+ (* b (* c i)) (* a i))) -2.0)
(if (<= t_2 5e+258)
(* (- (+ (* x y) (* z t)) (* t_2 i)) 2.0)
(* 2.0 (- (* x y) (* c (* t_1 i))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double t_2 = c * t_1;
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = (c * ((b * (c * i)) + (a * i))) * -2.0;
} else if (t_2 <= 5e+258) {
tmp = (((x * y) + (z * t)) - (t_2 * i)) * 2.0;
} else {
tmp = 2.0 * ((x * y) - (c * (t_1 * i)));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double t_2 = c * t_1;
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = (c * ((b * (c * i)) + (a * i))) * -2.0;
} else if (t_2 <= 5e+258) {
tmp = (((x * y) + (z * t)) - (t_2 * i)) * 2.0;
} else {
tmp = 2.0 * ((x * y) - (c * (t_1 * i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a + (b * c) t_2 = c * t_1 tmp = 0 if t_2 <= -math.inf: tmp = (c * ((b * (c * i)) + (a * i))) * -2.0 elif t_2 <= 5e+258: tmp = (((x * y) + (z * t)) - (t_2 * i)) * 2.0 else: tmp = 2.0 * ((x * y) - (c * (t_1 * i))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(b * c)) t_2 = Float64(c * t_1) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(Float64(c * Float64(Float64(b * Float64(c * i)) + Float64(a * i))) * -2.0); elseif (t_2 <= 5e+258) tmp = Float64(Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(t_2 * i)) * 2.0); else tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(c * Float64(t_1 * i)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = a + (b * c); t_2 = c * t_1; tmp = 0.0; if (t_2 <= -Inf) tmp = (c * ((b * (c * i)) + (a * i))) * -2.0; elseif (t_2 <= 5e+258) tmp = (((x * y) + (z * t)) - (t_2 * i)) * 2.0; else tmp = 2.0 * ((x * y) - (c * (t_1 * i))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(c * t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(N[(c * N[(N[(b * N[(c * i), $MachinePrecision]), $MachinePrecision] + N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision], If[LessEqual[t$95$2, 5e+258], N[(N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(t$95$2 * i), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(c * N[(t$95$1 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + b \cdot c\\
t_2 := c \cdot t\_1\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;\left(c \cdot \left(b \cdot \left(c \cdot i\right) + a \cdot i\right)\right) \cdot -2\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+258}:\\
\;\;\;\;\left(\left(x \cdot y + z \cdot t\right) - t\_2 \cdot i\right) \cdot 2\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(t\_1 \cdot i\right)\right)\\
\end{array}
\end{array}
if (*.f64 (+.f64 a (*.f64 b c)) c) < -inf.0Initial program 66.1%
Taylor expanded in z around 0 81.5%
Taylor expanded in x around 0 84.3%
distribute-rgt-in81.5%
associate-*r*86.4%
+-commutative86.4%
Applied egg-rr86.4%
if -inf.0 < (*.f64 (+.f64 a (*.f64 b c)) c) < 5e258Initial program 98.4%
if 5e258 < (*.f64 (+.f64 a (*.f64 b c)) c) Initial program 78.0%
Taylor expanded in z around 0 93.1%
Final simplification95.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (* z t)))
(t_2 (* -2.0 (* i (* a c))))
(t_3 (* (* x y) 2.0)))
(if (<= a -1.06e+142)
t_2
(if (<= a -2.8e-182)
t_1
(if (<= a 1.9e-261)
t_3
(if (<= a 6.3e-86)
t_1
(if (<= a 5.4e-45) t_3 (if (<= a 4.3e+80) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * (z * t);
double t_2 = -2.0 * (i * (a * c));
double t_3 = (x * y) * 2.0;
double tmp;
if (a <= -1.06e+142) {
tmp = t_2;
} else if (a <= -2.8e-182) {
tmp = t_1;
} else if (a <= 1.9e-261) {
tmp = t_3;
} else if (a <= 6.3e-86) {
tmp = t_1;
} else if (a <= 5.4e-45) {
tmp = t_3;
} else if (a <= 4.3e+80) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = 2.0d0 * (z * t)
t_2 = (-2.0d0) * (i * (a * c))
t_3 = (x * y) * 2.0d0
if (a <= (-1.06d+142)) then
tmp = t_2
else if (a <= (-2.8d-182)) then
tmp = t_1
else if (a <= 1.9d-261) then
tmp = t_3
else if (a <= 6.3d-86) then
tmp = t_1
else if (a <= 5.4d-45) then
tmp = t_3
else if (a <= 4.3d+80) 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 t_1 = 2.0 * (z * t);
double t_2 = -2.0 * (i * (a * c));
double t_3 = (x * y) * 2.0;
double tmp;
if (a <= -1.06e+142) {
tmp = t_2;
} else if (a <= -2.8e-182) {
tmp = t_1;
} else if (a <= 1.9e-261) {
tmp = t_3;
} else if (a <= 6.3e-86) {
tmp = t_1;
} else if (a <= 5.4e-45) {
tmp = t_3;
} else if (a <= 4.3e+80) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * (z * t) t_2 = -2.0 * (i * (a * c)) t_3 = (x * y) * 2.0 tmp = 0 if a <= -1.06e+142: tmp = t_2 elif a <= -2.8e-182: tmp = t_1 elif a <= 1.9e-261: tmp = t_3 elif a <= 6.3e-86: tmp = t_1 elif a <= 5.4e-45: tmp = t_3 elif a <= 4.3e+80: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(z * t)) t_2 = Float64(-2.0 * Float64(i * Float64(a * c))) t_3 = Float64(Float64(x * y) * 2.0) tmp = 0.0 if (a <= -1.06e+142) tmp = t_2; elseif (a <= -2.8e-182) tmp = t_1; elseif (a <= 1.9e-261) tmp = t_3; elseif (a <= 6.3e-86) tmp = t_1; elseif (a <= 5.4e-45) tmp = t_3; elseif (a <= 4.3e+80) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 2.0 * (z * t); t_2 = -2.0 * (i * (a * c)); t_3 = (x * y) * 2.0; tmp = 0.0; if (a <= -1.06e+142) tmp = t_2; elseif (a <= -2.8e-182) tmp = t_1; elseif (a <= 1.9e-261) tmp = t_3; elseif (a <= 6.3e-86) tmp = t_1; elseif (a <= 5.4e-45) tmp = t_3; elseif (a <= 4.3e+80) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-2.0 * N[(i * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * y), $MachinePrecision] * 2.0), $MachinePrecision]}, If[LessEqual[a, -1.06e+142], t$95$2, If[LessEqual[a, -2.8e-182], t$95$1, If[LessEqual[a, 1.9e-261], t$95$3, If[LessEqual[a, 6.3e-86], t$95$1, If[LessEqual[a, 5.4e-45], t$95$3, If[LessEqual[a, 4.3e+80], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(z \cdot t\right)\\
t_2 := -2 \cdot \left(i \cdot \left(a \cdot c\right)\right)\\
t_3 := \left(x \cdot y\right) \cdot 2\\
\mathbf{if}\;a \leq -1.06 \cdot 10^{+142}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -2.8 \cdot 10^{-182}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.9 \cdot 10^{-261}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;a \leq 6.3 \cdot 10^{-86}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 5.4 \cdot 10^{-45}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;a \leq 4.3 \cdot 10^{+80}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -1.06e142 or 4.30000000000000004e80 < a Initial program 91.1%
Taylor expanded in z around 0 74.4%
Taylor expanded in x around 0 67.8%
Taylor expanded in c around 0 58.6%
*-commutative58.6%
*-commutative58.6%
associate-*l*53.3%
*-commutative53.3%
associate-*r*53.3%
*-commutative53.3%
*-commutative53.3%
associate-*r*53.3%
Simplified53.3%
Taylor expanded in c around 0 58.6%
associate-*r*59.7%
Simplified59.7%
if -1.06e142 < a < -2.79999999999999993e-182 or 1.9e-261 < a < 6.2999999999999999e-86 or 5.3999999999999997e-45 < a < 4.30000000000000004e80Initial program 91.5%
Taylor expanded in z around inf 50.0%
if -2.79999999999999993e-182 < a < 1.9e-261 or 6.2999999999999999e-86 < a < 5.3999999999999997e-45Initial program 86.0%
Taylor expanded in x around inf 44.7%
Final simplification52.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (* z t))) (t_2 (* (* x y) 2.0)))
(if (<= a -7e+139)
(* -2.0 (* a (* c i)))
(if (<= a -3.5e-182)
t_1
(if (<= a 7.2e-264)
t_2
(if (<= a 8.2e-86)
t_1
(if (<= a 5.5e-49)
t_2
(if (<= a 1.2e+78) t_1 (* -2.0 (* i (* a c)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * (z * t);
double t_2 = (x * y) * 2.0;
double tmp;
if (a <= -7e+139) {
tmp = -2.0 * (a * (c * i));
} else if (a <= -3.5e-182) {
tmp = t_1;
} else if (a <= 7.2e-264) {
tmp = t_2;
} else if (a <= 8.2e-86) {
tmp = t_1;
} else if (a <= 5.5e-49) {
tmp = t_2;
} else if (a <= 1.2e+78) {
tmp = t_1;
} else {
tmp = -2.0 * (i * (a * c));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 2.0d0 * (z * t)
t_2 = (x * y) * 2.0d0
if (a <= (-7d+139)) then
tmp = (-2.0d0) * (a * (c * i))
else if (a <= (-3.5d-182)) then
tmp = t_1
else if (a <= 7.2d-264) then
tmp = t_2
else if (a <= 8.2d-86) then
tmp = t_1
else if (a <= 5.5d-49) then
tmp = t_2
else if (a <= 1.2d+78) then
tmp = t_1
else
tmp = (-2.0d0) * (i * (a * 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 t_1 = 2.0 * (z * t);
double t_2 = (x * y) * 2.0;
double tmp;
if (a <= -7e+139) {
tmp = -2.0 * (a * (c * i));
} else if (a <= -3.5e-182) {
tmp = t_1;
} else if (a <= 7.2e-264) {
tmp = t_2;
} else if (a <= 8.2e-86) {
tmp = t_1;
} else if (a <= 5.5e-49) {
tmp = t_2;
} else if (a <= 1.2e+78) {
tmp = t_1;
} else {
tmp = -2.0 * (i * (a * c));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * (z * t) t_2 = (x * y) * 2.0 tmp = 0 if a <= -7e+139: tmp = -2.0 * (a * (c * i)) elif a <= -3.5e-182: tmp = t_1 elif a <= 7.2e-264: tmp = t_2 elif a <= 8.2e-86: tmp = t_1 elif a <= 5.5e-49: tmp = t_2 elif a <= 1.2e+78: tmp = t_1 else: tmp = -2.0 * (i * (a * c)) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(z * t)) t_2 = Float64(Float64(x * y) * 2.0) tmp = 0.0 if (a <= -7e+139) tmp = Float64(-2.0 * Float64(a * Float64(c * i))); elseif (a <= -3.5e-182) tmp = t_1; elseif (a <= 7.2e-264) tmp = t_2; elseif (a <= 8.2e-86) tmp = t_1; elseif (a <= 5.5e-49) tmp = t_2; elseif (a <= 1.2e+78) tmp = t_1; else tmp = Float64(-2.0 * Float64(i * Float64(a * c))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 2.0 * (z * t); t_2 = (x * y) * 2.0; tmp = 0.0; if (a <= -7e+139) tmp = -2.0 * (a * (c * i)); elseif (a <= -3.5e-182) tmp = t_1; elseif (a <= 7.2e-264) tmp = t_2; elseif (a <= 8.2e-86) tmp = t_1; elseif (a <= 5.5e-49) tmp = t_2; elseif (a <= 1.2e+78) tmp = t_1; else tmp = -2.0 * (i * (a * c)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y), $MachinePrecision] * 2.0), $MachinePrecision]}, If[LessEqual[a, -7e+139], N[(-2.0 * N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -3.5e-182], t$95$1, If[LessEqual[a, 7.2e-264], t$95$2, If[LessEqual[a, 8.2e-86], t$95$1, If[LessEqual[a, 5.5e-49], t$95$2, If[LessEqual[a, 1.2e+78], t$95$1, N[(-2.0 * N[(i * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(z \cdot t\right)\\
t_2 := \left(x \cdot y\right) \cdot 2\\
\mathbf{if}\;a \leq -7 \cdot 10^{+139}:\\
\;\;\;\;-2 \cdot \left(a \cdot \left(c \cdot i\right)\right)\\
\mathbf{elif}\;a \leq -3.5 \cdot 10^{-182}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 7.2 \cdot 10^{-264}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq 8.2 \cdot 10^{-86}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 5.5 \cdot 10^{-49}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq 1.2 \cdot 10^{+78}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;-2 \cdot \left(i \cdot \left(a \cdot c\right)\right)\\
\end{array}
\end{array}
if a < -6.99999999999999957e139Initial program 89.9%
Taylor expanded in a around inf 63.2%
mul-1-neg63.2%
*-commutative63.2%
associate-*l*58.5%
*-commutative58.5%
distribute-rgt-neg-in58.5%
*-commutative58.5%
distribute-rgt-neg-in58.5%
Simplified58.5%
Taylor expanded in c around 0 63.2%
*-commutative63.2%
Simplified63.2%
if -6.99999999999999957e139 < a < -3.49999999999999983e-182 or 7.2000000000000004e-264 < a < 8.19999999999999959e-86 or 5.50000000000000031e-49 < a < 1.1999999999999999e78Initial program 91.5%
Taylor expanded in z around inf 50.0%
if -3.49999999999999983e-182 < a < 7.2000000000000004e-264 or 8.19999999999999959e-86 < a < 5.50000000000000031e-49Initial program 86.0%
Taylor expanded in x around inf 44.7%
if 1.1999999999999999e78 < a Initial program 92.1%
Taylor expanded in z around 0 69.2%
Taylor expanded in x around 0 63.2%
Taylor expanded in c around 0 54.9%
*-commutative54.9%
*-commutative54.9%
associate-*l*49.2%
*-commutative49.2%
associate-*r*49.2%
*-commutative49.2%
*-commutative49.2%
associate-*r*49.2%
Simplified49.2%
Taylor expanded in c around 0 54.9%
associate-*r*58.8%
Simplified58.8%
Final simplification52.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (- (* x y) (* a (* c i)))))
(t_2 (* 2.0 (* z (- t (* (* c i) (/ a z)))))))
(if (<= z -6.5e+29)
t_2
(if (<= z -1.6e-272)
t_1
(if (<= z 7.8e-170)
(* -2.0 (* c (* (+ a (* b c)) i)))
(if (<= z 0.156) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * ((x * y) - (a * (c * i)));
double t_2 = 2.0 * (z * (t - ((c * i) * (a / z))));
double tmp;
if (z <= -6.5e+29) {
tmp = t_2;
} else if (z <= -1.6e-272) {
tmp = t_1;
} else if (z <= 7.8e-170) {
tmp = -2.0 * (c * ((a + (b * c)) * i));
} else if (z <= 0.156) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 2.0d0 * ((x * y) - (a * (c * i)))
t_2 = 2.0d0 * (z * (t - ((c * i) * (a / z))))
if (z <= (-6.5d+29)) then
tmp = t_2
else if (z <= (-1.6d-272)) then
tmp = t_1
else if (z <= 7.8d-170) then
tmp = (-2.0d0) * (c * ((a + (b * c)) * i))
else if (z <= 0.156d0) 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 t_1 = 2.0 * ((x * y) - (a * (c * i)));
double t_2 = 2.0 * (z * (t - ((c * i) * (a / z))));
double tmp;
if (z <= -6.5e+29) {
tmp = t_2;
} else if (z <= -1.6e-272) {
tmp = t_1;
} else if (z <= 7.8e-170) {
tmp = -2.0 * (c * ((a + (b * c)) * i));
} else if (z <= 0.156) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * ((x * y) - (a * (c * i))) t_2 = 2.0 * (z * (t - ((c * i) * (a / z)))) tmp = 0 if z <= -6.5e+29: tmp = t_2 elif z <= -1.6e-272: tmp = t_1 elif z <= 7.8e-170: tmp = -2.0 * (c * ((a + (b * c)) * i)) elif z <= 0.156: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(Float64(x * y) - Float64(a * Float64(c * i)))) t_2 = Float64(2.0 * Float64(z * Float64(t - Float64(Float64(c * i) * Float64(a / z))))) tmp = 0.0 if (z <= -6.5e+29) tmp = t_2; elseif (z <= -1.6e-272) tmp = t_1; elseif (z <= 7.8e-170) tmp = Float64(-2.0 * Float64(c * Float64(Float64(a + Float64(b * c)) * i))); elseif (z <= 0.156) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 2.0 * ((x * y) - (a * (c * i))); t_2 = 2.0 * (z * (t - ((c * i) * (a / z)))); tmp = 0.0; if (z <= -6.5e+29) tmp = t_2; elseif (z <= -1.6e-272) tmp = t_1; elseif (z <= 7.8e-170) tmp = -2.0 * (c * ((a + (b * c)) * i)); elseif (z <= 0.156) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(z * N[(t - N[(N[(c * i), $MachinePrecision] * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.5e+29], t$95$2, If[LessEqual[z, -1.6e-272], t$95$1, If[LessEqual[z, 7.8e-170], N[(-2.0 * N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.156], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(x \cdot y - a \cdot \left(c \cdot i\right)\right)\\
t_2 := 2 \cdot \left(z \cdot \left(t - \left(c \cdot i\right) \cdot \frac{a}{z}\right)\right)\\
\mathbf{if}\;z \leq -6.5 \cdot 10^{+29}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -1.6 \cdot 10^{-272}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 7.8 \cdot 10^{-170}:\\
\;\;\;\;-2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\
\mathbf{elif}\;z \leq 0.156:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -6.49999999999999971e29 or 0.156 < z Initial program 91.8%
Taylor expanded in x around 0 80.6%
Taylor expanded in c around 0 71.4%
mul-1-neg71.4%
+-commutative71.4%
sub-neg71.4%
*-commutative71.4%
associate-*l*66.9%
Simplified66.9%
Taylor expanded in z around inf 73.1%
mul-1-neg73.1%
unsub-neg73.1%
*-commutative73.1%
associate-/l*70.6%
Simplified70.6%
if -6.49999999999999971e29 < z < -1.6e-272 or 7.80000000000000042e-170 < z < 0.156Initial program 92.9%
Taylor expanded in z around 0 81.7%
Taylor expanded in c around 0 65.4%
mul-1-neg65.4%
+-commutative65.4%
sub-neg65.4%
Simplified65.4%
if -1.6e-272 < z < 7.80000000000000042e-170Initial program 79.1%
Taylor expanded in z around 0 76.5%
Taylor expanded in x around 0 59.4%
Final simplification66.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (* x y) 2.0)))
(if (<= (* x y) -4.3e+102)
t_1
(if (<= (* x y) 8.5e+51)
(* 2.0 (- (* z t) (* c (* a i))))
(if (<= (* x y) 2.4e+240) (* -2.0 (* c (* (+ a (* b c)) i))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (x * y) * 2.0;
double tmp;
if ((x * y) <= -4.3e+102) {
tmp = t_1;
} else if ((x * y) <= 8.5e+51) {
tmp = 2.0 * ((z * t) - (c * (a * i)));
} else if ((x * y) <= 2.4e+240) {
tmp = -2.0 * (c * ((a + (b * c)) * i));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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) :: t_1
real(8) :: tmp
t_1 = (x * y) * 2.0d0
if ((x * y) <= (-4.3d+102)) then
tmp = t_1
else if ((x * y) <= 8.5d+51) then
tmp = 2.0d0 * ((z * t) - (c * (a * i)))
else if ((x * y) <= 2.4d+240) then
tmp = (-2.0d0) * (c * ((a + (b * c)) * i))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (x * y) * 2.0;
double tmp;
if ((x * y) <= -4.3e+102) {
tmp = t_1;
} else if ((x * y) <= 8.5e+51) {
tmp = 2.0 * ((z * t) - (c * (a * i)));
} else if ((x * y) <= 2.4e+240) {
tmp = -2.0 * (c * ((a + (b * c)) * i));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (x * y) * 2.0 tmp = 0 if (x * y) <= -4.3e+102: tmp = t_1 elif (x * y) <= 8.5e+51: tmp = 2.0 * ((z * t) - (c * (a * i))) elif (x * y) <= 2.4e+240: tmp = -2.0 * (c * ((a + (b * c)) * i)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(x * y) * 2.0) tmp = 0.0 if (Float64(x * y) <= -4.3e+102) tmp = t_1; elseif (Float64(x * y) <= 8.5e+51) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(a * i)))); elseif (Float64(x * y) <= 2.4e+240) tmp = Float64(-2.0 * Float64(c * Float64(Float64(a + Float64(b * c)) * i))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (x * y) * 2.0; tmp = 0.0; if ((x * y) <= -4.3e+102) tmp = t_1; elseif ((x * y) <= 8.5e+51) tmp = 2.0 * ((z * t) - (c * (a * i))); elseif ((x * y) <= 2.4e+240) tmp = -2.0 * (c * ((a + (b * c)) * i)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] * 2.0), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -4.3e+102], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 8.5e+51], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 2.4e+240], N[(-2.0 * N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot y\right) \cdot 2\\
\mathbf{if}\;x \cdot y \leq -4.3 \cdot 10^{+102}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 8.5 \cdot 10^{+51}:\\
\;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(a \cdot i\right)\right)\\
\mathbf{elif}\;x \cdot y \leq 2.4 \cdot 10^{+240}:\\
\;\;\;\;-2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 x y) < -4.3000000000000001e102 or 2.3999999999999999e240 < (*.f64 x y) Initial program 79.3%
Taylor expanded in x around inf 71.5%
if -4.3000000000000001e102 < (*.f64 x y) < 8.4999999999999999e51Initial program 94.0%
Taylor expanded in x around 0 85.5%
Taylor expanded in c around 0 72.4%
mul-1-neg72.4%
+-commutative72.4%
sub-neg72.4%
*-commutative72.4%
associate-*l*68.2%
Simplified68.2%
if 8.4999999999999999e51 < (*.f64 x y) < 2.3999999999999999e240Initial program 90.7%
Taylor expanded in z around 0 85.5%
Taylor expanded in x around 0 70.8%
Final simplification69.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (* z t))) (t_2 (* -2.0 (* c (* (+ a (* b c)) i)))))
(if (<= c -5.5e-19)
t_2
(if (<= c -9.5e-132)
t_1
(if (<= c -2.05e-221) (* (* x y) 2.0) (if (<= c 9.2e+107) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * (z * t);
double t_2 = -2.0 * (c * ((a + (b * c)) * i));
double tmp;
if (c <= -5.5e-19) {
tmp = t_2;
} else if (c <= -9.5e-132) {
tmp = t_1;
} else if (c <= -2.05e-221) {
tmp = (x * y) * 2.0;
} else if (c <= 9.2e+107) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 2.0d0 * (z * t)
t_2 = (-2.0d0) * (c * ((a + (b * c)) * i))
if (c <= (-5.5d-19)) then
tmp = t_2
else if (c <= (-9.5d-132)) then
tmp = t_1
else if (c <= (-2.05d-221)) then
tmp = (x * y) * 2.0d0
else if (c <= 9.2d+107) 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 t_1 = 2.0 * (z * t);
double t_2 = -2.0 * (c * ((a + (b * c)) * i));
double tmp;
if (c <= -5.5e-19) {
tmp = t_2;
} else if (c <= -9.5e-132) {
tmp = t_1;
} else if (c <= -2.05e-221) {
tmp = (x * y) * 2.0;
} else if (c <= 9.2e+107) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * (z * t) t_2 = -2.0 * (c * ((a + (b * c)) * i)) tmp = 0 if c <= -5.5e-19: tmp = t_2 elif c <= -9.5e-132: tmp = t_1 elif c <= -2.05e-221: tmp = (x * y) * 2.0 elif c <= 9.2e+107: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(z * t)) t_2 = Float64(-2.0 * Float64(c * Float64(Float64(a + Float64(b * c)) * i))) tmp = 0.0 if (c <= -5.5e-19) tmp = t_2; elseif (c <= -9.5e-132) tmp = t_1; elseif (c <= -2.05e-221) tmp = Float64(Float64(x * y) * 2.0); elseif (c <= 9.2e+107) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 2.0 * (z * t); t_2 = -2.0 * (c * ((a + (b * c)) * i)); tmp = 0.0; if (c <= -5.5e-19) tmp = t_2; elseif (c <= -9.5e-132) tmp = t_1; elseif (c <= -2.05e-221) tmp = (x * y) * 2.0; elseif (c <= 9.2e+107) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-2.0 * N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -5.5e-19], t$95$2, If[LessEqual[c, -9.5e-132], t$95$1, If[LessEqual[c, -2.05e-221], N[(N[(x * y), $MachinePrecision] * 2.0), $MachinePrecision], If[LessEqual[c, 9.2e+107], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(z \cdot t\right)\\
t_2 := -2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\
\mathbf{if}\;c \leq -5.5 \cdot 10^{-19}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;c \leq -9.5 \cdot 10^{-132}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq -2.05 \cdot 10^{-221}:\\
\;\;\;\;\left(x \cdot y\right) \cdot 2\\
\mathbf{elif}\;c \leq 9.2 \cdot 10^{+107}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if c < -5.4999999999999996e-19 or 9.2000000000000001e107 < c Initial program 78.6%
Taylor expanded in z around 0 83.9%
Taylor expanded in x around 0 76.2%
if -5.4999999999999996e-19 < c < -9.49999999999999987e-132 or -2.04999999999999991e-221 < c < 9.2000000000000001e107Initial program 97.2%
Taylor expanded in z around inf 50.7%
if -9.49999999999999987e-132 < c < -2.04999999999999991e-221Initial program 96.0%
Taylor expanded in x around inf 58.3%
Final simplification60.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (- (* x y) (* a (* c i)))))
(t_2 (* 2.0 (- (* z t) (* c (* a i))))))
(if (<= z -1.02e+76)
t_2
(if (<= z -4.8e-275)
t_1
(if (<= z 3.2e-172)
(* -2.0 (* c (* (+ a (* b c)) i)))
(if (<= z 0.13) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * ((x * y) - (a * (c * i)));
double t_2 = 2.0 * ((z * t) - (c * (a * i)));
double tmp;
if (z <= -1.02e+76) {
tmp = t_2;
} else if (z <= -4.8e-275) {
tmp = t_1;
} else if (z <= 3.2e-172) {
tmp = -2.0 * (c * ((a + (b * c)) * i));
} else if (z <= 0.13) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 2.0d0 * ((x * y) - (a * (c * i)))
t_2 = 2.0d0 * ((z * t) - (c * (a * i)))
if (z <= (-1.02d+76)) then
tmp = t_2
else if (z <= (-4.8d-275)) then
tmp = t_1
else if (z <= 3.2d-172) then
tmp = (-2.0d0) * (c * ((a + (b * c)) * i))
else if (z <= 0.13d0) 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 t_1 = 2.0 * ((x * y) - (a * (c * i)));
double t_2 = 2.0 * ((z * t) - (c * (a * i)));
double tmp;
if (z <= -1.02e+76) {
tmp = t_2;
} else if (z <= -4.8e-275) {
tmp = t_1;
} else if (z <= 3.2e-172) {
tmp = -2.0 * (c * ((a + (b * c)) * i));
} else if (z <= 0.13) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * ((x * y) - (a * (c * i))) t_2 = 2.0 * ((z * t) - (c * (a * i))) tmp = 0 if z <= -1.02e+76: tmp = t_2 elif z <= -4.8e-275: tmp = t_1 elif z <= 3.2e-172: tmp = -2.0 * (c * ((a + (b * c)) * i)) elif z <= 0.13: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(Float64(x * y) - Float64(a * Float64(c * i)))) t_2 = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(a * i)))) tmp = 0.0 if (z <= -1.02e+76) tmp = t_2; elseif (z <= -4.8e-275) tmp = t_1; elseif (z <= 3.2e-172) tmp = Float64(-2.0 * Float64(c * Float64(Float64(a + Float64(b * c)) * i))); elseif (z <= 0.13) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 2.0 * ((x * y) - (a * (c * i))); t_2 = 2.0 * ((z * t) - (c * (a * i))); tmp = 0.0; if (z <= -1.02e+76) tmp = t_2; elseif (z <= -4.8e-275) tmp = t_1; elseif (z <= 3.2e-172) tmp = -2.0 * (c * ((a + (b * c)) * i)); elseif (z <= 0.13) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.02e+76], t$95$2, If[LessEqual[z, -4.8e-275], t$95$1, If[LessEqual[z, 3.2e-172], N[(-2.0 * N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.13], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(x \cdot y - a \cdot \left(c \cdot i\right)\right)\\
t_2 := 2 \cdot \left(z \cdot t - c \cdot \left(a \cdot i\right)\right)\\
\mathbf{if}\;z \leq -1.02 \cdot 10^{+76}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -4.8 \cdot 10^{-275}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{-172}:\\
\;\;\;\;-2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\
\mathbf{elif}\;z \leq 0.13:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -1.02000000000000007e76 or 0.13 < z Initial program 91.9%
Taylor expanded in x around 0 82.4%
Taylor expanded in c around 0 73.3%
mul-1-neg73.3%
+-commutative73.3%
sub-neg73.3%
*-commutative73.3%
associate-*l*69.2%
Simplified69.2%
if -1.02000000000000007e76 < z < -4.79999999999999981e-275 or 3.2000000000000001e-172 < z < 0.13Initial program 92.8%
Taylor expanded in z around 0 80.0%
Taylor expanded in c around 0 64.3%
mul-1-neg64.3%
+-commutative64.3%
sub-neg64.3%
Simplified64.3%
if -4.79999999999999981e-275 < z < 3.2000000000000001e-172Initial program 78.6%
Taylor expanded in z around 0 78.3%
Taylor expanded in x around 0 60.8%
Final simplification65.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* x y) (* z t))))
(if (or (<= i -5e+70) (not (<= i 2000000.0)))
(* (- t_1 (* (* c (+ a (* b c))) i)) 2.0)
(* 2.0 (- t_1 (* c (+ (* b (* c i)) (* a i))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (x * y) + (z * t);
double tmp;
if ((i <= -5e+70) || !(i <= 2000000.0)) {
tmp = (t_1 - ((c * (a + (b * c))) * i)) * 2.0;
} else {
tmp = 2.0 * (t_1 - (c * ((b * (c * i)) + (a * i))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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) :: t_1
real(8) :: tmp
t_1 = (x * y) + (z * t)
if ((i <= (-5d+70)) .or. (.not. (i <= 2000000.0d0))) then
tmp = (t_1 - ((c * (a + (b * c))) * i)) * 2.0d0
else
tmp = 2.0d0 * (t_1 - (c * ((b * (c * i)) + (a * i))))
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 t_1 = (x * y) + (z * t);
double tmp;
if ((i <= -5e+70) || !(i <= 2000000.0)) {
tmp = (t_1 - ((c * (a + (b * c))) * i)) * 2.0;
} else {
tmp = 2.0 * (t_1 - (c * ((b * (c * i)) + (a * i))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (x * y) + (z * t) tmp = 0 if (i <= -5e+70) or not (i <= 2000000.0): tmp = (t_1 - ((c * (a + (b * c))) * i)) * 2.0 else: tmp = 2.0 * (t_1 - (c * ((b * (c * i)) + (a * i)))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(x * y) + Float64(z * t)) tmp = 0.0 if ((i <= -5e+70) || !(i <= 2000000.0)) tmp = Float64(Float64(t_1 - Float64(Float64(c * Float64(a + Float64(b * c))) * i)) * 2.0); else tmp = Float64(2.0 * Float64(t_1 - Float64(c * Float64(Float64(b * Float64(c * i)) + Float64(a * i))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (x * y) + (z * t); tmp = 0.0; if ((i <= -5e+70) || ~((i <= 2000000.0))) tmp = (t_1 - ((c * (a + (b * c))) * i)) * 2.0; else tmp = 2.0 * (t_1 - (c * ((b * (c * i)) + (a * i)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[i, -5e+70], N[Not[LessEqual[i, 2000000.0]], $MachinePrecision]], N[(N[(t$95$1 - N[(N[(c * N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision], N[(2.0 * N[(t$95$1 - N[(c * N[(N[(b * N[(c * i), $MachinePrecision]), $MachinePrecision] + N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot y + z \cdot t\\
\mathbf{if}\;i \leq -5 \cdot 10^{+70} \lor \neg \left(i \leq 2000000\right):\\
\;\;\;\;\left(t\_1 - \left(c \cdot \left(a + b \cdot c\right)\right) \cdot i\right) \cdot 2\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(t\_1 - c \cdot \left(b \cdot \left(c \cdot i\right) + a \cdot i\right)\right)\\
\end{array}
\end{array}
if i < -5.0000000000000002e70 or 2e6 < i Initial program 94.6%
if -5.0000000000000002e70 < i < 2e6Initial program 87.0%
Taylor expanded in c around 0 96.6%
Final simplification95.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (* z t))) (t_2 (* -2.0 (* c (* (* b c) i)))))
(if (<= c -3.2e-7)
t_2
(if (<= c -2.7e-131)
t_1
(if (<= c -1.8e-221) (* (* x y) 2.0) (if (<= c 1.35e+108) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * (z * t);
double t_2 = -2.0 * (c * ((b * c) * i));
double tmp;
if (c <= -3.2e-7) {
tmp = t_2;
} else if (c <= -2.7e-131) {
tmp = t_1;
} else if (c <= -1.8e-221) {
tmp = (x * y) * 2.0;
} else if (c <= 1.35e+108) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 2.0d0 * (z * t)
t_2 = (-2.0d0) * (c * ((b * c) * i))
if (c <= (-3.2d-7)) then
tmp = t_2
else if (c <= (-2.7d-131)) then
tmp = t_1
else if (c <= (-1.8d-221)) then
tmp = (x * y) * 2.0d0
else if (c <= 1.35d+108) 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 t_1 = 2.0 * (z * t);
double t_2 = -2.0 * (c * ((b * c) * i));
double tmp;
if (c <= -3.2e-7) {
tmp = t_2;
} else if (c <= -2.7e-131) {
tmp = t_1;
} else if (c <= -1.8e-221) {
tmp = (x * y) * 2.0;
} else if (c <= 1.35e+108) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * (z * t) t_2 = -2.0 * (c * ((b * c) * i)) tmp = 0 if c <= -3.2e-7: tmp = t_2 elif c <= -2.7e-131: tmp = t_1 elif c <= -1.8e-221: tmp = (x * y) * 2.0 elif c <= 1.35e+108: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(z * t)) t_2 = Float64(-2.0 * Float64(c * Float64(Float64(b * c) * i))) tmp = 0.0 if (c <= -3.2e-7) tmp = t_2; elseif (c <= -2.7e-131) tmp = t_1; elseif (c <= -1.8e-221) tmp = Float64(Float64(x * y) * 2.0); elseif (c <= 1.35e+108) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 2.0 * (z * t); t_2 = -2.0 * (c * ((b * c) * i)); tmp = 0.0; if (c <= -3.2e-7) tmp = t_2; elseif (c <= -2.7e-131) tmp = t_1; elseif (c <= -1.8e-221) tmp = (x * y) * 2.0; elseif (c <= 1.35e+108) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-2.0 * N[(c * N[(N[(b * c), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -3.2e-7], t$95$2, If[LessEqual[c, -2.7e-131], t$95$1, If[LessEqual[c, -1.8e-221], N[(N[(x * y), $MachinePrecision] * 2.0), $MachinePrecision], If[LessEqual[c, 1.35e+108], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(z \cdot t\right)\\
t_2 := -2 \cdot \left(c \cdot \left(\left(b \cdot c\right) \cdot i\right)\right)\\
\mathbf{if}\;c \leq -3.2 \cdot 10^{-7}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;c \leq -2.7 \cdot 10^{-131}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq -1.8 \cdot 10^{-221}:\\
\;\;\;\;\left(x \cdot y\right) \cdot 2\\
\mathbf{elif}\;c \leq 1.35 \cdot 10^{+108}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if c < -3.2000000000000001e-7 or 1.35e108 < c Initial program 78.1%
Taylor expanded in z around 0 83.6%
Taylor expanded in x around 0 75.7%
Taylor expanded in a around 0 61.5%
if -3.2000000000000001e-7 < c < -2.70000000000000021e-131 or -1.80000000000000006e-221 < c < 1.35e108Initial program 97.3%
Taylor expanded in z around inf 50.0%
if -2.70000000000000021e-131 < c < -1.80000000000000006e-221Initial program 96.0%
Taylor expanded in x around inf 58.3%
Final simplification55.0%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (* x y) -2.7e+116) (not (<= (* x y) 4.4e+181))) (* 2.0 (- (* x y) (* a (* c i)))) (* 2.0 (- (* z t) (* c (* (+ a (* b c)) i))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((x * y) <= -2.7e+116) || !((x * y) <= 4.4e+181)) {
tmp = 2.0 * ((x * y) - (a * (c * i)));
} else {
tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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) :: tmp
if (((x * y) <= (-2.7d+116)) .or. (.not. ((x * y) <= 4.4d+181))) then
tmp = 2.0d0 * ((x * y) - (a * (c * i)))
else
tmp = 2.0d0 * ((z * t) - (c * ((a + (b * c)) * i)))
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 tmp;
if (((x * y) <= -2.7e+116) || !((x * y) <= 4.4e+181)) {
tmp = 2.0 * ((x * y) - (a * (c * i)));
} else {
tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((x * y) <= -2.7e+116) or not ((x * y) <= 4.4e+181): tmp = 2.0 * ((x * y) - (a * (c * i))) else: tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(x * y) <= -2.7e+116) || !(Float64(x * y) <= 4.4e+181)) tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(a * Float64(c * i)))); else tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(Float64(a + Float64(b * c)) * i)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (((x * y) <= -2.7e+116) || ~(((x * y) <= 4.4e+181))) tmp = 2.0 * ((x * y) - (a * (c * i))); else tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(x * y), $MachinePrecision], -2.7e+116], N[Not[LessEqual[N[(x * y), $MachinePrecision], 4.4e+181]], $MachinePrecision]], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -2.7 \cdot 10^{+116} \lor \neg \left(x \cdot y \leq 4.4 \cdot 10^{+181}\right):\\
\;\;\;\;2 \cdot \left(x \cdot y - a \cdot \left(c \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\
\end{array}
\end{array}
if (*.f64 x y) < -2.7e116 or 4.4000000000000002e181 < (*.f64 x y) Initial program 80.8%
Taylor expanded in z around 0 78.3%
Taylor expanded in c around 0 79.2%
mul-1-neg79.2%
+-commutative79.2%
sub-neg79.2%
Simplified79.2%
if -2.7e116 < (*.f64 x y) < 4.4000000000000002e181Initial program 93.2%
Taylor expanded in x around 0 84.5%
Final simplification83.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* c (* (+ a (* b c)) i))))
(if (<= (* x y) -4.8e+102)
(* 2.0 (- (* x y) t_1))
(if (<= (* x y) 2.25e+181)
(* 2.0 (- (* z t) t_1))
(* 2.0 (- (* x y) (* a (* c i))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = c * ((a + (b * c)) * i);
double tmp;
if ((x * y) <= -4.8e+102) {
tmp = 2.0 * ((x * y) - t_1);
} else if ((x * y) <= 2.25e+181) {
tmp = 2.0 * ((z * t) - t_1);
} else {
tmp = 2.0 * ((x * y) - (a * (c * i)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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) :: t_1
real(8) :: tmp
t_1 = c * ((a + (b * c)) * i)
if ((x * y) <= (-4.8d+102)) then
tmp = 2.0d0 * ((x * y) - t_1)
else if ((x * y) <= 2.25d+181) then
tmp = 2.0d0 * ((z * t) - t_1)
else
tmp = 2.0d0 * ((x * y) - (a * (c * i)))
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 t_1 = c * ((a + (b * c)) * i);
double tmp;
if ((x * y) <= -4.8e+102) {
tmp = 2.0 * ((x * y) - t_1);
} else if ((x * y) <= 2.25e+181) {
tmp = 2.0 * ((z * t) - t_1);
} else {
tmp = 2.0 * ((x * y) - (a * (c * i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = c * ((a + (b * c)) * i) tmp = 0 if (x * y) <= -4.8e+102: tmp = 2.0 * ((x * y) - t_1) elif (x * y) <= 2.25e+181: tmp = 2.0 * ((z * t) - t_1) else: tmp = 2.0 * ((x * y) - (a * (c * i))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(c * Float64(Float64(a + Float64(b * c)) * i)) tmp = 0.0 if (Float64(x * y) <= -4.8e+102) tmp = Float64(2.0 * Float64(Float64(x * y) - t_1)); elseif (Float64(x * y) <= 2.25e+181) tmp = Float64(2.0 * Float64(Float64(z * t) - t_1)); else tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(a * Float64(c * i)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = c * ((a + (b * c)) * i); tmp = 0.0; if ((x * y) <= -4.8e+102) tmp = 2.0 * ((x * y) - t_1); elseif ((x * y) <= 2.25e+181) tmp = 2.0 * ((z * t) - t_1); else tmp = 2.0 * ((x * y) - (a * (c * i))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -4.8e+102], N[(2.0 * N[(N[(x * y), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 2.25e+181], N[(2.0 * N[(N[(z * t), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\\
\mathbf{if}\;x \cdot y \leq -4.8 \cdot 10^{+102}:\\
\;\;\;\;2 \cdot \left(x \cdot y - t\_1\right)\\
\mathbf{elif}\;x \cdot y \leq 2.25 \cdot 10^{+181}:\\
\;\;\;\;2 \cdot \left(z \cdot t - t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y - a \cdot \left(c \cdot i\right)\right)\\
\end{array}
\end{array}
if (*.f64 x y) < -4.79999999999999989e102Initial program 84.5%
Taylor expanded in z around 0 80.6%
if -4.79999999999999989e102 < (*.f64 x y) < 2.25e181Initial program 93.6%
Taylor expanded in x around 0 84.9%
if 2.25e181 < (*.f64 x y) Initial program 70.0%
Taylor expanded in z around 0 75.3%
Taylor expanded in c around 0 90.0%
mul-1-neg90.0%
+-commutative90.0%
sub-neg90.0%
Simplified90.0%
Final simplification84.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (- (* x y) (* a (* c i))))))
(if (<= y -2.8e-60)
t_1
(if (<= y 2e-261)
(* 2.0 (- (* z t) (* c (* a i))))
(if (<= y 3.4e+166) (* 2.0 (- (* z t) (* c (* b (* c i))))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * ((x * y) - (a * (c * i)));
double tmp;
if (y <= -2.8e-60) {
tmp = t_1;
} else if (y <= 2e-261) {
tmp = 2.0 * ((z * t) - (c * (a * i)));
} else if (y <= 3.4e+166) {
tmp = 2.0 * ((z * t) - (c * (b * (c * i))));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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) :: t_1
real(8) :: tmp
t_1 = 2.0d0 * ((x * y) - (a * (c * i)))
if (y <= (-2.8d-60)) then
tmp = t_1
else if (y <= 2d-261) then
tmp = 2.0d0 * ((z * t) - (c * (a * i)))
else if (y <= 3.4d+166) then
tmp = 2.0d0 * ((z * t) - (c * (b * (c * i))))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * ((x * y) - (a * (c * i)));
double tmp;
if (y <= -2.8e-60) {
tmp = t_1;
} else if (y <= 2e-261) {
tmp = 2.0 * ((z * t) - (c * (a * i)));
} else if (y <= 3.4e+166) {
tmp = 2.0 * ((z * t) - (c * (b * (c * i))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * ((x * y) - (a * (c * i))) tmp = 0 if y <= -2.8e-60: tmp = t_1 elif y <= 2e-261: tmp = 2.0 * ((z * t) - (c * (a * i))) elif y <= 3.4e+166: tmp = 2.0 * ((z * t) - (c * (b * (c * i)))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(Float64(x * y) - Float64(a * Float64(c * i)))) tmp = 0.0 if (y <= -2.8e-60) tmp = t_1; elseif (y <= 2e-261) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(a * i)))); elseif (y <= 3.4e+166) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(b * Float64(c * i))))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 2.0 * ((x * y) - (a * (c * i))); tmp = 0.0; if (y <= -2.8e-60) tmp = t_1; elseif (y <= 2e-261) tmp = 2.0 * ((z * t) - (c * (a * i))); elseif (y <= 3.4e+166) tmp = 2.0 * ((z * t) - (c * (b * (c * i)))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.8e-60], t$95$1, If[LessEqual[y, 2e-261], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.4e+166], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(b * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(x \cdot y - a \cdot \left(c \cdot i\right)\right)\\
\mathbf{if}\;y \leq -2.8 \cdot 10^{-60}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2 \cdot 10^{-261}:\\
\;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(a \cdot i\right)\right)\\
\mathbf{elif}\;y \leq 3.4 \cdot 10^{+166}:\\
\;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.8000000000000002e-60 or 3.4e166 < y Initial program 86.5%
Taylor expanded in z around 0 75.5%
Taylor expanded in c around 0 68.1%
mul-1-neg68.1%
+-commutative68.1%
sub-neg68.1%
Simplified68.1%
if -2.8000000000000002e-60 < y < 1.99999999999999997e-261Initial program 94.4%
Taylor expanded in x around 0 84.8%
Taylor expanded in c around 0 73.6%
mul-1-neg73.6%
+-commutative73.6%
sub-neg73.6%
*-commutative73.6%
associate-*l*72.2%
Simplified72.2%
if 1.99999999999999997e-261 < y < 3.4e166Initial program 90.4%
Taylor expanded in x around 0 79.6%
Taylor expanded in a around 0 65.7%
Taylor expanded in i around 0 66.5%
Final simplification68.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* x y) (* z t))))
(if (<= a -4.7e+47)
(* 2.0 (- t_1 (* i (* a c))))
(if (<= a 1.7e+82)
(* 2.0 (- t_1 (* c (* b (* c i)))))
(* 2.0 (- (* z t) (* c (* (+ a (* b c)) i))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (x * y) + (z * t);
double tmp;
if (a <= -4.7e+47) {
tmp = 2.0 * (t_1 - (i * (a * c)));
} else if (a <= 1.7e+82) {
tmp = 2.0 * (t_1 - (c * (b * (c * i))));
} else {
tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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) :: t_1
real(8) :: tmp
t_1 = (x * y) + (z * t)
if (a <= (-4.7d+47)) then
tmp = 2.0d0 * (t_1 - (i * (a * c)))
else if (a <= 1.7d+82) then
tmp = 2.0d0 * (t_1 - (c * (b * (c * i))))
else
tmp = 2.0d0 * ((z * t) - (c * ((a + (b * c)) * i)))
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 t_1 = (x * y) + (z * t);
double tmp;
if (a <= -4.7e+47) {
tmp = 2.0 * (t_1 - (i * (a * c)));
} else if (a <= 1.7e+82) {
tmp = 2.0 * (t_1 - (c * (b * (c * i))));
} else {
tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (x * y) + (z * t) tmp = 0 if a <= -4.7e+47: tmp = 2.0 * (t_1 - (i * (a * c))) elif a <= 1.7e+82: tmp = 2.0 * (t_1 - (c * (b * (c * i)))) else: tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(x * y) + Float64(z * t)) tmp = 0.0 if (a <= -4.7e+47) tmp = Float64(2.0 * Float64(t_1 - Float64(i * Float64(a * c)))); elseif (a <= 1.7e+82) tmp = Float64(2.0 * Float64(t_1 - Float64(c * Float64(b * Float64(c * i))))); else tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(Float64(a + Float64(b * c)) * i)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (x * y) + (z * t); tmp = 0.0; if (a <= -4.7e+47) tmp = 2.0 * (t_1 - (i * (a * c))); elseif (a <= 1.7e+82) tmp = 2.0 * (t_1 - (c * (b * (c * i)))); else tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -4.7e+47], N[(2.0 * N[(t$95$1 - N[(i * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.7e+82], N[(2.0 * N[(t$95$1 - N[(c * N[(b * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot y + z \cdot t\\
\mathbf{if}\;a \leq -4.7 \cdot 10^{+47}:\\
\;\;\;\;2 \cdot \left(t\_1 - i \cdot \left(a \cdot c\right)\right)\\
\mathbf{elif}\;a \leq 1.7 \cdot 10^{+82}:\\
\;\;\;\;2 \cdot \left(t\_1 - c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\
\end{array}
\end{array}
if a < -4.69999999999999964e47Initial program 93.1%
Taylor expanded in a around inf 86.1%
*-commutative86.1%
Simplified86.1%
if -4.69999999999999964e47 < a < 1.69999999999999997e82Initial program 88.6%
Taylor expanded in c around 0 94.7%
Taylor expanded in a around 0 93.4%
if 1.69999999999999997e82 < a Initial program 91.8%
Taylor expanded in x around 0 87.7%
Final simplification90.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* c (* (+ a (* b c)) i))))
(if (<= c -4.8e-18)
(* 2.0 (- (* x y) t_1))
(if (<= c 62.0)
(* 2.0 (- (+ (* x y) (* z t)) (* i (* a c))))
(* 2.0 (- (* z t) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = c * ((a + (b * c)) * i);
double tmp;
if (c <= -4.8e-18) {
tmp = 2.0 * ((x * y) - t_1);
} else if (c <= 62.0) {
tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c)));
} else {
tmp = 2.0 * ((z * t) - t_1);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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) :: t_1
real(8) :: tmp
t_1 = c * ((a + (b * c)) * i)
if (c <= (-4.8d-18)) then
tmp = 2.0d0 * ((x * y) - t_1)
else if (c <= 62.0d0) then
tmp = 2.0d0 * (((x * y) + (z * t)) - (i * (a * c)))
else
tmp = 2.0d0 * ((z * t) - 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 t_1 = c * ((a + (b * c)) * i);
double tmp;
if (c <= -4.8e-18) {
tmp = 2.0 * ((x * y) - t_1);
} else if (c <= 62.0) {
tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c)));
} else {
tmp = 2.0 * ((z * t) - t_1);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = c * ((a + (b * c)) * i) tmp = 0 if c <= -4.8e-18: tmp = 2.0 * ((x * y) - t_1) elif c <= 62.0: tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c))) else: tmp = 2.0 * ((z * t) - t_1) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(c * Float64(Float64(a + Float64(b * c)) * i)) tmp = 0.0 if (c <= -4.8e-18) tmp = Float64(2.0 * Float64(Float64(x * y) - t_1)); elseif (c <= 62.0) tmp = Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(i * Float64(a * c)))); else tmp = Float64(2.0 * Float64(Float64(z * t) - t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = c * ((a + (b * c)) * i); tmp = 0.0; if (c <= -4.8e-18) tmp = 2.0 * ((x * y) - t_1); elseif (c <= 62.0) tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c))); else tmp = 2.0 * ((z * t) - t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -4.8e-18], N[(2.0 * N[(N[(x * y), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 62.0], N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(i * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(z * t), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\\
\mathbf{if}\;c \leq -4.8 \cdot 10^{-18}:\\
\;\;\;\;2 \cdot \left(x \cdot y - t\_1\right)\\
\mathbf{elif}\;c \leq 62:\\
\;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - i \cdot \left(a \cdot c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(z \cdot t - t\_1\right)\\
\end{array}
\end{array}
if c < -4.79999999999999988e-18Initial program 73.4%
Taylor expanded in z around 0 84.9%
if -4.79999999999999988e-18 < c < 62Initial program 98.6%
Taylor expanded in a around inf 95.5%
*-commutative95.5%
Simplified95.5%
if 62 < c Initial program 86.9%
Taylor expanded in x around 0 85.1%
Final simplification90.4%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (* x y) -3.4e+102) (not (<= (* x y) 7e+70))) (* (* x y) 2.0) (* 2.0 (* z t))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((x * y) <= -3.4e+102) || !((x * y) <= 7e+70)) {
tmp = (x * y) * 2.0;
} else {
tmp = 2.0 * (z * t);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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) :: tmp
if (((x * y) <= (-3.4d+102)) .or. (.not. ((x * y) <= 7d+70))) then
tmp = (x * y) * 2.0d0
else
tmp = 2.0d0 * (z * t)
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 tmp;
if (((x * y) <= -3.4e+102) || !((x * y) <= 7e+70)) {
tmp = (x * y) * 2.0;
} else {
tmp = 2.0 * (z * t);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((x * y) <= -3.4e+102) or not ((x * y) <= 7e+70): tmp = (x * y) * 2.0 else: tmp = 2.0 * (z * t) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(x * y) <= -3.4e+102) || !(Float64(x * y) <= 7e+70)) tmp = Float64(Float64(x * y) * 2.0); else tmp = Float64(2.0 * Float64(z * t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (((x * y) <= -3.4e+102) || ~(((x * y) <= 7e+70))) tmp = (x * y) * 2.0; else tmp = 2.0 * (z * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(x * y), $MachinePrecision], -3.4e+102], N[Not[LessEqual[N[(x * y), $MachinePrecision], 7e+70]], $MachinePrecision]], N[(N[(x * y), $MachinePrecision] * 2.0), $MachinePrecision], N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -3.4 \cdot 10^{+102} \lor \neg \left(x \cdot y \leq 7 \cdot 10^{+70}\right):\\
\;\;\;\;\left(x \cdot y\right) \cdot 2\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(z \cdot t\right)\\
\end{array}
\end{array}
if (*.f64 x y) < -3.4e102 or 7.00000000000000005e70 < (*.f64 x y) Initial program 82.2%
Taylor expanded in x around inf 61.9%
if -3.4e102 < (*.f64 x y) < 7.00000000000000005e70Initial program 93.7%
Taylor expanded in z around inf 43.8%
Final simplification49.3%
(FPCore (x y z t a b c i) :precision binary64 (* 2.0 (* z t)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (z * t);
}
real(8) function code(x, y, z, t, a, b, c, i)
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
code = 2.0d0 * (z * t)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (z * t);
}
def code(x, y, z, t, a, b, c, i): return 2.0 * (z * t)
function code(x, y, z, t, a, b, c, i) return Float64(2.0 * Float64(z * t)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = 2.0 * (z * t); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(z \cdot t\right)
\end{array}
Initial program 90.2%
Taylor expanded in z around inf 34.7%
Final simplification34.7%
(FPCore (x y z t a b c i) :precision binary64 (* 2.0 (- (+ (* x y) (* z t)) (* (+ a (* b c)) (* c i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - ((a + (b * c)) * (c * i)));
}
real(8) function code(x, y, z, t, a, b, c, i)
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
code = 2.0d0 * (((x * y) + (z * t)) - ((a + (b * c)) * (c * i)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - ((a + (b * c)) * (c * i)));
}
def code(x, y, z, t, a, b, c, i): return 2.0 * (((x * y) + (z * t)) - ((a + (b * c)) * (c * i)))
function code(x, y, z, t, a, b, c, i) return Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(Float64(a + Float64(b * c)) * Float64(c * i)))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = 2.0 * (((x * y) + (z * t)) - ((a + (b * c)) * (c * i))); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(a + b \cdot c\right) \cdot \left(c \cdot i\right)\right)
\end{array}
herbie shell --seed 2024067
(FPCore (x y z t a b c i)
:name "Diagrams.ThreeD.Shapes:frustum from diagrams-lib-1.3.0.3, A"
:precision binary64
:alt
(* 2.0 (- (+ (* x y) (* z t)) (* (+ a (* b c)) (* c i))))
(* 2.0 (- (+ (* x y) (* z t)) (* (* (+ a (* b c)) c) i))))