
(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 19 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 (fma y x (* c (* a (- 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 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 * fma(y, x, (c * (a * -i)));
}
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 * fma(y, x, Float64(c * Float64(a * Float64(-i))))); 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 * x + N[(c * N[(a * (-i)), $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 \mathsf{fma}\left(y, x, c \cdot \left(a \cdot \left(-i\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 92.0%
associate-*l*97.6%
fma-def97.6%
Simplified97.6%
if +inf.0 < (-.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)) Initial program 0.0%
associate--l+0.0%
*-commutative0.0%
fma-def18.8%
*-commutative18.8%
+-commutative18.8%
fma-udef18.8%
associate-*r*25.0%
Applied egg-rr25.0%
Taylor expanded in a around inf 68.8%
*-commutative68.8%
associate-*r*68.8%
neg-mul-168.8%
distribute-rgt-neg-in68.8%
associate-*l*62.8%
Simplified62.8%
Final simplification95.4%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= i -3.3e-107) (not (<= i 6.2e-57))) (* (- (+ (* x y) (* z t)) (* (* c (+ a (* b c))) i)) 2.0) (* 2.0 (- (fma x y (* z t)) (* c (* b (* c i)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((i <= -3.3e-107) || !(i <= 6.2e-57)) {
tmp = (((x * y) + (z * t)) - ((c * (a + (b * c))) * i)) * 2.0;
} else {
tmp = 2.0 * (fma(x, y, (z * t)) - (c * (b * (c * i))));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((i <= -3.3e-107) || !(i <= 6.2e-57)) tmp = Float64(Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(Float64(c * Float64(a + Float64(b * c))) * i)) * 2.0); else tmp = Float64(2.0 * Float64(fma(x, y, Float64(z * t)) - Float64(c * Float64(b * Float64(c * i))))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[i, -3.3e-107], N[Not[LessEqual[i, 6.2e-57]], $MachinePrecision]], N[(N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(c * N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision], N[(2.0 * N[(N[(x * y + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(c * N[(b * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;i \leq -3.3 \cdot 10^{-107} \lor \neg \left(i \leq 6.2 \cdot 10^{-57}\right):\\
\;\;\;\;\left(\left(x \cdot y + z \cdot t\right) - \left(c \cdot \left(a + b \cdot c\right)\right) \cdot i\right) \cdot 2\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\mathsf{fma}\left(x, y, z \cdot t\right) - c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\
\end{array}
\end{array}
if i < -3.30000000000000004e-107 or 6.19999999999999952e-57 < i Initial program 91.9%
if -3.30000000000000004e-107 < i < 6.19999999999999952e-57Initial program 78.6%
fma-def80.4%
*-commutative80.4%
associate-*l*92.8%
+-commutative92.8%
fma-def92.8%
Simplified92.8%
Taylor expanded in b around inf 94.0%
Final simplification92.8%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= i -5.2e-104) (not (<= i 8e-57))) (* (- (+ (* x y) (* z t)) (* (* c (+ a (* b c))) i)) 2.0) (* 2.0 (fma y x (- (* z t) (* c (* b (* c i))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((i <= -5.2e-104) || !(i <= 8e-57)) {
tmp = (((x * y) + (z * t)) - ((c * (a + (b * c))) * i)) * 2.0;
} else {
tmp = 2.0 * fma(y, x, ((z * t) - (c * (b * (c * i)))));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((i <= -5.2e-104) || !(i <= 8e-57)) tmp = Float64(Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(Float64(c * Float64(a + Float64(b * c))) * i)) * 2.0); else tmp = Float64(2.0 * fma(y, x, Float64(Float64(z * t) - Float64(c * Float64(b * Float64(c * i)))))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[i, -5.2e-104], N[Not[LessEqual[i, 8e-57]], $MachinePrecision]], N[(N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(c * N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision], N[(2.0 * N[(y * x + N[(N[(z * t), $MachinePrecision] - N[(c * N[(b * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;i \leq -5.2 \cdot 10^{-104} \lor \neg \left(i \leq 8 \cdot 10^{-57}\right):\\
\;\;\;\;\left(\left(x \cdot y + z \cdot t\right) - \left(c \cdot \left(a + b \cdot c\right)\right) \cdot i\right) \cdot 2\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \mathsf{fma}\left(y, x, z \cdot t - c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\
\end{array}
\end{array}
if i < -5.20000000000000005e-104 or 7.99999999999999964e-57 < i Initial program 91.9%
if -5.20000000000000005e-104 < i < 7.99999999999999964e-57Initial program 78.6%
associate--l+78.6%
*-commutative78.6%
fma-def80.4%
*-commutative80.4%
+-commutative80.4%
fma-udef80.4%
associate-*r*92.8%
Applied egg-rr92.8%
Taylor expanded in b around inf 94.0%
Final simplification92.8%
(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))
(* b (* (* c (* c i)) -2.0))
(if (<= t_2 INFINITY)
(* (- (+ (* x y) (* z t)) (* t_2 i)) 2.0)
(* -2.0 (* 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 = b * ((c * (c * i)) * -2.0);
} else if (t_2 <= ((double) INFINITY)) {
tmp = (((x * y) + (z * t)) - (t_2 * i)) * 2.0;
} else {
tmp = -2.0 * (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 = b * ((c * (c * i)) * -2.0);
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = (((x * y) + (z * t)) - (t_2 * i)) * 2.0;
} else {
tmp = -2.0 * (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 = b * ((c * (c * i)) * -2.0) elif t_2 <= math.inf: tmp = (((x * y) + (z * t)) - (t_2 * i)) * 2.0 else: tmp = -2.0 * (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(b * Float64(Float64(c * Float64(c * i)) * -2.0)); elseif (t_2 <= Inf) tmp = Float64(Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(t_2 * i)) * 2.0); else tmp = Float64(-2.0 * 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 = b * ((c * (c * i)) * -2.0); elseif (t_2 <= Inf) tmp = (((x * y) + (z * t)) - (t_2 * i)) * 2.0; else tmp = -2.0 * (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[(b * N[(N[(c * N[(c * i), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], 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[(c * N[(t$95$1 * i), $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:\\
\;\;\;\;b \cdot \left(\left(c \cdot \left(c \cdot i\right)\right) \cdot -2\right)\\
\mathbf{elif}\;t_2 \leq \infty:\\
\;\;\;\;\left(\left(x \cdot y + z \cdot t\right) - t_2 \cdot i\right) \cdot 2\\
\mathbf{else}:\\
\;\;\;\;-2 \cdot \left(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.2%
Taylor expanded in b around inf 78.8%
mul-1-neg78.8%
distribute-rgt-neg-in78.8%
unpow278.8%
associate-*r*82.3%
Simplified82.3%
Taylor expanded in b around 0 78.8%
*-commutative78.8%
unpow278.8%
associate-*l*78.8%
associate-*l*82.3%
Simplified82.3%
if -inf.0 < (*.f64 (+.f64 a (*.f64 b c)) c) < +inf.0Initial program 90.7%
if +inf.0 < (*.f64 (+.f64 a (*.f64 b c)) c) Initial program 86.3%
Taylor expanded in i around inf 48.8%
Taylor expanded in i around 0 48.8%
Final simplification89.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* -2.0 (* c (* a i))))
(t_2 (* 2.0 (* z t)))
(t_3 (* (* x y) 2.0)))
(if (<= (* x y) -1e+103)
t_3
(if (<= (* x y) -20.0)
t_1
(if (<= (* x y) -5e-103)
t_2
(if (<= (* x y) -1e-319)
t_1
(if (<= (* x y) 3.2e-202) t_2 (if (<= (* x y) 1e+25) t_1 t_3))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = -2.0 * (c * (a * i));
double t_2 = 2.0 * (z * t);
double t_3 = (x * y) * 2.0;
double tmp;
if ((x * y) <= -1e+103) {
tmp = t_3;
} else if ((x * y) <= -20.0) {
tmp = t_1;
} else if ((x * y) <= -5e-103) {
tmp = t_2;
} else if ((x * y) <= -1e-319) {
tmp = t_1;
} else if ((x * y) <= 3.2e-202) {
tmp = t_2;
} else if ((x * y) <= 1e+25) {
tmp = t_1;
} else {
tmp = t_3;
}
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) * (c * (a * i))
t_2 = 2.0d0 * (z * t)
t_3 = (x * y) * 2.0d0
if ((x * y) <= (-1d+103)) then
tmp = t_3
else if ((x * y) <= (-20.0d0)) then
tmp = t_1
else if ((x * y) <= (-5d-103)) then
tmp = t_2
else if ((x * y) <= (-1d-319)) then
tmp = t_1
else if ((x * y) <= 3.2d-202) then
tmp = t_2
else if ((x * y) <= 1d+25) then
tmp = t_1
else
tmp = t_3
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 * (c * (a * i));
double t_2 = 2.0 * (z * t);
double t_3 = (x * y) * 2.0;
double tmp;
if ((x * y) <= -1e+103) {
tmp = t_3;
} else if ((x * y) <= -20.0) {
tmp = t_1;
} else if ((x * y) <= -5e-103) {
tmp = t_2;
} else if ((x * y) <= -1e-319) {
tmp = t_1;
} else if ((x * y) <= 3.2e-202) {
tmp = t_2;
} else if ((x * y) <= 1e+25) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = -2.0 * (c * (a * i)) t_2 = 2.0 * (z * t) t_3 = (x * y) * 2.0 tmp = 0 if (x * y) <= -1e+103: tmp = t_3 elif (x * y) <= -20.0: tmp = t_1 elif (x * y) <= -5e-103: tmp = t_2 elif (x * y) <= -1e-319: tmp = t_1 elif (x * y) <= 3.2e-202: tmp = t_2 elif (x * y) <= 1e+25: tmp = t_1 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(-2.0 * Float64(c * Float64(a * i))) t_2 = Float64(2.0 * Float64(z * t)) t_3 = Float64(Float64(x * y) * 2.0) tmp = 0.0 if (Float64(x * y) <= -1e+103) tmp = t_3; elseif (Float64(x * y) <= -20.0) tmp = t_1; elseif (Float64(x * y) <= -5e-103) tmp = t_2; elseif (Float64(x * y) <= -1e-319) tmp = t_1; elseif (Float64(x * y) <= 3.2e-202) tmp = t_2; elseif (Float64(x * y) <= 1e+25) tmp = t_1; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = -2.0 * (c * (a * i)); t_2 = 2.0 * (z * t); t_3 = (x * y) * 2.0; tmp = 0.0; if ((x * y) <= -1e+103) tmp = t_3; elseif ((x * y) <= -20.0) tmp = t_1; elseif ((x * y) <= -5e-103) tmp = t_2; elseif ((x * y) <= -1e-319) tmp = t_1; elseif ((x * y) <= 3.2e-202) tmp = t_2; elseif ((x * y) <= 1e+25) tmp = t_1; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(-2.0 * N[(c * N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * y), $MachinePrecision] * 2.0), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -1e+103], t$95$3, If[LessEqual[N[(x * y), $MachinePrecision], -20.0], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], -5e-103], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], -1e-319], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 3.2e-202], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], 1e+25], t$95$1, t$95$3]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -2 \cdot \left(c \cdot \left(a \cdot i\right)\right)\\
t_2 := 2 \cdot \left(z \cdot t\right)\\
t_3 := \left(x \cdot y\right) \cdot 2\\
\mathbf{if}\;x \cdot y \leq -1 \cdot 10^{+103}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \cdot y \leq -20:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \cdot y \leq -5 \cdot 10^{-103}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \cdot y \leq -1 \cdot 10^{-319}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \cdot y \leq 3.2 \cdot 10^{-202}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \cdot y \leq 10^{+25}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if (*.f64 x y) < -1e103 or 1.00000000000000009e25 < (*.f64 x y) Initial program 83.6%
Taylor expanded in x around inf 54.9%
if -1e103 < (*.f64 x y) < -20 or -4.99999999999999966e-103 < (*.f64 x y) < -9.99989e-320 or 3.2000000000000001e-202 < (*.f64 x y) < 1.00000000000000009e25Initial program 90.5%
Taylor expanded in i around inf 64.7%
Taylor expanded in c around 0 39.3%
*-commutative39.3%
associate-*l*36.2%
Simplified36.2%
if -20 < (*.f64 x y) < -4.99999999999999966e-103 or -9.99989e-320 < (*.f64 x y) < 3.2000000000000001e-202Initial program 84.6%
Taylor expanded in z around inf 42.5%
Final simplification45.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* -2.0 (* i (* a c))))
(t_2 (* 2.0 (* z t)))
(t_3 (* (* x y) 2.0)))
(if (<= (* x y) -1e+103)
t_3
(if (<= (* x y) -20.0)
(* -2.0 (* c (* a i)))
(if (<= (* x y) -5e-103)
t_2
(if (<= (* x y) -1e-319)
t_1
(if (<= (* x y) 3.2e-202) t_2 (if (<= (* x y) 5e+66) t_1 t_3))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = -2.0 * (i * (a * c));
double t_2 = 2.0 * (z * t);
double t_3 = (x * y) * 2.0;
double tmp;
if ((x * y) <= -1e+103) {
tmp = t_3;
} else if ((x * y) <= -20.0) {
tmp = -2.0 * (c * (a * i));
} else if ((x * y) <= -5e-103) {
tmp = t_2;
} else if ((x * y) <= -1e-319) {
tmp = t_1;
} else if ((x * y) <= 3.2e-202) {
tmp = t_2;
} else if ((x * y) <= 5e+66) {
tmp = t_1;
} else {
tmp = t_3;
}
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) * (i * (a * c))
t_2 = 2.0d0 * (z * t)
t_3 = (x * y) * 2.0d0
if ((x * y) <= (-1d+103)) then
tmp = t_3
else if ((x * y) <= (-20.0d0)) then
tmp = (-2.0d0) * (c * (a * i))
else if ((x * y) <= (-5d-103)) then
tmp = t_2
else if ((x * y) <= (-1d-319)) then
tmp = t_1
else if ((x * y) <= 3.2d-202) then
tmp = t_2
else if ((x * y) <= 5d+66) then
tmp = t_1
else
tmp = t_3
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 * (i * (a * c));
double t_2 = 2.0 * (z * t);
double t_3 = (x * y) * 2.0;
double tmp;
if ((x * y) <= -1e+103) {
tmp = t_3;
} else if ((x * y) <= -20.0) {
tmp = -2.0 * (c * (a * i));
} else if ((x * y) <= -5e-103) {
tmp = t_2;
} else if ((x * y) <= -1e-319) {
tmp = t_1;
} else if ((x * y) <= 3.2e-202) {
tmp = t_2;
} else if ((x * y) <= 5e+66) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = -2.0 * (i * (a * c)) t_2 = 2.0 * (z * t) t_3 = (x * y) * 2.0 tmp = 0 if (x * y) <= -1e+103: tmp = t_3 elif (x * y) <= -20.0: tmp = -2.0 * (c * (a * i)) elif (x * y) <= -5e-103: tmp = t_2 elif (x * y) <= -1e-319: tmp = t_1 elif (x * y) <= 3.2e-202: tmp = t_2 elif (x * y) <= 5e+66: tmp = t_1 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(-2.0 * Float64(i * Float64(a * c))) t_2 = Float64(2.0 * Float64(z * t)) t_3 = Float64(Float64(x * y) * 2.0) tmp = 0.0 if (Float64(x * y) <= -1e+103) tmp = t_3; elseif (Float64(x * y) <= -20.0) tmp = Float64(-2.0 * Float64(c * Float64(a * i))); elseif (Float64(x * y) <= -5e-103) tmp = t_2; elseif (Float64(x * y) <= -1e-319) tmp = t_1; elseif (Float64(x * y) <= 3.2e-202) tmp = t_2; elseif (Float64(x * y) <= 5e+66) tmp = t_1; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = -2.0 * (i * (a * c)); t_2 = 2.0 * (z * t); t_3 = (x * y) * 2.0; tmp = 0.0; if ((x * y) <= -1e+103) tmp = t_3; elseif ((x * y) <= -20.0) tmp = -2.0 * (c * (a * i)); elseif ((x * y) <= -5e-103) tmp = t_2; elseif ((x * y) <= -1e-319) tmp = t_1; elseif ((x * y) <= 3.2e-202) tmp = t_2; elseif ((x * y) <= 5e+66) tmp = t_1; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(-2.0 * N[(i * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * y), $MachinePrecision] * 2.0), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -1e+103], t$95$3, If[LessEqual[N[(x * y), $MachinePrecision], -20.0], N[(-2.0 * N[(c * N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -5e-103], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], -1e-319], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 3.2e-202], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], 5e+66], t$95$1, t$95$3]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -2 \cdot \left(i \cdot \left(a \cdot c\right)\right)\\
t_2 := 2 \cdot \left(z \cdot t\right)\\
t_3 := \left(x \cdot y\right) \cdot 2\\
\mathbf{if}\;x \cdot y \leq -1 \cdot 10^{+103}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \cdot y \leq -20:\\
\;\;\;\;-2 \cdot \left(c \cdot \left(a \cdot i\right)\right)\\
\mathbf{elif}\;x \cdot y \leq -5 \cdot 10^{-103}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \cdot y \leq -1 \cdot 10^{-319}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \cdot y \leq 3.2 \cdot 10^{-202}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{+66}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if (*.f64 x y) < -1e103 or 4.99999999999999991e66 < (*.f64 x y) Initial program 82.5%
Taylor expanded in x around inf 57.4%
if -1e103 < (*.f64 x y) < -20Initial program 86.2%
Taylor expanded in i around inf 49.2%
Taylor expanded in c around 0 49.2%
*-commutative49.2%
associate-*l*49.2%
Simplified49.2%
if -20 < (*.f64 x y) < -4.99999999999999966e-103 or -9.99989e-320 < (*.f64 x y) < 3.2000000000000001e-202Initial program 84.6%
Taylor expanded in z around inf 42.5%
if -4.99999999999999966e-103 < (*.f64 x y) < -9.99989e-320 or 3.2000000000000001e-202 < (*.f64 x y) < 4.99999999999999991e66Initial program 92.5%
Taylor expanded in i around inf 65.8%
Taylor expanded in c around 0 35.8%
associate-*r*32.2%
Simplified32.2%
Final simplification45.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (- (* x y) (* a (* c i))))))
(if (<= (* x y) -5e+244)
t_1
(if (<= (* x y) -1e+181)
(* 2.0 (- (* z t) (* c (* c (* b i)))))
(if (<= (* x y) -5e+99)
t_1
(if (<= (* x y) 5e+31)
(* 2.0 (- (* z t) (* c (* (+ a (* b c)) i))))
(* (+ (* x y) (* z t)) 2.0)))))))
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 ((x * y) <= -5e+244) {
tmp = t_1;
} else if ((x * y) <= -1e+181) {
tmp = 2.0 * ((z * t) - (c * (c * (b * i))));
} else if ((x * y) <= -5e+99) {
tmp = t_1;
} else if ((x * y) <= 5e+31) {
tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i)));
} else {
tmp = ((x * y) + (z * t)) * 2.0;
}
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 ((x * y) <= (-5d+244)) then
tmp = t_1
else if ((x * y) <= (-1d+181)) then
tmp = 2.0d0 * ((z * t) - (c * (c * (b * i))))
else if ((x * y) <= (-5d+99)) then
tmp = t_1
else if ((x * y) <= 5d+31) then
tmp = 2.0d0 * ((z * t) - (c * ((a + (b * c)) * i)))
else
tmp = ((x * y) + (z * t)) * 2.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 t_1 = 2.0 * ((x * y) - (a * (c * i)));
double tmp;
if ((x * y) <= -5e+244) {
tmp = t_1;
} else if ((x * y) <= -1e+181) {
tmp = 2.0 * ((z * t) - (c * (c * (b * i))));
} else if ((x * y) <= -5e+99) {
tmp = t_1;
} else if ((x * y) <= 5e+31) {
tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i)));
} else {
tmp = ((x * y) + (z * t)) * 2.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * ((x * y) - (a * (c * i))) tmp = 0 if (x * y) <= -5e+244: tmp = t_1 elif (x * y) <= -1e+181: tmp = 2.0 * ((z * t) - (c * (c * (b * i)))) elif (x * y) <= -5e+99: tmp = t_1 elif (x * y) <= 5e+31: tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i))) else: tmp = ((x * y) + (z * t)) * 2.0 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 (Float64(x * y) <= -5e+244) tmp = t_1; elseif (Float64(x * y) <= -1e+181) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(c * Float64(b * i))))); elseif (Float64(x * y) <= -5e+99) tmp = t_1; elseif (Float64(x * y) <= 5e+31) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(Float64(a + Float64(b * c)) * i)))); else tmp = Float64(Float64(Float64(x * y) + Float64(z * t)) * 2.0); 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 ((x * y) <= -5e+244) tmp = t_1; elseif ((x * y) <= -1e+181) tmp = 2.0 * ((z * t) - (c * (c * (b * i)))); elseif ((x * y) <= -5e+99) tmp = t_1; elseif ((x * y) <= 5e+31) tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i))); else tmp = ((x * y) + (z * t)) * 2.0; 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[N[(x * y), $MachinePrecision], -5e+244], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], -1e+181], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(c * N[(b * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -5e+99], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 5e+31], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(x \cdot y - a \cdot \left(c \cdot i\right)\right)\\
\mathbf{if}\;x \cdot y \leq -5 \cdot 10^{+244}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \cdot y \leq -1 \cdot 10^{+181}:\\
\;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\
\mathbf{elif}\;x \cdot y \leq -5 \cdot 10^{+99}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{+31}:\\
\;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\
\end{array}
\end{array}
if (*.f64 x y) < -5.00000000000000022e244 or -9.9999999999999992e180 < (*.f64 x y) < -5.00000000000000008e99Initial program 87.4%
Taylor expanded in a around inf 90.7%
Taylor expanded in z around 0 94.0%
if -5.00000000000000022e244 < (*.f64 x y) < -9.9999999999999992e180Initial program 68.3%
Taylor expanded in x around 0 68.3%
Taylor expanded in a around 0 87.0%
associate-*r*68.5%
*-commutative68.5%
associate-*r*87.2%
Simplified87.2%
if -5.00000000000000008e99 < (*.f64 x y) < 5.00000000000000027e31Initial program 88.8%
Taylor expanded in x around 0 85.3%
if 5.00000000000000027e31 < (*.f64 x y) Initial program 82.6%
Taylor expanded in c around 0 72.2%
Final simplification83.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* -2.0 (* c (* (* b c) i)))) (t_2 (* (* x y) 2.0)))
(if (<= (* x y) -5e+104)
t_2
(if (<= (* x y) -20.0)
(* (* c i) (* a -2.0))
(if (<= (* x y) -4e-283)
t_1
(if (<= (* x y) 1e-209)
(* 2.0 (* z t))
(if (<= (* x y) 5e+31) 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 * (c * ((b * c) * i));
double t_2 = (x * y) * 2.0;
double tmp;
if ((x * y) <= -5e+104) {
tmp = t_2;
} else if ((x * y) <= -20.0) {
tmp = (c * i) * (a * -2.0);
} else if ((x * y) <= -4e-283) {
tmp = t_1;
} else if ((x * y) <= 1e-209) {
tmp = 2.0 * (z * t);
} else if ((x * y) <= 5e+31) {
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) * (c * ((b * c) * i))
t_2 = (x * y) * 2.0d0
if ((x * y) <= (-5d+104)) then
tmp = t_2
else if ((x * y) <= (-20.0d0)) then
tmp = (c * i) * (a * (-2.0d0))
else if ((x * y) <= (-4d-283)) then
tmp = t_1
else if ((x * y) <= 1d-209) then
tmp = 2.0d0 * (z * t)
else if ((x * y) <= 5d+31) 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 * (c * ((b * c) * i));
double t_2 = (x * y) * 2.0;
double tmp;
if ((x * y) <= -5e+104) {
tmp = t_2;
} else if ((x * y) <= -20.0) {
tmp = (c * i) * (a * -2.0);
} else if ((x * y) <= -4e-283) {
tmp = t_1;
} else if ((x * y) <= 1e-209) {
tmp = 2.0 * (z * t);
} else if ((x * y) <= 5e+31) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = -2.0 * (c * ((b * c) * i)) t_2 = (x * y) * 2.0 tmp = 0 if (x * y) <= -5e+104: tmp = t_2 elif (x * y) <= -20.0: tmp = (c * i) * (a * -2.0) elif (x * y) <= -4e-283: tmp = t_1 elif (x * y) <= 1e-209: tmp = 2.0 * (z * t) elif (x * y) <= 5e+31: 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(c * Float64(Float64(b * c) * i))) t_2 = Float64(Float64(x * y) * 2.0) tmp = 0.0 if (Float64(x * y) <= -5e+104) tmp = t_2; elseif (Float64(x * y) <= -20.0) tmp = Float64(Float64(c * i) * Float64(a * -2.0)); elseif (Float64(x * y) <= -4e-283) tmp = t_1; elseif (Float64(x * y) <= 1e-209) tmp = Float64(2.0 * Float64(z * t)); elseif (Float64(x * y) <= 5e+31) 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 * (c * ((b * c) * i)); t_2 = (x * y) * 2.0; tmp = 0.0; if ((x * y) <= -5e+104) tmp = t_2; elseif ((x * y) <= -20.0) tmp = (c * i) * (a * -2.0); elseif ((x * y) <= -4e-283) tmp = t_1; elseif ((x * y) <= 1e-209) tmp = 2.0 * (z * t); elseif ((x * y) <= 5e+31) 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[(c * N[(N[(b * c), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y), $MachinePrecision] * 2.0), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -5e+104], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], -20.0], N[(N[(c * i), $MachinePrecision] * N[(a * -2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -4e-283], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 1e-209], N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 5e+31], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -2 \cdot \left(c \cdot \left(\left(b \cdot c\right) \cdot i\right)\right)\\
t_2 := \left(x \cdot y\right) \cdot 2\\
\mathbf{if}\;x \cdot y \leq -5 \cdot 10^{+104}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \cdot y \leq -20:\\
\;\;\;\;\left(c \cdot i\right) \cdot \left(a \cdot -2\right)\\
\mathbf{elif}\;x \cdot y \leq -4 \cdot 10^{-283}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \cdot y \leq 10^{-209}:\\
\;\;\;\;2 \cdot \left(z \cdot t\right)\\
\mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{+31}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if (*.f64 x y) < -4.9999999999999997e104 or 5.00000000000000027e31 < (*.f64 x y) Initial program 83.3%
Taylor expanded in x around inf 55.8%
if -4.9999999999999997e104 < (*.f64 x y) < -20Initial program 86.8%
Taylor expanded in a around inf 51.5%
Taylor expanded in a around 0 51.5%
*-commutative51.5%
*-commutative51.5%
associate-*l*51.5%
Simplified51.5%
if -20 < (*.f64 x y) < -3.99999999999999979e-283 or 1e-209 < (*.f64 x y) < 5.00000000000000027e31Initial program 93.0%
Taylor expanded in i around inf 70.6%
Taylor expanded in a around 0 54.8%
Taylor expanded in c around 0 49.8%
unpow249.8%
associate-*r*54.9%
associate-*r*54.9%
*-commutative54.9%
associate-*l*53.7%
Simplified53.7%
if -3.99999999999999979e-283 < (*.f64 x y) < 1e-209Initial program 80.6%
Taylor expanded in z around inf 46.3%
Final simplification53.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* x y) (* z t))))
(if (<= (* x y) -1000.0)
(* 2.0 (- t_1 (* a (* c i))))
(if (<= (* x y) 1e-96)
(* 2.0 (- (* z t) (* c (* (+ a (* b c)) i))))
(* 2.0 (- t_1 (* b (* c (* 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 ((x * y) <= -1000.0) {
tmp = 2.0 * (t_1 - (a * (c * i)));
} else if ((x * y) <= 1e-96) {
tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i)));
} else {
tmp = 2.0 * (t_1 - (b * (c * (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 ((x * y) <= (-1000.0d0)) then
tmp = 2.0d0 * (t_1 - (a * (c * i)))
else if ((x * y) <= 1d-96) then
tmp = 2.0d0 * ((z * t) - (c * ((a + (b * c)) * i)))
else
tmp = 2.0d0 * (t_1 - (b * (c * (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 ((x * y) <= -1000.0) {
tmp = 2.0 * (t_1 - (a * (c * i)));
} else if ((x * y) <= 1e-96) {
tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i)));
} else {
tmp = 2.0 * (t_1 - (b * (c * (c * i))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (x * y) + (z * t) tmp = 0 if (x * y) <= -1000.0: tmp = 2.0 * (t_1 - (a * (c * i))) elif (x * y) <= 1e-96: tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i))) else: tmp = 2.0 * (t_1 - (b * (c * (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 (Float64(x * y) <= -1000.0) tmp = Float64(2.0 * Float64(t_1 - Float64(a * Float64(c * i)))); elseif (Float64(x * y) <= 1e-96) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(Float64(a + Float64(b * c)) * i)))); else tmp = Float64(2.0 * Float64(t_1 - Float64(b * Float64(c * Float64(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 ((x * y) <= -1000.0) tmp = 2.0 * (t_1 - (a * (c * i))); elseif ((x * y) <= 1e-96) tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i))); else tmp = 2.0 * (t_1 - (b * (c * (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[N[(x * y), $MachinePrecision], -1000.0], N[(2.0 * N[(t$95$1 - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 1e-96], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(t$95$1 - N[(b * N[(c * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot y + z \cdot t\\
\mathbf{if}\;x \cdot y \leq -1000:\\
\;\;\;\;2 \cdot \left(t_1 - a \cdot \left(c \cdot i\right)\right)\\
\mathbf{elif}\;x \cdot y \leq 10^{-96}:\\
\;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(t_1 - b \cdot \left(c \cdot \left(c \cdot i\right)\right)\right)\\
\end{array}
\end{array}
if (*.f64 x y) < -1e3Initial program 85.1%
Taylor expanded in a around inf 86.7%
if -1e3 < (*.f64 x y) < 9.9999999999999991e-97Initial program 88.0%
Taylor expanded in x around 0 88.3%
if 9.9999999999999991e-97 < (*.f64 x y) Initial program 85.0%
Taylor expanded in a around 0 76.3%
unpow276.3%
associate-*r*82.5%
Simplified82.5%
Final simplification85.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (* c i) (* a -2.0))) (t_2 (* (* x y) 2.0)))
(if (<= (* x y) -5e+104)
t_2
(if (<= (* x y) -20.0)
t_1
(if (<= (* x y) 3.2e-202)
(* 2.0 (* z t))
(if (<= (* x y) 5e+66) 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 = (c * i) * (a * -2.0);
double t_2 = (x * y) * 2.0;
double tmp;
if ((x * y) <= -5e+104) {
tmp = t_2;
} else if ((x * y) <= -20.0) {
tmp = t_1;
} else if ((x * y) <= 3.2e-202) {
tmp = 2.0 * (z * t);
} else if ((x * y) <= 5e+66) {
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 = (c * i) * (a * (-2.0d0))
t_2 = (x * y) * 2.0d0
if ((x * y) <= (-5d+104)) then
tmp = t_2
else if ((x * y) <= (-20.0d0)) then
tmp = t_1
else if ((x * y) <= 3.2d-202) then
tmp = 2.0d0 * (z * t)
else if ((x * y) <= 5d+66) 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 = (c * i) * (a * -2.0);
double t_2 = (x * y) * 2.0;
double tmp;
if ((x * y) <= -5e+104) {
tmp = t_2;
} else if ((x * y) <= -20.0) {
tmp = t_1;
} else if ((x * y) <= 3.2e-202) {
tmp = 2.0 * (z * t);
} else if ((x * y) <= 5e+66) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (c * i) * (a * -2.0) t_2 = (x * y) * 2.0 tmp = 0 if (x * y) <= -5e+104: tmp = t_2 elif (x * y) <= -20.0: tmp = t_1 elif (x * y) <= 3.2e-202: tmp = 2.0 * (z * t) elif (x * y) <= 5e+66: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(c * i) * Float64(a * -2.0)) t_2 = Float64(Float64(x * y) * 2.0) tmp = 0.0 if (Float64(x * y) <= -5e+104) tmp = t_2; elseif (Float64(x * y) <= -20.0) tmp = t_1; elseif (Float64(x * y) <= 3.2e-202) tmp = Float64(2.0 * Float64(z * t)); elseif (Float64(x * y) <= 5e+66) 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 = (c * i) * (a * -2.0); t_2 = (x * y) * 2.0; tmp = 0.0; if ((x * y) <= -5e+104) tmp = t_2; elseif ((x * y) <= -20.0) tmp = t_1; elseif ((x * y) <= 3.2e-202) tmp = 2.0 * (z * t); elseif ((x * y) <= 5e+66) 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[(N[(c * i), $MachinePrecision] * N[(a * -2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y), $MachinePrecision] * 2.0), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -5e+104], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], -20.0], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 3.2e-202], N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 5e+66], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(c \cdot i\right) \cdot \left(a \cdot -2\right)\\
t_2 := \left(x \cdot y\right) \cdot 2\\
\mathbf{if}\;x \cdot y \leq -5 \cdot 10^{+104}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \cdot y \leq -20:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \cdot y \leq 3.2 \cdot 10^{-202}:\\
\;\;\;\;2 \cdot \left(z \cdot t\right)\\
\mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{+66}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if (*.f64 x y) < -4.9999999999999997e104 or 4.99999999999999991e66 < (*.f64 x y) Initial program 82.3%
Taylor expanded in x around inf 57.9%
if -4.9999999999999997e104 < (*.f64 x y) < -20 or 3.2000000000000001e-202 < (*.f64 x y) < 4.99999999999999991e66Initial program 93.1%
Taylor expanded in a around inf 42.6%
Taylor expanded in a around 0 42.6%
*-commutative42.6%
*-commutative42.6%
associate-*l*42.6%
Simplified42.6%
if -20 < (*.f64 x y) < 3.2000000000000001e-202Initial program 85.3%
Taylor expanded in z around inf 37.8%
Final simplification47.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* a (* c i))) (t_2 (* (+ (* x y) (* z t)) 2.0)))
(if (<= c -1.1e+45)
(* -2.0 (* c (* (+ a (* b c)) i)))
(if (<= c -2.3e-12)
t_2
(if (<= c -1.08e-119)
(* 2.0 (- (* x y) t_1))
(if (<= c 2.55e-111)
t_2
(if (<= c 8.5e+123)
(* 2.0 (- (* z t) t_1))
(* 2.0 (* c (* b (* c (- i))))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a * (c * i);
double t_2 = ((x * y) + (z * t)) * 2.0;
double tmp;
if (c <= -1.1e+45) {
tmp = -2.0 * (c * ((a + (b * c)) * i));
} else if (c <= -2.3e-12) {
tmp = t_2;
} else if (c <= -1.08e-119) {
tmp = 2.0 * ((x * y) - t_1);
} else if (c <= 2.55e-111) {
tmp = t_2;
} else if (c <= 8.5e+123) {
tmp = 2.0 * ((z * t) - t_1);
} else {
tmp = 2.0 * (c * (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) :: t_2
real(8) :: tmp
t_1 = a * (c * i)
t_2 = ((x * y) + (z * t)) * 2.0d0
if (c <= (-1.1d+45)) then
tmp = (-2.0d0) * (c * ((a + (b * c)) * i))
else if (c <= (-2.3d-12)) then
tmp = t_2
else if (c <= (-1.08d-119)) then
tmp = 2.0d0 * ((x * y) - t_1)
else if (c <= 2.55d-111) then
tmp = t_2
else if (c <= 8.5d+123) then
tmp = 2.0d0 * ((z * t) - t_1)
else
tmp = 2.0d0 * (c * (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 = a * (c * i);
double t_2 = ((x * y) + (z * t)) * 2.0;
double tmp;
if (c <= -1.1e+45) {
tmp = -2.0 * (c * ((a + (b * c)) * i));
} else if (c <= -2.3e-12) {
tmp = t_2;
} else if (c <= -1.08e-119) {
tmp = 2.0 * ((x * y) - t_1);
} else if (c <= 2.55e-111) {
tmp = t_2;
} else if (c <= 8.5e+123) {
tmp = 2.0 * ((z * t) - t_1);
} else {
tmp = 2.0 * (c * (b * (c * -i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a * (c * i) t_2 = ((x * y) + (z * t)) * 2.0 tmp = 0 if c <= -1.1e+45: tmp = -2.0 * (c * ((a + (b * c)) * i)) elif c <= -2.3e-12: tmp = t_2 elif c <= -1.08e-119: tmp = 2.0 * ((x * y) - t_1) elif c <= 2.55e-111: tmp = t_2 elif c <= 8.5e+123: tmp = 2.0 * ((z * t) - t_1) else: tmp = 2.0 * (c * (b * (c * -i))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a * Float64(c * i)) t_2 = Float64(Float64(Float64(x * y) + Float64(z * t)) * 2.0) tmp = 0.0 if (c <= -1.1e+45) tmp = Float64(-2.0 * Float64(c * Float64(Float64(a + Float64(b * c)) * i))); elseif (c <= -2.3e-12) tmp = t_2; elseif (c <= -1.08e-119) tmp = Float64(2.0 * Float64(Float64(x * y) - t_1)); elseif (c <= 2.55e-111) tmp = t_2; elseif (c <= 8.5e+123) tmp = Float64(2.0 * Float64(Float64(z * t) - t_1)); else tmp = Float64(2.0 * Float64(c * Float64(b * Float64(c * Float64(-i))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = a * (c * i); t_2 = ((x * y) + (z * t)) * 2.0; tmp = 0.0; if (c <= -1.1e+45) tmp = -2.0 * (c * ((a + (b * c)) * i)); elseif (c <= -2.3e-12) tmp = t_2; elseif (c <= -1.08e-119) tmp = 2.0 * ((x * y) - t_1); elseif (c <= 2.55e-111) tmp = t_2; elseif (c <= 8.5e+123) tmp = 2.0 * ((z * t) - t_1); else tmp = 2.0 * (c * (b * (c * -i))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]}, If[LessEqual[c, -1.1e+45], N[(-2.0 * N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -2.3e-12], t$95$2, If[LessEqual[c, -1.08e-119], N[(2.0 * N[(N[(x * y), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.55e-111], t$95$2, If[LessEqual[c, 8.5e+123], N[(2.0 * N[(N[(z * t), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(c * N[(b * N[(c * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(c \cdot i\right)\\
t_2 := \left(x \cdot y + z \cdot t\right) \cdot 2\\
\mathbf{if}\;c \leq -1.1 \cdot 10^{+45}:\\
\;\;\;\;-2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\
\mathbf{elif}\;c \leq -2.3 \cdot 10^{-12}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq -1.08 \cdot 10^{-119}:\\
\;\;\;\;2 \cdot \left(x \cdot y - t_1\right)\\
\mathbf{elif}\;c \leq 2.55 \cdot 10^{-111}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq 8.5 \cdot 10^{+123}:\\
\;\;\;\;2 \cdot \left(z \cdot t - t_1\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(c \cdot \left(b \cdot \left(c \cdot \left(-i\right)\right)\right)\right)\\
\end{array}
\end{array}
if c < -1.1e45Initial program 77.5%
Taylor expanded in i around inf 80.5%
Taylor expanded in i around 0 80.5%
if -1.1e45 < c < -2.29999999999999989e-12 or -1.0799999999999999e-119 < c < 2.55000000000000016e-111Initial program 96.6%
Taylor expanded in c around 0 84.9%
if -2.29999999999999989e-12 < c < -1.0799999999999999e-119Initial program 93.7%
Taylor expanded in a around inf 66.4%
Taylor expanded in z around 0 70.8%
if 2.55000000000000016e-111 < c < 8.5e123Initial program 89.0%
Taylor expanded in x around 0 81.2%
Taylor expanded in c around 0 63.8%
+-commutative63.8%
mul-1-neg63.8%
sub-neg63.8%
Simplified63.8%
if 8.5e123 < c Initial program 67.8%
Taylor expanded in i around inf 75.9%
Taylor expanded in a around 0 80.6%
Final simplification77.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* a (* c i))))
(if (<= c -6.5e+68)
(* -2.0 (* c (* (+ a (* b c)) i)))
(if (<= c -2.85e-11)
(* 2.0 (- (* z t) (* c (* c (* b i)))))
(if (<= c -8e-120)
(* 2.0 (- (* x y) t_1))
(if (<= c 2.5e-113)
(* (+ (* x y) (* z t)) 2.0)
(if (<= c 8e+124)
(* 2.0 (- (* z t) t_1))
(* 2.0 (* c (* b (* c (- i))))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a * (c * i);
double tmp;
if (c <= -6.5e+68) {
tmp = -2.0 * (c * ((a + (b * c)) * i));
} else if (c <= -2.85e-11) {
tmp = 2.0 * ((z * t) - (c * (c * (b * i))));
} else if (c <= -8e-120) {
tmp = 2.0 * ((x * y) - t_1);
} else if (c <= 2.5e-113) {
tmp = ((x * y) + (z * t)) * 2.0;
} else if (c <= 8e+124) {
tmp = 2.0 * ((z * t) - t_1);
} else {
tmp = 2.0 * (c * (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 = a * (c * i)
if (c <= (-6.5d+68)) then
tmp = (-2.0d0) * (c * ((a + (b * c)) * i))
else if (c <= (-2.85d-11)) then
tmp = 2.0d0 * ((z * t) - (c * (c * (b * i))))
else if (c <= (-8d-120)) then
tmp = 2.0d0 * ((x * y) - t_1)
else if (c <= 2.5d-113) then
tmp = ((x * y) + (z * t)) * 2.0d0
else if (c <= 8d+124) then
tmp = 2.0d0 * ((z * t) - t_1)
else
tmp = 2.0d0 * (c * (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 = a * (c * i);
double tmp;
if (c <= -6.5e+68) {
tmp = -2.0 * (c * ((a + (b * c)) * i));
} else if (c <= -2.85e-11) {
tmp = 2.0 * ((z * t) - (c * (c * (b * i))));
} else if (c <= -8e-120) {
tmp = 2.0 * ((x * y) - t_1);
} else if (c <= 2.5e-113) {
tmp = ((x * y) + (z * t)) * 2.0;
} else if (c <= 8e+124) {
tmp = 2.0 * ((z * t) - t_1);
} else {
tmp = 2.0 * (c * (b * (c * -i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a * (c * i) tmp = 0 if c <= -6.5e+68: tmp = -2.0 * (c * ((a + (b * c)) * i)) elif c <= -2.85e-11: tmp = 2.0 * ((z * t) - (c * (c * (b * i)))) elif c <= -8e-120: tmp = 2.0 * ((x * y) - t_1) elif c <= 2.5e-113: tmp = ((x * y) + (z * t)) * 2.0 elif c <= 8e+124: tmp = 2.0 * ((z * t) - t_1) else: tmp = 2.0 * (c * (b * (c * -i))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a * Float64(c * i)) tmp = 0.0 if (c <= -6.5e+68) tmp = Float64(-2.0 * Float64(c * Float64(Float64(a + Float64(b * c)) * i))); elseif (c <= -2.85e-11) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(c * Float64(b * i))))); elseif (c <= -8e-120) tmp = Float64(2.0 * Float64(Float64(x * y) - t_1)); elseif (c <= 2.5e-113) tmp = Float64(Float64(Float64(x * y) + Float64(z * t)) * 2.0); elseif (c <= 8e+124) tmp = Float64(2.0 * Float64(Float64(z * t) - t_1)); else tmp = Float64(2.0 * Float64(c * Float64(b * Float64(c * Float64(-i))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = a * (c * i); tmp = 0.0; if (c <= -6.5e+68) tmp = -2.0 * (c * ((a + (b * c)) * i)); elseif (c <= -2.85e-11) tmp = 2.0 * ((z * t) - (c * (c * (b * i)))); elseif (c <= -8e-120) tmp = 2.0 * ((x * y) - t_1); elseif (c <= 2.5e-113) tmp = ((x * y) + (z * t)) * 2.0; elseif (c <= 8e+124) tmp = 2.0 * ((z * t) - t_1); else tmp = 2.0 * (c * (b * (c * -i))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -6.5e+68], N[(-2.0 * N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -2.85e-11], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(c * N[(b * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -8e-120], N[(2.0 * N[(N[(x * y), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.5e-113], N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision], If[LessEqual[c, 8e+124], N[(2.0 * N[(N[(z * t), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(c * N[(b * N[(c * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(c \cdot i\right)\\
\mathbf{if}\;c \leq -6.5 \cdot 10^{+68}:\\
\;\;\;\;-2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\
\mathbf{elif}\;c \leq -2.85 \cdot 10^{-11}:\\
\;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\
\mathbf{elif}\;c \leq -8 \cdot 10^{-120}:\\
\;\;\;\;2 \cdot \left(x \cdot y - t_1\right)\\
\mathbf{elif}\;c \leq 2.5 \cdot 10^{-113}:\\
\;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\
\mathbf{elif}\;c \leq 8 \cdot 10^{+124}:\\
\;\;\;\;2 \cdot \left(z \cdot t - t_1\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(c \cdot \left(b \cdot \left(c \cdot \left(-i\right)\right)\right)\right)\\
\end{array}
\end{array}
if c < -6.5000000000000005e68Initial program 80.2%
Taylor expanded in i around inf 87.8%
Taylor expanded in i around 0 87.8%
if -6.5000000000000005e68 < c < -2.8499999999999999e-11Initial program 80.1%
Taylor expanded in x around 0 76.1%
Taylor expanded in a around 0 76.6%
associate-*r*69.1%
*-commutative69.1%
associate-*r*76.7%
Simplified76.7%
if -2.8499999999999999e-11 < c < -7.99999999999999983e-120Initial program 93.7%
Taylor expanded in a around inf 66.4%
Taylor expanded in z around 0 70.8%
if -7.99999999999999983e-120 < c < 2.4999999999999999e-113Initial program 97.4%
Taylor expanded in c around 0 87.0%
if 2.4999999999999999e-113 < c < 7.99999999999999959e124Initial program 89.0%
Taylor expanded in x around 0 81.2%
Taylor expanded in c around 0 63.8%
+-commutative63.8%
mul-1-neg63.8%
sub-neg63.8%
Simplified63.8%
if 7.99999999999999959e124 < c Initial program 67.8%
Taylor expanded in i around inf 75.9%
Taylor expanded in a around 0 80.6%
Final simplification79.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* b (* (* c (* c i)) -2.0)))
(t_2 (* (+ (* x y) (* z t)) 2.0))
(t_3 (* -2.0 (* c (* (* b c) i)))))
(if (<= c -7e+88)
t_3
(if (<= c 2.85e+85)
t_2
(if (<= c 6.6e+114)
t_1
(if (<= c 7.6e+127) t_2 (if (<= c 2.15e+156) t_3 t_1)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = b * ((c * (c * i)) * -2.0);
double t_2 = ((x * y) + (z * t)) * 2.0;
double t_3 = -2.0 * (c * ((b * c) * i));
double tmp;
if (c <= -7e+88) {
tmp = t_3;
} else if (c <= 2.85e+85) {
tmp = t_2;
} else if (c <= 6.6e+114) {
tmp = t_1;
} else if (c <= 7.6e+127) {
tmp = t_2;
} else if (c <= 2.15e+156) {
tmp = t_3;
} 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) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = b * ((c * (c * i)) * (-2.0d0))
t_2 = ((x * y) + (z * t)) * 2.0d0
t_3 = (-2.0d0) * (c * ((b * c) * i))
if (c <= (-7d+88)) then
tmp = t_3
else if (c <= 2.85d+85) then
tmp = t_2
else if (c <= 6.6d+114) then
tmp = t_1
else if (c <= 7.6d+127) then
tmp = t_2
else if (c <= 2.15d+156) then
tmp = t_3
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 = b * ((c * (c * i)) * -2.0);
double t_2 = ((x * y) + (z * t)) * 2.0;
double t_3 = -2.0 * (c * ((b * c) * i));
double tmp;
if (c <= -7e+88) {
tmp = t_3;
} else if (c <= 2.85e+85) {
tmp = t_2;
} else if (c <= 6.6e+114) {
tmp = t_1;
} else if (c <= 7.6e+127) {
tmp = t_2;
} else if (c <= 2.15e+156) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = b * ((c * (c * i)) * -2.0) t_2 = ((x * y) + (z * t)) * 2.0 t_3 = -2.0 * (c * ((b * c) * i)) tmp = 0 if c <= -7e+88: tmp = t_3 elif c <= 2.85e+85: tmp = t_2 elif c <= 6.6e+114: tmp = t_1 elif c <= 7.6e+127: tmp = t_2 elif c <= 2.15e+156: tmp = t_3 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(b * Float64(Float64(c * Float64(c * i)) * -2.0)) t_2 = Float64(Float64(Float64(x * y) + Float64(z * t)) * 2.0) t_3 = Float64(-2.0 * Float64(c * Float64(Float64(b * c) * i))) tmp = 0.0 if (c <= -7e+88) tmp = t_3; elseif (c <= 2.85e+85) tmp = t_2; elseif (c <= 6.6e+114) tmp = t_1; elseif (c <= 7.6e+127) tmp = t_2; elseif (c <= 2.15e+156) tmp = t_3; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = b * ((c * (c * i)) * -2.0); t_2 = ((x * y) + (z * t)) * 2.0; t_3 = -2.0 * (c * ((b * c) * i)); tmp = 0.0; if (c <= -7e+88) tmp = t_3; elseif (c <= 2.85e+85) tmp = t_2; elseif (c <= 6.6e+114) tmp = t_1; elseif (c <= 7.6e+127) tmp = t_2; elseif (c <= 2.15e+156) tmp = t_3; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(b * N[(N[(c * N[(c * i), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]}, Block[{t$95$3 = N[(-2.0 * N[(c * N[(N[(b * c), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -7e+88], t$95$3, If[LessEqual[c, 2.85e+85], t$95$2, If[LessEqual[c, 6.6e+114], t$95$1, If[LessEqual[c, 7.6e+127], t$95$2, If[LessEqual[c, 2.15e+156], t$95$3, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(\left(c \cdot \left(c \cdot i\right)\right) \cdot -2\right)\\
t_2 := \left(x \cdot y + z \cdot t\right) \cdot 2\\
t_3 := -2 \cdot \left(c \cdot \left(\left(b \cdot c\right) \cdot i\right)\right)\\
\mathbf{if}\;c \leq -7 \cdot 10^{+88}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;c \leq 2.85 \cdot 10^{+85}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq 6.6 \cdot 10^{+114}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq 7.6 \cdot 10^{+127}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq 2.15 \cdot 10^{+156}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if c < -6.9999999999999995e88 or 7.59999999999999961e127 < c < 2.14999999999999993e156Initial program 79.1%
Taylor expanded in i around inf 90.2%
Taylor expanded in a around 0 74.8%
Taylor expanded in c around 0 65.9%
unpow265.9%
associate-*r*69.5%
associate-*r*75.0%
*-commutative75.0%
associate-*l*74.8%
Simplified74.8%
if -6.9999999999999995e88 < c < 2.8500000000000001e85 or 6.6000000000000001e114 < c < 7.59999999999999961e127Initial program 92.7%
Taylor expanded in c around 0 68.2%
if 2.8500000000000001e85 < c < 6.6000000000000001e114 or 2.14999999999999993e156 < c Initial program 70.0%
Taylor expanded in b around inf 68.1%
mul-1-neg68.1%
distribute-rgt-neg-in68.1%
unpow268.1%
associate-*r*71.8%
Simplified71.8%
Taylor expanded in b around 0 68.1%
*-commutative68.1%
unpow268.1%
associate-*l*68.1%
associate-*l*71.8%
Simplified71.8%
Final simplification70.1%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= c -1.65e+45)
(not (or (<= c 6.2e-60) (and (not (<= c 0.0062)) (<= c 9.4e+42)))))
(* -2.0 (* c (* (+ a (* b c)) i)))
(* (+ (* x y) (* z t)) 2.0)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c <= -1.65e+45) || !((c <= 6.2e-60) || (!(c <= 0.0062) && (c <= 9.4e+42)))) {
tmp = -2.0 * (c * ((a + (b * c)) * i));
} else {
tmp = ((x * y) + (z * t)) * 2.0;
}
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 ((c <= (-1.65d+45)) .or. (.not. (c <= 6.2d-60) .or. (.not. (c <= 0.0062d0)) .and. (c <= 9.4d+42))) then
tmp = (-2.0d0) * (c * ((a + (b * c)) * i))
else
tmp = ((x * y) + (z * t)) * 2.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 tmp;
if ((c <= -1.65e+45) || !((c <= 6.2e-60) || (!(c <= 0.0062) && (c <= 9.4e+42)))) {
tmp = -2.0 * (c * ((a + (b * c)) * i));
} else {
tmp = ((x * y) + (z * t)) * 2.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c <= -1.65e+45) or not ((c <= 6.2e-60) or (not (c <= 0.0062) and (c <= 9.4e+42))): tmp = -2.0 * (c * ((a + (b * c)) * i)) else: tmp = ((x * y) + (z * t)) * 2.0 return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((c <= -1.65e+45) || !((c <= 6.2e-60) || (!(c <= 0.0062) && (c <= 9.4e+42)))) tmp = Float64(-2.0 * Float64(c * Float64(Float64(a + Float64(b * c)) * i))); else tmp = Float64(Float64(Float64(x * y) + Float64(z * t)) * 2.0); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((c <= -1.65e+45) || ~(((c <= 6.2e-60) || (~((c <= 0.0062)) && (c <= 9.4e+42))))) tmp = -2.0 * (c * ((a + (b * c)) * i)); else tmp = ((x * y) + (z * t)) * 2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[c, -1.65e+45], N[Not[Or[LessEqual[c, 6.2e-60], And[N[Not[LessEqual[c, 0.0062]], $MachinePrecision], LessEqual[c, 9.4e+42]]]], $MachinePrecision]], N[(-2.0 * N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -1.65 \cdot 10^{+45} \lor \neg \left(c \leq 6.2 \cdot 10^{-60} \lor \neg \left(c \leq 0.0062\right) \land c \leq 9.4 \cdot 10^{+42}\right):\\
\;\;\;\;-2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\
\end{array}
\end{array}
if c < -1.65e45 or 6.19999999999999976e-60 < c < 0.00619999999999999978 or 9.39999999999999971e42 < c Initial program 77.4%
Taylor expanded in i around inf 75.1%
Taylor expanded in i around 0 75.1%
if -1.65e45 < c < 6.19999999999999976e-60 or 0.00619999999999999978 < c < 9.39999999999999971e42Initial program 95.9%
Taylor expanded in c around 0 75.7%
Final simplification75.4%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= c -2e-9)
(* 2.0 (- (* z t) (* c (* (+ a (* b c)) i))))
(if (<= c 3e+127)
(* 2.0 (- (+ (* x y) (* z t)) (* a (* c i))))
(* 2.0 (* c (* b (* c (- i))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (c <= -2e-9) {
tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i)));
} else if (c <= 3e+127) {
tmp = 2.0 * (((x * y) + (z * t)) - (a * (c * i)));
} else {
tmp = 2.0 * (c * (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 (c <= (-2d-9)) then
tmp = 2.0d0 * ((z * t) - (c * ((a + (b * c)) * i)))
else if (c <= 3d+127) then
tmp = 2.0d0 * (((x * y) + (z * t)) - (a * (c * i)))
else
tmp = 2.0d0 * (c * (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 (c <= -2e-9) {
tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i)));
} else if (c <= 3e+127) {
tmp = 2.0 * (((x * y) + (z * t)) - (a * (c * i)));
} else {
tmp = 2.0 * (c * (b * (c * -i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if c <= -2e-9: tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i))) elif c <= 3e+127: tmp = 2.0 * (((x * y) + (z * t)) - (a * (c * i))) else: tmp = 2.0 * (c * (b * (c * -i))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (c <= -2e-9) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(Float64(a + Float64(b * c)) * i)))); elseif (c <= 3e+127) tmp = Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(a * Float64(c * i)))); else tmp = Float64(2.0 * Float64(c * Float64(b * Float64(c * Float64(-i))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (c <= -2e-9) tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i))); elseif (c <= 3e+127) tmp = 2.0 * (((x * y) + (z * t)) - (a * (c * i))); else tmp = 2.0 * (c * (b * (c * -i))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[c, -2e-9], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 3e+127], N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(c * N[(b * N[(c * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -2 \cdot 10^{-9}:\\
\;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\
\mathbf{elif}\;c \leq 3 \cdot 10^{+127}:\\
\;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - a \cdot \left(c \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(c \cdot \left(b \cdot \left(c \cdot \left(-i\right)\right)\right)\right)\\
\end{array}
\end{array}
if c < -2.00000000000000012e-9Initial program 79.9%
Taylor expanded in x around 0 81.0%
if -2.00000000000000012e-9 < c < 3.0000000000000002e127Initial program 93.9%
Taylor expanded in a around inf 86.0%
if 3.0000000000000002e127 < c Initial program 67.8%
Taylor expanded in i around inf 75.9%
Taylor expanded in a around 0 80.6%
Final simplification83.8%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= c -8e+44)
(* -2.0 (* c (* (+ a (* b c)) i)))
(if (<= c 8e-112)
(* (+ (* x y) (* z t)) 2.0)
(if (<= c 9.5e+119)
(* 2.0 (- (* z t) (* a (* c i))))
(* 2.0 (* c (* b (* c (- i)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (c <= -8e+44) {
tmp = -2.0 * (c * ((a + (b * c)) * i));
} else if (c <= 8e-112) {
tmp = ((x * y) + (z * t)) * 2.0;
} else if (c <= 9.5e+119) {
tmp = 2.0 * ((z * t) - (a * (c * i)));
} else {
tmp = 2.0 * (c * (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 (c <= (-8d+44)) then
tmp = (-2.0d0) * (c * ((a + (b * c)) * i))
else if (c <= 8d-112) then
tmp = ((x * y) + (z * t)) * 2.0d0
else if (c <= 9.5d+119) then
tmp = 2.0d0 * ((z * t) - (a * (c * i)))
else
tmp = 2.0d0 * (c * (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 (c <= -8e+44) {
tmp = -2.0 * (c * ((a + (b * c)) * i));
} else if (c <= 8e-112) {
tmp = ((x * y) + (z * t)) * 2.0;
} else if (c <= 9.5e+119) {
tmp = 2.0 * ((z * t) - (a * (c * i)));
} else {
tmp = 2.0 * (c * (b * (c * -i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if c <= -8e+44: tmp = -2.0 * (c * ((a + (b * c)) * i)) elif c <= 8e-112: tmp = ((x * y) + (z * t)) * 2.0 elif c <= 9.5e+119: tmp = 2.0 * ((z * t) - (a * (c * i))) else: tmp = 2.0 * (c * (b * (c * -i))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (c <= -8e+44) tmp = Float64(-2.0 * Float64(c * Float64(Float64(a + Float64(b * c)) * i))); elseif (c <= 8e-112) tmp = Float64(Float64(Float64(x * y) + Float64(z * t)) * 2.0); elseif (c <= 9.5e+119) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(a * Float64(c * i)))); else tmp = Float64(2.0 * Float64(c * Float64(b * Float64(c * Float64(-i))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (c <= -8e+44) tmp = -2.0 * (c * ((a + (b * c)) * i)); elseif (c <= 8e-112) tmp = ((x * y) + (z * t)) * 2.0; elseif (c <= 9.5e+119) tmp = 2.0 * ((z * t) - (a * (c * i))); else tmp = 2.0 * (c * (b * (c * -i))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[c, -8e+44], N[(-2.0 * N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 8e-112], N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision], If[LessEqual[c, 9.5e+119], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(c * N[(b * N[(c * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -8 \cdot 10^{+44}:\\
\;\;\;\;-2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\
\mathbf{elif}\;c \leq 8 \cdot 10^{-112}:\\
\;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\
\mathbf{elif}\;c \leq 9.5 \cdot 10^{+119}:\\
\;\;\;\;2 \cdot \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(c \cdot \left(b \cdot \left(c \cdot \left(-i\right)\right)\right)\right)\\
\end{array}
\end{array}
if c < -8.0000000000000007e44Initial program 77.5%
Taylor expanded in i around inf 80.5%
Taylor expanded in i around 0 80.5%
if -8.0000000000000007e44 < c < 7.9999999999999996e-112Initial program 96.2%
Taylor expanded in c around 0 77.1%
if 7.9999999999999996e-112 < c < 9.4999999999999994e119Initial program 89.0%
Taylor expanded in x around 0 81.2%
Taylor expanded in c around 0 63.8%
+-commutative63.8%
mul-1-neg63.8%
sub-neg63.8%
Simplified63.8%
if 9.4999999999999994e119 < c Initial program 67.8%
Taylor expanded in i around inf 75.9%
Taylor expanded in a around 0 80.6%
Final simplification75.5%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (* x y) -5e+112) (not (<= (* x y) 5e+66))) (* (* 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) <= -5e+112) || !((x * y) <= 5e+66)) {
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) <= (-5d+112)) .or. (.not. ((x * y) <= 5d+66))) 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) <= -5e+112) || !((x * y) <= 5e+66)) {
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) <= -5e+112) or not ((x * y) <= 5e+66): 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) <= -5e+112) || !(Float64(x * y) <= 5e+66)) 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) <= -5e+112) || ~(((x * y) <= 5e+66))) 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], -5e+112], N[Not[LessEqual[N[(x * y), $MachinePrecision], 5e+66]], $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 -5 \cdot 10^{+112} \lor \neg \left(x \cdot y \leq 5 \cdot 10^{+66}\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) < -5e112 or 4.99999999999999991e66 < (*.f64 x y) Initial program 82.1%
Taylor expanded in x around inf 58.5%
if -5e112 < (*.f64 x y) < 4.99999999999999991e66Initial program 88.9%
Taylor expanded in z around inf 30.9%
Final simplification41.6%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= c -7.2e+83) (not (<= c 7.2e+119))) (* -2.0 (* c (* (* b c) i))) (* (+ (* x y) (* z t)) 2.0)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c <= -7.2e+83) || !(c <= 7.2e+119)) {
tmp = -2.0 * (c * ((b * c) * i));
} else {
tmp = ((x * y) + (z * t)) * 2.0;
}
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 ((c <= (-7.2d+83)) .or. (.not. (c <= 7.2d+119))) then
tmp = (-2.0d0) * (c * ((b * c) * i))
else
tmp = ((x * y) + (z * t)) * 2.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 tmp;
if ((c <= -7.2e+83) || !(c <= 7.2e+119)) {
tmp = -2.0 * (c * ((b * c) * i));
} else {
tmp = ((x * y) + (z * t)) * 2.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c <= -7.2e+83) or not (c <= 7.2e+119): tmp = -2.0 * (c * ((b * c) * i)) else: tmp = ((x * y) + (z * t)) * 2.0 return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((c <= -7.2e+83) || !(c <= 7.2e+119)) tmp = Float64(-2.0 * Float64(c * Float64(Float64(b * c) * i))); else tmp = Float64(Float64(Float64(x * y) + Float64(z * t)) * 2.0); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((c <= -7.2e+83) || ~((c <= 7.2e+119))) tmp = -2.0 * (c * ((b * c) * i)); else tmp = ((x * y) + (z * t)) * 2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[c, -7.2e+83], N[Not[LessEqual[c, 7.2e+119]], $MachinePrecision]], N[(-2.0 * N[(c * N[(N[(b * c), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -7.2 \cdot 10^{+83} \lor \neg \left(c \leq 7.2 \cdot 10^{+119}\right):\\
\;\;\;\;-2 \cdot \left(c \cdot \left(\left(b \cdot c\right) \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\
\end{array}
\end{array}
if c < -7.1999999999999995e83 or 7.20000000000000003e119 < c Initial program 74.0%
Taylor expanded in i around inf 83.3%
Taylor expanded in a around 0 75.8%
Taylor expanded in c around 0 67.3%
unpow267.3%
associate-*r*71.5%
associate-*r*73.9%
*-commutative73.9%
associate-*l*72.7%
Simplified72.7%
if -7.1999999999999995e83 < c < 7.20000000000000003e119Initial program 92.1%
Taylor expanded in c around 0 65.2%
Final simplification67.6%
(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 86.3%
Taylor expanded in z around inf 26.4%
Final simplification26.4%
(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 2023282
(FPCore (x y z t a b c i)
:name "Diagrams.ThreeD.Shapes:frustum from diagrams-lib-1.3.0.3, A"
:precision binary64
:herbie-target
(* 2.0 (- (+ (* x y) (* z t)) (* (+ a (* b c)) (* c i))))
(* 2.0 (- (+ (* x y) (* z t)) (* (* (+ a (* b c)) c) i))))