
(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 17 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 (* (* c t_1) i)))
(if (or (<= t_2 (- INFINITY)) (not (<= t_2 2e+281)))
(* -2.0 (* c (* t_1 i)))
(* (- (+ (* z t) (* x y)) t_2) 2.0))))
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 <= -((double) INFINITY)) || !(t_2 <= 2e+281)) {
tmp = -2.0 * (c * (t_1 * i));
} else {
tmp = (((z * t) + (x * y)) - t_2) * 2.0;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double t_2 = (c * t_1) * i;
double tmp;
if ((t_2 <= -Double.POSITIVE_INFINITY) || !(t_2 <= 2e+281)) {
tmp = -2.0 * (c * (t_1 * i));
} else {
tmp = (((z * t) + (x * y)) - t_2) * 2.0;
}
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 <= -math.inf) or not (t_2 <= 2e+281): tmp = -2.0 * (c * (t_1 * i)) else: tmp = (((z * t) + (x * y)) - t_2) * 2.0 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 <= Float64(-Inf)) || !(t_2 <= 2e+281)) tmp = Float64(-2.0 * Float64(c * Float64(t_1 * i))); else tmp = Float64(Float64(Float64(Float64(z * t) + Float64(x * y)) - t_2) * 2.0); 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 <= -Inf) || ~((t_2 <= 2e+281))) tmp = -2.0 * (c * (t_1 * i)); else tmp = (((z * t) + (x * y)) - t_2) * 2.0; 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[Or[LessEqual[t$95$2, (-Infinity)], N[Not[LessEqual[t$95$2, 2e+281]], $MachinePrecision]], N[(-2.0 * N[(c * N[(t$95$1 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision] * 2.0), $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 -\infty \lor \neg \left(t_2 \leq 2 \cdot 10^{+281}\right):\\
\;\;\;\;-2 \cdot \left(c \cdot \left(t_1 \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(z \cdot t + x \cdot y\right) - t_2\right) \cdot 2\\
\end{array}
\end{array}
if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -inf.0 or 2.0000000000000001e281 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) Initial program 80.3%
Taylor expanded in i around inf 94.9%
Taylor expanded in i around 0 94.9%
if -inf.0 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 2.0000000000000001e281Initial program 98.5%
Final simplification96.9%
(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 (* (* c t_1) i)) INFINITY)
(* 2.0 (- t_2 (* t_1 (* c i))))
(* -2.0 (* c (* t_1 i))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double t_2 = (z * t) + (x * y);
double tmp;
if ((t_2 - ((c * t_1) * i)) <= ((double) INFINITY)) {
tmp = 2.0 * (t_2 - (t_1 * (c * i)));
} else {
tmp = -2.0 * (c * (t_1 * i));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double t_2 = (z * t) + (x * y);
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 * (c * (t_1 * i));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a + (b * c) t_2 = (z * t) + (x * y) tmp = 0 if (t_2 - ((c * t_1) * i)) <= math.inf: tmp = 2.0 * (t_2 - (t_1 * (c * i))) else: tmp = -2.0 * (c * (t_1 * i)) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(b * c)) t_2 = Float64(Float64(z * t) + Float64(x * y)) 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 * 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 = (z * t) + (x * y); tmp = 0.0; if ((t_2 - ((c * t_1) * i)) <= Inf) tmp = 2.0 * (t_2 - (t_1 * (c * i))); else tmp = -2.0 * (c * (t_1 * i)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z * t), $MachinePrecision] + N[(x * y), $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 * N[(c * N[(t$95$1 * i), $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 - \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 \left(c \cdot \left(t_1 \cdot i\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 94.9%
associate-*l*97.9%
fma-def97.9%
Simplified97.9%
fma-def97.9%
+-commutative97.9%
Applied egg-rr97.9%
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 i around inf 67.1%
Taylor expanded in i around 0 67.1%
Final simplification96.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (- (* z t) (* c (* a i)))))
(t_2 (* 2.0 (+ (* z t) (* x y))))
(t_3 (* -2.0 (* c (* (+ a (* b c)) i)))))
(if (<= c -1.15e+44)
t_3
(if (<= c -2.4e+14)
t_2
(if (<= c -1.4e-61)
t_1
(if (<= c 1e-88)
t_2
(if (<= c 3.95e+34) t_1 (if (<= c 1.5e+47) 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) - (c * (a * i)));
double t_2 = 2.0 * ((z * t) + (x * y));
double t_3 = -2.0 * (c * ((a + (b * c)) * i));
double tmp;
if (c <= -1.15e+44) {
tmp = t_3;
} else if (c <= -2.4e+14) {
tmp = t_2;
} else if (c <= -1.4e-61) {
tmp = t_1;
} else if (c <= 1e-88) {
tmp = t_2;
} else if (c <= 3.95e+34) {
tmp = t_1;
} else if (c <= 1.5e+47) {
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) - (c * (a * i)))
t_2 = 2.0d0 * ((z * t) + (x * y))
t_3 = (-2.0d0) * (c * ((a + (b * c)) * i))
if (c <= (-1.15d+44)) then
tmp = t_3
else if (c <= (-2.4d+14)) then
tmp = t_2
else if (c <= (-1.4d-61)) then
tmp = t_1
else if (c <= 1d-88) then
tmp = t_2
else if (c <= 3.95d+34) then
tmp = t_1
else if (c <= 1.5d+47) 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) - (c * (a * i)));
double t_2 = 2.0 * ((z * t) + (x * y));
double t_3 = -2.0 * (c * ((a + (b * c)) * i));
double tmp;
if (c <= -1.15e+44) {
tmp = t_3;
} else if (c <= -2.4e+14) {
tmp = t_2;
} else if (c <= -1.4e-61) {
tmp = t_1;
} else if (c <= 1e-88) {
tmp = t_2;
} else if (c <= 3.95e+34) {
tmp = t_1;
} else if (c <= 1.5e+47) {
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) - (c * (a * i))) t_2 = 2.0 * ((z * t) + (x * y)) t_3 = -2.0 * (c * ((a + (b * c)) * i)) tmp = 0 if c <= -1.15e+44: tmp = t_3 elif c <= -2.4e+14: tmp = t_2 elif c <= -1.4e-61: tmp = t_1 elif c <= 1e-88: tmp = t_2 elif c <= 3.95e+34: tmp = t_1 elif c <= 1.5e+47: 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(z * t) - Float64(c * Float64(a * i)))) t_2 = Float64(2.0 * Float64(Float64(z * t) + Float64(x * y))) t_3 = Float64(-2.0 * Float64(c * Float64(Float64(a + Float64(b * c)) * i))) tmp = 0.0 if (c <= -1.15e+44) tmp = t_3; elseif (c <= -2.4e+14) tmp = t_2; elseif (c <= -1.4e-61) tmp = t_1; elseif (c <= 1e-88) tmp = t_2; elseif (c <= 3.95e+34) tmp = t_1; elseif (c <= 1.5e+47) 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) - (c * (a * i))); t_2 = 2.0 * ((z * t) + (x * y)); t_3 = -2.0 * (c * ((a + (b * c)) * i)); tmp = 0.0; if (c <= -1.15e+44) tmp = t_3; elseif (c <= -2.4e+14) tmp = t_2; elseif (c <= -1.4e-61) tmp = t_1; elseif (c <= 1e-88) tmp = t_2; elseif (c <= 3.95e+34) tmp = t_1; elseif (c <= 1.5e+47) 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[(z * t), $MachinePrecision] - N[(c * N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(N[(z * t), $MachinePrecision] + N[(x * y), $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.15e+44], t$95$3, If[LessEqual[c, -2.4e+14], t$95$2, If[LessEqual[c, -1.4e-61], t$95$1, If[LessEqual[c, 1e-88], t$95$2, If[LessEqual[c, 3.95e+34], t$95$1, If[LessEqual[c, 1.5e+47], t$95$2, t$95$3]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(z \cdot t - c \cdot \left(a \cdot i\right)\right)\\
t_2 := 2 \cdot \left(z \cdot t + x \cdot y\right)\\
t_3 := -2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\
\mathbf{if}\;c \leq -1.15 \cdot 10^{+44}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;c \leq -2.4 \cdot 10^{+14}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq -1.4 \cdot 10^{-61}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq 10^{-88}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq 3.95 \cdot 10^{+34}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq 1.5 \cdot 10^{+47}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if c < -1.15000000000000002e44 or 1.5000000000000001e47 < c Initial program 81.5%
Taylor expanded in i around inf 89.8%
Taylor expanded in i around 0 89.8%
if -1.15000000000000002e44 < c < -2.4e14 or -1.4000000000000001e-61 < c < 9.99999999999999934e-89 or 3.94999999999999999e34 < c < 1.5000000000000001e47Initial program 97.8%
Taylor expanded in c around 0 83.5%
if -2.4e14 < c < -1.4000000000000001e-61 or 9.99999999999999934e-89 < c < 3.94999999999999999e34Initial program 97.9%
associate-*l*97.7%
fma-def97.7%
Simplified97.7%
fma-def97.7%
+-commutative97.7%
Applied egg-rr97.7%
Taylor expanded in a around inf 88.9%
associate-*r*89.0%
*-commutative89.0%
Simplified89.0%
Taylor expanded in x around 0 82.9%
Final simplification86.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (- (* z t) (* c (* a i)))))
(t_2 (* -2.0 (* c (* (+ a (* b c)) i))))
(t_3 (* 2.0 (+ (* z t) (* x y)))))
(if (<= c -7.4e+51)
t_2
(if (<= c -9.4e+14)
(* 2.0 (- (* x y) (* c (* i (* b c)))))
(if (<= c -1.3e-61)
t_1
(if (<= c 1.06e-88)
t_3
(if (<= c 4.1e+35) t_1 (if (<= c 1.45e+47) t_3 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) - (c * (a * i)));
double t_2 = -2.0 * (c * ((a + (b * c)) * i));
double t_3 = 2.0 * ((z * t) + (x * y));
double tmp;
if (c <= -7.4e+51) {
tmp = t_2;
} else if (c <= -9.4e+14) {
tmp = 2.0 * ((x * y) - (c * (i * (b * c))));
} else if (c <= -1.3e-61) {
tmp = t_1;
} else if (c <= 1.06e-88) {
tmp = t_3;
} else if (c <= 4.1e+35) {
tmp = t_1;
} else if (c <= 1.45e+47) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = 2.0d0 * ((z * t) - (c * (a * i)))
t_2 = (-2.0d0) * (c * ((a + (b * c)) * i))
t_3 = 2.0d0 * ((z * t) + (x * y))
if (c <= (-7.4d+51)) then
tmp = t_2
else if (c <= (-9.4d+14)) then
tmp = 2.0d0 * ((x * y) - (c * (i * (b * c))))
else if (c <= (-1.3d-61)) then
tmp = t_1
else if (c <= 1.06d-88) then
tmp = t_3
else if (c <= 4.1d+35) then
tmp = t_1
else if (c <= 1.45d+47) then
tmp = t_3
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) - (c * (a * i)));
double t_2 = -2.0 * (c * ((a + (b * c)) * i));
double t_3 = 2.0 * ((z * t) + (x * y));
double tmp;
if (c <= -7.4e+51) {
tmp = t_2;
} else if (c <= -9.4e+14) {
tmp = 2.0 * ((x * y) - (c * (i * (b * c))));
} else if (c <= -1.3e-61) {
tmp = t_1;
} else if (c <= 1.06e-88) {
tmp = t_3;
} else if (c <= 4.1e+35) {
tmp = t_1;
} else if (c <= 1.45e+47) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * ((z * t) - (c * (a * i))) t_2 = -2.0 * (c * ((a + (b * c)) * i)) t_3 = 2.0 * ((z * t) + (x * y)) tmp = 0 if c <= -7.4e+51: tmp = t_2 elif c <= -9.4e+14: tmp = 2.0 * ((x * y) - (c * (i * (b * c)))) elif c <= -1.3e-61: tmp = t_1 elif c <= 1.06e-88: tmp = t_3 elif c <= 4.1e+35: tmp = t_1 elif c <= 1.45e+47: tmp = t_3 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(a * i)))) t_2 = Float64(-2.0 * Float64(c * Float64(Float64(a + Float64(b * c)) * i))) t_3 = Float64(2.0 * Float64(Float64(z * t) + Float64(x * y))) tmp = 0.0 if (c <= -7.4e+51) tmp = t_2; elseif (c <= -9.4e+14) tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(c * Float64(i * Float64(b * c))))); elseif (c <= -1.3e-61) tmp = t_1; elseif (c <= 1.06e-88) tmp = t_3; elseif (c <= 4.1e+35) tmp = t_1; elseif (c <= 1.45e+47) tmp = t_3; 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) - (c * (a * i))); t_2 = -2.0 * (c * ((a + (b * c)) * i)); t_3 = 2.0 * ((z * t) + (x * y)); tmp = 0.0; if (c <= -7.4e+51) tmp = t_2; elseif (c <= -9.4e+14) tmp = 2.0 * ((x * y) - (c * (i * (b * c)))); elseif (c <= -1.3e-61) tmp = t_1; elseif (c <= 1.06e-88) tmp = t_3; elseif (c <= 4.1e+35) tmp = t_1; elseif (c <= 1.45e+47) tmp = t_3; 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[(z * t), $MachinePrecision] - N[(c * N[(a * i), $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]}, Block[{t$95$3 = N[(2.0 * N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -7.4e+51], t$95$2, If[LessEqual[c, -9.4e+14], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(c * N[(i * N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -1.3e-61], t$95$1, If[LessEqual[c, 1.06e-88], t$95$3, If[LessEqual[c, 4.1e+35], t$95$1, If[LessEqual[c, 1.45e+47], t$95$3, t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(z \cdot t - c \cdot \left(a \cdot i\right)\right)\\
t_2 := -2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\
t_3 := 2 \cdot \left(z \cdot t + x \cdot y\right)\\
\mathbf{if}\;c \leq -7.4 \cdot 10^{+51}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq -9.4 \cdot 10^{+14}:\\
\;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(i \cdot \left(b \cdot c\right)\right)\right)\\
\mathbf{elif}\;c \leq -1.3 \cdot 10^{-61}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq 1.06 \cdot 10^{-88}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;c \leq 4.1 \cdot 10^{+35}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq 1.45 \cdot 10^{+47}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if c < -7.4000000000000005e51 or 1.4499999999999999e47 < c Initial program 81.1%
Taylor expanded in i around inf 89.6%
Taylor expanded in i around 0 89.6%
if -7.4000000000000005e51 < c < -9.4e14Initial program 90.8%
Taylor expanded in a around 0 99.9%
unpow299.9%
associate-*r*99.9%
Simplified99.9%
Taylor expanded in z around 0 90.8%
unpow290.8%
associate-*r*90.8%
associate-*r*90.8%
*-commutative90.8%
associate-*l*90.8%
*-commutative90.8%
*-commutative90.8%
Simplified90.8%
if -9.4e14 < c < -1.30000000000000005e-61 or 1.06e-88 < c < 4.0999999999999998e35Initial program 97.9%
associate-*l*97.7%
fma-def97.7%
Simplified97.7%
fma-def97.7%
+-commutative97.7%
Applied egg-rr97.7%
Taylor expanded in a around inf 88.9%
associate-*r*89.0%
*-commutative89.0%
Simplified89.0%
Taylor expanded in x around 0 82.9%
if -1.30000000000000005e-61 < c < 1.06e-88 or 4.0999999999999998e35 < c < 1.4499999999999999e47Initial program 98.8%
Taylor expanded in c around 0 84.0%
Final simplification86.6%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= c -8.5e+43)
(and (not (<= c -1.16e+27))
(or (<= c -1.35e-61) (not (<= c 1.1e-88)))))
(* 2.0 (- (* z t) (* c (* (+ a (* b c)) i))))
(* 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 <= -8.5e+43) || (!(c <= -1.16e+27) && ((c <= -1.35e-61) || !(c <= 1.1e-88)))) {
tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i)));
} 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 <= (-8.5d+43)) .or. (.not. (c <= (-1.16d+27))) .and. (c <= (-1.35d-61)) .or. (.not. (c <= 1.1d-88))) then
tmp = 2.0d0 * ((z * t) - (c * ((a + (b * c)) * i)))
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 <= -8.5e+43) || (!(c <= -1.16e+27) && ((c <= -1.35e-61) || !(c <= 1.1e-88)))) {
tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i)));
} else {
tmp = 2.0 * ((z * t) + (x * y));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c <= -8.5e+43) or (not (c <= -1.16e+27) and ((c <= -1.35e-61) or not (c <= 1.1e-88))): tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i))) 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 <= -8.5e+43) || (!(c <= -1.16e+27) && ((c <= -1.35e-61) || !(c <= 1.1e-88)))) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(Float64(a + Float64(b * c)) * i)))); 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 <= -8.5e+43) || (~((c <= -1.16e+27)) && ((c <= -1.35e-61) || ~((c <= 1.1e-88))))) tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i))); 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, -8.5e+43], And[N[Not[LessEqual[c, -1.16e+27]], $MachinePrecision], Or[LessEqual[c, -1.35e-61], N[Not[LessEqual[c, 1.1e-88]], $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[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -8.5 \cdot 10^{+43} \lor \neg \left(c \leq -1.16 \cdot 10^{+27}\right) \land \left(c \leq -1.35 \cdot 10^{-61} \lor \neg \left(c \leq 1.1 \cdot 10^{-88}\right)\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(z \cdot t + x \cdot y\right)\\
\end{array}
\end{array}
if c < -8.5e43 or -1.16e27 < c < -1.34999999999999997e-61 or 1.10000000000000002e-88 < c Initial program 86.7%
Taylor expanded in x around 0 90.3%
if -8.5e43 < c < -1.16e27 or -1.34999999999999997e-61 < c < 1.10000000000000002e-88Initial program 97.7%
Taylor expanded in c around 0 84.7%
Final simplification88.4%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* c (* (+ a (* b c)) i)))
(t_2 (* 2.0 (- (* z t) t_1)))
(t_3 (+ (* z t) (* x y))))
(if (<= c -8.5e+43)
t_2
(if (<= c -1.4e+27)
(* 2.0 t_3)
(if (<= c -3.05e-46)
t_2
(if (<= c 1.45e+47)
(* 2.0 (- t_3 (* i (* a c))))
(* 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 t_2 = 2.0 * ((z * t) - t_1);
double t_3 = (z * t) + (x * y);
double tmp;
if (c <= -8.5e+43) {
tmp = t_2;
} else if (c <= -1.4e+27) {
tmp = 2.0 * t_3;
} else if (c <= -3.05e-46) {
tmp = t_2;
} else if (c <= 1.45e+47) {
tmp = 2.0 * (t_3 - (i * (a * c)));
} 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) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = c * ((a + (b * c)) * i)
t_2 = 2.0d0 * ((z * t) - t_1)
t_3 = (z * t) + (x * y)
if (c <= (-8.5d+43)) then
tmp = t_2
else if (c <= (-1.4d+27)) then
tmp = 2.0d0 * t_3
else if (c <= (-3.05d-46)) then
tmp = t_2
else if (c <= 1.45d+47) then
tmp = 2.0d0 * (t_3 - (i * (a * c)))
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 t_2 = 2.0 * ((z * t) - t_1);
double t_3 = (z * t) + (x * y);
double tmp;
if (c <= -8.5e+43) {
tmp = t_2;
} else if (c <= -1.4e+27) {
tmp = 2.0 * t_3;
} else if (c <= -3.05e-46) {
tmp = t_2;
} else if (c <= 1.45e+47) {
tmp = 2.0 * (t_3 - (i * (a * c)));
} 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) t_2 = 2.0 * ((z * t) - t_1) t_3 = (z * t) + (x * y) tmp = 0 if c <= -8.5e+43: tmp = t_2 elif c <= -1.4e+27: tmp = 2.0 * t_3 elif c <= -3.05e-46: tmp = t_2 elif c <= 1.45e+47: tmp = 2.0 * (t_3 - (i * (a * c))) 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)) t_2 = Float64(2.0 * Float64(Float64(z * t) - t_1)) t_3 = Float64(Float64(z * t) + Float64(x * y)) tmp = 0.0 if (c <= -8.5e+43) tmp = t_2; elseif (c <= -1.4e+27) tmp = Float64(2.0 * t_3); elseif (c <= -3.05e-46) tmp = t_2; elseif (c <= 1.45e+47) tmp = Float64(2.0 * Float64(t_3 - Float64(i * Float64(a * c)))); 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); t_2 = 2.0 * ((z * t) - t_1); t_3 = (z * t) + (x * y); tmp = 0.0; if (c <= -8.5e+43) tmp = t_2; elseif (c <= -1.4e+27) tmp = 2.0 * t_3; elseif (c <= -3.05e-46) tmp = t_2; elseif (c <= 1.45e+47) tmp = 2.0 * (t_3 - (i * (a * c))); 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]}, Block[{t$95$2 = N[(2.0 * N[(N[(z * t), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -8.5e+43], t$95$2, If[LessEqual[c, -1.4e+27], N[(2.0 * t$95$3), $MachinePrecision], If[LessEqual[c, -3.05e-46], t$95$2, If[LessEqual[c, 1.45e+47], N[(2.0 * N[(t$95$3 - N[(i * N[(a * c), $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)\\
t_2 := 2 \cdot \left(z \cdot t - t_1\right)\\
t_3 := z \cdot t + x \cdot y\\
\mathbf{if}\;c \leq -8.5 \cdot 10^{+43}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq -1.4 \cdot 10^{+27}:\\
\;\;\;\;2 \cdot t_3\\
\mathbf{elif}\;c \leq -3.05 \cdot 10^{-46}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq 1.45 \cdot 10^{+47}:\\
\;\;\;\;2 \cdot \left(t_3 - i \cdot \left(a \cdot c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y - t_1\right)\\
\end{array}
\end{array}
if c < -8.5e43 or -1.4e27 < c < -3.05000000000000018e-46Initial program 87.9%
Taylor expanded in x around 0 94.9%
if -8.5e43 < c < -1.4e27Initial program 83.3%
Taylor expanded in c around 0 100.0%
if -3.05000000000000018e-46 < c < 1.4499999999999999e47Initial program 99.1%
associate-*l*99.1%
fma-def99.1%
Simplified99.1%
fma-def99.1%
+-commutative99.1%
Applied egg-rr99.1%
Taylor expanded in a around inf 91.3%
associate-*r*95.5%
*-commutative95.5%
Simplified95.5%
if 1.4499999999999999e47 < c Initial program 77.8%
Taylor expanded in z around 0 88.6%
Final simplification93.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* c (* (+ a (* b c)) i)))
(t_2 (* 2.0 (- (* z t) t_1)))
(t_3 (+ (* z t) (* x y))))
(if (<= c -1.9e+52)
t_2
(if (<= c -1.6e+14)
(* 2.0 (- t_3 (* c (* c (* b i)))))
(if (<= c -3.05e-46)
t_2
(if (<= c 3.35e+47)
(* 2.0 (- t_3 (* i (* a c))))
(* 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 t_2 = 2.0 * ((z * t) - t_1);
double t_3 = (z * t) + (x * y);
double tmp;
if (c <= -1.9e+52) {
tmp = t_2;
} else if (c <= -1.6e+14) {
tmp = 2.0 * (t_3 - (c * (c * (b * i))));
} else if (c <= -3.05e-46) {
tmp = t_2;
} else if (c <= 3.35e+47) {
tmp = 2.0 * (t_3 - (i * (a * c)));
} 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) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = c * ((a + (b * c)) * i)
t_2 = 2.0d0 * ((z * t) - t_1)
t_3 = (z * t) + (x * y)
if (c <= (-1.9d+52)) then
tmp = t_2
else if (c <= (-1.6d+14)) then
tmp = 2.0d0 * (t_3 - (c * (c * (b * i))))
else if (c <= (-3.05d-46)) then
tmp = t_2
else if (c <= 3.35d+47) then
tmp = 2.0d0 * (t_3 - (i * (a * c)))
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 t_2 = 2.0 * ((z * t) - t_1);
double t_3 = (z * t) + (x * y);
double tmp;
if (c <= -1.9e+52) {
tmp = t_2;
} else if (c <= -1.6e+14) {
tmp = 2.0 * (t_3 - (c * (c * (b * i))));
} else if (c <= -3.05e-46) {
tmp = t_2;
} else if (c <= 3.35e+47) {
tmp = 2.0 * (t_3 - (i * (a * c)));
} 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) t_2 = 2.0 * ((z * t) - t_1) t_3 = (z * t) + (x * y) tmp = 0 if c <= -1.9e+52: tmp = t_2 elif c <= -1.6e+14: tmp = 2.0 * (t_3 - (c * (c * (b * i)))) elif c <= -3.05e-46: tmp = t_2 elif c <= 3.35e+47: tmp = 2.0 * (t_3 - (i * (a * c))) 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)) t_2 = Float64(2.0 * Float64(Float64(z * t) - t_1)) t_3 = Float64(Float64(z * t) + Float64(x * y)) tmp = 0.0 if (c <= -1.9e+52) tmp = t_2; elseif (c <= -1.6e+14) tmp = Float64(2.0 * Float64(t_3 - Float64(c * Float64(c * Float64(b * i))))); elseif (c <= -3.05e-46) tmp = t_2; elseif (c <= 3.35e+47) tmp = Float64(2.0 * Float64(t_3 - Float64(i * Float64(a * c)))); 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); t_2 = 2.0 * ((z * t) - t_1); t_3 = (z * t) + (x * y); tmp = 0.0; if (c <= -1.9e+52) tmp = t_2; elseif (c <= -1.6e+14) tmp = 2.0 * (t_3 - (c * (c * (b * i)))); elseif (c <= -3.05e-46) tmp = t_2; elseif (c <= 3.35e+47) tmp = 2.0 * (t_3 - (i * (a * c))); 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]}, Block[{t$95$2 = N[(2.0 * N[(N[(z * t), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.9e+52], t$95$2, If[LessEqual[c, -1.6e+14], N[(2.0 * N[(t$95$3 - N[(c * N[(c * N[(b * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -3.05e-46], t$95$2, If[LessEqual[c, 3.35e+47], N[(2.0 * N[(t$95$3 - N[(i * N[(a * c), $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)\\
t_2 := 2 \cdot \left(z \cdot t - t_1\right)\\
t_3 := z \cdot t + x \cdot y\\
\mathbf{if}\;c \leq -1.9 \cdot 10^{+52}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq -1.6 \cdot 10^{+14}:\\
\;\;\;\;2 \cdot \left(t_3 - c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\
\mathbf{elif}\;c \leq -3.05 \cdot 10^{-46}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq 3.35 \cdot 10^{+47}:\\
\;\;\;\;2 \cdot \left(t_3 - i \cdot \left(a \cdot c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y - t_1\right)\\
\end{array}
\end{array}
if c < -1.9e52 or -1.6e14 < c < -3.05000000000000018e-46Initial program 87.0%
Taylor expanded in x around 0 96.9%
if -1.9e52 < c < -1.6e14Initial program 90.8%
Taylor expanded in a around 0 99.9%
unpow299.9%
associate-*r*99.9%
Simplified99.9%
if -3.05000000000000018e-46 < c < 3.34999999999999986e47Initial program 99.1%
associate-*l*99.1%
fma-def99.1%
Simplified99.1%
fma-def99.1%
+-commutative99.1%
Applied egg-rr99.1%
Taylor expanded in a around inf 91.3%
associate-*r*95.5%
*-commutative95.5%
Simplified95.5%
if 3.34999999999999986e47 < c Initial program 77.8%
Taylor expanded in z around 0 88.6%
Final simplification94.4%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* c (* (+ a (* b c)) i)))
(t_2 (* 2.0 (- (* z t) t_1)))
(t_3 (+ (* z t) (* x y))))
(if (<= c -1e+52)
t_2
(if (<= c -45000000000000.0)
(* 2.0 (- t_3 (* (* c i) (* b c))))
(if (<= c -2.9e-50)
t_2
(if (<= c 6e+47)
(* 2.0 (- t_3 (* i (* a c))))
(* 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 t_2 = 2.0 * ((z * t) - t_1);
double t_3 = (z * t) + (x * y);
double tmp;
if (c <= -1e+52) {
tmp = t_2;
} else if (c <= -45000000000000.0) {
tmp = 2.0 * (t_3 - ((c * i) * (b * c)));
} else if (c <= -2.9e-50) {
tmp = t_2;
} else if (c <= 6e+47) {
tmp = 2.0 * (t_3 - (i * (a * c)));
} 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) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = c * ((a + (b * c)) * i)
t_2 = 2.0d0 * ((z * t) - t_1)
t_3 = (z * t) + (x * y)
if (c <= (-1d+52)) then
tmp = t_2
else if (c <= (-45000000000000.0d0)) then
tmp = 2.0d0 * (t_3 - ((c * i) * (b * c)))
else if (c <= (-2.9d-50)) then
tmp = t_2
else if (c <= 6d+47) then
tmp = 2.0d0 * (t_3 - (i * (a * c)))
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 t_2 = 2.0 * ((z * t) - t_1);
double t_3 = (z * t) + (x * y);
double tmp;
if (c <= -1e+52) {
tmp = t_2;
} else if (c <= -45000000000000.0) {
tmp = 2.0 * (t_3 - ((c * i) * (b * c)));
} else if (c <= -2.9e-50) {
tmp = t_2;
} else if (c <= 6e+47) {
tmp = 2.0 * (t_3 - (i * (a * c)));
} 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) t_2 = 2.0 * ((z * t) - t_1) t_3 = (z * t) + (x * y) tmp = 0 if c <= -1e+52: tmp = t_2 elif c <= -45000000000000.0: tmp = 2.0 * (t_3 - ((c * i) * (b * c))) elif c <= -2.9e-50: tmp = t_2 elif c <= 6e+47: tmp = 2.0 * (t_3 - (i * (a * c))) 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)) t_2 = Float64(2.0 * Float64(Float64(z * t) - t_1)) t_3 = Float64(Float64(z * t) + Float64(x * y)) tmp = 0.0 if (c <= -1e+52) tmp = t_2; elseif (c <= -45000000000000.0) tmp = Float64(2.0 * Float64(t_3 - Float64(Float64(c * i) * Float64(b * c)))); elseif (c <= -2.9e-50) tmp = t_2; elseif (c <= 6e+47) tmp = Float64(2.0 * Float64(t_3 - Float64(i * Float64(a * c)))); 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); t_2 = 2.0 * ((z * t) - t_1); t_3 = (z * t) + (x * y); tmp = 0.0; if (c <= -1e+52) tmp = t_2; elseif (c <= -45000000000000.0) tmp = 2.0 * (t_3 - ((c * i) * (b * c))); elseif (c <= -2.9e-50) tmp = t_2; elseif (c <= 6e+47) tmp = 2.0 * (t_3 - (i * (a * c))); 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]}, Block[{t$95$2 = N[(2.0 * N[(N[(z * t), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1e+52], t$95$2, If[LessEqual[c, -45000000000000.0], N[(2.0 * N[(t$95$3 - N[(N[(c * i), $MachinePrecision] * N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -2.9e-50], t$95$2, If[LessEqual[c, 6e+47], N[(2.0 * N[(t$95$3 - N[(i * N[(a * c), $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)\\
t_2 := 2 \cdot \left(z \cdot t - t_1\right)\\
t_3 := z \cdot t + x \cdot y\\
\mathbf{if}\;c \leq -1 \cdot 10^{+52}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq -45000000000000:\\
\;\;\;\;2 \cdot \left(t_3 - \left(c \cdot i\right) \cdot \left(b \cdot c\right)\right)\\
\mathbf{elif}\;c \leq -2.9 \cdot 10^{-50}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq 6 \cdot 10^{+47}:\\
\;\;\;\;2 \cdot \left(t_3 - i \cdot \left(a \cdot c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y - t_1\right)\\
\end{array}
\end{array}
if c < -9.9999999999999999e51 or -4.5e13 < c < -2.90000000000000008e-50Initial program 87.0%
Taylor expanded in x around 0 96.9%
if -9.9999999999999999e51 < c < -4.5e13Initial program 90.8%
associate-*l*90.9%
fma-def90.9%
Simplified90.9%
fma-def90.9%
+-commutative90.9%
Applied egg-rr90.9%
Taylor expanded in a around 0 100.0%
if -2.90000000000000008e-50 < c < 6.0000000000000003e47Initial program 99.1%
associate-*l*99.1%
fma-def99.1%
Simplified99.1%
fma-def99.1%
+-commutative99.1%
Applied egg-rr99.1%
Taylor expanded in a around inf 91.3%
associate-*r*95.5%
*-commutative95.5%
Simplified95.5%
if 6.0000000000000003e47 < c Initial program 77.8%
Taylor expanded in z around 0 88.6%
Final simplification94.4%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (* z t)))
(t_2 (* 2.0 (* x y)))
(t_3 (* -2.0 (* c (* c (* b i))))))
(if (<= c -1e+44)
t_3
(if (<= c -8.8e+14)
t_2
(if (<= c -6.4e-14)
(* i (* -2.0 (* a c)))
(if (<= c 4.8e-204)
t_1
(if (<= c 1.95e-82) t_2 (if (<= c 1.6e+47) t_1 t_3))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * (z * t);
double t_2 = 2.0 * (x * y);
double t_3 = -2.0 * (c * (c * (b * i)));
double tmp;
if (c <= -1e+44) {
tmp = t_3;
} else if (c <= -8.8e+14) {
tmp = t_2;
} else if (c <= -6.4e-14) {
tmp = i * (-2.0 * (a * c));
} else if (c <= 4.8e-204) {
tmp = t_1;
} else if (c <= 1.95e-82) {
tmp = t_2;
} else if (c <= 1.6e+47) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = 2.0d0 * (z * t)
t_2 = 2.0d0 * (x * y)
t_3 = (-2.0d0) * (c * (c * (b * i)))
if (c <= (-1d+44)) then
tmp = t_3
else if (c <= (-8.8d+14)) then
tmp = t_2
else if (c <= (-6.4d-14)) then
tmp = i * ((-2.0d0) * (a * c))
else if (c <= 4.8d-204) then
tmp = t_1
else if (c <= 1.95d-82) then
tmp = t_2
else if (c <= 1.6d+47) then
tmp = t_1
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * (z * t);
double t_2 = 2.0 * (x * y);
double t_3 = -2.0 * (c * (c * (b * i)));
double tmp;
if (c <= -1e+44) {
tmp = t_3;
} else if (c <= -8.8e+14) {
tmp = t_2;
} else if (c <= -6.4e-14) {
tmp = i * (-2.0 * (a * c));
} else if (c <= 4.8e-204) {
tmp = t_1;
} else if (c <= 1.95e-82) {
tmp = t_2;
} else if (c <= 1.6e+47) {
tmp = t_1;
} 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 * (x * y) t_3 = -2.0 * (c * (c * (b * i))) tmp = 0 if c <= -1e+44: tmp = t_3 elif c <= -8.8e+14: tmp = t_2 elif c <= -6.4e-14: tmp = i * (-2.0 * (a * c)) elif c <= 4.8e-204: tmp = t_1 elif c <= 1.95e-82: tmp = t_2 elif c <= 1.6e+47: tmp = t_1 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(z * t)) t_2 = Float64(2.0 * Float64(x * y)) t_3 = Float64(-2.0 * Float64(c * Float64(c * Float64(b * i)))) tmp = 0.0 if (c <= -1e+44) tmp = t_3; elseif (c <= -8.8e+14) tmp = t_2; elseif (c <= -6.4e-14) tmp = Float64(i * Float64(-2.0 * Float64(a * c))); elseif (c <= 4.8e-204) tmp = t_1; elseif (c <= 1.95e-82) tmp = t_2; elseif (c <= 1.6e+47) tmp = t_1; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 2.0 * (z * t); t_2 = 2.0 * (x * y); t_3 = -2.0 * (c * (c * (b * i))); tmp = 0.0; if (c <= -1e+44) tmp = t_3; elseif (c <= -8.8e+14) tmp = t_2; elseif (c <= -6.4e-14) tmp = i * (-2.0 * (a * c)); elseif (c <= 4.8e-204) tmp = t_1; elseif (c <= 1.95e-82) tmp = t_2; elseif (c <= 1.6e+47) tmp = t_1; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(-2.0 * N[(c * N[(c * N[(b * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1e+44], t$95$3, If[LessEqual[c, -8.8e+14], t$95$2, If[LessEqual[c, -6.4e-14], N[(i * N[(-2.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 4.8e-204], t$95$1, If[LessEqual[c, 1.95e-82], t$95$2, If[LessEqual[c, 1.6e+47], t$95$1, t$95$3]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(z \cdot t\right)\\
t_2 := 2 \cdot \left(x \cdot y\right)\\
t_3 := -2 \cdot \left(c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\
\mathbf{if}\;c \leq -1 \cdot 10^{+44}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;c \leq -8.8 \cdot 10^{+14}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq -6.4 \cdot 10^{-14}:\\
\;\;\;\;i \cdot \left(-2 \cdot \left(a \cdot c\right)\right)\\
\mathbf{elif}\;c \leq 4.8 \cdot 10^{-204}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq 1.95 \cdot 10^{-82}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq 1.6 \cdot 10^{+47}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if c < -1.0000000000000001e44 or 1.6e47 < c Initial program 81.5%
Taylor expanded in i around inf 89.8%
Taylor expanded in c around inf 68.0%
unpow268.0%
associate-*r*72.1%
associate-*r*73.8%
*-commutative73.8%
associate-*l*72.2%
*-commutative72.2%
*-commutative72.2%
Simplified72.2%
Taylor expanded in i around 0 72.1%
if -1.0000000000000001e44 < c < -8.8e14 or 4.8e-204 < c < 1.94999999999999987e-82Initial program 97.2%
Taylor expanded in x around inf 58.4%
if -8.8e14 < c < -6.4000000000000005e-14Initial program 99.8%
Taylor expanded in a around inf 76.5%
associate-*r*76.5%
neg-mul-176.5%
*-commutative76.5%
associate-*r*76.7%
Simplified76.7%
Taylor expanded in c around 0 76.5%
*-commutative76.5%
Simplified76.5%
Taylor expanded in c around 0 76.5%
*-commutative76.5%
*-commutative76.5%
associate-*r*76.7%
*-commutative76.7%
associate-*l*76.7%
Simplified76.7%
if -6.4000000000000005e-14 < c < 4.8e-204 or 1.94999999999999987e-82 < c < 1.6e47Initial program 97.9%
Taylor expanded in z around inf 50.7%
Final simplification62.3%
(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 (<= c -1.15e+44)
(* -2.0 (* c (* i (* b c))))
(if (<= c -1.9e+16)
t_2
(if (<= c -6.6e-19)
(* i (* -2.0 (* a c)))
(if (<= c 5.6e-202)
t_1
(if (<= c 1.1e-82)
t_2
(if (<= c 1.9e+48) t_1 (* -2.0 (* 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 = 2.0 * (z * t);
double t_2 = 2.0 * (x * y);
double tmp;
if (c <= -1.15e+44) {
tmp = -2.0 * (c * (i * (b * c)));
} else if (c <= -1.9e+16) {
tmp = t_2;
} else if (c <= -6.6e-19) {
tmp = i * (-2.0 * (a * c));
} else if (c <= 5.6e-202) {
tmp = t_1;
} else if (c <= 1.1e-82) {
tmp = t_2;
} else if (c <= 1.9e+48) {
tmp = t_1;
} else {
tmp = -2.0 * (c * (c * (b * 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 = 2.0d0 * (z * t)
t_2 = 2.0d0 * (x * y)
if (c <= (-1.15d+44)) then
tmp = (-2.0d0) * (c * (i * (b * c)))
else if (c <= (-1.9d+16)) then
tmp = t_2
else if (c <= (-6.6d-19)) then
tmp = i * ((-2.0d0) * (a * c))
else if (c <= 5.6d-202) then
tmp = t_1
else if (c <= 1.1d-82) then
tmp = t_2
else if (c <= 1.9d+48) then
tmp = t_1
else
tmp = (-2.0d0) * (c * (c * (b * 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 = 2.0 * (z * t);
double t_2 = 2.0 * (x * y);
double tmp;
if (c <= -1.15e+44) {
tmp = -2.0 * (c * (i * (b * c)));
} else if (c <= -1.9e+16) {
tmp = t_2;
} else if (c <= -6.6e-19) {
tmp = i * (-2.0 * (a * c));
} else if (c <= 5.6e-202) {
tmp = t_1;
} else if (c <= 1.1e-82) {
tmp = t_2;
} else if (c <= 1.9e+48) {
tmp = t_1;
} else {
tmp = -2.0 * (c * (c * (b * i)));
}
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 c <= -1.15e+44: tmp = -2.0 * (c * (i * (b * c))) elif c <= -1.9e+16: tmp = t_2 elif c <= -6.6e-19: tmp = i * (-2.0 * (a * c)) elif c <= 5.6e-202: tmp = t_1 elif c <= 1.1e-82: tmp = t_2 elif c <= 1.9e+48: tmp = t_1 else: tmp = -2.0 * (c * (c * (b * i))) 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 (c <= -1.15e+44) tmp = Float64(-2.0 * Float64(c * Float64(i * Float64(b * c)))); elseif (c <= -1.9e+16) tmp = t_2; elseif (c <= -6.6e-19) tmp = Float64(i * Float64(-2.0 * Float64(a * c))); elseif (c <= 5.6e-202) tmp = t_1; elseif (c <= 1.1e-82) tmp = t_2; elseif (c <= 1.9e+48) tmp = t_1; else tmp = Float64(-2.0 * Float64(c * Float64(c * Float64(b * i)))); 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 (c <= -1.15e+44) tmp = -2.0 * (c * (i * (b * c))); elseif (c <= -1.9e+16) tmp = t_2; elseif (c <= -6.6e-19) tmp = i * (-2.0 * (a * c)); elseif (c <= 5.6e-202) tmp = t_1; elseif (c <= 1.1e-82) tmp = t_2; elseif (c <= 1.9e+48) tmp = t_1; else tmp = -2.0 * (c * (c * (b * i))); 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[c, -1.15e+44], N[(-2.0 * N[(c * N[(i * N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -1.9e+16], t$95$2, If[LessEqual[c, -6.6e-19], N[(i * N[(-2.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 5.6e-202], t$95$1, If[LessEqual[c, 1.1e-82], t$95$2, If[LessEqual[c, 1.9e+48], t$95$1, N[(-2.0 * N[(c * N[(c * N[(b * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\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}\;c \leq -1.15 \cdot 10^{+44}:\\
\;\;\;\;-2 \cdot \left(c \cdot \left(i \cdot \left(b \cdot c\right)\right)\right)\\
\mathbf{elif}\;c \leq -1.9 \cdot 10^{+16}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq -6.6 \cdot 10^{-19}:\\
\;\;\;\;i \cdot \left(-2 \cdot \left(a \cdot c\right)\right)\\
\mathbf{elif}\;c \leq 5.6 \cdot 10^{-202}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq 1.1 \cdot 10^{-82}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq 1.9 \cdot 10^{+48}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;-2 \cdot \left(c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\
\end{array}
\end{array}
if c < -1.15000000000000002e44Initial program 85.5%
Taylor expanded in i around inf 94.4%
Taylor expanded in c around inf 76.5%
unpow276.5%
associate-*r*81.8%
associate-*r*81.9%
*-commutative81.9%
associate-*l*83.7%
*-commutative83.7%
*-commutative83.7%
Simplified83.7%
if -1.15000000000000002e44 < c < -1.9e16 or 5.6000000000000002e-202 < c < 1.09999999999999993e-82Initial program 97.2%
Taylor expanded in x around inf 58.4%
if -1.9e16 < c < -6.5999999999999995e-19Initial program 99.8%
Taylor expanded in a around inf 76.5%
associate-*r*76.5%
neg-mul-176.5%
*-commutative76.5%
associate-*r*76.7%
Simplified76.7%
Taylor expanded in c around 0 76.5%
*-commutative76.5%
Simplified76.5%
Taylor expanded in c around 0 76.5%
*-commutative76.5%
*-commutative76.5%
associate-*r*76.7%
*-commutative76.7%
associate-*l*76.7%
Simplified76.7%
if -6.5999999999999995e-19 < c < 5.6000000000000002e-202 or 1.09999999999999993e-82 < c < 1.9e48Initial program 97.9%
Taylor expanded in z around inf 50.7%
if 1.9e48 < c Initial program 77.8%
Taylor expanded in i around inf 85.8%
Taylor expanded in c around inf 60.4%
unpow260.4%
associate-*r*63.6%
associate-*r*66.7%
*-commutative66.7%
associate-*l*62.1%
*-commutative62.1%
*-commutative62.1%
Simplified62.1%
Taylor expanded in i around 0 63.6%
Final simplification62.7%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= c -9e+43)
(and (not (<= c -1.2e+24))
(or (<= c -1.55e-61) (not (<= c 1.9e+47)))))
(* -2.0 (* c (* (+ a (* b c)) i)))
(* 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 <= -9e+43) || (!(c <= -1.2e+24) && ((c <= -1.55e-61) || !(c <= 1.9e+47)))) {
tmp = -2.0 * (c * ((a + (b * c)) * i));
} 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 <= (-9d+43)) .or. (.not. (c <= (-1.2d+24))) .and. (c <= (-1.55d-61)) .or. (.not. (c <= 1.9d+47))) then
tmp = (-2.0d0) * (c * ((a + (b * c)) * i))
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 <= -9e+43) || (!(c <= -1.2e+24) && ((c <= -1.55e-61) || !(c <= 1.9e+47)))) {
tmp = -2.0 * (c * ((a + (b * c)) * i));
} else {
tmp = 2.0 * ((z * t) + (x * y));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c <= -9e+43) or (not (c <= -1.2e+24) and ((c <= -1.55e-61) or not (c <= 1.9e+47))): tmp = -2.0 * (c * ((a + (b * c)) * i)) 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 <= -9e+43) || (!(c <= -1.2e+24) && ((c <= -1.55e-61) || !(c <= 1.9e+47)))) tmp = Float64(-2.0 * Float64(c * Float64(Float64(a + Float64(b * c)) * i))); 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 <= -9e+43) || (~((c <= -1.2e+24)) && ((c <= -1.55e-61) || ~((c <= 1.9e+47))))) tmp = -2.0 * (c * ((a + (b * c)) * i)); 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, -9e+43], And[N[Not[LessEqual[c, -1.2e+24]], $MachinePrecision], Or[LessEqual[c, -1.55e-61], N[Not[LessEqual[c, 1.9e+47]], $MachinePrecision]]]], N[(-2.0 * N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $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 -9 \cdot 10^{+43} \lor \neg \left(c \leq -1.2 \cdot 10^{+24}\right) \land \left(c \leq -1.55 \cdot 10^{-61} \lor \neg \left(c \leq 1.9 \cdot 10^{+47}\right)\right):\\
\;\;\;\;-2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(z \cdot t + x \cdot y\right)\\
\end{array}
\end{array}
if c < -9e43 or -1.2e24 < c < -1.54999999999999997e-61 or 1.9000000000000002e47 < c Initial program 83.7%
Taylor expanded in i around inf 86.0%
Taylor expanded in i around 0 86.0%
if -9e43 < c < -1.2e24 or -1.54999999999999997e-61 < c < 1.9000000000000002e47Initial program 98.3%
Taylor expanded in c around 0 79.6%
Final simplification83.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (+ (* z t) (* x y)))))
(if (<= c -9.5e+43)
(* -2.0 (* c (* i (* b c))))
(if (<= c -1400000000.0)
t_1
(if (<= c -3.45e-15)
(* i (* -2.0 (* a c)))
(if (<= c 1.8e+58) t_1 (* -2.0 (* 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 = 2.0 * ((z * t) + (x * y));
double tmp;
if (c <= -9.5e+43) {
tmp = -2.0 * (c * (i * (b * c)));
} else if (c <= -1400000000.0) {
tmp = t_1;
} else if (c <= -3.45e-15) {
tmp = i * (-2.0 * (a * c));
} else if (c <= 1.8e+58) {
tmp = t_1;
} else {
tmp = -2.0 * (c * (c * (b * i)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = 2.0d0 * ((z * t) + (x * y))
if (c <= (-9.5d+43)) then
tmp = (-2.0d0) * (c * (i * (b * c)))
else if (c <= (-1400000000.0d0)) then
tmp = t_1
else if (c <= (-3.45d-15)) then
tmp = i * ((-2.0d0) * (a * c))
else if (c <= 1.8d+58) then
tmp = t_1
else
tmp = (-2.0d0) * (c * (c * (b * 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 = 2.0 * ((z * t) + (x * y));
double tmp;
if (c <= -9.5e+43) {
tmp = -2.0 * (c * (i * (b * c)));
} else if (c <= -1400000000.0) {
tmp = t_1;
} else if (c <= -3.45e-15) {
tmp = i * (-2.0 * (a * c));
} else if (c <= 1.8e+58) {
tmp = t_1;
} else {
tmp = -2.0 * (c * (c * (b * i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * ((z * t) + (x * y)) tmp = 0 if c <= -9.5e+43: tmp = -2.0 * (c * (i * (b * c))) elif c <= -1400000000.0: tmp = t_1 elif c <= -3.45e-15: tmp = i * (-2.0 * (a * c)) elif c <= 1.8e+58: tmp = t_1 else: tmp = -2.0 * (c * (c * (b * i))) 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 (c <= -9.5e+43) tmp = Float64(-2.0 * Float64(c * Float64(i * Float64(b * c)))); elseif (c <= -1400000000.0) tmp = t_1; elseif (c <= -3.45e-15) tmp = Float64(i * Float64(-2.0 * Float64(a * c))); elseif (c <= 1.8e+58) tmp = t_1; else tmp = Float64(-2.0 * Float64(c * Float64(c * Float64(b * i)))); 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 (c <= -9.5e+43) tmp = -2.0 * (c * (i * (b * c))); elseif (c <= -1400000000.0) tmp = t_1; elseif (c <= -3.45e-15) tmp = i * (-2.0 * (a * c)); elseif (c <= 1.8e+58) tmp = t_1; else tmp = -2.0 * (c * (c * (b * i))); 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[c, -9.5e+43], N[(-2.0 * N[(c * N[(i * N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -1400000000.0], t$95$1, If[LessEqual[c, -3.45e-15], N[(i * N[(-2.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.8e+58], t$95$1, N[(-2.0 * N[(c * N[(c * N[(b * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(z \cdot t + x \cdot y\right)\\
\mathbf{if}\;c \leq -9.5 \cdot 10^{+43}:\\
\;\;\;\;-2 \cdot \left(c \cdot \left(i \cdot \left(b \cdot c\right)\right)\right)\\
\mathbf{elif}\;c \leq -1400000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq -3.45 \cdot 10^{-15}:\\
\;\;\;\;i \cdot \left(-2 \cdot \left(a \cdot c\right)\right)\\
\mathbf{elif}\;c \leq 1.8 \cdot 10^{+58}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;-2 \cdot \left(c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\
\end{array}
\end{array}
if c < -9.5000000000000004e43Initial program 85.5%
Taylor expanded in i around inf 94.4%
Taylor expanded in c around inf 76.5%
unpow276.5%
associate-*r*81.8%
associate-*r*81.9%
*-commutative81.9%
associate-*l*83.7%
*-commutative83.7%
*-commutative83.7%
Simplified83.7%
if -9.5000000000000004e43 < c < -1.4e9 or -3.45000000000000005e-15 < c < 1.79999999999999998e58Initial program 97.1%
Taylor expanded in c around 0 74.9%
if -1.4e9 < c < -3.45000000000000005e-15Initial program 99.8%
Taylor expanded in a around inf 76.5%
associate-*r*76.5%
neg-mul-176.5%
*-commutative76.5%
associate-*r*76.7%
Simplified76.7%
Taylor expanded in c around 0 76.5%
*-commutative76.5%
Simplified76.5%
Taylor expanded in c around 0 76.5%
*-commutative76.5%
*-commutative76.5%
associate-*r*76.7%
*-commutative76.7%
associate-*l*76.7%
Simplified76.7%
if 1.79999999999999998e58 < c Initial program 78.4%
Taylor expanded in i around inf 86.6%
Taylor expanded in c around inf 63.2%
unpow263.2%
associate-*r*66.5%
associate-*r*68.1%
*-commutative68.1%
associate-*l*64.9%
*-commutative64.9%
*-commutative64.9%
Simplified64.9%
Taylor expanded in i around 0 66.5%
Final simplification74.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (+ (* z t) (* x y)))))
(if (<= c -1.36e+44)
(* -2.0 (* c (* i (* b c))))
(if (<= c -2150000000.0)
t_1
(if (<= c -1.12e-13)
(* i (* -2.0 (* a c)))
(if (<= c 8.2e+47) t_1 (* b (* -2.0 (* c (* c i))))))))))
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 (c <= -1.36e+44) {
tmp = -2.0 * (c * (i * (b * c)));
} else if (c <= -2150000000.0) {
tmp = t_1;
} else if (c <= -1.12e-13) {
tmp = i * (-2.0 * (a * c));
} else if (c <= 8.2e+47) {
tmp = t_1;
} else {
tmp = b * (-2.0 * (c * (c * i)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = 2.0d0 * ((z * t) + (x * y))
if (c <= (-1.36d+44)) then
tmp = (-2.0d0) * (c * (i * (b * c)))
else if (c <= (-2150000000.0d0)) then
tmp = t_1
else if (c <= (-1.12d-13)) then
tmp = i * ((-2.0d0) * (a * c))
else if (c <= 8.2d+47) then
tmp = t_1
else
tmp = b * ((-2.0d0) * (c * (c * i)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * ((z * t) + (x * y));
double tmp;
if (c <= -1.36e+44) {
tmp = -2.0 * (c * (i * (b * c)));
} else if (c <= -2150000000.0) {
tmp = t_1;
} else if (c <= -1.12e-13) {
tmp = i * (-2.0 * (a * c));
} else if (c <= 8.2e+47) {
tmp = t_1;
} else {
tmp = b * (-2.0 * (c * (c * i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * ((z * t) + (x * y)) tmp = 0 if c <= -1.36e+44: tmp = -2.0 * (c * (i * (b * c))) elif c <= -2150000000.0: tmp = t_1 elif c <= -1.12e-13: tmp = i * (-2.0 * (a * c)) elif c <= 8.2e+47: tmp = t_1 else: tmp = b * (-2.0 * (c * (c * i))) 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 (c <= -1.36e+44) tmp = Float64(-2.0 * Float64(c * Float64(i * Float64(b * c)))); elseif (c <= -2150000000.0) tmp = t_1; elseif (c <= -1.12e-13) tmp = Float64(i * Float64(-2.0 * Float64(a * c))); elseif (c <= 8.2e+47) tmp = t_1; else tmp = Float64(b * Float64(-2.0 * Float64(c * Float64(c * i)))); 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 (c <= -1.36e+44) tmp = -2.0 * (c * (i * (b * c))); elseif (c <= -2150000000.0) tmp = t_1; elseif (c <= -1.12e-13) tmp = i * (-2.0 * (a * c)); elseif (c <= 8.2e+47) tmp = t_1; else tmp = b * (-2.0 * (c * (c * i))); 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[c, -1.36e+44], N[(-2.0 * N[(c * N[(i * N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -2150000000.0], t$95$1, If[LessEqual[c, -1.12e-13], N[(i * N[(-2.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 8.2e+47], t$95$1, N[(b * N[(-2.0 * N[(c * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(z \cdot t + x \cdot y\right)\\
\mathbf{if}\;c \leq -1.36 \cdot 10^{+44}:\\
\;\;\;\;-2 \cdot \left(c \cdot \left(i \cdot \left(b \cdot c\right)\right)\right)\\
\mathbf{elif}\;c \leq -2150000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq -1.12 \cdot 10^{-13}:\\
\;\;\;\;i \cdot \left(-2 \cdot \left(a \cdot c\right)\right)\\
\mathbf{elif}\;c \leq 8.2 \cdot 10^{+47}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(-2 \cdot \left(c \cdot \left(c \cdot i\right)\right)\right)\\
\end{array}
\end{array}
if c < -1.36000000000000005e44Initial program 85.5%
Taylor expanded in i around inf 94.4%
Taylor expanded in c around inf 76.5%
unpow276.5%
associate-*r*81.8%
associate-*r*81.9%
*-commutative81.9%
associate-*l*83.7%
*-commutative83.7%
*-commutative83.7%
Simplified83.7%
if -1.36000000000000005e44 < c < -2.15e9 or -1.12e-13 < c < 8.2000000000000002e47Initial program 97.7%
Taylor expanded in c around 0 76.0%
if -2.15e9 < c < -1.12e-13Initial program 99.8%
Taylor expanded in a around inf 76.5%
associate-*r*76.5%
neg-mul-176.5%
*-commutative76.5%
associate-*r*76.7%
Simplified76.7%
Taylor expanded in c around 0 76.5%
*-commutative76.5%
Simplified76.5%
Taylor expanded in c around 0 76.5%
*-commutative76.5%
*-commutative76.5%
associate-*r*76.7%
*-commutative76.7%
associate-*l*76.7%
Simplified76.7%
if 8.2000000000000002e47 < c Initial program 77.8%
Taylor expanded in i around inf 85.8%
Taylor expanded in c around inf 60.4%
*-commutative60.4%
associate-*r*66.9%
unpow266.9%
associate-*r*67.0%
*-commutative67.0%
associate-*l*67.0%
Simplified67.0%
Final simplification75.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* i (* -2.0 (* a c)))) (t_2 (* 2.0 (* z t))))
(if (<= t -1860000.0)
t_2
(if (<= t -1.9e-130)
t_1
(if (<= t -9e-237) (* 2.0 (* x y)) (if (<= t 3.4e+37) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = i * (-2.0 * (a * c));
double t_2 = 2.0 * (z * t);
double tmp;
if (t <= -1860000.0) {
tmp = t_2;
} else if (t <= -1.9e-130) {
tmp = t_1;
} else if (t <= -9e-237) {
tmp = 2.0 * (x * y);
} else if (t <= 3.4e+37) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = i * ((-2.0d0) * (a * c))
t_2 = 2.0d0 * (z * t)
if (t <= (-1860000.0d0)) then
tmp = t_2
else if (t <= (-1.9d-130)) then
tmp = t_1
else if (t <= (-9d-237)) then
tmp = 2.0d0 * (x * y)
else if (t <= 3.4d+37) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = i * (-2.0 * (a * c));
double t_2 = 2.0 * (z * t);
double tmp;
if (t <= -1860000.0) {
tmp = t_2;
} else if (t <= -1.9e-130) {
tmp = t_1;
} else if (t <= -9e-237) {
tmp = 2.0 * (x * y);
} else if (t <= 3.4e+37) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = i * (-2.0 * (a * c)) t_2 = 2.0 * (z * t) tmp = 0 if t <= -1860000.0: tmp = t_2 elif t <= -1.9e-130: tmp = t_1 elif t <= -9e-237: tmp = 2.0 * (x * y) elif t <= 3.4e+37: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(i * Float64(-2.0 * Float64(a * c))) t_2 = Float64(2.0 * Float64(z * t)) tmp = 0.0 if (t <= -1860000.0) tmp = t_2; elseif (t <= -1.9e-130) tmp = t_1; elseif (t <= -9e-237) tmp = Float64(2.0 * Float64(x * y)); elseif (t <= 3.4e+37) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = i * (-2.0 * (a * c)); t_2 = 2.0 * (z * t); tmp = 0.0; if (t <= -1860000.0) tmp = t_2; elseif (t <= -1.9e-130) tmp = t_1; elseif (t <= -9e-237) tmp = 2.0 * (x * y); elseif (t <= 3.4e+37) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(i * N[(-2.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1860000.0], t$95$2, If[LessEqual[t, -1.9e-130], t$95$1, If[LessEqual[t, -9e-237], N[(2.0 * N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.4e+37], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := i \cdot \left(-2 \cdot \left(a \cdot c\right)\right)\\
t_2 := 2 \cdot \left(z \cdot t\right)\\
\mathbf{if}\;t \leq -1860000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -1.9 \cdot 10^{-130}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -9 \cdot 10^{-237}:\\
\;\;\;\;2 \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;t \leq 3.4 \cdot 10^{+37}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -1.86e6 or 3.40000000000000006e37 < t Initial program 87.6%
Taylor expanded in z around inf 43.8%
if -1.86e6 < t < -1.8999999999999999e-130 or -9.00000000000000019e-237 < t < 3.40000000000000006e37Initial program 91.2%
Taylor expanded in a around inf 36.5%
associate-*r*36.5%
neg-mul-136.5%
*-commutative36.5%
associate-*r*37.4%
Simplified37.4%
Taylor expanded in c around 0 36.5%
*-commutative36.5%
Simplified36.5%
Taylor expanded in c around 0 36.5%
*-commutative36.5%
*-commutative36.5%
associate-*r*37.4%
*-commutative37.4%
associate-*l*38.2%
Simplified38.2%
if -1.8999999999999999e-130 < t < -9.00000000000000019e-237Initial program 99.8%
Taylor expanded in x around inf 25.8%
Final simplification39.4%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= z -1.1e+232) (and (not (<= z -2.85e+21)) (<= z 6e-75))) (* 2.0 (* a (* c (- i)))) (* 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 ((z <= -1.1e+232) || (!(z <= -2.85e+21) && (z <= 6e-75))) {
tmp = 2.0 * (a * (c * -i));
} 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 ((z <= (-1.1d+232)) .or. (.not. (z <= (-2.85d+21))) .and. (z <= 6d-75)) then
tmp = 2.0d0 * (a * (c * -i))
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 ((z <= -1.1e+232) || (!(z <= -2.85e+21) && (z <= 6e-75))) {
tmp = 2.0 * (a * (c * -i));
} else {
tmp = 2.0 * (z * t);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (z <= -1.1e+232) or (not (z <= -2.85e+21) and (z <= 6e-75)): tmp = 2.0 * (a * (c * -i)) else: tmp = 2.0 * (z * t) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((z <= -1.1e+232) || (!(z <= -2.85e+21) && (z <= 6e-75))) tmp = Float64(2.0 * Float64(a * Float64(c * Float64(-i)))); 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 ((z <= -1.1e+232) || (~((z <= -2.85e+21)) && (z <= 6e-75))) tmp = 2.0 * (a * (c * -i)); else tmp = 2.0 * (z * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[z, -1.1e+232], And[N[Not[LessEqual[z, -2.85e+21]], $MachinePrecision], LessEqual[z, 6e-75]]], N[(2.0 * N[(a * N[(c * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.1 \cdot 10^{+232} \lor \neg \left(z \leq -2.85 \cdot 10^{+21}\right) \land z \leq 6 \cdot 10^{-75}:\\
\;\;\;\;2 \cdot \left(a \cdot \left(c \cdot \left(-i\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(z \cdot t\right)\\
\end{array}
\end{array}
if z < -1.1e232 or -2.85e21 < z < 5.9999999999999997e-75Initial program 87.7%
associate-*l*92.8%
fma-def92.8%
Simplified92.8%
fma-def92.8%
+-commutative92.8%
Applied egg-rr92.8%
Taylor expanded in a around inf 41.2%
mul-1-neg41.2%
*-commutative41.2%
distribute-rgt-neg-in41.2%
*-commutative41.2%
associate-*l*42.0%
Simplified42.0%
if -1.1e232 < z < -2.85e21 or 5.9999999999999997e-75 < z Initial program 93.2%
Taylor expanded in z around inf 43.9%
Final simplification42.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -2.3e+179) (not (<= x 2.85e+51))) (* 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 <= -2.3e+179) || !(x <= 2.85e+51)) {
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 <= (-2.3d+179)) .or. (.not. (x <= 2.85d+51))) 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 <= -2.3e+179) || !(x <= 2.85e+51)) {
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 <= -2.3e+179) or not (x <= 2.85e+51): 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 <= -2.3e+179) || !(x <= 2.85e+51)) 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 <= -2.3e+179) || ~((x <= 2.85e+51))) 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, -2.3e+179], N[Not[LessEqual[x, 2.85e+51]], $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 -2.3 \cdot 10^{+179} \lor \neg \left(x \leq 2.85 \cdot 10^{+51}\right):\\
\;\;\;\;2 \cdot \left(x \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(z \cdot t\right)\\
\end{array}
\end{array}
if x < -2.29999999999999994e179 or 2.8500000000000001e51 < x Initial program 89.6%
Taylor expanded in x around inf 44.8%
if -2.29999999999999994e179 < x < 2.8500000000000001e51Initial program 90.9%
Taylor expanded in z around inf 29.5%
Final simplification34.6%
(FPCore (x y z t a b c i) :precision binary64 (* 2.0 (* z t)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (z * t);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = 2.0d0 * (z * t)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (z * t);
}
def code(x, y, z, t, a, b, c, i): return 2.0 * (z * t)
function code(x, y, z, t, a, b, c, i) return Float64(2.0 * Float64(z * t)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = 2.0 * (z * t); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(z \cdot t\right)
\end{array}
Initial program 90.5%
Taylor expanded in z around inf 27.3%
Final simplification27.3%
(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 2023230
(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))))