
(FPCore (x y z t a b c i) :precision binary64 (* 2.0 (- (+ (* x y) (* z t)) (* (* (+ a (* b c)) c) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i));
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = 2.0d0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i));
}
def code(x, y, z, t, a, b, c, i): return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i))
function code(x, y, z, t, a, b, c, i) return Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(Float64(Float64(a + Float64(b * c)) * c) * i))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i)); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i) :precision binary64 (* 2.0 (- (+ (* x y) (* z t)) (* (* (+ a (* b c)) c) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i));
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = 2.0d0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i));
}
def code(x, y, z, t, a, b, c, i): return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i))
function code(x, y, z, t, a, b, c, i) return Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(Float64(Float64(a + Float64(b * c)) * c) * i))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i)); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right)
\end{array}
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (* b c))))
(if (<= (- (+ (* x y) (* z t)) (* (* c t_1) i)) INFINITY)
(* 2.0 (- (fma x y (* z t)) (* t_1 (* c i))))
(* 2.0 (* 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 tmp;
if ((((x * y) + (z * t)) - ((c * t_1) * i)) <= ((double) INFINITY)) {
tmp = 2.0 * (fma(x, y, (z * t)) - (t_1 * (c * i)));
} else {
tmp = 2.0 * (c * (t_1 * -i));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(b * c)) tmp = 0.0 if (Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(Float64(c * t_1) * i)) <= Inf) tmp = Float64(2.0 * Float64(fma(x, y, Float64(z * t)) - Float64(t_1 * Float64(c * i)))); else tmp = Float64(2.0 * Float64(c * Float64(t_1 * Float64(-i)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(c * t$95$1), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision], Infinity], N[(2.0 * N[(N[(x * y + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(t$95$1 * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(c * N[(t$95$1 * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + b \cdot c\\
\mathbf{if}\;\left(x \cdot y + z \cdot t\right) - \left(c \cdot t_1\right) \cdot i \leq \infty:\\
\;\;\;\;2 \cdot \left(\mathsf{fma}\left(x, y, z \cdot t\right) - t_1 \cdot \left(c \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(c \cdot \left(t_1 \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.2%
associate-*l*99.5%
fma-def99.5%
Simplified99.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%
Taylor expanded in i around inf 50.2%
Final simplification96.8%
(FPCore (x y z t a b c i) :precision binary64 (let* ((t_1 (+ a (* b c))) (t_2 (- (+ (* x y) (* z t)) (* (* c t_1) i)))) (if (<= t_2 INFINITY) (* t_2 2.0) (* 2.0 (* c (* t_1 (- i)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double t_2 = ((x * y) + (z * t)) - ((c * t_1) * i);
double tmp;
if (t_2 <= ((double) INFINITY)) {
tmp = t_2 * 2.0;
} else {
tmp = 2.0 * (c * (t_1 * -i));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double t_2 = ((x * y) + (z * t)) - ((c * t_1) * i);
double tmp;
if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = t_2 * 2.0;
} else {
tmp = 2.0 * (c * (t_1 * -i));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a + (b * c) t_2 = ((x * y) + (z * t)) - ((c * t_1) * i) tmp = 0 if t_2 <= math.inf: tmp = t_2 * 2.0 else: tmp = 2.0 * (c * (t_1 * -i)) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(b * c)) t_2 = Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(Float64(c * t_1) * i)) tmp = 0.0 if (t_2 <= Inf) tmp = Float64(t_2 * 2.0); else tmp = Float64(2.0 * Float64(c * Float64(t_1 * Float64(-i)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = a + (b * c); t_2 = ((x * y) + (z * t)) - ((c * t_1) * i); tmp = 0.0; if (t_2 <= Inf) tmp = t_2 * 2.0; else tmp = 2.0 * (c * (t_1 * -i)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(c * t$95$1), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, Infinity], N[(t$95$2 * 2.0), $MachinePrecision], N[(2.0 * N[(c * N[(t$95$1 * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + b \cdot c\\
t_2 := \left(x \cdot y + z \cdot t\right) - \left(c \cdot t_1\right) \cdot i\\
\mathbf{if}\;t_2 \leq \infty:\\
\;\;\;\;t_2 \cdot 2\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(c \cdot \left(t_1 \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.2%
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 50.2%
Final simplification92.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (+ (* x y) (* z t)) 2.0)))
(if (<= (* x y) -1.85e+105)
t_1
(if (<= (* x y) -1.05e-53)
(* 2.0 (- (* x y) (* b (* i (* c c)))))
(if (<= (* x y) 6.2e+49)
(* 2.0 (- (* z t) (* a (* c i))))
(if (<= (* x y) 1.02e+96)
t_1
(* 2.0 (- (* x y) (* c (* (* b c) i))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((x * y) + (z * t)) * 2.0;
double tmp;
if ((x * y) <= -1.85e+105) {
tmp = t_1;
} else if ((x * y) <= -1.05e-53) {
tmp = 2.0 * ((x * y) - (b * (i * (c * c))));
} else if ((x * y) <= 6.2e+49) {
tmp = 2.0 * ((z * t) - (a * (c * i)));
} else if ((x * y) <= 1.02e+96) {
tmp = t_1;
} else {
tmp = 2.0 * ((x * y) - (c * ((b * c) * i)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = ((x * y) + (z * t)) * 2.0d0
if ((x * y) <= (-1.85d+105)) then
tmp = t_1
else if ((x * y) <= (-1.05d-53)) then
tmp = 2.0d0 * ((x * y) - (b * (i * (c * c))))
else if ((x * y) <= 6.2d+49) then
tmp = 2.0d0 * ((z * t) - (a * (c * i)))
else if ((x * y) <= 1.02d+96) then
tmp = t_1
else
tmp = 2.0d0 * ((x * y) - (c * ((b * c) * i)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((x * y) + (z * t)) * 2.0;
double tmp;
if ((x * y) <= -1.85e+105) {
tmp = t_1;
} else if ((x * y) <= -1.05e-53) {
tmp = 2.0 * ((x * y) - (b * (i * (c * c))));
} else if ((x * y) <= 6.2e+49) {
tmp = 2.0 * ((z * t) - (a * (c * i)));
} else if ((x * y) <= 1.02e+96) {
tmp = t_1;
} else {
tmp = 2.0 * ((x * y) - (c * ((b * c) * i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = ((x * y) + (z * t)) * 2.0 tmp = 0 if (x * y) <= -1.85e+105: tmp = t_1 elif (x * y) <= -1.05e-53: tmp = 2.0 * ((x * y) - (b * (i * (c * c)))) elif (x * y) <= 6.2e+49: tmp = 2.0 * ((z * t) - (a * (c * i))) elif (x * y) <= 1.02e+96: tmp = t_1 else: tmp = 2.0 * ((x * y) - (c * ((b * c) * i))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(x * y) + Float64(z * t)) * 2.0) tmp = 0.0 if (Float64(x * y) <= -1.85e+105) tmp = t_1; elseif (Float64(x * y) <= -1.05e-53) tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(b * Float64(i * Float64(c * c))))); elseif (Float64(x * y) <= 6.2e+49) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(a * Float64(c * i)))); elseif (Float64(x * y) <= 1.02e+96) tmp = t_1; else tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(c * Float64(Float64(b * c) * i)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = ((x * y) + (z * t)) * 2.0; tmp = 0.0; if ((x * y) <= -1.85e+105) tmp = t_1; elseif ((x * y) <= -1.05e-53) tmp = 2.0 * ((x * y) - (b * (i * (c * c)))); elseif ((x * y) <= 6.2e+49) tmp = 2.0 * ((z * t) - (a * (c * i))); elseif ((x * y) <= 1.02e+96) tmp = t_1; else tmp = 2.0 * ((x * y) - (c * ((b * c) * i))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -1.85e+105], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], -1.05e-53], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(b * N[(i * N[(c * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 6.2e+49], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 1.02e+96], t$95$1, N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(c * N[(N[(b * c), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot y + z \cdot t\right) \cdot 2\\
\mathbf{if}\;x \cdot y \leq -1.85 \cdot 10^{+105}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \cdot y \leq -1.05 \cdot 10^{-53}:\\
\;\;\;\;2 \cdot \left(x \cdot y - b \cdot \left(i \cdot \left(c \cdot c\right)\right)\right)\\
\mathbf{elif}\;x \cdot y \leq 6.2 \cdot 10^{+49}:\\
\;\;\;\;2 \cdot \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\\
\mathbf{elif}\;x \cdot y \leq 1.02 \cdot 10^{+96}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(\left(b \cdot c\right) \cdot i\right)\right)\\
\end{array}
\end{array}
if (*.f64 x y) < -1.84999999999999992e105 or 6.19999999999999985e49 < (*.f64 x y) < 1.02000000000000001e96Initial program 86.5%
Taylor expanded in c around 0 84.9%
if -1.84999999999999992e105 < (*.f64 x y) < -1.04999999999999989e-53Initial program 99.9%
Taylor expanded in a around 0 90.5%
Taylor expanded in z around 0 74.6%
unpow274.6%
Simplified74.6%
if -1.04999999999999989e-53 < (*.f64 x y) < 6.19999999999999985e49Initial program 91.1%
Taylor expanded in a around inf 73.3%
*-commutative73.3%
Simplified73.3%
Taylor expanded in x around 0 72.6%
if 1.02000000000000001e96 < (*.f64 x y) Initial program 83.3%
Taylor expanded in z around 0 82.2%
Taylor expanded in a around 0 77.3%
Final simplification76.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (* z t))) (t_2 (* (* x y) 2.0)))
(if (<= (* x y) -1.8e-24)
t_2
(if (<= (* x y) -2.3e-180)
(* 2.0 (* i (* a (- c))))
(if (<= (* x y) 2.2e-207)
t_1
(if (<= (* x y) 0.47)
(* (* a (* c i)) -2.0)
(if (<= (* x y) 8e+198) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * (z * t);
double t_2 = (x * y) * 2.0;
double tmp;
if ((x * y) <= -1.8e-24) {
tmp = t_2;
} else if ((x * y) <= -2.3e-180) {
tmp = 2.0 * (i * (a * -c));
} else if ((x * y) <= 2.2e-207) {
tmp = t_1;
} else if ((x * y) <= 0.47) {
tmp = (a * (c * i)) * -2.0;
} else if ((x * y) <= 8e+198) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 2.0d0 * (z * t)
t_2 = (x * y) * 2.0d0
if ((x * y) <= (-1.8d-24)) then
tmp = t_2
else if ((x * y) <= (-2.3d-180)) then
tmp = 2.0d0 * (i * (a * -c))
else if ((x * y) <= 2.2d-207) then
tmp = t_1
else if ((x * y) <= 0.47d0) then
tmp = (a * (c * i)) * (-2.0d0)
else if ((x * y) <= 8d+198) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * (z * t);
double t_2 = (x * y) * 2.0;
double tmp;
if ((x * y) <= -1.8e-24) {
tmp = t_2;
} else if ((x * y) <= -2.3e-180) {
tmp = 2.0 * (i * (a * -c));
} else if ((x * y) <= 2.2e-207) {
tmp = t_1;
} else if ((x * y) <= 0.47) {
tmp = (a * (c * i)) * -2.0;
} else if ((x * y) <= 8e+198) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * (z * t) t_2 = (x * y) * 2.0 tmp = 0 if (x * y) <= -1.8e-24: tmp = t_2 elif (x * y) <= -2.3e-180: tmp = 2.0 * (i * (a * -c)) elif (x * y) <= 2.2e-207: tmp = t_1 elif (x * y) <= 0.47: tmp = (a * (c * i)) * -2.0 elif (x * y) <= 8e+198: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(z * t)) t_2 = Float64(Float64(x * y) * 2.0) tmp = 0.0 if (Float64(x * y) <= -1.8e-24) tmp = t_2; elseif (Float64(x * y) <= -2.3e-180) tmp = Float64(2.0 * Float64(i * Float64(a * Float64(-c)))); elseif (Float64(x * y) <= 2.2e-207) tmp = t_1; elseif (Float64(x * y) <= 0.47) tmp = Float64(Float64(a * Float64(c * i)) * -2.0); elseif (Float64(x * y) <= 8e+198) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 2.0 * (z * t); t_2 = (x * y) * 2.0; tmp = 0.0; if ((x * y) <= -1.8e-24) tmp = t_2; elseif ((x * y) <= -2.3e-180) tmp = 2.0 * (i * (a * -c)); elseif ((x * y) <= 2.2e-207) tmp = t_1; elseif ((x * y) <= 0.47) tmp = (a * (c * i)) * -2.0; elseif ((x * y) <= 8e+198) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y), $MachinePrecision] * 2.0), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -1.8e-24], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], -2.3e-180], N[(2.0 * N[(i * N[(a * (-c)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 2.2e-207], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 0.47], N[(N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 8e+198], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(z \cdot t\right)\\
t_2 := \left(x \cdot y\right) \cdot 2\\
\mathbf{if}\;x \cdot y \leq -1.8 \cdot 10^{-24}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \cdot y \leq -2.3 \cdot 10^{-180}:\\
\;\;\;\;2 \cdot \left(i \cdot \left(a \cdot \left(-c\right)\right)\right)\\
\mathbf{elif}\;x \cdot y \leq 2.2 \cdot 10^{-207}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \cdot y \leq 0.47:\\
\;\;\;\;\left(a \cdot \left(c \cdot i\right)\right) \cdot -2\\
\mathbf{elif}\;x \cdot y \leq 8 \cdot 10^{+198}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if (*.f64 x y) < -1.8e-24 or 8.00000000000000014e198 < (*.f64 x y) Initial program 88.5%
Taylor expanded in x around inf 52.2%
if -1.8e-24 < (*.f64 x y) < -2.29999999999999996e-180Initial program 89.1%
Taylor expanded in z around 0 73.1%
Taylor expanded in a around inf 42.5%
mul-1-neg42.5%
associate-*r*46.2%
*-commutative46.2%
distribute-lft-neg-in46.2%
*-commutative46.2%
Simplified46.2%
if -2.29999999999999996e-180 < (*.f64 x y) < 2.1999999999999999e-207 or 0.46999999999999997 < (*.f64 x y) < 8.00000000000000014e198Initial program 89.8%
Taylor expanded in z around inf 49.1%
if 2.1999999999999999e-207 < (*.f64 x y) < 0.46999999999999997Initial program 94.7%
Taylor expanded in a around inf 48.4%
Taylor expanded in a around 0 48.4%
Final simplification49.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (+ (* x y) (* z t)) 2.0))
(t_2 (* 2.0 (* c (* (+ a (* b c)) (- i))))))
(if (<= c -1.55e+69)
t_2
(if (<= c -7e+29)
t_1
(if (<= c -2e-10)
(* 2.0 (- (* x y) (* b (* i (* c c)))))
(if (<= c -1.16e-83)
(* 2.0 (- (* z t) (* a (* c i))))
(if (<= c 4.5e+46) 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 = ((x * y) + (z * t)) * 2.0;
double t_2 = 2.0 * (c * ((a + (b * c)) * -i));
double tmp;
if (c <= -1.55e+69) {
tmp = t_2;
} else if (c <= -7e+29) {
tmp = t_1;
} else if (c <= -2e-10) {
tmp = 2.0 * ((x * y) - (b * (i * (c * c))));
} else if (c <= -1.16e-83) {
tmp = 2.0 * ((z * t) - (a * (c * i)));
} else if (c <= 4.5e+46) {
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 = ((x * y) + (z * t)) * 2.0d0
t_2 = 2.0d0 * (c * ((a + (b * c)) * -i))
if (c <= (-1.55d+69)) then
tmp = t_2
else if (c <= (-7d+29)) then
tmp = t_1
else if (c <= (-2d-10)) then
tmp = 2.0d0 * ((x * y) - (b * (i * (c * c))))
else if (c <= (-1.16d-83)) then
tmp = 2.0d0 * ((z * t) - (a * (c * i)))
else if (c <= 4.5d+46) 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 = ((x * y) + (z * t)) * 2.0;
double t_2 = 2.0 * (c * ((a + (b * c)) * -i));
double tmp;
if (c <= -1.55e+69) {
tmp = t_2;
} else if (c <= -7e+29) {
tmp = t_1;
} else if (c <= -2e-10) {
tmp = 2.0 * ((x * y) - (b * (i * (c * c))));
} else if (c <= -1.16e-83) {
tmp = 2.0 * ((z * t) - (a * (c * i)));
} else if (c <= 4.5e+46) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = ((x * y) + (z * t)) * 2.0 t_2 = 2.0 * (c * ((a + (b * c)) * -i)) tmp = 0 if c <= -1.55e+69: tmp = t_2 elif c <= -7e+29: tmp = t_1 elif c <= -2e-10: tmp = 2.0 * ((x * y) - (b * (i * (c * c)))) elif c <= -1.16e-83: tmp = 2.0 * ((z * t) - (a * (c * i))) elif c <= 4.5e+46: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(x * y) + Float64(z * t)) * 2.0) t_2 = Float64(2.0 * Float64(c * Float64(Float64(a + Float64(b * c)) * Float64(-i)))) tmp = 0.0 if (c <= -1.55e+69) tmp = t_2; elseif (c <= -7e+29) tmp = t_1; elseif (c <= -2e-10) tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(b * Float64(i * Float64(c * c))))); elseif (c <= -1.16e-83) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(a * Float64(c * i)))); elseif (c <= 4.5e+46) 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 = ((x * y) + (z * t)) * 2.0; t_2 = 2.0 * (c * ((a + (b * c)) * -i)); tmp = 0.0; if (c <= -1.55e+69) tmp = t_2; elseif (c <= -7e+29) tmp = t_1; elseif (c <= -2e-10) tmp = 2.0 * ((x * y) - (b * (i * (c * c)))); elseif (c <= -1.16e-83) tmp = 2.0 * ((z * t) - (a * (c * i))); elseif (c <= 4.5e+46) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $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.55e+69], t$95$2, If[LessEqual[c, -7e+29], t$95$1, If[LessEqual[c, -2e-10], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(b * N[(i * N[(c * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -1.16e-83], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 4.5e+46], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot y + z \cdot t\right) \cdot 2\\
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.55 \cdot 10^{+69}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq -7 \cdot 10^{+29}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq -2 \cdot 10^{-10}:\\
\;\;\;\;2 \cdot \left(x \cdot y - b \cdot \left(i \cdot \left(c \cdot c\right)\right)\right)\\
\mathbf{elif}\;c \leq -1.16 \cdot 10^{-83}:\\
\;\;\;\;2 \cdot \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\\
\mathbf{elif}\;c \leq 4.5 \cdot 10^{+46}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if c < -1.5499999999999999e69 or 4.5000000000000001e46 < c Initial program 80.4%
Taylor expanded in i around inf 77.2%
if -1.5499999999999999e69 < c < -6.99999999999999958e29 or -1.16000000000000008e-83 < c < 4.5000000000000001e46Initial program 96.8%
Taylor expanded in c around 0 78.8%
if -6.99999999999999958e29 < c < -2.00000000000000007e-10Initial program 100.0%
Taylor expanded in a around 0 87.1%
Taylor expanded in z around 0 73.3%
unpow273.3%
Simplified73.3%
if -2.00000000000000007e-10 < c < -1.16000000000000008e-83Initial program 99.9%
Taylor expanded in a around inf 92.9%
*-commutative92.9%
Simplified92.9%
Taylor expanded in x around 0 70.0%
Final simplification77.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (* z t))) (t_2 (* (* x y) 2.0)))
(if (<= (* x y) -2.9e+264)
t_2
(if (<= (* x y) 4.6e-210)
t_1
(if (<= (* x y) 1.0)
(* (* a (* c i)) -2.0)
(if (<= (* x y) 9.5e+198) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * (z * t);
double t_2 = (x * y) * 2.0;
double tmp;
if ((x * y) <= -2.9e+264) {
tmp = t_2;
} else if ((x * y) <= 4.6e-210) {
tmp = t_1;
} else if ((x * y) <= 1.0) {
tmp = (a * (c * i)) * -2.0;
} else if ((x * y) <= 9.5e+198) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 2.0d0 * (z * t)
t_2 = (x * y) * 2.0d0
if ((x * y) <= (-2.9d+264)) then
tmp = t_2
else if ((x * y) <= 4.6d-210) then
tmp = t_1
else if ((x * y) <= 1.0d0) then
tmp = (a * (c * i)) * (-2.0d0)
else if ((x * y) <= 9.5d+198) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * (z * t);
double t_2 = (x * y) * 2.0;
double tmp;
if ((x * y) <= -2.9e+264) {
tmp = t_2;
} else if ((x * y) <= 4.6e-210) {
tmp = t_1;
} else if ((x * y) <= 1.0) {
tmp = (a * (c * i)) * -2.0;
} else if ((x * y) <= 9.5e+198) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * (z * t) t_2 = (x * y) * 2.0 tmp = 0 if (x * y) <= -2.9e+264: tmp = t_2 elif (x * y) <= 4.6e-210: tmp = t_1 elif (x * y) <= 1.0: tmp = (a * (c * i)) * -2.0 elif (x * y) <= 9.5e+198: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(z * t)) t_2 = Float64(Float64(x * y) * 2.0) tmp = 0.0 if (Float64(x * y) <= -2.9e+264) tmp = t_2; elseif (Float64(x * y) <= 4.6e-210) tmp = t_1; elseif (Float64(x * y) <= 1.0) tmp = Float64(Float64(a * Float64(c * i)) * -2.0); elseif (Float64(x * y) <= 9.5e+198) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 2.0 * (z * t); t_2 = (x * y) * 2.0; tmp = 0.0; if ((x * y) <= -2.9e+264) tmp = t_2; elseif ((x * y) <= 4.6e-210) tmp = t_1; elseif ((x * y) <= 1.0) tmp = (a * (c * i)) * -2.0; elseif ((x * y) <= 9.5e+198) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y), $MachinePrecision] * 2.0), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -2.9e+264], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], 4.6e-210], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 1.0], N[(N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 9.5e+198], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(z \cdot t\right)\\
t_2 := \left(x \cdot y\right) \cdot 2\\
\mathbf{if}\;x \cdot y \leq -2.9 \cdot 10^{+264}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \cdot y \leq 4.6 \cdot 10^{-210}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \cdot y \leq 1:\\
\;\;\;\;\left(a \cdot \left(c \cdot i\right)\right) \cdot -2\\
\mathbf{elif}\;x \cdot y \leq 9.5 \cdot 10^{+198}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if (*.f64 x y) < -2.8999999999999998e264 or 9.5e198 < (*.f64 x y) Initial program 82.1%
Taylor expanded in x around inf 77.6%
if -2.8999999999999998e264 < (*.f64 x y) < 4.6e-210 or 1 < (*.f64 x y) < 9.5e198Initial program 90.7%
Taylor expanded in z around inf 41.6%
if 4.6e-210 < (*.f64 x y) < 1Initial program 94.7%
Taylor expanded in a around inf 48.4%
Taylor expanded in a around 0 48.4%
Final simplification48.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* x y) (* z t))))
(if (or (<= a -7.6e+92) (not (<= a 1.95e-89)))
(* 2.0 (- t_1 (* i (* a c))))
(* 2.0 (- t_1 (* i (* c (* b c))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (x * y) + (z * t);
double tmp;
if ((a <= -7.6e+92) || !(a <= 1.95e-89)) {
tmp = 2.0 * (t_1 - (i * (a * c)));
} else {
tmp = 2.0 * (t_1 - (i * (c * (b * c))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = (x * y) + (z * t)
if ((a <= (-7.6d+92)) .or. (.not. (a <= 1.95d-89))) then
tmp = 2.0d0 * (t_1 - (i * (a * c)))
else
tmp = 2.0d0 * (t_1 - (i * (c * (b * c))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (x * y) + (z * t);
double tmp;
if ((a <= -7.6e+92) || !(a <= 1.95e-89)) {
tmp = 2.0 * (t_1 - (i * (a * c)));
} else {
tmp = 2.0 * (t_1 - (i * (c * (b * c))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (x * y) + (z * t) tmp = 0 if (a <= -7.6e+92) or not (a <= 1.95e-89): tmp = 2.0 * (t_1 - (i * (a * c))) else: tmp = 2.0 * (t_1 - (i * (c * (b * c)))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(x * y) + Float64(z * t)) tmp = 0.0 if ((a <= -7.6e+92) || !(a <= 1.95e-89)) tmp = Float64(2.0 * Float64(t_1 - Float64(i * Float64(a * c)))); else tmp = Float64(2.0 * Float64(t_1 - Float64(i * Float64(c * Float64(b * c))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (x * y) + (z * t); tmp = 0.0; if ((a <= -7.6e+92) || ~((a <= 1.95e-89))) tmp = 2.0 * (t_1 - (i * (a * c))); else tmp = 2.0 * (t_1 - (i * (c * (b * c)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[a, -7.6e+92], N[Not[LessEqual[a, 1.95e-89]], $MachinePrecision]], N[(2.0 * N[(t$95$1 - N[(i * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(t$95$1 - N[(i * N[(c * N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot y + z \cdot t\\
\mathbf{if}\;a \leq -7.6 \cdot 10^{+92} \lor \neg \left(a \leq 1.95 \cdot 10^{-89}\right):\\
\;\;\;\;2 \cdot \left(t_1 - i \cdot \left(a \cdot c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(t_1 - i \cdot \left(c \cdot \left(b \cdot c\right)\right)\right)\\
\end{array}
\end{array}
if a < -7.6000000000000001e92 or 1.94999999999999989e-89 < a Initial program 85.8%
Taylor expanded in a around inf 80.7%
*-commutative80.7%
Simplified80.7%
if -7.6000000000000001e92 < a < 1.94999999999999989e-89Initial program 94.9%
Taylor expanded in a around 0 94.1%
Final simplification86.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (- (* z t) (* a (* c i)))))
(t_2 (* 2.0 (* i (* c (* b (- c)))))))
(if (<= c -1.65e+201)
t_2
(if (<= c -1.8e+69)
t_1
(if (<= c 5.3e-17)
(* (+ (* x y) (* z t)) 2.0)
(if (<= c 4.9e+136) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * ((z * t) - (a * (c * i)));
double t_2 = 2.0 * (i * (c * (b * -c)));
double tmp;
if (c <= -1.65e+201) {
tmp = t_2;
} else if (c <= -1.8e+69) {
tmp = t_1;
} else if (c <= 5.3e-17) {
tmp = ((x * y) + (z * t)) * 2.0;
} else if (c <= 4.9e+136) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 2.0d0 * ((z * t) - (a * (c * i)))
t_2 = 2.0d0 * (i * (c * (b * -c)))
if (c <= (-1.65d+201)) then
tmp = t_2
else if (c <= (-1.8d+69)) then
tmp = t_1
else if (c <= 5.3d-17) then
tmp = ((x * y) + (z * t)) * 2.0d0
else if (c <= 4.9d+136) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * ((z * t) - (a * (c * i)));
double t_2 = 2.0 * (i * (c * (b * -c)));
double tmp;
if (c <= -1.65e+201) {
tmp = t_2;
} else if (c <= -1.8e+69) {
tmp = t_1;
} else if (c <= 5.3e-17) {
tmp = ((x * y) + (z * t)) * 2.0;
} else if (c <= 4.9e+136) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * ((z * t) - (a * (c * i))) t_2 = 2.0 * (i * (c * (b * -c))) tmp = 0 if c <= -1.65e+201: tmp = t_2 elif c <= -1.8e+69: tmp = t_1 elif c <= 5.3e-17: tmp = ((x * y) + (z * t)) * 2.0 elif c <= 4.9e+136: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(Float64(z * t) - Float64(a * Float64(c * i)))) t_2 = Float64(2.0 * Float64(i * Float64(c * Float64(b * Float64(-c))))) tmp = 0.0 if (c <= -1.65e+201) tmp = t_2; elseif (c <= -1.8e+69) tmp = t_1; elseif (c <= 5.3e-17) tmp = Float64(Float64(Float64(x * y) + Float64(z * t)) * 2.0); elseif (c <= 4.9e+136) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 2.0 * ((z * t) - (a * (c * i))); t_2 = 2.0 * (i * (c * (b * -c))); tmp = 0.0; if (c <= -1.65e+201) tmp = t_2; elseif (c <= -1.8e+69) tmp = t_1; elseif (c <= 5.3e-17) tmp = ((x * y) + (z * t)) * 2.0; elseif (c <= 4.9e+136) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(i * N[(c * N[(b * (-c)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.65e+201], t$95$2, If[LessEqual[c, -1.8e+69], t$95$1, If[LessEqual[c, 5.3e-17], N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision], If[LessEqual[c, 4.9e+136], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\\
t_2 := 2 \cdot \left(i \cdot \left(c \cdot \left(b \cdot \left(-c\right)\right)\right)\right)\\
\mathbf{if}\;c \leq -1.65 \cdot 10^{+201}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq -1.8 \cdot 10^{+69}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq 5.3 \cdot 10^{-17}:\\
\;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\
\mathbf{elif}\;c \leq 4.9 \cdot 10^{+136}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if c < -1.65e201 or 4.90000000000000012e136 < c Initial program 79.8%
Taylor expanded in a around 0 81.2%
Taylor expanded in b around inf 76.8%
mul-1-neg76.8%
unpow276.8%
associate-*r*72.4%
associate-*l*76.9%
distribute-rgt-neg-in76.9%
distribute-rgt-neg-in76.9%
Simplified76.9%
associate-*r*81.2%
distribute-rgt-neg-out81.2%
add-sqr-sqrt38.2%
sqrt-unprod25.8%
sqr-neg25.8%
sqrt-unprod2.1%
add-sqr-sqrt2.2%
associate-*r*0.8%
*-commutative0.8%
*-commutative0.8%
associate-*l*2.2%
add-sqr-sqrt2.1%
sqrt-unprod25.8%
sqr-neg25.8%
sqrt-unprod38.2%
add-sqr-sqrt81.2%
Applied egg-rr81.2%
if -1.65e201 < c < -1.8000000000000001e69 or 5.2999999999999998e-17 < c < 4.90000000000000012e136Initial program 84.8%
Taylor expanded in a around inf 73.3%
*-commutative73.3%
Simplified73.3%
Taylor expanded in x around 0 64.8%
if -1.8000000000000001e69 < c < 5.2999999999999998e-17Initial program 97.0%
Taylor expanded in c around 0 76.2%
Final simplification74.8%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= c -4e-81) (not (<= c 4e-69))) (* 2.0 (- (* x y) (* c (* (+ a (* b c)) i)))) (* (+ (* x y) (* z t)) 2.0)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c <= -4e-81) || !(c <= 4e-69)) {
tmp = 2.0 * ((x * y) - (c * ((a + (b * c)) * i)));
} else {
tmp = ((x * y) + (z * t)) * 2.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((c <= (-4d-81)) .or. (.not. (c <= 4d-69))) then
tmp = 2.0d0 * ((x * y) - (c * ((a + (b * c)) * i)))
else
tmp = ((x * y) + (z * t)) * 2.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c <= -4e-81) || !(c <= 4e-69)) {
tmp = 2.0 * ((x * y) - (c * ((a + (b * c)) * i)));
} else {
tmp = ((x * y) + (z * t)) * 2.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c <= -4e-81) or not (c <= 4e-69): tmp = 2.0 * ((x * y) - (c * ((a + (b * c)) * i))) else: tmp = ((x * y) + (z * t)) * 2.0 return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((c <= -4e-81) || !(c <= 4e-69)) tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(c * Float64(Float64(a + Float64(b * c)) * i)))); else tmp = Float64(Float64(Float64(x * y) + Float64(z * t)) * 2.0); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((c <= -4e-81) || ~((c <= 4e-69))) tmp = 2.0 * ((x * y) - (c * ((a + (b * c)) * i))); else tmp = ((x * y) + (z * t)) * 2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[c, -4e-81], N[Not[LessEqual[c, 4e-69]], $MachinePrecision]], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -4 \cdot 10^{-81} \lor \neg \left(c \leq 4 \cdot 10^{-69}\right):\\
\;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\
\end{array}
\end{array}
if c < -3.9999999999999998e-81 or 3.9999999999999999e-69 < c Initial program 85.6%
Taylor expanded in z around 0 78.3%
if -3.9999999999999998e-81 < c < 3.9999999999999999e-69Initial program 97.7%
Taylor expanded in c around 0 83.5%
Final simplification80.2%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= c -7.2e+201)
(* 2.0 (* i (* c (* b (- c)))))
(if (<= c 8e+124)
(* 2.0 (- (+ (* x y) (* z t)) (* i (* a c))))
(* 2.0 (- (* x y) (* 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 (c <= -7.2e+201) {
tmp = 2.0 * (i * (c * (b * -c)));
} else if (c <= 8e+124) {
tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c)));
} else {
tmp = 2.0 * ((x * y) - (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 (c <= (-7.2d+201)) then
tmp = 2.0d0 * (i * (c * (b * -c)))
else if (c <= 8d+124) then
tmp = 2.0d0 * (((x * y) + (z * t)) - (i * (a * c)))
else
tmp = 2.0d0 * ((x * y) - (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 (c <= -7.2e+201) {
tmp = 2.0 * (i * (c * (b * -c)));
} else if (c <= 8e+124) {
tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c)));
} else {
tmp = 2.0 * ((x * y) - (c * ((a + (b * c)) * i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if c <= -7.2e+201: tmp = 2.0 * (i * (c * (b * -c))) elif c <= 8e+124: tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c))) else: tmp = 2.0 * ((x * y) - (c * ((a + (b * c)) * i))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (c <= -7.2e+201) tmp = Float64(2.0 * Float64(i * Float64(c * Float64(b * Float64(-c))))); elseif (c <= 8e+124) tmp = Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(i * Float64(a * c)))); else tmp = Float64(2.0 * Float64(Float64(x * y) - 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 (c <= -7.2e+201) tmp = 2.0 * (i * (c * (b * -c))); elseif (c <= 8e+124) tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c))); else tmp = 2.0 * ((x * y) - (c * ((a + (b * c)) * i))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[c, -7.2e+201], N[(2.0 * N[(i * N[(c * N[(b * (-c)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 8e+124], N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(i * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -7.2 \cdot 10^{+201}:\\
\;\;\;\;2 \cdot \left(i \cdot \left(c \cdot \left(b \cdot \left(-c\right)\right)\right)\right)\\
\mathbf{elif}\;c \leq 8 \cdot 10^{+124}:\\
\;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - i \cdot \left(a \cdot c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\
\end{array}
\end{array}
if c < -7.19999999999999951e201Initial program 75.2%
Taylor expanded in a around 0 80.0%
Taylor expanded in b around inf 85.4%
mul-1-neg85.4%
unpow285.4%
associate-*r*80.8%
associate-*l*85.3%
distribute-rgt-neg-in85.3%
distribute-rgt-neg-in85.3%
Simplified85.3%
associate-*r*90.1%
distribute-rgt-neg-out90.1%
add-sqr-sqrt60.1%
sqrt-unprod40.1%
sqr-neg40.1%
sqrt-unprod0.3%
add-sqr-sqrt0.5%
associate-*r*0.6%
*-commutative0.6%
*-commutative0.6%
associate-*l*0.5%
add-sqr-sqrt0.3%
sqrt-unprod40.1%
sqr-neg40.1%
sqrt-unprod60.1%
add-sqr-sqrt90.1%
Applied egg-rr90.1%
if -7.19999999999999951e201 < c < 7.99999999999999959e124Initial program 93.2%
Taylor expanded in a around inf 85.9%
*-commutative85.9%
Simplified85.9%
if 7.99999999999999959e124 < c Initial program 83.0%
Taylor expanded in z around 0 89.2%
Final simplification86.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= c -1.55e+69) (not (<= c 4e+43))) (* 2.0 (* c (* (+ a (* b c)) (- i)))) (* (+ (* x y) (* z t)) 2.0)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c <= -1.55e+69) || !(c <= 4e+43)) {
tmp = 2.0 * (c * ((a + (b * c)) * -i));
} else {
tmp = ((x * y) + (z * t)) * 2.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((c <= (-1.55d+69)) .or. (.not. (c <= 4d+43))) then
tmp = 2.0d0 * (c * ((a + (b * c)) * -i))
else
tmp = ((x * y) + (z * t)) * 2.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c <= -1.55e+69) || !(c <= 4e+43)) {
tmp = 2.0 * (c * ((a + (b * c)) * -i));
} else {
tmp = ((x * y) + (z * t)) * 2.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c <= -1.55e+69) or not (c <= 4e+43): tmp = 2.0 * (c * ((a + (b * c)) * -i)) else: tmp = ((x * y) + (z * t)) * 2.0 return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((c <= -1.55e+69) || !(c <= 4e+43)) tmp = Float64(2.0 * Float64(c * Float64(Float64(a + Float64(b * c)) * Float64(-i)))); else tmp = Float64(Float64(Float64(x * y) + Float64(z * t)) * 2.0); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((c <= -1.55e+69) || ~((c <= 4e+43))) tmp = 2.0 * (c * ((a + (b * c)) * -i)); else tmp = ((x * y) + (z * t)) * 2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[c, -1.55e+69], N[Not[LessEqual[c, 4e+43]], $MachinePrecision]], N[(2.0 * N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -1.55 \cdot 10^{+69} \lor \neg \left(c \leq 4 \cdot 10^{+43}\right):\\
\;\;\;\;2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot \left(-i\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\
\end{array}
\end{array}
if c < -1.5499999999999999e69 or 4.00000000000000006e43 < c Initial program 80.4%
Taylor expanded in i around inf 77.2%
if -1.5499999999999999e69 < c < 4.00000000000000006e43Initial program 97.2%
Taylor expanded in c around 0 74.7%
Final simplification75.8%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= c -4e+121) (not (<= c 1.3e+130))) (* 2.0 (* b (* i (* c (- c))))) (* (+ (* x y) (* z t)) 2.0)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c <= -4e+121) || !(c <= 1.3e+130)) {
tmp = 2.0 * (b * (i * (c * -c)));
} else {
tmp = ((x * y) + (z * t)) * 2.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((c <= (-4d+121)) .or. (.not. (c <= 1.3d+130))) then
tmp = 2.0d0 * (b * (i * (c * -c)))
else
tmp = ((x * y) + (z * t)) * 2.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c <= -4e+121) || !(c <= 1.3e+130)) {
tmp = 2.0 * (b * (i * (c * -c)));
} else {
tmp = ((x * y) + (z * t)) * 2.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c <= -4e+121) or not (c <= 1.3e+130): tmp = 2.0 * (b * (i * (c * -c))) else: tmp = ((x * y) + (z * t)) * 2.0 return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((c <= -4e+121) || !(c <= 1.3e+130)) tmp = Float64(2.0 * Float64(b * Float64(i * Float64(c * Float64(-c))))); else tmp = Float64(Float64(Float64(x * y) + Float64(z * t)) * 2.0); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((c <= -4e+121) || ~((c <= 1.3e+130))) tmp = 2.0 * (b * (i * (c * -c))); else tmp = ((x * y) + (z * t)) * 2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[c, -4e+121], N[Not[LessEqual[c, 1.3e+130]], $MachinePrecision]], N[(2.0 * N[(b * N[(i * N[(c * (-c)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -4 \cdot 10^{+121} \lor \neg \left(c \leq 1.3 \cdot 10^{+130}\right):\\
\;\;\;\;2 \cdot \left(b \cdot \left(i \cdot \left(c \cdot \left(-c\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\
\end{array}
\end{array}
if c < -4.00000000000000015e121 or 1.2999999999999999e130 < c Initial program 83.4%
Taylor expanded in b around inf 70.6%
mul-1-neg70.6%
distribute-rgt-neg-in70.6%
unpow270.6%
associate-*r*65.1%
distribute-rgt-neg-in65.1%
associate-*r*70.6%
Simplified70.6%
if -4.00000000000000015e121 < c < 1.2999999999999999e130Initial program 93.1%
Taylor expanded in c around 0 69.6%
Final simplification69.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= c -3.5e+121) (not (<= c 5e+126))) (* 2.0 (* i (* c (* b (- c))))) (* (+ (* x y) (* z t)) 2.0)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c <= -3.5e+121) || !(c <= 5e+126)) {
tmp = 2.0 * (i * (c * (b * -c)));
} else {
tmp = ((x * y) + (z * t)) * 2.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((c <= (-3.5d+121)) .or. (.not. (c <= 5d+126))) then
tmp = 2.0d0 * (i * (c * (b * -c)))
else
tmp = ((x * y) + (z * t)) * 2.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c <= -3.5e+121) || !(c <= 5e+126)) {
tmp = 2.0 * (i * (c * (b * -c)));
} else {
tmp = ((x * y) + (z * t)) * 2.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c <= -3.5e+121) or not (c <= 5e+126): tmp = 2.0 * (i * (c * (b * -c))) else: tmp = ((x * y) + (z * t)) * 2.0 return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((c <= -3.5e+121) || !(c <= 5e+126)) tmp = Float64(2.0 * Float64(i * Float64(c * Float64(b * Float64(-c))))); else tmp = Float64(Float64(Float64(x * y) + Float64(z * t)) * 2.0); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((c <= -3.5e+121) || ~((c <= 5e+126))) tmp = 2.0 * (i * (c * (b * -c))); else tmp = ((x * y) + (z * t)) * 2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[c, -3.5e+121], N[Not[LessEqual[c, 5e+126]], $MachinePrecision]], N[(2.0 * N[(i * N[(c * N[(b * (-c)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -3.5 \cdot 10^{+121} \lor \neg \left(c \leq 5 \cdot 10^{+126}\right):\\
\;\;\;\;2 \cdot \left(i \cdot \left(c \cdot \left(b \cdot \left(-c\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\
\end{array}
\end{array}
if c < -3.5e121 or 4.99999999999999977e126 < c Initial program 83.4%
Taylor expanded in a around 0 77.4%
Taylor expanded in b around inf 70.6%
mul-1-neg70.6%
unpow270.6%
associate-*r*65.1%
associate-*l*69.8%
distribute-rgt-neg-in69.8%
distribute-rgt-neg-in69.8%
Simplified69.8%
associate-*r*74.1%
distribute-rgt-neg-out74.1%
add-sqr-sqrt35.1%
sqrt-unprod29.4%
sqr-neg29.4%
sqrt-unprod4.2%
add-sqr-sqrt4.5%
associate-*r*3.4%
*-commutative3.4%
*-commutative3.4%
associate-*l*4.5%
add-sqr-sqrt4.2%
sqrt-unprod29.4%
sqr-neg29.4%
sqrt-unprod35.1%
add-sqr-sqrt74.1%
Applied egg-rr74.1%
if -3.5e121 < c < 4.99999999999999977e126Initial program 93.1%
Taylor expanded in c around 0 69.6%
Final simplification71.0%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (* x y) -2.9e+264) (not (<= (* x y) 2.9e+200))) (* (* x y) 2.0) (* 2.0 (* z t))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((x * y) <= -2.9e+264) || !((x * y) <= 2.9e+200)) {
tmp = (x * y) * 2.0;
} else {
tmp = 2.0 * (z * t);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (((x * y) <= (-2.9d+264)) .or. (.not. ((x * y) <= 2.9d+200))) then
tmp = (x * y) * 2.0d0
else
tmp = 2.0d0 * (z * t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((x * y) <= -2.9e+264) || !((x * y) <= 2.9e+200)) {
tmp = (x * y) * 2.0;
} else {
tmp = 2.0 * (z * t);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((x * y) <= -2.9e+264) or not ((x * y) <= 2.9e+200): tmp = (x * y) * 2.0 else: tmp = 2.0 * (z * t) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(x * y) <= -2.9e+264) || !(Float64(x * y) <= 2.9e+200)) tmp = Float64(Float64(x * y) * 2.0); else tmp = Float64(2.0 * Float64(z * t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (((x * y) <= -2.9e+264) || ~(((x * y) <= 2.9e+200))) tmp = (x * y) * 2.0; else tmp = 2.0 * (z * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(x * y), $MachinePrecision], -2.9e+264], N[Not[LessEqual[N[(x * y), $MachinePrecision], 2.9e+200]], $MachinePrecision]], N[(N[(x * y), $MachinePrecision] * 2.0), $MachinePrecision], N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -2.9 \cdot 10^{+264} \lor \neg \left(x \cdot y \leq 2.9 \cdot 10^{+200}\right):\\
\;\;\;\;\left(x \cdot y\right) \cdot 2\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(z \cdot t\right)\\
\end{array}
\end{array}
if (*.f64 x y) < -2.8999999999999998e264 or 2.8999999999999999e200 < (*.f64 x y) Initial program 82.1%
Taylor expanded in x around inf 77.6%
if -2.8999999999999998e264 < (*.f64 x y) < 2.8999999999999999e200Initial program 91.4%
Taylor expanded in z around inf 39.2%
Final simplification45.1%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= c -4.5e+121) (not (<= c 1.65e+125))) (* (* c (* c i)) (* b -2.0)) (* (+ (* x y) (* z t)) 2.0)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c <= -4.5e+121) || !(c <= 1.65e+125)) {
tmp = (c * (c * i)) * (b * -2.0);
} else {
tmp = ((x * y) + (z * t)) * 2.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((c <= (-4.5d+121)) .or. (.not. (c <= 1.65d+125))) then
tmp = (c * (c * i)) * (b * (-2.0d0))
else
tmp = ((x * y) + (z * t)) * 2.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c <= -4.5e+121) || !(c <= 1.65e+125)) {
tmp = (c * (c * i)) * (b * -2.0);
} else {
tmp = ((x * y) + (z * t)) * 2.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c <= -4.5e+121) or not (c <= 1.65e+125): tmp = (c * (c * i)) * (b * -2.0) else: tmp = ((x * y) + (z * t)) * 2.0 return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((c <= -4.5e+121) || !(c <= 1.65e+125)) tmp = Float64(Float64(c * Float64(c * i)) * Float64(b * -2.0)); else tmp = Float64(Float64(Float64(x * y) + Float64(z * t)) * 2.0); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((c <= -4.5e+121) || ~((c <= 1.65e+125))) tmp = (c * (c * i)) * (b * -2.0); else tmp = ((x * y) + (z * t)) * 2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[c, -4.5e+121], N[Not[LessEqual[c, 1.65e+125]], $MachinePrecision]], N[(N[(c * N[(c * i), $MachinePrecision]), $MachinePrecision] * N[(b * -2.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -4.5 \cdot 10^{+121} \lor \neg \left(c \leq 1.65 \cdot 10^{+125}\right):\\
\;\;\;\;\left(c \cdot \left(c \cdot i\right)\right) \cdot \left(b \cdot -2\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\
\end{array}
\end{array}
if c < -4.5000000000000003e121 or 1.65000000000000003e125 < c Initial program 83.4%
Taylor expanded in i around inf 81.6%
Taylor expanded in c around inf 70.6%
associate-*r*70.6%
*-commutative70.6%
*-commutative70.6%
unpow270.6%
associate-*l*65.1%
Simplified65.1%
if -4.5000000000000003e121 < c < 1.65000000000000003e125Initial program 93.1%
Taylor expanded in c around 0 69.6%
Final simplification68.1%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= c -6.5e+121) (not (<= c 4.5e+129))) (* (* i (* b (* c c))) -2.0) (* (+ (* x y) (* z t)) 2.0)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c <= -6.5e+121) || !(c <= 4.5e+129)) {
tmp = (i * (b * (c * c))) * -2.0;
} else {
tmp = ((x * y) + (z * t)) * 2.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((c <= (-6.5d+121)) .or. (.not. (c <= 4.5d+129))) then
tmp = (i * (b * (c * c))) * (-2.0d0)
else
tmp = ((x * y) + (z * t)) * 2.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c <= -6.5e+121) || !(c <= 4.5e+129)) {
tmp = (i * (b * (c * c))) * -2.0;
} else {
tmp = ((x * y) + (z * t)) * 2.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c <= -6.5e+121) or not (c <= 4.5e+129): tmp = (i * (b * (c * c))) * -2.0 else: tmp = ((x * y) + (z * t)) * 2.0 return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((c <= -6.5e+121) || !(c <= 4.5e+129)) tmp = Float64(Float64(i * Float64(b * Float64(c * c))) * -2.0); else tmp = Float64(Float64(Float64(x * y) + Float64(z * t)) * 2.0); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((c <= -6.5e+121) || ~((c <= 4.5e+129))) tmp = (i * (b * (c * c))) * -2.0; else tmp = ((x * y) + (z * t)) * 2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[c, -6.5e+121], N[Not[LessEqual[c, 4.5e+129]], $MachinePrecision]], N[(N[(i * N[(b * N[(c * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -6.5 \cdot 10^{+121} \lor \neg \left(c \leq 4.5 \cdot 10^{+129}\right):\\
\;\;\;\;\left(i \cdot \left(b \cdot \left(c \cdot c\right)\right)\right) \cdot -2\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\
\end{array}
\end{array}
if c < -6.50000000000000019e121 or 4.5000000000000001e129 < c Initial program 83.4%
Taylor expanded in i around inf 81.6%
Taylor expanded in c around inf 70.6%
*-commutative70.6%
associate-*r*70.5%
unpow270.5%
Simplified70.5%
if -6.50000000000000019e121 < c < 4.5000000000000001e129Initial program 93.1%
Taylor expanded in c around 0 69.6%
Final simplification69.9%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a -2.7e+222) (* (* a (* c i)) -2.0) (if (<= a 9e+148) (* (+ (* x y) (* z t)) 2.0) (* 2.0 (* i (* a (- c)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= -2.7e+222) {
tmp = (a * (c * i)) * -2.0;
} else if (a <= 9e+148) {
tmp = ((x * y) + (z * t)) * 2.0;
} else {
tmp = 2.0 * (i * (a * -c));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (a <= (-2.7d+222)) then
tmp = (a * (c * i)) * (-2.0d0)
else if (a <= 9d+148) then
tmp = ((x * y) + (z * t)) * 2.0d0
else
tmp = 2.0d0 * (i * (a * -c))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= -2.7e+222) {
tmp = (a * (c * i)) * -2.0;
} else if (a <= 9e+148) {
tmp = ((x * y) + (z * t)) * 2.0;
} else {
tmp = 2.0 * (i * (a * -c));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= -2.7e+222: tmp = (a * (c * i)) * -2.0 elif a <= 9e+148: tmp = ((x * y) + (z * t)) * 2.0 else: tmp = 2.0 * (i * (a * -c)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= -2.7e+222) tmp = Float64(Float64(a * Float64(c * i)) * -2.0); elseif (a <= 9e+148) tmp = Float64(Float64(Float64(x * y) + Float64(z * t)) * 2.0); else tmp = Float64(2.0 * Float64(i * Float64(a * Float64(-c)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (a <= -2.7e+222) tmp = (a * (c * i)) * -2.0; elseif (a <= 9e+148) tmp = ((x * y) + (z * t)) * 2.0; else tmp = 2.0 * (i * (a * -c)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, -2.7e+222], N[(N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision], If[LessEqual[a, 9e+148], N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision], N[(2.0 * N[(i * N[(a * (-c)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.7 \cdot 10^{+222}:\\
\;\;\;\;\left(a \cdot \left(c \cdot i\right)\right) \cdot -2\\
\mathbf{elif}\;a \leq 9 \cdot 10^{+148}:\\
\;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(i \cdot \left(a \cdot \left(-c\right)\right)\right)\\
\end{array}
\end{array}
if a < -2.70000000000000013e222Initial program 73.4%
Taylor expanded in a around inf 67.6%
Taylor expanded in a around 0 67.6%
if -2.70000000000000013e222 < a < 8.99999999999999987e148Initial program 91.7%
Taylor expanded in c around 0 61.8%
if 8.99999999999999987e148 < a Initial program 88.7%
Taylor expanded in z around 0 70.4%
Taylor expanded in a around inf 56.4%
mul-1-neg56.4%
associate-*r*61.5%
*-commutative61.5%
distribute-lft-neg-in61.5%
*-commutative61.5%
Simplified61.5%
Final simplification62.2%
(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.0%
Taylor expanded in z around inf 35.9%
Final simplification35.9%
(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 2023293
(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))))