
(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
(let* ((t_1 (+ a (* b c))) (t_2 (+ (* z t) (* x y))))
(if (<= (- t_2 (* i (* c t_1))) INFINITY)
(* 2.0 (- t_2 (* t_1 (* c i))))
(* 2.0 (fma z t (* (* c c) (* b (- 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 = (z * t) + (x * y);
double tmp;
if ((t_2 - (i * (c * t_1))) <= ((double) INFINITY)) {
tmp = 2.0 * (t_2 - (t_1 * (c * i)));
} else {
tmp = 2.0 * fma(z, t, ((c * c) * (b * -i)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(b * c)) t_2 = Float64(Float64(z * t) + Float64(x * y)) tmp = 0.0 if (Float64(t_2 - Float64(i * Float64(c * t_1))) <= Inf) tmp = Float64(2.0 * Float64(t_2 - Float64(t_1 * Float64(c * i)))); else tmp = Float64(2.0 * fma(z, t, Float64(Float64(c * c) * Float64(b * 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]}, Block[{t$95$2 = N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$2 - N[(i * N[(c * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(2.0 * N[(t$95$2 - N[(t$95$1 * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(z * t + N[(N[(c * c), $MachinePrecision] * N[(b * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + b \cdot c\\
t_2 := z \cdot t + x \cdot y\\
\mathbf{if}\;t_2 - i \cdot \left(c \cdot t_1\right) \leq \infty:\\
\;\;\;\;2 \cdot \left(t_2 - t_1 \cdot \left(c \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \mathsf{fma}\left(z, t, \left(c \cdot c\right) \cdot \left(b \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 95.0%
associate-*l*99.5%
fma-def99.5%
Simplified99.5%
fma-def99.5%
+-commutative99.5%
Applied egg-rr99.5%
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%
associate-+l-0.0%
fma-neg33.3%
neg-sub033.3%
associate-+l-33.3%
neg-sub033.3%
distribute-rgt-neg-in33.3%
*-commutative33.3%
associate-*l*50.0%
fma-def50.0%
+-commutative50.0%
fma-def50.0%
Simplified50.0%
Taylor expanded in i around 0 50.0%
Taylor expanded in c around inf 83.3%
mul-1-neg83.3%
unpow283.3%
Simplified83.3%
Final simplification99.1%
(FPCore (x y z t a b c i) :precision binary64 (* 2.0 (- (fma 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 * (fma(x, y, (z * t)) - ((a + (b * c)) * (c * i)));
}
function code(x, y, z, t, a, b, c, i) return Float64(2.0 * Float64(fma(x, y, Float64(z * t)) - Float64(Float64(a + Float64(b * c)) * Float64(c * i)))) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(2.0 * N[(N[(x * y + 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(\mathsf{fma}\left(x, y, z \cdot t\right) - \left(a + b \cdot c\right) \cdot \left(c \cdot i\right)\right)
\end{array}
Initial program 92.8%
associate-*l*97.6%
fma-def98.0%
Simplified98.0%
Final simplification98.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (* b c))) (t_2 (* i (* c t_1))))
(if (<= t_2 (- INFINITY))
(* 2.0 (* c (* t_1 (- i))))
(* 2.0 (- (+ (* z t) (* x y)) 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 = i * (c * t_1);
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = 2.0 * (c * (t_1 * -i));
} else {
tmp = 2.0 * (((z * t) + (x * y)) - 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 = i * (c * t_1);
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = 2.0 * (c * (t_1 * -i));
} else {
tmp = 2.0 * (((z * t) + (x * y)) - t_2);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a + (b * c) t_2 = i * (c * t_1) tmp = 0 if t_2 <= -math.inf: tmp = 2.0 * (c * (t_1 * -i)) else: tmp = 2.0 * (((z * t) + (x * y)) - t_2) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(b * c)) t_2 = Float64(i * Float64(c * t_1)) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(2.0 * Float64(c * Float64(t_1 * Float64(-i)))); else tmp = Float64(2.0 * Float64(Float64(Float64(z * t) + Float64(x * y)) - 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 = i * (c * t_1); tmp = 0.0; if (t_2 <= -Inf) tmp = 2.0 * (c * (t_1 * -i)); else tmp = 2.0 * (((z * t) + (x * y)) - 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[(i * N[(c * t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(2.0 * N[(c * N[(t$95$1 * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + b \cdot c\\
t_2 := i \cdot \left(c \cdot t_1\right)\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;2 \cdot \left(c \cdot \left(t_1 \cdot \left(-i\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(z \cdot t + x \cdot y\right) - t_2\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -inf.0Initial program 77.2%
Taylor expanded in i around inf 93.6%
if -inf.0 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) Initial program 96.2%
Final simplification95.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (* x y)))
(t_2 (* 2.0 (* z t)))
(t_3 (* (* (* c c) (* b i)) -2.0)))
(if (<= c -3.4e+134)
t_3
(if (<= c -2.1e+78)
t_2
(if (<= c -5600000000000.0)
t_3
(if (<= c -8e-92)
t_1
(if (<= c -6.2e-288)
t_2
(if (<= c 2e-201)
t_1
(if (<= c 1.25e-141)
t_2
(if (<= c 1.15e+43) (* 2.0 (* i (* a (- c)))) 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 * (x * y);
double t_2 = 2.0 * (z * t);
double t_3 = ((c * c) * (b * i)) * -2.0;
double tmp;
if (c <= -3.4e+134) {
tmp = t_3;
} else if (c <= -2.1e+78) {
tmp = t_2;
} else if (c <= -5600000000000.0) {
tmp = t_3;
} else if (c <= -8e-92) {
tmp = t_1;
} else if (c <= -6.2e-288) {
tmp = t_2;
} else if (c <= 2e-201) {
tmp = t_1;
} else if (c <= 1.25e-141) {
tmp = t_2;
} else if (c <= 1.15e+43) {
tmp = 2.0 * (i * (a * -c));
} 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 * (x * y)
t_2 = 2.0d0 * (z * t)
t_3 = ((c * c) * (b * i)) * (-2.0d0)
if (c <= (-3.4d+134)) then
tmp = t_3
else if (c <= (-2.1d+78)) then
tmp = t_2
else if (c <= (-5600000000000.0d0)) then
tmp = t_3
else if (c <= (-8d-92)) then
tmp = t_1
else if (c <= (-6.2d-288)) then
tmp = t_2
else if (c <= 2d-201) then
tmp = t_1
else if (c <= 1.25d-141) then
tmp = t_2
else if (c <= 1.15d+43) then
tmp = 2.0d0 * (i * (a * -c))
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 * (x * y);
double t_2 = 2.0 * (z * t);
double t_3 = ((c * c) * (b * i)) * -2.0;
double tmp;
if (c <= -3.4e+134) {
tmp = t_3;
} else if (c <= -2.1e+78) {
tmp = t_2;
} else if (c <= -5600000000000.0) {
tmp = t_3;
} else if (c <= -8e-92) {
tmp = t_1;
} else if (c <= -6.2e-288) {
tmp = t_2;
} else if (c <= 2e-201) {
tmp = t_1;
} else if (c <= 1.25e-141) {
tmp = t_2;
} else if (c <= 1.15e+43) {
tmp = 2.0 * (i * (a * -c));
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * (x * y) t_2 = 2.0 * (z * t) t_3 = ((c * c) * (b * i)) * -2.0 tmp = 0 if c <= -3.4e+134: tmp = t_3 elif c <= -2.1e+78: tmp = t_2 elif c <= -5600000000000.0: tmp = t_3 elif c <= -8e-92: tmp = t_1 elif c <= -6.2e-288: tmp = t_2 elif c <= 2e-201: tmp = t_1 elif c <= 1.25e-141: tmp = t_2 elif c <= 1.15e+43: tmp = 2.0 * (i * (a * -c)) else: tmp = t_3 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(x * y)) t_2 = Float64(2.0 * Float64(z * t)) t_3 = Float64(Float64(Float64(c * c) * Float64(b * i)) * -2.0) tmp = 0.0 if (c <= -3.4e+134) tmp = t_3; elseif (c <= -2.1e+78) tmp = t_2; elseif (c <= -5600000000000.0) tmp = t_3; elseif (c <= -8e-92) tmp = t_1; elseif (c <= -6.2e-288) tmp = t_2; elseif (c <= 2e-201) tmp = t_1; elseif (c <= 1.25e-141) tmp = t_2; elseif (c <= 1.15e+43) tmp = Float64(2.0 * Float64(i * Float64(a * Float64(-c)))); else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 2.0 * (x * y); t_2 = 2.0 * (z * t); t_3 = ((c * c) * (b * i)) * -2.0; tmp = 0.0; if (c <= -3.4e+134) tmp = t_3; elseif (c <= -2.1e+78) tmp = t_2; elseif (c <= -5600000000000.0) tmp = t_3; elseif (c <= -8e-92) tmp = t_1; elseif (c <= -6.2e-288) tmp = t_2; elseif (c <= 2e-201) tmp = t_1; elseif (c <= 1.25e-141) tmp = t_2; elseif (c <= 1.15e+43) tmp = 2.0 * (i * (a * -c)); 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[(x * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(c * c), $MachinePrecision] * N[(b * i), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]}, If[LessEqual[c, -3.4e+134], t$95$3, If[LessEqual[c, -2.1e+78], t$95$2, If[LessEqual[c, -5600000000000.0], t$95$3, If[LessEqual[c, -8e-92], t$95$1, If[LessEqual[c, -6.2e-288], t$95$2, If[LessEqual[c, 2e-201], t$95$1, If[LessEqual[c, 1.25e-141], t$95$2, If[LessEqual[c, 1.15e+43], N[(2.0 * N[(i * N[(a * (-c)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(x \cdot y\right)\\
t_2 := 2 \cdot \left(z \cdot t\right)\\
t_3 := \left(\left(c \cdot c\right) \cdot \left(b \cdot i\right)\right) \cdot -2\\
\mathbf{if}\;c \leq -3.4 \cdot 10^{+134}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;c \leq -2.1 \cdot 10^{+78}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq -5600000000000:\\
\;\;\;\;t_3\\
\mathbf{elif}\;c \leq -8 \cdot 10^{-92}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq -6.2 \cdot 10^{-288}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq 2 \cdot 10^{-201}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq 1.25 \cdot 10^{-141}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq 1.15 \cdot 10^{+43}:\\
\;\;\;\;2 \cdot \left(i \cdot \left(a \cdot \left(-c\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if c < -3.40000000000000018e134 or -2.1000000000000001e78 < c < -5.6e12 or 1.1500000000000001e43 < c Initial program 85.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.40000000000000018e134 < c < -2.1000000000000001e78 or -7.9999999999999999e-92 < c < -6.19999999999999967e-288 or 1.99999999999999989e-201 < c < 1.25e-141Initial program 98.5%
Taylor expanded in z around inf 60.2%
if -5.6e12 < c < -7.9999999999999999e-92 or -6.19999999999999967e-288 < c < 1.99999999999999989e-201Initial program 98.2%
Taylor expanded in x around inf 60.2%
if 1.25e-141 < c < 1.1500000000000001e43Initial program 93.8%
associate-*l*96.8%
fma-def96.8%
Simplified96.8%
fma-def96.8%
+-commutative96.8%
Applied egg-rr96.8%
Taylor expanded in a around inf 90.8%
Taylor expanded in a around inf 41.0%
mul-1-neg41.0%
associate-*r*43.7%
*-commutative43.7%
associate-*r*43.7%
distribute-rgt-neg-in43.7%
*-commutative43.7%
Simplified43.7%
Final simplification58.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (- (* x y) (* i (* a c)))))
(t_2 (* 2.0 (* c (* (+ a (* b c)) (- i))))))
(if (<= c -1.2e+161)
t_2
(if (<= c -1.45e+79)
(* 2.0 (- (* z t) (* a (* c i))))
(if (<= c -1.75e-16)
t_1
(if (<= c 1.2e-141)
(* 2.0 (+ (* z t) (* x y)))
(if (<= c 2.5e+14)
t_1
(if (<= c 5.8e+40)
(* 2.0 (- (* z t) (* b (* c (* c i)))))
t_2))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * ((x * y) - (i * (a * c)));
double t_2 = 2.0 * (c * ((a + (b * c)) * -i));
double tmp;
if (c <= -1.2e+161) {
tmp = t_2;
} else if (c <= -1.45e+79) {
tmp = 2.0 * ((z * t) - (a * (c * i)));
} else if (c <= -1.75e-16) {
tmp = t_1;
} else if (c <= 1.2e-141) {
tmp = 2.0 * ((z * t) + (x * y));
} else if (c <= 2.5e+14) {
tmp = t_1;
} else if (c <= 5.8e+40) {
tmp = 2.0 * ((z * t) - (b * (c * (c * i))));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 2.0d0 * ((x * y) - (i * (a * c)))
t_2 = 2.0d0 * (c * ((a + (b * c)) * -i))
if (c <= (-1.2d+161)) then
tmp = t_2
else if (c <= (-1.45d+79)) then
tmp = 2.0d0 * ((z * t) - (a * (c * i)))
else if (c <= (-1.75d-16)) then
tmp = t_1
else if (c <= 1.2d-141) then
tmp = 2.0d0 * ((z * t) + (x * y))
else if (c <= 2.5d+14) then
tmp = t_1
else if (c <= 5.8d+40) then
tmp = 2.0d0 * ((z * t) - (b * (c * (c * i))))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * ((x * y) - (i * (a * c)));
double t_2 = 2.0 * (c * ((a + (b * c)) * -i));
double tmp;
if (c <= -1.2e+161) {
tmp = t_2;
} else if (c <= -1.45e+79) {
tmp = 2.0 * ((z * t) - (a * (c * i)));
} else if (c <= -1.75e-16) {
tmp = t_1;
} else if (c <= 1.2e-141) {
tmp = 2.0 * ((z * t) + (x * y));
} else if (c <= 2.5e+14) {
tmp = t_1;
} else if (c <= 5.8e+40) {
tmp = 2.0 * ((z * t) - (b * (c * (c * i))));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * ((x * y) - (i * (a * c))) t_2 = 2.0 * (c * ((a + (b * c)) * -i)) tmp = 0 if c <= -1.2e+161: tmp = t_2 elif c <= -1.45e+79: tmp = 2.0 * ((z * t) - (a * (c * i))) elif c <= -1.75e-16: tmp = t_1 elif c <= 1.2e-141: tmp = 2.0 * ((z * t) + (x * y)) elif c <= 2.5e+14: tmp = t_1 elif c <= 5.8e+40: tmp = 2.0 * ((z * t) - (b * (c * (c * i)))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(Float64(x * y) - Float64(i * Float64(a * c)))) t_2 = Float64(2.0 * Float64(c * Float64(Float64(a + Float64(b * c)) * Float64(-i)))) tmp = 0.0 if (c <= -1.2e+161) tmp = t_2; elseif (c <= -1.45e+79) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(a * Float64(c * i)))); elseif (c <= -1.75e-16) tmp = t_1; elseif (c <= 1.2e-141) tmp = Float64(2.0 * Float64(Float64(z * t) + Float64(x * y))); elseif (c <= 2.5e+14) tmp = t_1; elseif (c <= 5.8e+40) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(b * Float64(c * Float64(c * i))))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 2.0 * ((x * y) - (i * (a * c))); t_2 = 2.0 * (c * ((a + (b * c)) * -i)); tmp = 0.0; if (c <= -1.2e+161) tmp = t_2; elseif (c <= -1.45e+79) tmp = 2.0 * ((z * t) - (a * (c * i))); elseif (c <= -1.75e-16) tmp = t_1; elseif (c <= 1.2e-141) tmp = 2.0 * ((z * t) + (x * y)); elseif (c <= 2.5e+14) tmp = t_1; elseif (c <= 5.8e+40) tmp = 2.0 * ((z * t) - (b * (c * (c * i)))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(i * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.2e+161], t$95$2, If[LessEqual[c, -1.45e+79], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -1.75e-16], t$95$1, If[LessEqual[c, 1.2e-141], N[(2.0 * N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.5e+14], t$95$1, If[LessEqual[c, 5.8e+40], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(b * N[(c * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(x \cdot y - i \cdot \left(a \cdot c\right)\right)\\
t_2 := 2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot \left(-i\right)\right)\right)\\
\mathbf{if}\;c \leq -1.2 \cdot 10^{+161}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq -1.45 \cdot 10^{+79}:\\
\;\;\;\;2 \cdot \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\\
\mathbf{elif}\;c \leq -1.75 \cdot 10^{-16}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq 1.2 \cdot 10^{-141}:\\
\;\;\;\;2 \cdot \left(z \cdot t + x \cdot y\right)\\
\mathbf{elif}\;c \leq 2.5 \cdot 10^{+14}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq 5.8 \cdot 10^{+40}:\\
\;\;\;\;2 \cdot \left(z \cdot t - b \cdot \left(c \cdot \left(c \cdot i\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if c < -1.1999999999999999e161 or 5.80000000000000035e40 < c Initial program 83.3%
Taylor expanded in i around inf 85.0%
if -1.1999999999999999e161 < c < -1.44999999999999996e79Initial program 88.8%
Taylor expanded in a around inf 76.4%
Taylor expanded in x around 0 75.0%
*-commutative75.0%
*-commutative75.0%
associate-*l*75.0%
*-commutative75.0%
Simplified75.0%
sub-neg75.0%
*-commutative75.0%
*-commutative75.0%
*-commutative75.0%
associate-*r*75.0%
Applied egg-rr75.0%
if -1.44999999999999996e79 < c < -1.75000000000000009e-16 or 1.2e-141 < c < 2.5e14Initial program 97.4%
Taylor expanded in a around inf 87.8%
Taylor expanded in z around 0 71.6%
*-commutative71.6%
*-commutative71.6%
associate-*l*73.7%
*-commutative73.7%
Simplified73.7%
if -1.75000000000000009e-16 < c < 1.2e-141Initial program 99.0%
Taylor expanded in c around 0 86.9%
if 2.5e14 < c < 5.80000000000000035e40Initial program 85.7%
Taylor expanded in x around 0 86.8%
Taylor expanded in c around inf 73.0%
*-commutative73.0%
*-commutative73.0%
associate-*l*87.0%
unpow287.0%
Simplified87.0%
Taylor expanded in i around 0 87.0%
unpow287.0%
associate-*l*87.0%
Simplified87.0%
Final simplification83.4%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (- (* x y) (* i (* a c)))))
(t_2 (* 2.0 (* c (* (+ a (* b c)) (- i))))))
(if (<= c -3.7e+145)
t_2
(if (<= c -4.9e+60)
(* 2.0 (- (* z t) (* c (* i (* b c)))))
(if (<= c -6.8e-16)
t_1
(if (<= c 1.35e-142)
(* 2.0 (+ (* z t) (* x y)))
(if (<= c 58000000000000.0)
t_1
(if (<= c 3.2e+39)
(* 2.0 (- (* z t) (* b (* c (* c i)))))
t_2))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * ((x * y) - (i * (a * c)));
double t_2 = 2.0 * (c * ((a + (b * c)) * -i));
double tmp;
if (c <= -3.7e+145) {
tmp = t_2;
} else if (c <= -4.9e+60) {
tmp = 2.0 * ((z * t) - (c * (i * (b * c))));
} else if (c <= -6.8e-16) {
tmp = t_1;
} else if (c <= 1.35e-142) {
tmp = 2.0 * ((z * t) + (x * y));
} else if (c <= 58000000000000.0) {
tmp = t_1;
} else if (c <= 3.2e+39) {
tmp = 2.0 * ((z * t) - (b * (c * (c * i))));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 2.0d0 * ((x * y) - (i * (a * c)))
t_2 = 2.0d0 * (c * ((a + (b * c)) * -i))
if (c <= (-3.7d+145)) then
tmp = t_2
else if (c <= (-4.9d+60)) then
tmp = 2.0d0 * ((z * t) - (c * (i * (b * c))))
else if (c <= (-6.8d-16)) then
tmp = t_1
else if (c <= 1.35d-142) then
tmp = 2.0d0 * ((z * t) + (x * y))
else if (c <= 58000000000000.0d0) then
tmp = t_1
else if (c <= 3.2d+39) then
tmp = 2.0d0 * ((z * t) - (b * (c * (c * i))))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * ((x * y) - (i * (a * c)));
double t_2 = 2.0 * (c * ((a + (b * c)) * -i));
double tmp;
if (c <= -3.7e+145) {
tmp = t_2;
} else if (c <= -4.9e+60) {
tmp = 2.0 * ((z * t) - (c * (i * (b * c))));
} else if (c <= -6.8e-16) {
tmp = t_1;
} else if (c <= 1.35e-142) {
tmp = 2.0 * ((z * t) + (x * y));
} else if (c <= 58000000000000.0) {
tmp = t_1;
} else if (c <= 3.2e+39) {
tmp = 2.0 * ((z * t) - (b * (c * (c * i))));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * ((x * y) - (i * (a * c))) t_2 = 2.0 * (c * ((a + (b * c)) * -i)) tmp = 0 if c <= -3.7e+145: tmp = t_2 elif c <= -4.9e+60: tmp = 2.0 * ((z * t) - (c * (i * (b * c)))) elif c <= -6.8e-16: tmp = t_1 elif c <= 1.35e-142: tmp = 2.0 * ((z * t) + (x * y)) elif c <= 58000000000000.0: tmp = t_1 elif c <= 3.2e+39: tmp = 2.0 * ((z * t) - (b * (c * (c * i)))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(Float64(x * y) - Float64(i * Float64(a * c)))) t_2 = Float64(2.0 * Float64(c * Float64(Float64(a + Float64(b * c)) * Float64(-i)))) tmp = 0.0 if (c <= -3.7e+145) tmp = t_2; elseif (c <= -4.9e+60) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(i * Float64(b * c))))); elseif (c <= -6.8e-16) tmp = t_1; elseif (c <= 1.35e-142) tmp = Float64(2.0 * Float64(Float64(z * t) + Float64(x * y))); elseif (c <= 58000000000000.0) tmp = t_1; elseif (c <= 3.2e+39) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(b * Float64(c * Float64(c * i))))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 2.0 * ((x * y) - (i * (a * c))); t_2 = 2.0 * (c * ((a + (b * c)) * -i)); tmp = 0.0; if (c <= -3.7e+145) tmp = t_2; elseif (c <= -4.9e+60) tmp = 2.0 * ((z * t) - (c * (i * (b * c)))); elseif (c <= -6.8e-16) tmp = t_1; elseif (c <= 1.35e-142) tmp = 2.0 * ((z * t) + (x * y)); elseif (c <= 58000000000000.0) tmp = t_1; elseif (c <= 3.2e+39) tmp = 2.0 * ((z * t) - (b * (c * (c * i)))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(i * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -3.7e+145], t$95$2, If[LessEqual[c, -4.9e+60], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(i * N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -6.8e-16], t$95$1, If[LessEqual[c, 1.35e-142], N[(2.0 * N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 58000000000000.0], t$95$1, If[LessEqual[c, 3.2e+39], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(b * N[(c * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(x \cdot y - i \cdot \left(a \cdot c\right)\right)\\
t_2 := 2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot \left(-i\right)\right)\right)\\
\mathbf{if}\;c \leq -3.7 \cdot 10^{+145}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq -4.9 \cdot 10^{+60}:\\
\;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(i \cdot \left(b \cdot c\right)\right)\right)\\
\mathbf{elif}\;c \leq -6.8 \cdot 10^{-16}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq 1.35 \cdot 10^{-142}:\\
\;\;\;\;2 \cdot \left(z \cdot t + x \cdot y\right)\\
\mathbf{elif}\;c \leq 58000000000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq 3.2 \cdot 10^{+39}:\\
\;\;\;\;2 \cdot \left(z \cdot t - b \cdot \left(c \cdot \left(c \cdot i\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if c < -3.69999999999999993e145 or 3.19999999999999993e39 < c Initial program 83.9%
Taylor expanded in i around inf 84.4%
if -3.69999999999999993e145 < c < -4.9000000000000003e60Initial program 88.8%
Taylor expanded in x around 0 89.8%
Taylor expanded in c around inf 74.3%
if -4.9000000000000003e60 < c < -6.8e-16 or 1.3499999999999999e-142 < c < 5.8e13Initial program 97.2%
Taylor expanded in a around inf 92.1%
Taylor expanded in z around 0 74.6%
*-commutative74.6%
*-commutative74.6%
associate-*l*76.9%
*-commutative76.9%
Simplified76.9%
if -6.8e-16 < c < 1.3499999999999999e-142Initial program 99.0%
Taylor expanded in c around 0 86.9%
if 5.8e13 < c < 3.19999999999999993e39Initial program 85.7%
Taylor expanded in x around 0 86.8%
Taylor expanded in c around inf 73.0%
*-commutative73.0%
*-commutative73.0%
associate-*l*87.0%
unpow287.0%
Simplified87.0%
Taylor expanded in i around 0 87.0%
unpow287.0%
associate-*l*87.0%
Simplified87.0%
Final simplification83.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (- (* x y) (* i (* a c)))))
(t_2 (* 2.0 (- (* z t) (* a (* c i)))))
(t_3 (* 2.0 (* c (* (+ a (* b c)) (- i))))))
(if (<= c -1.2e+161)
t_3
(if (<= c -1.1e+79)
t_2
(if (<= c -7e-16)
t_1
(if (<= c 1.25e-141)
(* 2.0 (+ (* z t) (* x y)))
(if (<= c 3.8e+24) t_1 (if (<= c 9.5e+40) 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 * ((x * y) - (i * (a * c)));
double t_2 = 2.0 * ((z * t) - (a * (c * i)));
double t_3 = 2.0 * (c * ((a + (b * c)) * -i));
double tmp;
if (c <= -1.2e+161) {
tmp = t_3;
} else if (c <= -1.1e+79) {
tmp = t_2;
} else if (c <= -7e-16) {
tmp = t_1;
} else if (c <= 1.25e-141) {
tmp = 2.0 * ((z * t) + (x * y));
} else if (c <= 3.8e+24) {
tmp = t_1;
} else if (c <= 9.5e+40) {
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 * ((x * y) - (i * (a * c)))
t_2 = 2.0d0 * ((z * t) - (a * (c * i)))
t_3 = 2.0d0 * (c * ((a + (b * c)) * -i))
if (c <= (-1.2d+161)) then
tmp = t_3
else if (c <= (-1.1d+79)) then
tmp = t_2
else if (c <= (-7d-16)) then
tmp = t_1
else if (c <= 1.25d-141) then
tmp = 2.0d0 * ((z * t) + (x * y))
else if (c <= 3.8d+24) then
tmp = t_1
else if (c <= 9.5d+40) 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 * ((x * y) - (i * (a * c)));
double t_2 = 2.0 * ((z * t) - (a * (c * i)));
double t_3 = 2.0 * (c * ((a + (b * c)) * -i));
double tmp;
if (c <= -1.2e+161) {
tmp = t_3;
} else if (c <= -1.1e+79) {
tmp = t_2;
} else if (c <= -7e-16) {
tmp = t_1;
} else if (c <= 1.25e-141) {
tmp = 2.0 * ((z * t) + (x * y));
} else if (c <= 3.8e+24) {
tmp = t_1;
} else if (c <= 9.5e+40) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * ((x * y) - (i * (a * c))) t_2 = 2.0 * ((z * t) - (a * (c * i))) t_3 = 2.0 * (c * ((a + (b * c)) * -i)) tmp = 0 if c <= -1.2e+161: tmp = t_3 elif c <= -1.1e+79: tmp = t_2 elif c <= -7e-16: tmp = t_1 elif c <= 1.25e-141: tmp = 2.0 * ((z * t) + (x * y)) elif c <= 3.8e+24: tmp = t_1 elif c <= 9.5e+40: 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(Float64(x * y) - Float64(i * Float64(a * c)))) t_2 = Float64(2.0 * Float64(Float64(z * t) - Float64(a * Float64(c * i)))) t_3 = Float64(2.0 * Float64(c * Float64(Float64(a + Float64(b * c)) * Float64(-i)))) tmp = 0.0 if (c <= -1.2e+161) tmp = t_3; elseif (c <= -1.1e+79) tmp = t_2; elseif (c <= -7e-16) tmp = t_1; elseif (c <= 1.25e-141) tmp = Float64(2.0 * Float64(Float64(z * t) + Float64(x * y))); elseif (c <= 3.8e+24) tmp = t_1; elseif (c <= 9.5e+40) 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 * ((x * y) - (i * (a * c))); t_2 = 2.0 * ((z * t) - (a * (c * i))); t_3 = 2.0 * (c * ((a + (b * c)) * -i)); tmp = 0.0; if (c <= -1.2e+161) tmp = t_3; elseif (c <= -1.1e+79) tmp = t_2; elseif (c <= -7e-16) tmp = t_1; elseif (c <= 1.25e-141) tmp = 2.0 * ((z * t) + (x * y)); elseif (c <= 3.8e+24) tmp = t_1; elseif (c <= 9.5e+40) 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[(N[(x * y), $MachinePrecision] - N[(i * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(2.0 * N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.2e+161], t$95$3, If[LessEqual[c, -1.1e+79], t$95$2, If[LessEqual[c, -7e-16], t$95$1, If[LessEqual[c, 1.25e-141], N[(2.0 * N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 3.8e+24], t$95$1, If[LessEqual[c, 9.5e+40], t$95$2, t$95$3]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(x \cdot y - i \cdot \left(a \cdot c\right)\right)\\
t_2 := 2 \cdot \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\\
t_3 := 2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot \left(-i\right)\right)\right)\\
\mathbf{if}\;c \leq -1.2 \cdot 10^{+161}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;c \leq -1.1 \cdot 10^{+79}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq -7 \cdot 10^{-16}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq 1.25 \cdot 10^{-141}:\\
\;\;\;\;2 \cdot \left(z \cdot t + x \cdot y\right)\\
\mathbf{elif}\;c \leq 3.8 \cdot 10^{+24}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq 9.5 \cdot 10^{+40}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if c < -1.1999999999999999e161 or 9.5000000000000003e40 < c Initial program 83.3%
Taylor expanded in i around inf 85.0%
if -1.1999999999999999e161 < c < -1.0999999999999999e79 or 3.80000000000000015e24 < c < 9.5000000000000003e40Initial program 86.3%
Taylor expanded in a around inf 76.1%
Taylor expanded in x around 0 79.6%
*-commutative79.6%
*-commutative79.6%
associate-*l*75.0%
*-commutative75.0%
Simplified75.0%
sub-neg75.0%
*-commutative75.0%
*-commutative75.0%
*-commutative75.0%
associate-*r*79.6%
Applied egg-rr79.6%
if -1.0999999999999999e79 < c < -7.00000000000000035e-16 or 1.25e-141 < c < 3.80000000000000015e24Initial program 97.6%
Taylor expanded in a around inf 86.4%
Taylor expanded in z around 0 71.3%
*-commutative71.3%
*-commutative71.3%
associate-*l*73.2%
*-commutative73.2%
Simplified73.2%
if -7.00000000000000035e-16 < c < 1.25e-141Initial program 99.0%
Taylor expanded in c around 0 86.9%
Final simplification83.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* i (* a c))) (t_2 (* 2.0 (- (* z t) t_1))))
(if (<= c -1.25e+161)
(* c (* (* c (* b i)) -2.0))
(if (<= c -4100000000000.0)
t_2
(if (<= c 3.6e-142)
(* 2.0 (+ (* z t) (* x y)))
(if (<= c 3.4e+53)
(* 2.0 (- (* x y) t_1))
(if (or (<= c 3.2e+101) (not (<= c 1.35e+240)))
(* (* (* c c) (* b 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 = i * (a * c);
double t_2 = 2.0 * ((z * t) - t_1);
double tmp;
if (c <= -1.25e+161) {
tmp = c * ((c * (b * i)) * -2.0);
} else if (c <= -4100000000000.0) {
tmp = t_2;
} else if (c <= 3.6e-142) {
tmp = 2.0 * ((z * t) + (x * y));
} else if (c <= 3.4e+53) {
tmp = 2.0 * ((x * y) - t_1);
} else if ((c <= 3.2e+101) || !(c <= 1.35e+240)) {
tmp = ((c * c) * (b * i)) * -2.0;
} 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 = i * (a * c)
t_2 = 2.0d0 * ((z * t) - t_1)
if (c <= (-1.25d+161)) then
tmp = c * ((c * (b * i)) * (-2.0d0))
else if (c <= (-4100000000000.0d0)) then
tmp = t_2
else if (c <= 3.6d-142) then
tmp = 2.0d0 * ((z * t) + (x * y))
else if (c <= 3.4d+53) then
tmp = 2.0d0 * ((x * y) - t_1)
else if ((c <= 3.2d+101) .or. (.not. (c <= 1.35d+240))) then
tmp = ((c * c) * (b * i)) * (-2.0d0)
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = i * (a * c);
double t_2 = 2.0 * ((z * t) - t_1);
double tmp;
if (c <= -1.25e+161) {
tmp = c * ((c * (b * i)) * -2.0);
} else if (c <= -4100000000000.0) {
tmp = t_2;
} else if (c <= 3.6e-142) {
tmp = 2.0 * ((z * t) + (x * y));
} else if (c <= 3.4e+53) {
tmp = 2.0 * ((x * y) - t_1);
} else if ((c <= 3.2e+101) || !(c <= 1.35e+240)) {
tmp = ((c * c) * (b * i)) * -2.0;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = i * (a * c) t_2 = 2.0 * ((z * t) - t_1) tmp = 0 if c <= -1.25e+161: tmp = c * ((c * (b * i)) * -2.0) elif c <= -4100000000000.0: tmp = t_2 elif c <= 3.6e-142: tmp = 2.0 * ((z * t) + (x * y)) elif c <= 3.4e+53: tmp = 2.0 * ((x * y) - t_1) elif (c <= 3.2e+101) or not (c <= 1.35e+240): tmp = ((c * c) * (b * i)) * -2.0 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(i * Float64(a * c)) t_2 = Float64(2.0 * Float64(Float64(z * t) - t_1)) tmp = 0.0 if (c <= -1.25e+161) tmp = Float64(c * Float64(Float64(c * Float64(b * i)) * -2.0)); elseif (c <= -4100000000000.0) tmp = t_2; elseif (c <= 3.6e-142) tmp = Float64(2.0 * Float64(Float64(z * t) + Float64(x * y))); elseif (c <= 3.4e+53) tmp = Float64(2.0 * Float64(Float64(x * y) - t_1)); elseif ((c <= 3.2e+101) || !(c <= 1.35e+240)) tmp = Float64(Float64(Float64(c * c) * Float64(b * i)) * -2.0); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = i * (a * c); t_2 = 2.0 * ((z * t) - t_1); tmp = 0.0; if (c <= -1.25e+161) tmp = c * ((c * (b * i)) * -2.0); elseif (c <= -4100000000000.0) tmp = t_2; elseif (c <= 3.6e-142) tmp = 2.0 * ((z * t) + (x * y)); elseif (c <= 3.4e+53) tmp = 2.0 * ((x * y) - t_1); elseif ((c <= 3.2e+101) || ~((c <= 1.35e+240))) tmp = ((c * c) * (b * i)) * -2.0; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(i * N[(a * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(N[(z * t), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.25e+161], N[(c * N[(N[(c * N[(b * i), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -4100000000000.0], t$95$2, If[LessEqual[c, 3.6e-142], N[(2.0 * N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 3.4e+53], N[(2.0 * N[(N[(x * y), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[c, 3.2e+101], N[Not[LessEqual[c, 1.35e+240]], $MachinePrecision]], N[(N[(N[(c * c), $MachinePrecision] * N[(b * i), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := i \cdot \left(a \cdot c\right)\\
t_2 := 2 \cdot \left(z \cdot t - t_1\right)\\
\mathbf{if}\;c \leq -1.25 \cdot 10^{+161}:\\
\;\;\;\;c \cdot \left(\left(c \cdot \left(b \cdot i\right)\right) \cdot -2\right)\\
\mathbf{elif}\;c \leq -4100000000000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq 3.6 \cdot 10^{-142}:\\
\;\;\;\;2 \cdot \left(z \cdot t + x \cdot y\right)\\
\mathbf{elif}\;c \leq 3.4 \cdot 10^{+53}:\\
\;\;\;\;2 \cdot \left(x \cdot y - t_1\right)\\
\mathbf{elif}\;c \leq 3.2 \cdot 10^{+101} \lor \neg \left(c \leq 1.35 \cdot 10^{+240}\right):\\
\;\;\;\;\left(\left(c \cdot c\right) \cdot \left(b \cdot i\right)\right) \cdot -2\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if c < -1.2499999999999999e161Initial program 81.6%
Taylor expanded in b around inf 73.4%
mul-1-neg73.4%
distribute-rgt-neg-in73.4%
unpow273.4%
Simplified73.4%
Taylor expanded in c around 0 73.4%
*-commutative73.4%
unpow273.4%
*-commutative73.4%
associate-*l*78.6%
associate-*l*78.6%
*-commutative78.6%
Simplified78.6%
if -1.2499999999999999e161 < c < -4.1e12 or 3.20000000000000005e101 < c < 1.3499999999999999e240Initial program 84.6%
Taylor expanded in a around inf 70.0%
Taylor expanded in x around 0 64.1%
*-commutative64.1%
*-commutative64.1%
associate-*l*61.9%
*-commutative61.9%
Simplified61.9%
if -4.1e12 < c < 3.6e-142Initial program 99.1%
Taylor expanded in c around 0 85.8%
if 3.6e-142 < c < 3.39999999999999998e53Initial program 94.2%
Taylor expanded in a around inf 85.9%
Taylor expanded in z around 0 64.1%
*-commutative64.1%
*-commutative64.1%
associate-*l*66.6%
*-commutative66.6%
Simplified66.6%
if 3.39999999999999998e53 < c < 3.20000000000000005e101 or 1.3499999999999999e240 < c Initial program 94.8%
Taylor expanded in b around inf 80.7%
mul-1-neg80.7%
distribute-rgt-neg-in80.7%
unpow280.7%
Simplified80.7%
Taylor expanded in c around 0 80.7%
unpow280.7%
Simplified80.7%
Final simplification77.1%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (* x y) -4e+161) (not (<= (* x y) 1e+38))) (* 2.0 (+ (* z t) (* x y))) (* 2.0 (- (* z t) (* c (* (+ a (* b c)) i))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((x * y) <= -4e+161) || !((x * y) <= 1e+38)) {
tmp = 2.0 * ((z * t) + (x * y));
} else {
tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (((x * y) <= (-4d+161)) .or. (.not. ((x * y) <= 1d+38))) then
tmp = 2.0d0 * ((z * t) + (x * y))
else
tmp = 2.0d0 * ((z * t) - (c * ((a + (b * c)) * i)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((x * y) <= -4e+161) || !((x * y) <= 1e+38)) {
tmp = 2.0 * ((z * t) + (x * y));
} else {
tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((x * y) <= -4e+161) or not ((x * y) <= 1e+38): tmp = 2.0 * ((z * t) + (x * y)) else: tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(x * y) <= -4e+161) || !(Float64(x * y) <= 1e+38)) tmp = Float64(2.0 * Float64(Float64(z * t) + Float64(x * y))); else tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(Float64(a + Float64(b * c)) * i)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (((x * y) <= -4e+161) || ~(((x * y) <= 1e+38))) tmp = 2.0 * ((z * t) + (x * y)); else tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(x * y), $MachinePrecision], -4e+161], N[Not[LessEqual[N[(x * y), $MachinePrecision], 1e+38]], $MachinePrecision]], N[(2.0 * N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -4 \cdot 10^{+161} \lor \neg \left(x \cdot y \leq 10^{+38}\right):\\
\;\;\;\;2 \cdot \left(z \cdot t + x \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\
\end{array}
\end{array}
if (*.f64 x y) < -4.0000000000000002e161 or 9.99999999999999977e37 < (*.f64 x y) Initial program 93.3%
Taylor expanded in c around 0 79.1%
if -4.0000000000000002e161 < (*.f64 x y) < 9.99999999999999977e37Initial program 92.5%
Taylor expanded in x around 0 89.0%
Final simplification85.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* c (* (+ a (* b c)) i))))
(if (or (<= (* z t) -5e+15) (not (<= (* z t) 2e-15)))
(* 2.0 (- (* z t) t_1))
(* 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 = c * ((a + (b * c)) * i);
double tmp;
if (((z * t) <= -5e+15) || !((z * t) <= 2e-15)) {
tmp = 2.0 * ((z * t) - t_1);
} else {
tmp = 2.0 * ((x * y) - t_1);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = c * ((a + (b * c)) * i)
if (((z * t) <= (-5d+15)) .or. (.not. ((z * t) <= 2d-15))) then
tmp = 2.0d0 * ((z * t) - t_1)
else
tmp = 2.0d0 * ((x * y) - t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = c * ((a + (b * c)) * i);
double tmp;
if (((z * t) <= -5e+15) || !((z * t) <= 2e-15)) {
tmp = 2.0 * ((z * t) - t_1);
} else {
tmp = 2.0 * ((x * y) - t_1);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = c * ((a + (b * c)) * i) tmp = 0 if ((z * t) <= -5e+15) or not ((z * t) <= 2e-15): tmp = 2.0 * ((z * t) - t_1) else: tmp = 2.0 * ((x * y) - t_1) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(c * Float64(Float64(a + Float64(b * c)) * i)) tmp = 0.0 if ((Float64(z * t) <= -5e+15) || !(Float64(z * t) <= 2e-15)) tmp = Float64(2.0 * Float64(Float64(z * t) - t_1)); else tmp = Float64(2.0 * Float64(Float64(x * y) - t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = c * ((a + (b * c)) * i); tmp = 0.0; if (((z * t) <= -5e+15) || ~(((z * t) <= 2e-15))) tmp = 2.0 * ((z * t) - t_1); else tmp = 2.0 * ((x * y) - t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[N[(z * t), $MachinePrecision], -5e+15], N[Not[LessEqual[N[(z * t), $MachinePrecision], 2e-15]], $MachinePrecision]], N[(2.0 * N[(N[(z * t), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(x * y), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\\
\mathbf{if}\;z \cdot t \leq -5 \cdot 10^{+15} \lor \neg \left(z \cdot t \leq 2 \cdot 10^{-15}\right):\\
\;\;\;\;2 \cdot \left(z \cdot t - t_1\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y - t_1\right)\\
\end{array}
\end{array}
if (*.f64 z t) < -5e15 or 2.0000000000000002e-15 < (*.f64 z t) Initial program 89.7%
Taylor expanded in x around 0 86.4%
if -5e15 < (*.f64 z t) < 2.0000000000000002e-15Initial program 95.6%
Taylor expanded in z around 0 87.3%
Final simplification86.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (+ (* z t) (* x y)))))
(if (<= (* x y) -1e+60)
t_1
(if (<= (* x y) 2e-17)
(* 2.0 (- (* z t) (* i (* a c))))
(if (<= (* x y) 1e+38) (* c (* (* c (* b i)) -2.0)) 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 * ((z * t) + (x * y));
double tmp;
if ((x * y) <= -1e+60) {
tmp = t_1;
} else if ((x * y) <= 2e-17) {
tmp = 2.0 * ((z * t) - (i * (a * c)));
} else if ((x * y) <= 1e+38) {
tmp = c * ((c * (b * i)) * -2.0);
} 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 * ((z * t) + (x * y))
if ((x * y) <= (-1d+60)) then
tmp = t_1
else if ((x * y) <= 2d-17) then
tmp = 2.0d0 * ((z * t) - (i * (a * c)))
else if ((x * y) <= 1d+38) then
tmp = c * ((c * (b * i)) * (-2.0d0))
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 * ((z * t) + (x * y));
double tmp;
if ((x * y) <= -1e+60) {
tmp = t_1;
} else if ((x * y) <= 2e-17) {
tmp = 2.0 * ((z * t) - (i * (a * c)));
} else if ((x * y) <= 1e+38) {
tmp = c * ((c * (b * i)) * -2.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * ((z * t) + (x * y)) tmp = 0 if (x * y) <= -1e+60: tmp = t_1 elif (x * y) <= 2e-17: tmp = 2.0 * ((z * t) - (i * (a * c))) elif (x * y) <= 1e+38: tmp = c * ((c * (b * i)) * -2.0) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(Float64(z * t) + Float64(x * y))) tmp = 0.0 if (Float64(x * y) <= -1e+60) tmp = t_1; elseif (Float64(x * y) <= 2e-17) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(i * Float64(a * c)))); elseif (Float64(x * y) <= 1e+38) tmp = Float64(c * Float64(Float64(c * Float64(b * i)) * -2.0)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 2.0 * ((z * t) + (x * y)); tmp = 0.0; if ((x * y) <= -1e+60) tmp = t_1; elseif ((x * y) <= 2e-17) tmp = 2.0 * ((z * t) - (i * (a * c))); elseif ((x * y) <= 1e+38) tmp = c * ((c * (b * i)) * -2.0); 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[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -1e+60], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 2e-17], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(i * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 1e+38], N[(c * N[(N[(c * N[(b * i), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(z \cdot t + x \cdot y\right)\\
\mathbf{if}\;x \cdot y \leq -1 \cdot 10^{+60}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{-17}:\\
\;\;\;\;2 \cdot \left(z \cdot t - i \cdot \left(a \cdot c\right)\right)\\
\mathbf{elif}\;x \cdot y \leq 10^{+38}:\\
\;\;\;\;c \cdot \left(\left(c \cdot \left(b \cdot i\right)\right) \cdot -2\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (*.f64 x y) < -9.9999999999999995e59 or 9.99999999999999977e37 < (*.f64 x y) Initial program 92.0%
Taylor expanded in c around 0 76.3%
if -9.9999999999999995e59 < (*.f64 x y) < 2.00000000000000014e-17Initial program 93.5%
Taylor expanded in a around inf 74.6%
Taylor expanded in x around 0 69.6%
*-commutative69.6%
*-commutative69.6%
associate-*l*68.1%
*-commutative68.1%
Simplified68.1%
if 2.00000000000000014e-17 < (*.f64 x y) < 9.99999999999999977e37Initial program 88.5%
Taylor expanded in b around inf 78.2%
mul-1-neg78.2%
distribute-rgt-neg-in78.2%
unpow278.2%
Simplified78.2%
Taylor expanded in c around 0 78.2%
*-commutative78.2%
unpow278.2%
*-commutative78.2%
associate-*l*78.8%
associate-*l*78.8%
*-commutative78.8%
Simplified78.8%
Final simplification71.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (+ (* z t) (* x y)))))
(if (<= (* x y) -1e+134)
t_1
(if (<= (* x y) 2e-17)
(* 2.0 (- (* z t) (* a (* c i))))
(if (<= (* x y) 1e+38) (* c (* (* c (* b i)) -2.0)) 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 * ((z * t) + (x * y));
double tmp;
if ((x * y) <= -1e+134) {
tmp = t_1;
} else if ((x * y) <= 2e-17) {
tmp = 2.0 * ((z * t) - (a * (c * i)));
} else if ((x * y) <= 1e+38) {
tmp = c * ((c * (b * i)) * -2.0);
} 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 * ((z * t) + (x * y))
if ((x * y) <= (-1d+134)) then
tmp = t_1
else if ((x * y) <= 2d-17) then
tmp = 2.0d0 * ((z * t) - (a * (c * i)))
else if ((x * y) <= 1d+38) then
tmp = c * ((c * (b * i)) * (-2.0d0))
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 * ((z * t) + (x * y));
double tmp;
if ((x * y) <= -1e+134) {
tmp = t_1;
} else if ((x * y) <= 2e-17) {
tmp = 2.0 * ((z * t) - (a * (c * i)));
} else if ((x * y) <= 1e+38) {
tmp = c * ((c * (b * i)) * -2.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * ((z * t) + (x * y)) tmp = 0 if (x * y) <= -1e+134: tmp = t_1 elif (x * y) <= 2e-17: tmp = 2.0 * ((z * t) - (a * (c * i))) elif (x * y) <= 1e+38: tmp = c * ((c * (b * i)) * -2.0) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(Float64(z * t) + Float64(x * y))) tmp = 0.0 if (Float64(x * y) <= -1e+134) tmp = t_1; elseif (Float64(x * y) <= 2e-17) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(a * Float64(c * i)))); elseif (Float64(x * y) <= 1e+38) tmp = Float64(c * Float64(Float64(c * Float64(b * i)) * -2.0)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 2.0 * ((z * t) + (x * y)); tmp = 0.0; if ((x * y) <= -1e+134) tmp = t_1; elseif ((x * y) <= 2e-17) tmp = 2.0 * ((z * t) - (a * (c * i))); elseif ((x * y) <= 1e+38) tmp = c * ((c * (b * i)) * -2.0); 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[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -1e+134], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 2e-17], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 1e+38], N[(c * N[(N[(c * N[(b * i), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(z \cdot t + x \cdot y\right)\\
\mathbf{if}\;x \cdot y \leq -1 \cdot 10^{+134}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{-17}:\\
\;\;\;\;2 \cdot \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\\
\mathbf{elif}\;x \cdot y \leq 10^{+38}:\\
\;\;\;\;c \cdot \left(\left(c \cdot \left(b \cdot i\right)\right) \cdot -2\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (*.f64 x y) < -9.99999999999999921e133 or 9.99999999999999977e37 < (*.f64 x y) Initial program 93.4%
Taylor expanded in c around 0 78.3%
if -9.99999999999999921e133 < (*.f64 x y) < 2.00000000000000014e-17Initial program 92.7%
Taylor expanded in a around inf 74.1%
Taylor expanded in x around 0 68.2%
*-commutative68.2%
*-commutative68.2%
associate-*l*66.9%
*-commutative66.9%
Simplified66.9%
sub-neg66.9%
*-commutative66.9%
*-commutative66.9%
*-commutative66.9%
associate-*r*71.1%
Applied egg-rr71.1%
if 2.00000000000000014e-17 < (*.f64 x y) < 9.99999999999999977e37Initial program 88.5%
Taylor expanded in b around inf 78.2%
mul-1-neg78.2%
distribute-rgt-neg-in78.2%
unpow278.2%
Simplified78.2%
Taylor expanded in c around 0 78.2%
*-commutative78.2%
unpow278.2%
*-commutative78.2%
associate-*l*78.8%
associate-*l*78.8%
*-commutative78.8%
Simplified78.8%
Final simplification73.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= c -1.25e+60) (not (<= c 3.1e+14))) (* 2.0 (- (* z t) (* c (* (+ a (* b c)) i)))) (* 2.0 (- (+ (* z t) (* x y)) (* 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 <= -1.25e+60) || !(c <= 3.1e+14)) {
tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i)));
} else {
tmp = 2.0 * (((z * t) + (x * y)) - (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 <= (-1.25d+60)) .or. (.not. (c <= 3.1d+14))) then
tmp = 2.0d0 * ((z * t) - (c * ((a + (b * c)) * i)))
else
tmp = 2.0d0 * (((z * t) + (x * y)) - (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 <= -1.25e+60) || !(c <= 3.1e+14)) {
tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i)));
} else {
tmp = 2.0 * (((z * t) + (x * y)) - (i * (a * c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c <= -1.25e+60) or not (c <= 3.1e+14): tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i))) else: tmp = 2.0 * (((z * t) + (x * y)) - (i * (a * c))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((c <= -1.25e+60) || !(c <= 3.1e+14)) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(Float64(a + Float64(b * c)) * i)))); else tmp = Float64(2.0 * Float64(Float64(Float64(z * t) + Float64(x * y)) - 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 <= -1.25e+60) || ~((c <= 3.1e+14))) tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i))); else tmp = 2.0 * (((z * t) + (x * y)) - (i * (a * c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[c, -1.25e+60], N[Not[LessEqual[c, 3.1e+14]], $MachinePrecision]], 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[(N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] - N[(i * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -1.25 \cdot 10^{+60} \lor \neg \left(c \leq 3.1 \cdot 10^{+14}\right):\\
\;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(z \cdot t + x \cdot y\right) - i \cdot \left(a \cdot c\right)\right)\\
\end{array}
\end{array}
if c < -1.24999999999999994e60 or 3.1e14 < c Initial program 84.8%
Taylor expanded in x around 0 89.3%
if -1.24999999999999994e60 < c < 3.1e14Initial program 98.6%
Taylor expanded in a around inf 94.5%
Final simplification92.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* c (* (+ a (* b c)) i))))
(if (<= c -1.2e+62)
(* 2.0 (- (* z t) t_1))
(if (<= c 2.6e+40)
(* 2.0 (- (+ (* z t) (* x y)) (* a (* c i))))
(* 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 = c * ((a + (b * c)) * i);
double tmp;
if (c <= -1.2e+62) {
tmp = 2.0 * ((z * t) - t_1);
} else if (c <= 2.6e+40) {
tmp = 2.0 * (((z * t) + (x * y)) - (a * (c * i)));
} else {
tmp = 2.0 * ((x * y) - t_1);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = c * ((a + (b * c)) * i)
if (c <= (-1.2d+62)) then
tmp = 2.0d0 * ((z * t) - t_1)
else if (c <= 2.6d+40) then
tmp = 2.0d0 * (((z * t) + (x * y)) - (a * (c * i)))
else
tmp = 2.0d0 * ((x * y) - t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = c * ((a + (b * c)) * i);
double tmp;
if (c <= -1.2e+62) {
tmp = 2.0 * ((z * t) - t_1);
} else if (c <= 2.6e+40) {
tmp = 2.0 * (((z * t) + (x * y)) - (a * (c * i)));
} else {
tmp = 2.0 * ((x * y) - t_1);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = c * ((a + (b * c)) * i) tmp = 0 if c <= -1.2e+62: tmp = 2.0 * ((z * t) - t_1) elif c <= 2.6e+40: tmp = 2.0 * (((z * t) + (x * y)) - (a * (c * i))) else: tmp = 2.0 * ((x * y) - t_1) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(c * Float64(Float64(a + Float64(b * c)) * i)) tmp = 0.0 if (c <= -1.2e+62) tmp = Float64(2.0 * Float64(Float64(z * t) - t_1)); elseif (c <= 2.6e+40) tmp = Float64(2.0 * Float64(Float64(Float64(z * t) + Float64(x * y)) - Float64(a * Float64(c * i)))); else tmp = Float64(2.0 * Float64(Float64(x * y) - t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = c * ((a + (b * c)) * i); tmp = 0.0; if (c <= -1.2e+62) tmp = 2.0 * ((z * t) - t_1); elseif (c <= 2.6e+40) tmp = 2.0 * (((z * t) + (x * y)) - (a * (c * i))); else tmp = 2.0 * ((x * y) - t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.2e+62], N[(2.0 * N[(N[(z * t), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.6e+40], N[(2.0 * N[(N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(x * y), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\\
\mathbf{if}\;c \leq -1.2 \cdot 10^{+62}:\\
\;\;\;\;2 \cdot \left(z \cdot t - t_1\right)\\
\mathbf{elif}\;c \leq 2.6 \cdot 10^{+40}:\\
\;\;\;\;2 \cdot \left(\left(z \cdot t + x \cdot y\right) - a \cdot \left(c \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y - t_1\right)\\
\end{array}
\end{array}
if c < -1.2e62Initial program 84.8%
Taylor expanded in x around 0 93.2%
if -1.2e62 < c < 2.6000000000000001e40Initial program 98.0%
associate-*l*98.6%
fma-def99.3%
Simplified99.3%
fma-def98.6%
+-commutative98.6%
Applied egg-rr98.6%
Taylor expanded in a around inf 94.2%
if 2.6000000000000001e40 < c Initial program 84.7%
Taylor expanded in z around 0 84.8%
Final simplification92.3%
(FPCore (x y z t a b c i) :precision binary64 (* 2.0 (- (+ (* z t) (* x y)) (* (+ 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 * (((z * t) + (x * y)) - ((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 * (((z * t) + (x * y)) - ((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 * (((z * t) + (x * y)) - ((a + (b * c)) * (c * i)));
}
def code(x, y, z, t, a, b, c, i): return 2.0 * (((z * t) + (x * y)) - ((a + (b * c)) * (c * i)))
function code(x, y, z, t, a, b, c, i) return Float64(2.0 * Float64(Float64(Float64(z * t) + Float64(x * y)) - Float64(Float64(a + Float64(b * c)) * Float64(c * i)))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = 2.0 * (((z * t) + (x * y)) - ((a + (b * c)) * (c * i))); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(2.0 * N[(N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] - N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(\left(z \cdot t + x \cdot y\right) - \left(a + b \cdot c\right) \cdot \left(c \cdot i\right)\right)
\end{array}
Initial program 92.8%
associate-*l*97.6%
fma-def98.0%
Simplified98.0%
fma-def97.6%
+-commutative97.6%
Applied egg-rr97.6%
Final simplification97.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (* z t))))
(if (<= z -1.35e+107)
t_1
(if (<= z -7.5e-217)
(* 2.0 (* x y))
(if (<= z 3e-18) (* (* c -2.0) (* a i)) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * (z * t);
double tmp;
if (z <= -1.35e+107) {
tmp = t_1;
} else if (z <= -7.5e-217) {
tmp = 2.0 * (x * y);
} else if (z <= 3e-18) {
tmp = (c * -2.0) * (a * i);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = 2.0d0 * (z * t)
if (z <= (-1.35d+107)) then
tmp = t_1
else if (z <= (-7.5d-217)) then
tmp = 2.0d0 * (x * y)
else if (z <= 3d-18) then
tmp = (c * (-2.0d0)) * (a * i)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * (z * t);
double tmp;
if (z <= -1.35e+107) {
tmp = t_1;
} else if (z <= -7.5e-217) {
tmp = 2.0 * (x * y);
} else if (z <= 3e-18) {
tmp = (c * -2.0) * (a * i);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * (z * t) tmp = 0 if z <= -1.35e+107: tmp = t_1 elif z <= -7.5e-217: tmp = 2.0 * (x * y) elif z <= 3e-18: tmp = (c * -2.0) * (a * i) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(z * t)) tmp = 0.0 if (z <= -1.35e+107) tmp = t_1; elseif (z <= -7.5e-217) tmp = Float64(2.0 * Float64(x * y)); elseif (z <= 3e-18) tmp = Float64(Float64(c * -2.0) * Float64(a * i)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 2.0 * (z * t); tmp = 0.0; if (z <= -1.35e+107) tmp = t_1; elseif (z <= -7.5e-217) tmp = 2.0 * (x * y); elseif (z <= 3e-18) tmp = (c * -2.0) * (a * i); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.35e+107], t$95$1, If[LessEqual[z, -7.5e-217], N[(2.0 * N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3e-18], N[(N[(c * -2.0), $MachinePrecision] * N[(a * i), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(z \cdot t\right)\\
\mathbf{if}\;z \leq -1.35 \cdot 10^{+107}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -7.5 \cdot 10^{-217}:\\
\;\;\;\;2 \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;z \leq 3 \cdot 10^{-18}:\\
\;\;\;\;\left(c \cdot -2\right) \cdot \left(a \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.3500000000000001e107 or 2.99999999999999983e-18 < z Initial program 93.7%
Taylor expanded in z around inf 51.2%
if -1.3500000000000001e107 < z < -7.50000000000000031e-217Initial program 94.3%
Taylor expanded in x around inf 36.3%
if -7.50000000000000031e-217 < z < 2.99999999999999983e-18Initial program 90.1%
Taylor expanded in a around inf 33.3%
associate-*r*33.3%
neg-mul-133.3%
Simplified33.3%
Taylor expanded in c around 0 33.3%
associate-*r*33.3%
*-commutative33.3%
Simplified33.3%
Final simplification41.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= c -3e+141) (not (<= c 3.2e+41))) (* (* (* c c) (* b i)) -2.0) (* 2.0 (+ (* z t) (* x y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c <= -3e+141) || !(c <= 3.2e+41)) {
tmp = ((c * c) * (b * i)) * -2.0;
} else {
tmp = 2.0 * ((z * t) + (x * y));
}
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 <= (-3d+141)) .or. (.not. (c <= 3.2d+41))) then
tmp = ((c * c) * (b * i)) * (-2.0d0)
else
tmp = 2.0d0 * ((z * t) + (x * y))
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 <= -3e+141) || !(c <= 3.2e+41)) {
tmp = ((c * c) * (b * i)) * -2.0;
} else {
tmp = 2.0 * ((z * t) + (x * y));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c <= -3e+141) or not (c <= 3.2e+41): tmp = ((c * c) * (b * i)) * -2.0 else: tmp = 2.0 * ((z * t) + (x * y)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((c <= -3e+141) || !(c <= 3.2e+41)) tmp = Float64(Float64(Float64(c * c) * Float64(b * i)) * -2.0); else tmp = Float64(2.0 * Float64(Float64(z * t) + Float64(x * y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((c <= -3e+141) || ~((c <= 3.2e+41))) tmp = ((c * c) * (b * i)) * -2.0; else tmp = 2.0 * ((z * t) + (x * y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[c, -3e+141], N[Not[LessEqual[c, 3.2e+41]], $MachinePrecision]], N[(N[(N[(c * c), $MachinePrecision] * N[(b * i), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision], N[(2.0 * N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -3 \cdot 10^{+141} \lor \neg \left(c \leq 3.2 \cdot 10^{+41}\right):\\
\;\;\;\;\left(\left(c \cdot c\right) \cdot \left(b \cdot i\right)\right) \cdot -2\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(z \cdot t + x \cdot y\right)\\
\end{array}
\end{array}
if c < -2.9999999999999999e141 or 3.2000000000000001e41 < c Initial program 84.3%
Taylor expanded in b around inf 62.2%
mul-1-neg62.2%
distribute-rgt-neg-in62.2%
unpow262.2%
Simplified62.2%
Taylor expanded in c around 0 62.2%
unpow262.2%
Simplified62.2%
if -2.9999999999999999e141 < c < 3.2000000000000001e41Initial program 97.0%
Taylor expanded in c around 0 74.3%
Final simplification70.3%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= c -3e+141)
(* c (* (* c (* b i)) -2.0))
(if (<= c 1.15e+42)
(* 2.0 (+ (* z t) (* x y)))
(* (* (* c c) (* b i)) -2.0))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (c <= -3e+141) {
tmp = c * ((c * (b * i)) * -2.0);
} else if (c <= 1.15e+42) {
tmp = 2.0 * ((z * t) + (x * y));
} else {
tmp = ((c * c) * (b * i)) * -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 <= (-3d+141)) then
tmp = c * ((c * (b * i)) * (-2.0d0))
else if (c <= 1.15d+42) then
tmp = 2.0d0 * ((z * t) + (x * y))
else
tmp = ((c * c) * (b * i)) * (-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 <= -3e+141) {
tmp = c * ((c * (b * i)) * -2.0);
} else if (c <= 1.15e+42) {
tmp = 2.0 * ((z * t) + (x * y));
} else {
tmp = ((c * c) * (b * i)) * -2.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if c <= -3e+141: tmp = c * ((c * (b * i)) * -2.0) elif c <= 1.15e+42: tmp = 2.0 * ((z * t) + (x * y)) else: tmp = ((c * c) * (b * i)) * -2.0 return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (c <= -3e+141) tmp = Float64(c * Float64(Float64(c * Float64(b * i)) * -2.0)); elseif (c <= 1.15e+42) tmp = Float64(2.0 * Float64(Float64(z * t) + Float64(x * y))); else tmp = Float64(Float64(Float64(c * c) * Float64(b * i)) * -2.0); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (c <= -3e+141) tmp = c * ((c * (b * i)) * -2.0); elseif (c <= 1.15e+42) tmp = 2.0 * ((z * t) + (x * y)); else tmp = ((c * c) * (b * i)) * -2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[c, -3e+141], N[(c * N[(N[(c * N[(b * i), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.15e+42], N[(2.0 * N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(c * c), $MachinePrecision] * N[(b * i), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -3 \cdot 10^{+141}:\\
\;\;\;\;c \cdot \left(\left(c \cdot \left(b \cdot i\right)\right) \cdot -2\right)\\
\mathbf{elif}\;c \leq 1.15 \cdot 10^{+42}:\\
\;\;\;\;2 \cdot \left(z \cdot t + x \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(c \cdot c\right) \cdot \left(b \cdot i\right)\right) \cdot -2\\
\end{array}
\end{array}
if c < -2.9999999999999999e141Initial program 83.8%
Taylor expanded in b around inf 69.6%
mul-1-neg69.6%
distribute-rgt-neg-in69.6%
unpow269.6%
Simplified69.6%
Taylor expanded in c around 0 69.6%
*-commutative69.6%
unpow269.6%
*-commutative69.6%
associate-*l*74.2%
associate-*l*74.2%
*-commutative74.2%
Simplified74.2%
if -2.9999999999999999e141 < c < 1.15e42Initial program 97.0%
Taylor expanded in c around 0 74.3%
if 1.15e42 < c Initial program 84.7%
Taylor expanded in b around inf 55.2%
mul-1-neg55.2%
distribute-rgt-neg-in55.2%
unpow255.2%
Simplified55.2%
Taylor expanded in c around 0 55.2%
unpow255.2%
Simplified55.2%
Final simplification71.0%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -7.5e+115) (not (<= x 4.6e-83))) (* 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 ((x <= -7.5e+115) || !(x <= 4.6e-83)) {
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 ((x <= (-7.5d+115)) .or. (.not. (x <= 4.6d-83))) 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 ((x <= -7.5e+115) || !(x <= 4.6e-83)) {
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 (x <= -7.5e+115) or not (x <= 4.6e-83): 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 ((x <= -7.5e+115) || !(x <= 4.6e-83)) 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 ((x <= -7.5e+115) || ~((x <= 4.6e-83))) 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[x, -7.5e+115], N[Not[LessEqual[x, 4.6e-83]], $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}\;x \leq -7.5 \cdot 10^{+115} \lor \neg \left(x \leq 4.6 \cdot 10^{-83}\right):\\
\;\;\;\;2 \cdot \left(x \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(z \cdot t\right)\\
\end{array}
\end{array}
if x < -7.4999999999999997e115 or 4.59999999999999979e-83 < x Initial program 92.9%
Taylor expanded in x around inf 46.1%
if -7.4999999999999997e115 < x < 4.59999999999999979e-83Initial program 92.7%
Taylor expanded in z around inf 37.5%
Final simplification41.3%
(FPCore (x y z t a b c i) :precision binary64 (* 2.0 (* z t)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (z * t);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = 2.0d0 * (z * t)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (z * t);
}
def code(x, y, z, t, a, b, c, i): return 2.0 * (z * t)
function code(x, y, z, t, a, b, c, i) return Float64(2.0 * Float64(z * t)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = 2.0 * (z * t); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(z \cdot t\right)
\end{array}
Initial program 92.8%
Taylor expanded in z around inf 31.4%
Final simplification31.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 2023215
(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))))