
(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 20 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 (if (<= (* c (+ a (* b c))) -2e+93) (* 2.0 (fma z t (fma c (* (fma b c a) (- i)) (* x y)))) (* 2.0 (fma y x (- (* z t) (* (fma b c a) (* c i)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c * (a + (b * c))) <= -2e+93) {
tmp = 2.0 * fma(z, t, fma(c, (fma(b, c, a) * -i), (x * y)));
} else {
tmp = 2.0 * fma(y, x, ((z * t) - (fma(b, c, a) * (c * i))));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(c * Float64(a + Float64(b * c))) <= -2e+93) tmp = Float64(2.0 * fma(z, t, fma(c, Float64(fma(b, c, a) * Float64(-i)), Float64(x * y)))); else tmp = Float64(2.0 * fma(y, x, Float64(Float64(z * t) - Float64(fma(b, c, a) * Float64(c * i))))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(c * N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -2e+93], N[(2.0 * N[(z * t + N[(c * N[(N[(b * c + a), $MachinePrecision] * (-i)), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(y * x + N[(N[(z * t), $MachinePrecision] - N[(N[(b * c + a), $MachinePrecision] * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \cdot \left(a + b \cdot c\right) \leq -2 \cdot 10^{+93}:\\
\;\;\;\;2 \cdot \mathsf{fma}\left(z, t, \mathsf{fma}\left(c, \mathsf{fma}\left(b, c, a\right) \cdot \left(-i\right), x \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \mathsf{fma}\left(y, x, z \cdot t - \mathsf{fma}\left(b, c, a\right) \cdot \left(c \cdot i\right)\right)\\
\end{array}
\end{array}
if (*.f64 (+.f64 a (*.f64 b c)) c) < -2.00000000000000009e93Initial program 78.7%
associate--l+78.7%
+-commutative78.7%
associate-+l-78.7%
fma-neg83.1%
neg-sub083.1%
associate-+l-83.1%
neg-sub083.1%
distribute-rgt-neg-in83.1%
*-commutative83.1%
associate-*l*91.3%
fma-def94.3%
+-commutative94.3%
fma-def94.3%
Simplified94.3%
if -2.00000000000000009e93 < (*.f64 (+.f64 a (*.f64 b c)) c) Initial program 93.2%
associate-*l*96.7%
fma-def97.2%
Simplified97.2%
fma-def96.7%
+-commutative96.7%
Applied egg-rr96.7%
+-commutative96.7%
associate-*r*93.2%
*-commutative93.2%
+-commutative93.2%
fma-udef93.2%
add-cube-cbrt92.9%
unpow392.9%
associate--l+92.9%
*-commutative92.9%
fma-def93.9%
unpow394.0%
add-cube-cbrt94.3%
fma-udef94.3%
+-commutative94.3%
*-commutative94.3%
associate-*r*97.8%
+-commutative97.8%
fma-udef97.8%
Applied egg-rr97.8%
Final simplification96.8%
(FPCore (x y z t a b c i) :precision binary64 (* 2.0 (fma y x (- (* z t) (* (fma b c a) (* c i))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * fma(y, x, ((z * t) - (fma(b, c, a) * (c * i))));
}
function code(x, y, z, t, a, b, c, i) return Float64(2.0 * fma(y, x, Float64(Float64(z * t) - Float64(fma(b, c, a) * Float64(c * i))))) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(2.0 * N[(y * x + N[(N[(z * t), $MachinePrecision] - N[(N[(b * c + a), $MachinePrecision] * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \mathsf{fma}\left(y, x, z \cdot t - \mathsf{fma}\left(b, c, a\right) \cdot \left(c \cdot i\right)\right)
\end{array}
Initial program 89.3%
associate-*l*94.4%
fma-def94.8%
Simplified94.8%
fma-def94.4%
+-commutative94.4%
Applied egg-rr94.4%
+-commutative94.4%
associate-*r*89.3%
*-commutative89.3%
+-commutative89.3%
fma-udef89.3%
add-cube-cbrt89.1%
unpow389.0%
associate--l+89.0%
*-commutative89.0%
fma-def89.8%
unpow389.9%
add-cube-cbrt90.1%
fma-udef90.1%
+-commutative90.1%
*-commutative90.1%
associate-*r*95.2%
+-commutative95.2%
fma-udef95.2%
Applied egg-rr95.2%
Final simplification95.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (* b c))) (t_2 (+ (* x y) (* z t))))
(if (<= (- t_2 (* (* c t_1) i)) INFINITY)
(* 2.0 (- t_2 (* t_1 (* c i))))
(* 2.0 t_2))))
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 = (x * y) + (z * t);
double tmp;
if ((t_2 - ((c * t_1) * i)) <= ((double) INFINITY)) {
tmp = 2.0 * (t_2 - (t_1 * (c * i)));
} else {
tmp = 2.0 * t_2;
}
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 = (x * y) + (z * t);
double tmp;
if ((t_2 - ((c * t_1) * i)) <= Double.POSITIVE_INFINITY) {
tmp = 2.0 * (t_2 - (t_1 * (c * i)));
} else {
tmp = 2.0 * t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a + (b * c) t_2 = (x * y) + (z * t) tmp = 0 if (t_2 - ((c * t_1) * i)) <= math.inf: tmp = 2.0 * (t_2 - (t_1 * (c * i))) else: tmp = 2.0 * t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(b * c)) t_2 = Float64(Float64(x * y) + Float64(z * t)) tmp = 0.0 if (Float64(t_2 - Float64(Float64(c * t_1) * i)) <= Inf) tmp = Float64(2.0 * Float64(t_2 - Float64(t_1 * Float64(c * i)))); else tmp = Float64(2.0 * t_2); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = a + (b * c); t_2 = (x * y) + (z * t); tmp = 0.0; if ((t_2 - ((c * t_1) * i)) <= Inf) tmp = 2.0 * (t_2 - (t_1 * (c * i))); else tmp = 2.0 * t_2; 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[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$2 - N[(N[(c * t$95$1), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision], Infinity], N[(2.0 * N[(t$95$2 - N[(t$95$1 * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * t$95$2), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + b \cdot c\\
t_2 := x \cdot y + z \cdot t\\
\mathbf{if}\;t_2 - \left(c \cdot t_1\right) \cdot i \leq \infty:\\
\;\;\;\;2 \cdot \left(t_2 - t_1 \cdot \left(c \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot t_2\\
\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 93.7%
associate-*l*98.3%
fma-def98.3%
Simplified98.3%
fma-def98.3%
+-commutative98.3%
Applied egg-rr98.3%
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 c around 0 58.3%
Final simplification96.4%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (* b c))) (t_2 (* (* c t_1) i)))
(if (<= t_2 5e+279)
(* 2.0 (- (+ (* x y) (* z t)) t_2))
(* 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) * i;
double tmp;
if (t_2 <= 5e+279) {
tmp = 2.0 * (((x * y) + (z * t)) - t_2);
} else {
tmp = 2.0 * ((x * y) - (c * (t_1 * 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 + (b * c)
t_2 = (c * t_1) * i
if (t_2 <= 5d+279) then
tmp = 2.0d0 * (((x * y) + (z * t)) - t_2)
else
tmp = 2.0d0 * ((x * y) - (c * (t_1 * 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 + (b * c);
double t_2 = (c * t_1) * i;
double tmp;
if (t_2 <= 5e+279) {
tmp = 2.0 * (((x * y) + (z * t)) - t_2);
} 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) * i tmp = 0 if t_2 <= 5e+279: tmp = 2.0 * (((x * y) + (z * t)) - t_2) 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(Float64(c * t_1) * i) tmp = 0.0 if (t_2 <= 5e+279) tmp = Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - t_2)); 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) * i; tmp = 0.0; if (t_2 <= 5e+279) tmp = 2.0 * (((x * y) + (z * t)) - t_2); 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[(N[(c * t$95$1), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[t$95$2, 5e+279], N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]), $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 := \left(c \cdot t_1\right) \cdot i\\
\mathbf{if}\;t_2 \leq 5 \cdot 10^{+279}:\\
\;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - t_2\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(t_1 \cdot i\right)\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 5.0000000000000002e279Initial program 95.6%
if 5.0000000000000002e279 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) Initial program 64.9%
Taylor expanded in z around 0 84.9%
Final simplification93.4%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (- (* x y) (* c (* (+ a (* b c)) i)))))
(t_2 (+ (* x y) (* z t))))
(if (<= c -2.55e+182)
t_1
(if (<= c -2.1e+128)
(* 2.0 (- t_2 (* c (* c (* b i)))))
(if (or (<= c -4.5e-90) (not (<= c 2.5e+19)))
t_1
(* 2.0 (- t_2 (/ (* c i) (/ 1.0 a)))))))))
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) - (c * ((a + (b * c)) * i)));
double t_2 = (x * y) + (z * t);
double tmp;
if (c <= -2.55e+182) {
tmp = t_1;
} else if (c <= -2.1e+128) {
tmp = 2.0 * (t_2 - (c * (c * (b * i))));
} else if ((c <= -4.5e-90) || !(c <= 2.5e+19)) {
tmp = t_1;
} else {
tmp = 2.0 * (t_2 - ((c * i) / (1.0 / a)));
}
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) - (c * ((a + (b * c)) * i)))
t_2 = (x * y) + (z * t)
if (c <= (-2.55d+182)) then
tmp = t_1
else if (c <= (-2.1d+128)) then
tmp = 2.0d0 * (t_2 - (c * (c * (b * i))))
else if ((c <= (-4.5d-90)) .or. (.not. (c <= 2.5d+19))) then
tmp = t_1
else
tmp = 2.0d0 * (t_2 - ((c * i) / (1.0d0 / a)))
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) - (c * ((a + (b * c)) * i)));
double t_2 = (x * y) + (z * t);
double tmp;
if (c <= -2.55e+182) {
tmp = t_1;
} else if (c <= -2.1e+128) {
tmp = 2.0 * (t_2 - (c * (c * (b * i))));
} else if ((c <= -4.5e-90) || !(c <= 2.5e+19)) {
tmp = t_1;
} else {
tmp = 2.0 * (t_2 - ((c * i) / (1.0 / a)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * ((x * y) - (c * ((a + (b * c)) * i))) t_2 = (x * y) + (z * t) tmp = 0 if c <= -2.55e+182: tmp = t_1 elif c <= -2.1e+128: tmp = 2.0 * (t_2 - (c * (c * (b * i)))) elif (c <= -4.5e-90) or not (c <= 2.5e+19): tmp = t_1 else: tmp = 2.0 * (t_2 - ((c * i) / (1.0 / a))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(Float64(x * y) - Float64(c * Float64(Float64(a + Float64(b * c)) * i)))) t_2 = Float64(Float64(x * y) + Float64(z * t)) tmp = 0.0 if (c <= -2.55e+182) tmp = t_1; elseif (c <= -2.1e+128) tmp = Float64(2.0 * Float64(t_2 - Float64(c * Float64(c * Float64(b * i))))); elseif ((c <= -4.5e-90) || !(c <= 2.5e+19)) tmp = t_1; else tmp = Float64(2.0 * Float64(t_2 - Float64(Float64(c * i) / Float64(1.0 / a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 2.0 * ((x * y) - (c * ((a + (b * c)) * i))); t_2 = (x * y) + (z * t); tmp = 0.0; if (c <= -2.55e+182) tmp = t_1; elseif (c <= -2.1e+128) tmp = 2.0 * (t_2 - (c * (c * (b * i)))); elseif ((c <= -4.5e-90) || ~((c <= 2.5e+19))) tmp = t_1; else tmp = 2.0 * (t_2 - ((c * i) / (1.0 / a))); 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[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -2.55e+182], t$95$1, If[LessEqual[c, -2.1e+128], N[(2.0 * N[(t$95$2 - N[(c * N[(c * N[(b * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[c, -4.5e-90], N[Not[LessEqual[c, 2.5e+19]], $MachinePrecision]], t$95$1, N[(2.0 * N[(t$95$2 - N[(N[(c * i), $MachinePrecision] / N[(1.0 / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(x \cdot y - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\
t_2 := x \cdot y + z \cdot t\\
\mathbf{if}\;c \leq -2.55 \cdot 10^{+182}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq -2.1 \cdot 10^{+128}:\\
\;\;\;\;2 \cdot \left(t_2 - c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\
\mathbf{elif}\;c \leq -4.5 \cdot 10^{-90} \lor \neg \left(c \leq 2.5 \cdot 10^{+19}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(t_2 - \frac{c \cdot i}{\frac{1}{a}}\right)\\
\end{array}
\end{array}
if c < -2.55000000000000005e182 or -2.1e128 < c < -4.50000000000000009e-90 or 2.5e19 < c Initial program 80.9%
Taylor expanded in z around 0 87.3%
if -2.55000000000000005e182 < c < -2.1e128Initial program 90.9%
Taylor expanded in a around 0 81.8%
unpow281.8%
associate-*r*100.0%
Simplified100.0%
if -4.50000000000000009e-90 < c < 2.5e19Initial program 99.0%
associate-*r*99.0%
*-commutative99.0%
flip-+78.5%
associate-*r/72.8%
pow272.8%
Applied egg-rr72.8%
associate-/l*78.5%
*-commutative78.5%
*-commutative78.5%
Simplified78.5%
Taylor expanded in a around inf 91.4%
Final simplification89.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (+ (* x y) (* z t))))
(t_2 (* c (* a i)))
(t_3 (* 2.0 (- (* x y) t_2))))
(if (<= c -4.35e+158)
(* (* b (* c i)) (* c -2.0))
(if (<= c -5.7e+125)
(* 2.0 (- (* z t) t_2))
(if (<= c -3.4e+99)
(* -2.0 (* (* b i) (* c c)))
(if (<= c -2.95e-90)
t_3
(if (<= c 1300000.0)
t_1
(if (<= c 1.1e+76)
t_3
(if (<= c 3.25e+186) t_1 (* i (* (* b c) (* c -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) + (z * t));
double t_2 = c * (a * i);
double t_3 = 2.0 * ((x * y) - t_2);
double tmp;
if (c <= -4.35e+158) {
tmp = (b * (c * i)) * (c * -2.0);
} else if (c <= -5.7e+125) {
tmp = 2.0 * ((z * t) - t_2);
} else if (c <= -3.4e+99) {
tmp = -2.0 * ((b * i) * (c * c));
} else if (c <= -2.95e-90) {
tmp = t_3;
} else if (c <= 1300000.0) {
tmp = t_1;
} else if (c <= 1.1e+76) {
tmp = t_3;
} else if (c <= 3.25e+186) {
tmp = t_1;
} else {
tmp = i * ((b * c) * (c * -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) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = 2.0d0 * ((x * y) + (z * t))
t_2 = c * (a * i)
t_3 = 2.0d0 * ((x * y) - t_2)
if (c <= (-4.35d+158)) then
tmp = (b * (c * i)) * (c * (-2.0d0))
else if (c <= (-5.7d+125)) then
tmp = 2.0d0 * ((z * t) - t_2)
else if (c <= (-3.4d+99)) then
tmp = (-2.0d0) * ((b * i) * (c * c))
else if (c <= (-2.95d-90)) then
tmp = t_3
else if (c <= 1300000.0d0) then
tmp = t_1
else if (c <= 1.1d+76) then
tmp = t_3
else if (c <= 3.25d+186) then
tmp = t_1
else
tmp = i * ((b * c) * (c * (-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) + (z * t));
double t_2 = c * (a * i);
double t_3 = 2.0 * ((x * y) - t_2);
double tmp;
if (c <= -4.35e+158) {
tmp = (b * (c * i)) * (c * -2.0);
} else if (c <= -5.7e+125) {
tmp = 2.0 * ((z * t) - t_2);
} else if (c <= -3.4e+99) {
tmp = -2.0 * ((b * i) * (c * c));
} else if (c <= -2.95e-90) {
tmp = t_3;
} else if (c <= 1300000.0) {
tmp = t_1;
} else if (c <= 1.1e+76) {
tmp = t_3;
} else if (c <= 3.25e+186) {
tmp = t_1;
} else {
tmp = i * ((b * c) * (c * -2.0));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * ((x * y) + (z * t)) t_2 = c * (a * i) t_3 = 2.0 * ((x * y) - t_2) tmp = 0 if c <= -4.35e+158: tmp = (b * (c * i)) * (c * -2.0) elif c <= -5.7e+125: tmp = 2.0 * ((z * t) - t_2) elif c <= -3.4e+99: tmp = -2.0 * ((b * i) * (c * c)) elif c <= -2.95e-90: tmp = t_3 elif c <= 1300000.0: tmp = t_1 elif c <= 1.1e+76: tmp = t_3 elif c <= 3.25e+186: tmp = t_1 else: tmp = i * ((b * c) * (c * -2.0)) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(Float64(x * y) + Float64(z * t))) t_2 = Float64(c * Float64(a * i)) t_3 = Float64(2.0 * Float64(Float64(x * y) - t_2)) tmp = 0.0 if (c <= -4.35e+158) tmp = Float64(Float64(b * Float64(c * i)) * Float64(c * -2.0)); elseif (c <= -5.7e+125) tmp = Float64(2.0 * Float64(Float64(z * t) - t_2)); elseif (c <= -3.4e+99) tmp = Float64(-2.0 * Float64(Float64(b * i) * Float64(c * c))); elseif (c <= -2.95e-90) tmp = t_3; elseif (c <= 1300000.0) tmp = t_1; elseif (c <= 1.1e+76) tmp = t_3; elseif (c <= 3.25e+186) tmp = t_1; else tmp = Float64(i * Float64(Float64(b * c) * Float64(c * -2.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 2.0 * ((x * y) + (z * t)); t_2 = c * (a * i); t_3 = 2.0 * ((x * y) - t_2); tmp = 0.0; if (c <= -4.35e+158) tmp = (b * (c * i)) * (c * -2.0); elseif (c <= -5.7e+125) tmp = 2.0 * ((z * t) - t_2); elseif (c <= -3.4e+99) tmp = -2.0 * ((b * i) * (c * c)); elseif (c <= -2.95e-90) tmp = t_3; elseif (c <= 1300000.0) tmp = t_1; elseif (c <= 1.1e+76) tmp = t_3; elseif (c <= 3.25e+186) tmp = t_1; else tmp = i * ((b * c) * (c * -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[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(c * N[(a * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(2.0 * N[(N[(x * y), $MachinePrecision] - t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -4.35e+158], N[(N[(b * N[(c * i), $MachinePrecision]), $MachinePrecision] * N[(c * -2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -5.7e+125], N[(2.0 * N[(N[(z * t), $MachinePrecision] - t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -3.4e+99], N[(-2.0 * N[(N[(b * i), $MachinePrecision] * N[(c * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -2.95e-90], t$95$3, If[LessEqual[c, 1300000.0], t$95$1, If[LessEqual[c, 1.1e+76], t$95$3, If[LessEqual[c, 3.25e+186], t$95$1, N[(i * N[(N[(b * c), $MachinePrecision] * N[(c * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(x \cdot y + z \cdot t\right)\\
t_2 := c \cdot \left(a \cdot i\right)\\
t_3 := 2 \cdot \left(x \cdot y - t_2\right)\\
\mathbf{if}\;c \leq -4.35 \cdot 10^{+158}:\\
\;\;\;\;\left(b \cdot \left(c \cdot i\right)\right) \cdot \left(c \cdot -2\right)\\
\mathbf{elif}\;c \leq -5.7 \cdot 10^{+125}:\\
\;\;\;\;2 \cdot \left(z \cdot t - t_2\right)\\
\mathbf{elif}\;c \leq -3.4 \cdot 10^{+99}:\\
\;\;\;\;-2 \cdot \left(\left(b \cdot i\right) \cdot \left(c \cdot c\right)\right)\\
\mathbf{elif}\;c \leq -2.95 \cdot 10^{-90}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;c \leq 1300000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq 1.1 \cdot 10^{+76}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;c \leq 3.25 \cdot 10^{+186}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;i \cdot \left(\left(b \cdot c\right) \cdot \left(c \cdot -2\right)\right)\\
\end{array}
\end{array}
if c < -4.35000000000000012e158Initial program 65.4%
Taylor expanded in b around inf 64.7%
mul-1-neg64.7%
distribute-rgt-neg-in64.7%
unpow264.7%
Simplified64.7%
Taylor expanded in c around 0 64.7%
*-commutative64.7%
unpow264.7%
*-commutative64.7%
associate-*r*72.5%
*-commutative72.5%
associate-*l*72.5%
associate-*r*72.9%
*-commutative72.9%
associate-*l*76.5%
Simplified76.5%
if -4.35000000000000012e158 < c < -5.6999999999999996e125Initial program 100.0%
associate-*r*100.0%
*-commutative100.0%
flip-+75.0%
associate-*r/75.0%
pow275.0%
Applied egg-rr75.0%
associate-/l*75.0%
*-commutative75.0%
*-commutative75.0%
Simplified75.0%
Taylor expanded in a around inf 87.5%
Taylor expanded in x around 0 87.5%
if -5.6999999999999996e125 < c < -3.39999999999999984e99Initial program 91.0%
Taylor expanded in b around inf 61.3%
mul-1-neg61.3%
distribute-rgt-neg-in61.3%
unpow261.3%
Simplified61.3%
Taylor expanded in c around 0 61.3%
unpow261.3%
Simplified61.3%
if -3.39999999999999984e99 < c < -2.95000000000000002e-90 or 1.3e6 < c < 1.1e76Initial program 86.4%
associate-*r*89.6%
*-commutative89.6%
flip-+57.7%
associate-*r/54.5%
pow254.5%
Applied egg-rr54.5%
associate-/l*57.7%
*-commutative57.7%
*-commutative57.7%
Simplified57.7%
Taylor expanded in a around inf 62.6%
Taylor expanded in z around 0 57.7%
if -2.95000000000000002e-90 < c < 1.3e6 or 1.1e76 < c < 3.2499999999999998e186Initial program 96.2%
Taylor expanded in c around 0 74.5%
if 3.2499999999999998e186 < c Initial program 79.1%
Taylor expanded in a around 0 66.2%
unpow266.2%
associate-*r*78.9%
Simplified78.9%
Taylor expanded in z around 0 70.6%
unpow270.6%
*-commutative70.6%
associate-*r*79.0%
associate-*r*79.0%
*-commutative79.0%
associate-*l*78.9%
Simplified78.9%
Taylor expanded in y around 0 70.6%
*-commutative70.6%
*-commutative70.6%
associate-*l*70.6%
unpow270.6%
Simplified70.6%
Taylor expanded in i around 0 70.6%
unpow270.6%
associate-*r*70.6%
*-commutative70.6%
associate-*r*70.6%
*-commutative70.6%
associate-*l*70.6%
associate-*r*74.7%
*-commutative74.7%
Simplified74.7%
Final simplification70.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (- (* x y) (* c (* (+ a (* b c)) i)))))
(t_2 (+ (* x y) (* z t))))
(if (<= c -1.55e+182)
t_1
(if (<= c -5.8e+127)
(* 2.0 (- t_2 (* c (* c (* b i)))))
(if (or (<= c -4.5e-90) (not (<= c 2.5e+19)))
t_1
(* 2.0 (- t_2 (* 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 * ((x * y) - (c * ((a + (b * c)) * i)));
double t_2 = (x * y) + (z * t);
double tmp;
if (c <= -1.55e+182) {
tmp = t_1;
} else if (c <= -5.8e+127) {
tmp = 2.0 * (t_2 - (c * (c * (b * i))));
} else if ((c <= -4.5e-90) || !(c <= 2.5e+19)) {
tmp = t_1;
} else {
tmp = 2.0 * (t_2 - (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 * ((x * y) - (c * ((a + (b * c)) * i)))
t_2 = (x * y) + (z * t)
if (c <= (-1.55d+182)) then
tmp = t_1
else if (c <= (-5.8d+127)) then
tmp = 2.0d0 * (t_2 - (c * (c * (b * i))))
else if ((c <= (-4.5d-90)) .or. (.not. (c <= 2.5d+19))) then
tmp = t_1
else
tmp = 2.0d0 * (t_2 - (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 * ((x * y) - (c * ((a + (b * c)) * i)));
double t_2 = (x * y) + (z * t);
double tmp;
if (c <= -1.55e+182) {
tmp = t_1;
} else if (c <= -5.8e+127) {
tmp = 2.0 * (t_2 - (c * (c * (b * i))));
} else if ((c <= -4.5e-90) || !(c <= 2.5e+19)) {
tmp = t_1;
} else {
tmp = 2.0 * (t_2 - (i * (a * c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * ((x * y) - (c * ((a + (b * c)) * i))) t_2 = (x * y) + (z * t) tmp = 0 if c <= -1.55e+182: tmp = t_1 elif c <= -5.8e+127: tmp = 2.0 * (t_2 - (c * (c * (b * i)))) elif (c <= -4.5e-90) or not (c <= 2.5e+19): tmp = t_1 else: tmp = 2.0 * (t_2 - (i * (a * c))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(Float64(x * y) - Float64(c * Float64(Float64(a + Float64(b * c)) * i)))) t_2 = Float64(Float64(x * y) + Float64(z * t)) tmp = 0.0 if (c <= -1.55e+182) tmp = t_1; elseif (c <= -5.8e+127) tmp = Float64(2.0 * Float64(t_2 - Float64(c * Float64(c * Float64(b * i))))); elseif ((c <= -4.5e-90) || !(c <= 2.5e+19)) tmp = t_1; else tmp = Float64(2.0 * Float64(t_2 - 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 * ((x * y) - (c * ((a + (b * c)) * i))); t_2 = (x * y) + (z * t); tmp = 0.0; if (c <= -1.55e+182) tmp = t_1; elseif (c <= -5.8e+127) tmp = 2.0 * (t_2 - (c * (c * (b * i)))); elseif ((c <= -4.5e-90) || ~((c <= 2.5e+19))) tmp = t_1; else tmp = 2.0 * (t_2 - (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[(N[(x * y), $MachinePrecision] - N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.55e+182], t$95$1, If[LessEqual[c, -5.8e+127], N[(2.0 * N[(t$95$2 - N[(c * N[(c * N[(b * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[c, -4.5e-90], N[Not[LessEqual[c, 2.5e+19]], $MachinePrecision]], t$95$1, N[(2.0 * N[(t$95$2 - N[(i * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(x \cdot y - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\
t_2 := x \cdot y + z \cdot t\\
\mathbf{if}\;c \leq -1.55 \cdot 10^{+182}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq -5.8 \cdot 10^{+127}:\\
\;\;\;\;2 \cdot \left(t_2 - c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\
\mathbf{elif}\;c \leq -4.5 \cdot 10^{-90} \lor \neg \left(c \leq 2.5 \cdot 10^{+19}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(t_2 - i \cdot \left(a \cdot c\right)\right)\\
\end{array}
\end{array}
if c < -1.54999999999999998e182 or -5.8000000000000004e127 < c < -4.50000000000000009e-90 or 2.5e19 < c Initial program 80.9%
Taylor expanded in z around 0 87.3%
if -1.54999999999999998e182 < c < -5.8000000000000004e127Initial program 90.9%
Taylor expanded in a around 0 81.8%
unpow281.8%
associate-*r*100.0%
Simplified100.0%
if -4.50000000000000009e-90 < c < 2.5e19Initial program 99.0%
Taylor expanded in a around inf 91.4%
Final simplification89.6%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= c -3.5e-90) (not (<= c 70.0))) (* 2.0 (- (* x y) (* c (* (+ a (* b c)) i)))) (* 2.0 (+ (* x y) (* z t)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c <= -3.5e-90) || !(c <= 70.0)) {
tmp = 2.0 * ((x * y) - (c * ((a + (b * c)) * i)));
} else {
tmp = 2.0 * ((x * y) + (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 ((c <= (-3.5d-90)) .or. (.not. (c <= 70.0d0))) then
tmp = 2.0d0 * ((x * y) - (c * ((a + (b * c)) * i)))
else
tmp = 2.0d0 * ((x * y) + (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 ((c <= -3.5e-90) || !(c <= 70.0)) {
tmp = 2.0 * ((x * y) - (c * ((a + (b * c)) * i)));
} else {
tmp = 2.0 * ((x * y) + (z * t));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c <= -3.5e-90) or not (c <= 70.0): tmp = 2.0 * ((x * y) - (c * ((a + (b * c)) * i))) else: tmp = 2.0 * ((x * y) + (z * t)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((c <= -3.5e-90) || !(c <= 70.0)) tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(c * Float64(Float64(a + Float64(b * c)) * i)))); else tmp = Float64(2.0 * Float64(Float64(x * y) + Float64(z * t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((c <= -3.5e-90) || ~((c <= 70.0))) tmp = 2.0 * ((x * y) - (c * ((a + (b * c)) * i))); else tmp = 2.0 * ((x * y) + (z * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[c, -3.5e-90], N[Not[LessEqual[c, 70.0]], $MachinePrecision]], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -3.5 \cdot 10^{-90} \lor \neg \left(c \leq 70\right):\\
\;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\
\end{array}
\end{array}
if c < -3.4999999999999999e-90 or 70 < c Initial program 82.2%
Taylor expanded in z around 0 83.9%
if -3.4999999999999999e-90 < c < 70Initial program 99.0%
Taylor expanded in c around 0 78.1%
Final simplification81.5%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= c -4.5e-90) (not (<= c 2.9e+19))) (* 2.0 (- (* x y) (* c (* (+ a (* b c)) i)))) (* 2.0 (- (+ (* x y) (* z t)) (* i (* a c))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c <= -4.5e-90) || !(c <= 2.9e+19)) {
tmp = 2.0 * ((x * y) - (c * ((a + (b * c)) * i)));
} else {
tmp = 2.0 * (((x * y) + (z * t)) - (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) :: tmp
if ((c <= (-4.5d-90)) .or. (.not. (c <= 2.9d+19))) then
tmp = 2.0d0 * ((x * y) - (c * ((a + (b * c)) * i)))
else
tmp = 2.0d0 * (((x * y) + (z * t)) - (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 tmp;
if ((c <= -4.5e-90) || !(c <= 2.9e+19)) {
tmp = 2.0 * ((x * y) - (c * ((a + (b * c)) * i)));
} else {
tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c <= -4.5e-90) or not (c <= 2.9e+19): tmp = 2.0 * ((x * y) - (c * ((a + (b * c)) * i))) else: tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((c <= -4.5e-90) || !(c <= 2.9e+19)) tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(c * Float64(Float64(a + Float64(b * c)) * i)))); else tmp = Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(i * Float64(a * c)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((c <= -4.5e-90) || ~((c <= 2.9e+19))) tmp = 2.0 * ((x * y) - (c * ((a + (b * c)) * i))); else tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[c, -4.5e-90], N[Not[LessEqual[c, 2.9e+19]], $MachinePrecision]], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(i * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -4.5 \cdot 10^{-90} \lor \neg \left(c \leq 2.9 \cdot 10^{+19}\right):\\
\;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - i \cdot \left(a \cdot c\right)\right)\\
\end{array}
\end{array}
if c < -4.50000000000000009e-90 or 2.9e19 < c Initial program 81.7%
Taylor expanded in z around 0 84.2%
if -4.50000000000000009e-90 < c < 2.9e19Initial program 99.0%
Taylor expanded in a around inf 91.4%
Final simplification87.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (* z t)))
(t_2 (* 2.0 (* (* a i) (- c))))
(t_3 (* 2.0 (* x y))))
(if (<= y -5800000000.0)
t_3
(if (<= y -3.15e-263)
t_1
(if (<= y 5e-222)
t_2
(if (<= y 1.4e-48) t_1 (if (<= y 3.9e+123) t_2 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 * (z * t);
double t_2 = 2.0 * ((a * i) * -c);
double t_3 = 2.0 * (x * y);
double tmp;
if (y <= -5800000000.0) {
tmp = t_3;
} else if (y <= -3.15e-263) {
tmp = t_1;
} else if (y <= 5e-222) {
tmp = t_2;
} else if (y <= 1.4e-48) {
tmp = t_1;
} else if (y <= 3.9e+123) {
tmp = t_2;
} 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 * (z * t)
t_2 = 2.0d0 * ((a * i) * -c)
t_3 = 2.0d0 * (x * y)
if (y <= (-5800000000.0d0)) then
tmp = t_3
else if (y <= (-3.15d-263)) then
tmp = t_1
else if (y <= 5d-222) then
tmp = t_2
else if (y <= 1.4d-48) then
tmp = t_1
else if (y <= 3.9d+123) then
tmp = t_2
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 * (z * t);
double t_2 = 2.0 * ((a * i) * -c);
double t_3 = 2.0 * (x * y);
double tmp;
if (y <= -5800000000.0) {
tmp = t_3;
} else if (y <= -3.15e-263) {
tmp = t_1;
} else if (y <= 5e-222) {
tmp = t_2;
} else if (y <= 1.4e-48) {
tmp = t_1;
} else if (y <= 3.9e+123) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * (z * t) t_2 = 2.0 * ((a * i) * -c) t_3 = 2.0 * (x * y) tmp = 0 if y <= -5800000000.0: tmp = t_3 elif y <= -3.15e-263: tmp = t_1 elif y <= 5e-222: tmp = t_2 elif y <= 1.4e-48: tmp = t_1 elif y <= 3.9e+123: tmp = t_2 else: tmp = t_3 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(Float64(a * i) * Float64(-c))) t_3 = Float64(2.0 * Float64(x * y)) tmp = 0.0 if (y <= -5800000000.0) tmp = t_3; elseif (y <= -3.15e-263) tmp = t_1; elseif (y <= 5e-222) tmp = t_2; elseif (y <= 1.4e-48) tmp = t_1; elseif (y <= 3.9e+123) tmp = t_2; else tmp = t_3; 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 * ((a * i) * -c); t_3 = 2.0 * (x * y); tmp = 0.0; if (y <= -5800000000.0) tmp = t_3; elseif (y <= -3.15e-263) tmp = t_1; elseif (y <= 5e-222) tmp = t_2; elseif (y <= 1.4e-48) tmp = t_1; elseif (y <= 3.9e+123) tmp = t_2; 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[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(N[(a * i), $MachinePrecision] * (-c)), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(2.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5800000000.0], t$95$3, If[LessEqual[y, -3.15e-263], t$95$1, If[LessEqual[y, 5e-222], t$95$2, If[LessEqual[y, 1.4e-48], t$95$1, If[LessEqual[y, 3.9e+123], t$95$2, t$95$3]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(z \cdot t\right)\\
t_2 := 2 \cdot \left(\left(a \cdot i\right) \cdot \left(-c\right)\right)\\
t_3 := 2 \cdot \left(x \cdot y\right)\\
\mathbf{if}\;y \leq -5800000000:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y \leq -3.15 \cdot 10^{-263}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 5 \cdot 10^{-222}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{-48}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 3.9 \cdot 10^{+123}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if y < -5.8e9 or 3.89999999999999993e123 < y Initial program 86.5%
Taylor expanded in x around inf 57.5%
if -5.8e9 < y < -3.14999999999999986e-263 or 5.00000000000000008e-222 < y < 1.40000000000000002e-48Initial program 93.6%
Taylor expanded in z around inf 32.6%
if -3.14999999999999986e-263 < y < 5.00000000000000008e-222 or 1.40000000000000002e-48 < y < 3.89999999999999993e123Initial program 86.3%
Taylor expanded in a around inf 27.1%
associate-*r*27.1%
neg-mul-127.1%
Simplified27.1%
Final simplification40.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (* z t))) (t_2 (* 2.0 (* x y))))
(if (<= y -12000000.0)
t_2
(if (<= y -3.8e-261)
t_1
(if (<= y 4.4e-221)
(* 2.0 (* (* a i) (- c)))
(if (<= y 1.22e-49)
t_1
(if (<= y 3.8e+123) (* 2.0 (* i (* a (- c)))) 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 * (x * y);
double tmp;
if (y <= -12000000.0) {
tmp = t_2;
} else if (y <= -3.8e-261) {
tmp = t_1;
} else if (y <= 4.4e-221) {
tmp = 2.0 * ((a * i) * -c);
} else if (y <= 1.22e-49) {
tmp = t_1;
} else if (y <= 3.8e+123) {
tmp = 2.0 * (i * (a * -c));
} 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 * (x * y)
if (y <= (-12000000.0d0)) then
tmp = t_2
else if (y <= (-3.8d-261)) then
tmp = t_1
else if (y <= 4.4d-221) then
tmp = 2.0d0 * ((a * i) * -c)
else if (y <= 1.22d-49) then
tmp = t_1
else if (y <= 3.8d+123) then
tmp = 2.0d0 * (i * (a * -c))
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 * (x * y);
double tmp;
if (y <= -12000000.0) {
tmp = t_2;
} else if (y <= -3.8e-261) {
tmp = t_1;
} else if (y <= 4.4e-221) {
tmp = 2.0 * ((a * i) * -c);
} else if (y <= 1.22e-49) {
tmp = t_1;
} else if (y <= 3.8e+123) {
tmp = 2.0 * (i * (a * -c));
} 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 * (x * y) tmp = 0 if y <= -12000000.0: tmp = t_2 elif y <= -3.8e-261: tmp = t_1 elif y <= 4.4e-221: tmp = 2.0 * ((a * i) * -c) elif y <= 1.22e-49: tmp = t_1 elif y <= 3.8e+123: tmp = 2.0 * (i * (a * -c)) 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(x * y)) tmp = 0.0 if (y <= -12000000.0) tmp = t_2; elseif (y <= -3.8e-261) tmp = t_1; elseif (y <= 4.4e-221) tmp = Float64(2.0 * Float64(Float64(a * i) * Float64(-c))); elseif (y <= 1.22e-49) tmp = t_1; elseif (y <= 3.8e+123) tmp = Float64(2.0 * Float64(i * Float64(a * Float64(-c)))); 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 * (x * y); tmp = 0.0; if (y <= -12000000.0) tmp = t_2; elseif (y <= -3.8e-261) tmp = t_1; elseif (y <= 4.4e-221) tmp = 2.0 * ((a * i) * -c); elseif (y <= 1.22e-49) tmp = t_1; elseif (y <= 3.8e+123) tmp = 2.0 * (i * (a * -c)); 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[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -12000000.0], t$95$2, If[LessEqual[y, -3.8e-261], t$95$1, If[LessEqual[y, 4.4e-221], N[(2.0 * N[(N[(a * i), $MachinePrecision] * (-c)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.22e-49], t$95$1, If[LessEqual[y, 3.8e+123], N[(2.0 * N[(i * N[(a * (-c)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(z \cdot t\right)\\
t_2 := 2 \cdot \left(x \cdot y\right)\\
\mathbf{if}\;y \leq -12000000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -3.8 \cdot 10^{-261}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 4.4 \cdot 10^{-221}:\\
\;\;\;\;2 \cdot \left(\left(a \cdot i\right) \cdot \left(-c\right)\right)\\
\mathbf{elif}\;y \leq 1.22 \cdot 10^{-49}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{+123}:\\
\;\;\;\;2 \cdot \left(i \cdot \left(a \cdot \left(-c\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -1.2e7 or 3.79999999999999994e123 < y Initial program 86.5%
Taylor expanded in x around inf 57.5%
if -1.2e7 < y < -3.8e-261 or 4.40000000000000003e-221 < y < 1.2199999999999999e-49Initial program 93.6%
Taylor expanded in z around inf 32.6%
if -3.8e-261 < y < 4.40000000000000003e-221Initial program 90.3%
Taylor expanded in a around inf 25.5%
associate-*r*25.5%
neg-mul-125.5%
Simplified25.5%
if 1.2199999999999999e-49 < y < 3.79999999999999994e123Initial program 81.8%
associate-*l*92.4%
fma-def92.4%
Simplified92.4%
fma-def92.4%
+-commutative92.4%
Applied egg-rr92.4%
Taylor expanded in a around inf 29.0%
mul-1-neg29.0%
*-commutative29.0%
associate-*r*39.2%
distribute-rgt-neg-in39.2%
Simplified39.2%
Final simplification41.6%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= c -9.5e+157)
(* (* b (* c i)) (* c -2.0))
(if (<= c -1.5e+70)
(* 2.0 (- (* z t) (* c (* a i))))
(if (<= c -4.5e+43)
(* -2.0 (* (* b i) (* c c)))
(if (<= c 3.25e+186)
(* 2.0 (+ (* x y) (* z t)))
(* i (* (* b c) (* c -2.0))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (c <= -9.5e+157) {
tmp = (b * (c * i)) * (c * -2.0);
} else if (c <= -1.5e+70) {
tmp = 2.0 * ((z * t) - (c * (a * i)));
} else if (c <= -4.5e+43) {
tmp = -2.0 * ((b * i) * (c * c));
} else if (c <= 3.25e+186) {
tmp = 2.0 * ((x * y) + (z * t));
} else {
tmp = i * ((b * c) * (c * -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 <= (-9.5d+157)) then
tmp = (b * (c * i)) * (c * (-2.0d0))
else if (c <= (-1.5d+70)) then
tmp = 2.0d0 * ((z * t) - (c * (a * i)))
else if (c <= (-4.5d+43)) then
tmp = (-2.0d0) * ((b * i) * (c * c))
else if (c <= 3.25d+186) then
tmp = 2.0d0 * ((x * y) + (z * t))
else
tmp = i * ((b * c) * (c * (-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 <= -9.5e+157) {
tmp = (b * (c * i)) * (c * -2.0);
} else if (c <= -1.5e+70) {
tmp = 2.0 * ((z * t) - (c * (a * i)));
} else if (c <= -4.5e+43) {
tmp = -2.0 * ((b * i) * (c * c));
} else if (c <= 3.25e+186) {
tmp = 2.0 * ((x * y) + (z * t));
} else {
tmp = i * ((b * c) * (c * -2.0));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if c <= -9.5e+157: tmp = (b * (c * i)) * (c * -2.0) elif c <= -1.5e+70: tmp = 2.0 * ((z * t) - (c * (a * i))) elif c <= -4.5e+43: tmp = -2.0 * ((b * i) * (c * c)) elif c <= 3.25e+186: tmp = 2.0 * ((x * y) + (z * t)) else: tmp = i * ((b * c) * (c * -2.0)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (c <= -9.5e+157) tmp = Float64(Float64(b * Float64(c * i)) * Float64(c * -2.0)); elseif (c <= -1.5e+70) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(a * i)))); elseif (c <= -4.5e+43) tmp = Float64(-2.0 * Float64(Float64(b * i) * Float64(c * c))); elseif (c <= 3.25e+186) tmp = Float64(2.0 * Float64(Float64(x * y) + Float64(z * t))); else tmp = Float64(i * Float64(Float64(b * c) * Float64(c * -2.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (c <= -9.5e+157) tmp = (b * (c * i)) * (c * -2.0); elseif (c <= -1.5e+70) tmp = 2.0 * ((z * t) - (c * (a * i))); elseif (c <= -4.5e+43) tmp = -2.0 * ((b * i) * (c * c)); elseif (c <= 3.25e+186) tmp = 2.0 * ((x * y) + (z * t)); else tmp = i * ((b * c) * (c * -2.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[c, -9.5e+157], N[(N[(b * N[(c * i), $MachinePrecision]), $MachinePrecision] * N[(c * -2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -1.5e+70], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -4.5e+43], N[(-2.0 * N[(N[(b * i), $MachinePrecision] * N[(c * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 3.25e+186], N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(i * N[(N[(b * c), $MachinePrecision] * N[(c * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -9.5 \cdot 10^{+157}:\\
\;\;\;\;\left(b \cdot \left(c \cdot i\right)\right) \cdot \left(c \cdot -2\right)\\
\mathbf{elif}\;c \leq -1.5 \cdot 10^{+70}:\\
\;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(a \cdot i\right)\right)\\
\mathbf{elif}\;c \leq -4.5 \cdot 10^{+43}:\\
\;\;\;\;-2 \cdot \left(\left(b \cdot i\right) \cdot \left(c \cdot c\right)\right)\\
\mathbf{elif}\;c \leq 3.25 \cdot 10^{+186}:\\
\;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;i \cdot \left(\left(b \cdot c\right) \cdot \left(c \cdot -2\right)\right)\\
\end{array}
\end{array}
if c < -9.4999999999999996e157Initial program 65.4%
Taylor expanded in b around inf 64.7%
mul-1-neg64.7%
distribute-rgt-neg-in64.7%
unpow264.7%
Simplified64.7%
Taylor expanded in c around 0 64.7%
*-commutative64.7%
unpow264.7%
*-commutative64.7%
associate-*r*72.5%
*-commutative72.5%
associate-*l*72.5%
associate-*r*72.9%
*-commutative72.9%
associate-*l*76.5%
Simplified76.5%
if -9.4999999999999996e157 < c < -1.49999999999999988e70Initial program 91.6%
associate-*r*100.0%
*-commutative100.0%
flip-+73.4%
associate-*r/69.1%
pow269.1%
Applied egg-rr69.1%
associate-/l*73.4%
*-commutative73.4%
*-commutative73.4%
Simplified73.4%
Taylor expanded in a around inf 73.3%
Taylor expanded in x around 0 64.4%
if -1.49999999999999988e70 < c < -4.5e43Initial program 36.4%
Taylor expanded in b around inf 100.0%
mul-1-neg100.0%
distribute-rgt-neg-in100.0%
unpow2100.0%
Simplified100.0%
Taylor expanded in c around 0 100.0%
unpow2100.0%
Simplified100.0%
if -4.5e43 < c < 3.2499999999999998e186Initial program 94.5%
Taylor expanded in c around 0 65.0%
if 3.2499999999999998e186 < c Initial program 79.1%
Taylor expanded in a around 0 66.2%
unpow266.2%
associate-*r*78.9%
Simplified78.9%
Taylor expanded in z around 0 70.6%
unpow270.6%
*-commutative70.6%
associate-*r*79.0%
associate-*r*79.0%
*-commutative79.0%
associate-*l*78.9%
Simplified78.9%
Taylor expanded in y around 0 70.6%
*-commutative70.6%
*-commutative70.6%
associate-*l*70.6%
unpow270.6%
Simplified70.6%
Taylor expanded in i around 0 70.6%
unpow270.6%
associate-*r*70.6%
*-commutative70.6%
associate-*r*70.6%
*-commutative70.6%
associate-*l*70.6%
associate-*r*74.7%
*-commutative74.7%
Simplified74.7%
Final simplification67.3%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= c -4.5e-90)
(* 2.0 (* c (* (+ a (* b c)) (- i))))
(if (<= c 2.5e+19)
(* 2.0 (+ (* x y) (* z t)))
(* 2.0 (- (* x y) (* 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 <= -4.5e-90) {
tmp = 2.0 * (c * ((a + (b * c)) * -i));
} else if (c <= 2.5e+19) {
tmp = 2.0 * ((x * y) + (z * t));
} else {
tmp = 2.0 * ((x * y) - (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 <= (-4.5d-90)) then
tmp = 2.0d0 * (c * ((a + (b * c)) * -i))
else if (c <= 2.5d+19) then
tmp = 2.0d0 * ((x * y) + (z * t))
else
tmp = 2.0d0 * ((x * y) - (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 <= -4.5e-90) {
tmp = 2.0 * (c * ((a + (b * c)) * -i));
} else if (c <= 2.5e+19) {
tmp = 2.0 * ((x * y) + (z * t));
} else {
tmp = 2.0 * ((x * y) - (c * (b * (c * i))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if c <= -4.5e-90: tmp = 2.0 * (c * ((a + (b * c)) * -i)) elif c <= 2.5e+19: tmp = 2.0 * ((x * y) + (z * t)) else: tmp = 2.0 * ((x * y) - (c * (b * (c * i)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (c <= -4.5e-90) tmp = Float64(2.0 * Float64(c * Float64(Float64(a + Float64(b * c)) * Float64(-i)))); elseif (c <= 2.5e+19) tmp = Float64(2.0 * Float64(Float64(x * y) + Float64(z * t))); else tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(c * Float64(b * Float64(c * i))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (c <= -4.5e-90) tmp = 2.0 * (c * ((a + (b * c)) * -i)); elseif (c <= 2.5e+19) tmp = 2.0 * ((x * y) + (z * t)); else tmp = 2.0 * ((x * y) - (c * (b * (c * i)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[c, -4.5e-90], N[(2.0 * N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.5e+19], N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(c * N[(b * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -4.5 \cdot 10^{-90}:\\
\;\;\;\;2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot \left(-i\right)\right)\right)\\
\mathbf{elif}\;c \leq 2.5 \cdot 10^{+19}:\\
\;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\
\end{array}
\end{array}
if c < -4.50000000000000009e-90Initial program 81.2%
Taylor expanded in i around inf 67.3%
if -4.50000000000000009e-90 < c < 2.5e19Initial program 99.0%
Taylor expanded in c around 0 76.3%
if 2.5e19 < c Initial program 82.4%
Taylor expanded in a around 0 69.3%
unpow269.3%
associate-*r*77.5%
Simplified77.5%
Taylor expanded in z around 0 67.9%
unpow267.9%
*-commutative67.9%
associate-*r*74.3%
associate-*r*74.2%
*-commutative74.2%
associate-*l*75.8%
Simplified75.8%
Final simplification73.3%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= c -3.65e-90) (not (<= c 205.0))) (* 2.0 (* c (* (+ a (* b c)) (- i)))) (* 2.0 (+ (* x y) (* z t)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c <= -3.65e-90) || !(c <= 205.0)) {
tmp = 2.0 * (c * ((a + (b * c)) * -i));
} else {
tmp = 2.0 * ((x * y) + (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 ((c <= (-3.65d-90)) .or. (.not. (c <= 205.0d0))) then
tmp = 2.0d0 * (c * ((a + (b * c)) * -i))
else
tmp = 2.0d0 * ((x * y) + (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 ((c <= -3.65e-90) || !(c <= 205.0)) {
tmp = 2.0 * (c * ((a + (b * c)) * -i));
} else {
tmp = 2.0 * ((x * y) + (z * t));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c <= -3.65e-90) or not (c <= 205.0): tmp = 2.0 * (c * ((a + (b * c)) * -i)) else: tmp = 2.0 * ((x * y) + (z * t)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((c <= -3.65e-90) || !(c <= 205.0)) tmp = Float64(2.0 * Float64(c * Float64(Float64(a + Float64(b * c)) * Float64(-i)))); else tmp = Float64(2.0 * Float64(Float64(x * y) + Float64(z * t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((c <= -3.65e-90) || ~((c <= 205.0))) tmp = 2.0 * (c * ((a + (b * c)) * -i)); else tmp = 2.0 * ((x * y) + (z * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[c, -3.65e-90], N[Not[LessEqual[c, 205.0]], $MachinePrecision]], N[(2.0 * N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -3.65 \cdot 10^{-90} \lor \neg \left(c \leq 205\right):\\
\;\;\;\;2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot \left(-i\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\
\end{array}
\end{array}
if c < -3.64999999999999999e-90 or 205 < c Initial program 82.2%
Taylor expanded in i around inf 68.3%
if -3.64999999999999999e-90 < c < 205Initial program 99.0%
Taylor expanded in c around 0 78.1%
Final simplification72.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* -2.0 (* (* b i) (* c c)))))
(if (<= c -4e-73)
t_1
(if (<= c 5.1e-170)
(* 2.0 (* z t))
(if (<= c 2.5e+83) (* 2.0 (* x y)) 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 * ((b * i) * (c * c));
double tmp;
if (c <= -4e-73) {
tmp = t_1;
} else if (c <= 5.1e-170) {
tmp = 2.0 * (z * t);
} else if (c <= 2.5e+83) {
tmp = 2.0 * (x * y);
} 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) * ((b * i) * (c * c))
if (c <= (-4d-73)) then
tmp = t_1
else if (c <= 5.1d-170) then
tmp = 2.0d0 * (z * t)
else if (c <= 2.5d+83) then
tmp = 2.0d0 * (x * y)
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 * ((b * i) * (c * c));
double tmp;
if (c <= -4e-73) {
tmp = t_1;
} else if (c <= 5.1e-170) {
tmp = 2.0 * (z * t);
} else if (c <= 2.5e+83) {
tmp = 2.0 * (x * y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = -2.0 * ((b * i) * (c * c)) tmp = 0 if c <= -4e-73: tmp = t_1 elif c <= 5.1e-170: tmp = 2.0 * (z * t) elif c <= 2.5e+83: tmp = 2.0 * (x * y) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(-2.0 * Float64(Float64(b * i) * Float64(c * c))) tmp = 0.0 if (c <= -4e-73) tmp = t_1; elseif (c <= 5.1e-170) tmp = Float64(2.0 * Float64(z * t)); elseif (c <= 2.5e+83) tmp = Float64(2.0 * Float64(x * y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = -2.0 * ((b * i) * (c * c)); tmp = 0.0; if (c <= -4e-73) tmp = t_1; elseif (c <= 5.1e-170) tmp = 2.0 * (z * t); elseif (c <= 2.5e+83) tmp = 2.0 * (x * y); 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[(b * i), $MachinePrecision] * N[(c * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -4e-73], t$95$1, If[LessEqual[c, 5.1e-170], N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.5e+83], N[(2.0 * N[(x * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -2 \cdot \left(\left(b \cdot i\right) \cdot \left(c \cdot c\right)\right)\\
\mathbf{if}\;c \leq -4 \cdot 10^{-73}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq 5.1 \cdot 10^{-170}:\\
\;\;\;\;2 \cdot \left(z \cdot t\right)\\
\mathbf{elif}\;c \leq 2.5 \cdot 10^{+83}:\\
\;\;\;\;2 \cdot \left(x \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if c < -3.99999999999999999e-73 or 2.50000000000000014e83 < c Initial program 81.2%
Taylor expanded in b around inf 52.0%
mul-1-neg52.0%
distribute-rgt-neg-in52.0%
unpow252.0%
Simplified52.0%
Taylor expanded in c around 0 52.0%
unpow252.0%
Simplified52.0%
if -3.99999999999999999e-73 < c < 5.09999999999999982e-170Initial program 97.2%
Taylor expanded in z around inf 46.2%
if 5.09999999999999982e-170 < c < 2.50000000000000014e83Initial program 96.5%
Taylor expanded in x around inf 43.7%
Final simplification48.4%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= c -2.5e+54) (not (<= c 3.3e+186))) (* -2.0 (* (* b i) (* c c))) (* 2.0 (+ (* x y) (* z t)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c <= -2.5e+54) || !(c <= 3.3e+186)) {
tmp = -2.0 * ((b * i) * (c * c));
} else {
tmp = 2.0 * ((x * y) + (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 ((c <= (-2.5d+54)) .or. (.not. (c <= 3.3d+186))) then
tmp = (-2.0d0) * ((b * i) * (c * c))
else
tmp = 2.0d0 * ((x * y) + (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 ((c <= -2.5e+54) || !(c <= 3.3e+186)) {
tmp = -2.0 * ((b * i) * (c * c));
} else {
tmp = 2.0 * ((x * y) + (z * t));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c <= -2.5e+54) or not (c <= 3.3e+186): tmp = -2.0 * ((b * i) * (c * c)) else: tmp = 2.0 * ((x * y) + (z * t)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((c <= -2.5e+54) || !(c <= 3.3e+186)) tmp = Float64(-2.0 * Float64(Float64(b * i) * Float64(c * c))); else tmp = Float64(2.0 * Float64(Float64(x * y) + Float64(z * t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((c <= -2.5e+54) || ~((c <= 3.3e+186))) tmp = -2.0 * ((b * i) * (c * c)); else tmp = 2.0 * ((x * y) + (z * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[c, -2.5e+54], N[Not[LessEqual[c, 3.3e+186]], $MachinePrecision]], N[(-2.0 * N[(N[(b * i), $MachinePrecision] * N[(c * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -2.5 \cdot 10^{+54} \lor \neg \left(c \leq 3.3 \cdot 10^{+186}\right):\\
\;\;\;\;-2 \cdot \left(\left(b \cdot i\right) \cdot \left(c \cdot c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\
\end{array}
\end{array}
if c < -2.50000000000000003e54 or 3.30000000000000023e186 < c Initial program 76.4%
Taylor expanded in b around inf 62.5%
mul-1-neg62.5%
distribute-rgt-neg-in62.5%
unpow262.5%
Simplified62.5%
Taylor expanded in c around 0 62.5%
unpow262.5%
Simplified62.5%
if -2.50000000000000003e54 < c < 3.30000000000000023e186Initial program 94.5%
Taylor expanded in c around 0 65.0%
Final simplification64.3%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= c -1.8e+49)
(* -2.0 (* (* b i) (* c c)))
(if (<= c 3.25e+186)
(* 2.0 (+ (* x y) (* z t)))
(* i (* (* b c) (* c -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.8e+49) {
tmp = -2.0 * ((b * i) * (c * c));
} else if (c <= 3.25e+186) {
tmp = 2.0 * ((x * y) + (z * t));
} else {
tmp = i * ((b * c) * (c * -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.8d+49)) then
tmp = (-2.0d0) * ((b * i) * (c * c))
else if (c <= 3.25d+186) then
tmp = 2.0d0 * ((x * y) + (z * t))
else
tmp = i * ((b * c) * (c * (-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.8e+49) {
tmp = -2.0 * ((b * i) * (c * c));
} else if (c <= 3.25e+186) {
tmp = 2.0 * ((x * y) + (z * t));
} else {
tmp = i * ((b * c) * (c * -2.0));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if c <= -1.8e+49: tmp = -2.0 * ((b * i) * (c * c)) elif c <= 3.25e+186: tmp = 2.0 * ((x * y) + (z * t)) else: tmp = i * ((b * c) * (c * -2.0)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (c <= -1.8e+49) tmp = Float64(-2.0 * Float64(Float64(b * i) * Float64(c * c))); elseif (c <= 3.25e+186) tmp = Float64(2.0 * Float64(Float64(x * y) + Float64(z * t))); else tmp = Float64(i * Float64(Float64(b * c) * Float64(c * -2.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (c <= -1.8e+49) tmp = -2.0 * ((b * i) * (c * c)); elseif (c <= 3.25e+186) tmp = 2.0 * ((x * y) + (z * t)); else tmp = i * ((b * c) * (c * -2.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[c, -1.8e+49], N[(-2.0 * N[(N[(b * i), $MachinePrecision] * N[(c * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 3.25e+186], N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(i * N[(N[(b * c), $MachinePrecision] * N[(c * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -1.8 \cdot 10^{+49}:\\
\;\;\;\;-2 \cdot \left(\left(b \cdot i\right) \cdot \left(c \cdot c\right)\right)\\
\mathbf{elif}\;c \leq 3.25 \cdot 10^{+186}:\\
\;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;i \cdot \left(\left(b \cdot c\right) \cdot \left(c \cdot -2\right)\right)\\
\end{array}
\end{array}
if c < -1.79999999999999998e49Initial program 75.2%
Taylor expanded in b around inf 58.8%
mul-1-neg58.8%
distribute-rgt-neg-in58.8%
unpow258.8%
Simplified58.8%
Taylor expanded in c around 0 58.8%
unpow258.8%
Simplified58.8%
if -1.79999999999999998e49 < c < 3.2499999999999998e186Initial program 94.5%
Taylor expanded in c around 0 65.0%
if 3.2499999999999998e186 < c Initial program 79.1%
Taylor expanded in a around 0 66.2%
unpow266.2%
associate-*r*78.9%
Simplified78.9%
Taylor expanded in z around 0 70.6%
unpow270.6%
*-commutative70.6%
associate-*r*79.0%
associate-*r*79.0%
*-commutative79.0%
associate-*l*78.9%
Simplified78.9%
Taylor expanded in y around 0 70.6%
*-commutative70.6%
*-commutative70.6%
associate-*l*70.6%
unpow270.6%
Simplified70.6%
Taylor expanded in i around 0 70.6%
unpow270.6%
associate-*r*70.6%
*-commutative70.6%
associate-*r*70.6%
*-commutative70.6%
associate-*l*70.6%
associate-*r*74.7%
*-commutative74.7%
Simplified74.7%
Final simplification64.6%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= c -3.8e+51)
(* (* b (* c i)) (* c -2.0))
(if (<= c 3.25e+186)
(* 2.0 (+ (* x y) (* z t)))
(* i (* (* b c) (* c -2.0))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (c <= -3.8e+51) {
tmp = (b * (c * i)) * (c * -2.0);
} else if (c <= 3.25e+186) {
tmp = 2.0 * ((x * y) + (z * t));
} else {
tmp = i * ((b * c) * (c * -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 <= (-3.8d+51)) then
tmp = (b * (c * i)) * (c * (-2.0d0))
else if (c <= 3.25d+186) then
tmp = 2.0d0 * ((x * y) + (z * t))
else
tmp = i * ((b * c) * (c * (-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 <= -3.8e+51) {
tmp = (b * (c * i)) * (c * -2.0);
} else if (c <= 3.25e+186) {
tmp = 2.0 * ((x * y) + (z * t));
} else {
tmp = i * ((b * c) * (c * -2.0));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if c <= -3.8e+51: tmp = (b * (c * i)) * (c * -2.0) elif c <= 3.25e+186: tmp = 2.0 * ((x * y) + (z * t)) else: tmp = i * ((b * c) * (c * -2.0)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (c <= -3.8e+51) tmp = Float64(Float64(b * Float64(c * i)) * Float64(c * -2.0)); elseif (c <= 3.25e+186) tmp = Float64(2.0 * Float64(Float64(x * y) + Float64(z * t))); else tmp = Float64(i * Float64(Float64(b * c) * Float64(c * -2.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (c <= -3.8e+51) tmp = (b * (c * i)) * (c * -2.0); elseif (c <= 3.25e+186) tmp = 2.0 * ((x * y) + (z * t)); else tmp = i * ((b * c) * (c * -2.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[c, -3.8e+51], N[(N[(b * N[(c * i), $MachinePrecision]), $MachinePrecision] * N[(c * -2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 3.25e+186], N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(i * N[(N[(b * c), $MachinePrecision] * N[(c * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -3.8 \cdot 10^{+51}:\\
\;\;\;\;\left(b \cdot \left(c \cdot i\right)\right) \cdot \left(c \cdot -2\right)\\
\mathbf{elif}\;c \leq 3.25 \cdot 10^{+186}:\\
\;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;i \cdot \left(\left(b \cdot c\right) \cdot \left(c \cdot -2\right)\right)\\
\end{array}
\end{array}
if c < -3.7999999999999997e51Initial program 75.2%
Taylor expanded in b around inf 58.8%
mul-1-neg58.8%
distribute-rgt-neg-in58.8%
unpow258.8%
Simplified58.8%
Taylor expanded in c around 0 58.8%
*-commutative58.8%
unpow258.8%
*-commutative58.8%
associate-*r*60.8%
*-commutative60.8%
associate-*l*60.8%
associate-*r*59.0%
*-commutative59.0%
associate-*l*62.7%
Simplified62.7%
if -3.7999999999999997e51 < c < 3.2499999999999998e186Initial program 94.5%
Taylor expanded in c around 0 65.0%
if 3.2499999999999998e186 < c Initial program 79.1%
Taylor expanded in a around 0 66.2%
unpow266.2%
associate-*r*78.9%
Simplified78.9%
Taylor expanded in z around 0 70.6%
unpow270.6%
*-commutative70.6%
associate-*r*79.0%
associate-*r*79.0%
*-commutative79.0%
associate-*l*78.9%
Simplified78.9%
Taylor expanded in y around 0 70.6%
*-commutative70.6%
*-commutative70.6%
associate-*l*70.6%
unpow270.6%
Simplified70.6%
Taylor expanded in i around 0 70.6%
unpow270.6%
associate-*r*70.6%
*-commutative70.6%
associate-*r*70.6%
*-commutative70.6%
associate-*l*70.6%
associate-*r*74.7%
*-commutative74.7%
Simplified74.7%
Final simplification65.4%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -70000000000.0) (not (<= y 1.45e+69))) (* 2.0 (* x y)) (* 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 ((y <= -70000000000.0) || !(y <= 1.45e+69)) {
tmp = 2.0 * (x * y);
} 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 ((y <= (-70000000000.0d0)) .or. (.not. (y <= 1.45d+69))) then
tmp = 2.0d0 * (x * y)
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 ((y <= -70000000000.0) || !(y <= 1.45e+69)) {
tmp = 2.0 * (x * y);
} else {
tmp = 2.0 * (z * t);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -70000000000.0) or not (y <= 1.45e+69): tmp = 2.0 * (x * y) else: tmp = 2.0 * (z * t) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -70000000000.0) || !(y <= 1.45e+69)) tmp = Float64(2.0 * Float64(x * y)); 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 ((y <= -70000000000.0) || ~((y <= 1.45e+69))) tmp = 2.0 * (x * y); else tmp = 2.0 * (z * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -70000000000.0], N[Not[LessEqual[y, 1.45e+69]], $MachinePrecision]], N[(2.0 * N[(x * y), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -70000000000 \lor \neg \left(y \leq 1.45 \cdot 10^{+69}\right):\\
\;\;\;\;2 \cdot \left(x \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(z \cdot t\right)\\
\end{array}
\end{array}
if y < -7e10 or 1.4499999999999999e69 < y Initial program 85.0%
Taylor expanded in x around inf 53.2%
if -7e10 < y < 1.4499999999999999e69Initial program 92.3%
Taylor expanded in z around inf 30.4%
Final simplification39.7%
(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 89.3%
Taylor expanded in z around inf 25.8%
Final simplification25.8%
(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 2023200
(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))))