
(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 22 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 (+ (* x y) (* z t))))
(if (<= (- t_2 (* (* c t_1) i)) INFINITY)
(* 2.0 (- t_2 (* t_1 (* c i))))
(* 2.0 (* z (- t (* c (+ (/ (* a i) z) (/ (* b (* c i)) z)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double t_2 = (x * y) + (z * t);
double tmp;
if ((t_2 - ((c * t_1) * i)) <= ((double) INFINITY)) {
tmp = 2.0 * (t_2 - (t_1 * (c * i)));
} else {
tmp = 2.0 * (z * (t - (c * (((a * i) / z) + ((b * (c * i)) / z)))));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double t_2 = (x * y) + (z * t);
double tmp;
if ((t_2 - ((c * t_1) * i)) <= Double.POSITIVE_INFINITY) {
tmp = 2.0 * (t_2 - (t_1 * (c * i)));
} else {
tmp = 2.0 * (z * (t - (c * (((a * i) / z) + ((b * (c * i)) / z)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a + (b * c) t_2 = (x * y) + (z * t) tmp = 0 if (t_2 - ((c * t_1) * i)) <= math.inf: tmp = 2.0 * (t_2 - (t_1 * (c * i))) else: tmp = 2.0 * (z * (t - (c * (((a * i) / z) + ((b * (c * i)) / z))))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(b * c)) t_2 = Float64(Float64(x * y) + Float64(z * t)) tmp = 0.0 if (Float64(t_2 - Float64(Float64(c * t_1) * i)) <= Inf) tmp = Float64(2.0 * Float64(t_2 - Float64(t_1 * Float64(c * i)))); else tmp = Float64(2.0 * Float64(z * Float64(t - Float64(c * Float64(Float64(Float64(a * i) / z) + Float64(Float64(b * Float64(c * i)) / z)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = a + (b * c); t_2 = (x * y) + (z * t); tmp = 0.0; if ((t_2 - ((c * t_1) * i)) <= Inf) tmp = 2.0 * (t_2 - (t_1 * (c * i))); else tmp = 2.0 * (z * (t - (c * (((a * i) / z) + ((b * (c * i)) / z))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$2 - N[(N[(c * t$95$1), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision], Infinity], N[(2.0 * N[(t$95$2 - N[(t$95$1 * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(z * N[(t - N[(c * N[(N[(N[(a * i), $MachinePrecision] / z), $MachinePrecision] + N[(N[(b * N[(c * i), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + b \cdot c\\
t_2 := x \cdot y + z \cdot t\\
\mathbf{if}\;t\_2 - \left(c \cdot t\_1\right) \cdot i \leq \infty:\\
\;\;\;\;2 \cdot \left(t\_2 - t\_1 \cdot \left(c \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(z \cdot \left(t - c \cdot \left(\frac{a \cdot i}{z} + \frac{b \cdot \left(c \cdot i\right)}{z}\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 96.0%
fma-define96.0%
associate-*l*99.9%
Simplified99.9%
fma-define99.9%
+-commutative99.9%
Applied egg-rr99.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 z around inf 35.7%
Taylor expanded in c around 0 57.1%
associate-/l*64.3%
associate-/l*64.3%
associate-/l*64.3%
Simplified64.3%
Taylor expanded in x around 0 64.3%
Final simplification97.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (* c (* (* b c) (- i)))))
(t_2 (* a (* c i)))
(t_3 (* 2.0 (- (* x y) t_2))))
(if (<= c -1e+167)
t_1
(if (<= c -7.6e+126)
t_3
(if (<= c -6.8e+91)
(* 2.0 (* c (* b (* c (- i)))))
(if (<= c -2.4e+62)
t_3
(if (<= c -6.6e+47)
t_1
(if (<= c 2.9e-150)
(* (+ (* x y) (* z t)) 2.0)
(if (<= c 3.2e+167) (* 2.0 (- (* z t) t_2)) t_1)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * (c * ((b * c) * -i));
double t_2 = a * (c * i);
double t_3 = 2.0 * ((x * y) - t_2);
double tmp;
if (c <= -1e+167) {
tmp = t_1;
} else if (c <= -7.6e+126) {
tmp = t_3;
} else if (c <= -6.8e+91) {
tmp = 2.0 * (c * (b * (c * -i)));
} else if (c <= -2.4e+62) {
tmp = t_3;
} else if (c <= -6.6e+47) {
tmp = t_1;
} else if (c <= 2.9e-150) {
tmp = ((x * y) + (z * t)) * 2.0;
} else if (c <= 3.2e+167) {
tmp = 2.0 * ((z * t) - t_2);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = 2.0d0 * (c * ((b * c) * -i))
t_2 = a * (c * i)
t_3 = 2.0d0 * ((x * y) - t_2)
if (c <= (-1d+167)) then
tmp = t_1
else if (c <= (-7.6d+126)) then
tmp = t_3
else if (c <= (-6.8d+91)) then
tmp = 2.0d0 * (c * (b * (c * -i)))
else if (c <= (-2.4d+62)) then
tmp = t_3
else if (c <= (-6.6d+47)) then
tmp = t_1
else if (c <= 2.9d-150) then
tmp = ((x * y) + (z * t)) * 2.0d0
else if (c <= 3.2d+167) then
tmp = 2.0d0 * ((z * t) - t_2)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * (c * ((b * c) * -i));
double t_2 = a * (c * i);
double t_3 = 2.0 * ((x * y) - t_2);
double tmp;
if (c <= -1e+167) {
tmp = t_1;
} else if (c <= -7.6e+126) {
tmp = t_3;
} else if (c <= -6.8e+91) {
tmp = 2.0 * (c * (b * (c * -i)));
} else if (c <= -2.4e+62) {
tmp = t_3;
} else if (c <= -6.6e+47) {
tmp = t_1;
} else if (c <= 2.9e-150) {
tmp = ((x * y) + (z * t)) * 2.0;
} else if (c <= 3.2e+167) {
tmp = 2.0 * ((z * t) - t_2);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * (c * ((b * c) * -i)) t_2 = a * (c * i) t_3 = 2.0 * ((x * y) - t_2) tmp = 0 if c <= -1e+167: tmp = t_1 elif c <= -7.6e+126: tmp = t_3 elif c <= -6.8e+91: tmp = 2.0 * (c * (b * (c * -i))) elif c <= -2.4e+62: tmp = t_3 elif c <= -6.6e+47: tmp = t_1 elif c <= 2.9e-150: tmp = ((x * y) + (z * t)) * 2.0 elif c <= 3.2e+167: tmp = 2.0 * ((z * t) - t_2) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(c * Float64(Float64(b * c) * Float64(-i)))) t_2 = Float64(a * Float64(c * i)) t_3 = Float64(2.0 * Float64(Float64(x * y) - t_2)) tmp = 0.0 if (c <= -1e+167) tmp = t_1; elseif (c <= -7.6e+126) tmp = t_3; elseif (c <= -6.8e+91) tmp = Float64(2.0 * Float64(c * Float64(b * Float64(c * Float64(-i))))); elseif (c <= -2.4e+62) tmp = t_3; elseif (c <= -6.6e+47) tmp = t_1; elseif (c <= 2.9e-150) tmp = Float64(Float64(Float64(x * y) + Float64(z * t)) * 2.0); elseif (c <= 3.2e+167) tmp = Float64(2.0 * Float64(Float64(z * t) - t_2)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 2.0 * (c * ((b * c) * -i)); t_2 = a * (c * i); t_3 = 2.0 * ((x * y) - t_2); tmp = 0.0; if (c <= -1e+167) tmp = t_1; elseif (c <= -7.6e+126) tmp = t_3; elseif (c <= -6.8e+91) tmp = 2.0 * (c * (b * (c * -i))); elseif (c <= -2.4e+62) tmp = t_3; elseif (c <= -6.6e+47) tmp = t_1; elseif (c <= 2.9e-150) tmp = ((x * y) + (z * t)) * 2.0; elseif (c <= 3.2e+167) tmp = 2.0 * ((z * t) - t_2); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(c * N[(N[(b * c), $MachinePrecision] * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(2.0 * N[(N[(x * y), $MachinePrecision] - t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1e+167], t$95$1, If[LessEqual[c, -7.6e+126], t$95$3, If[LessEqual[c, -6.8e+91], N[(2.0 * N[(c * N[(b * N[(c * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -2.4e+62], t$95$3, If[LessEqual[c, -6.6e+47], t$95$1, If[LessEqual[c, 2.9e-150], N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision], If[LessEqual[c, 3.2e+167], N[(2.0 * N[(N[(z * t), $MachinePrecision] - t$95$2), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(c \cdot \left(\left(b \cdot c\right) \cdot \left(-i\right)\right)\right)\\
t_2 := a \cdot \left(c \cdot i\right)\\
t_3 := 2 \cdot \left(x \cdot y - t\_2\right)\\
\mathbf{if}\;c \leq -1 \cdot 10^{+167}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq -7.6 \cdot 10^{+126}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;c \leq -6.8 \cdot 10^{+91}:\\
\;\;\;\;2 \cdot \left(c \cdot \left(b \cdot \left(c \cdot \left(-i\right)\right)\right)\right)\\
\mathbf{elif}\;c \leq -2.4 \cdot 10^{+62}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;c \leq -6.6 \cdot 10^{+47}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 2.9 \cdot 10^{-150}:\\
\;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\
\mathbf{elif}\;c \leq 3.2 \cdot 10^{+167}:\\
\;\;\;\;2 \cdot \left(z \cdot t - t\_2\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -1e167 or -2.4e62 < c < -6.5999999999999998e47 or 3.19999999999999981e167 < c Initial program 86.8%
Taylor expanded in i around inf 94.1%
Taylor expanded in a around 0 86.8%
if -1e167 < c < -7.60000000000000033e126 or -6.8000000000000002e91 < c < -2.4e62Initial program 86.9%
Taylor expanded in a around inf 74.6%
*-commutative74.6%
Simplified74.6%
Taylor expanded in z around 0 66.2%
if -7.60000000000000033e126 < c < -6.8000000000000002e91Initial program 64.0%
Taylor expanded in i around inf 87.1%
Taylor expanded in a around 0 87.7%
Taylor expanded in i around 0 87.9%
if -6.5999999999999998e47 < c < 2.8999999999999998e-150Initial program 98.0%
Taylor expanded in c around 0 77.5%
if 2.8999999999999998e-150 < c < 3.19999999999999981e167Initial program 87.7%
Taylor expanded in a around inf 67.9%
*-commutative67.9%
Simplified67.9%
Taylor expanded in x around 0 54.0%
Final simplification74.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (+ (* x y) (* z t)) 2.0))
(t_2 (* 2.0 (- (* z t) (* a (* c i)))))
(t_3 (* 2.0 (* c (* (* b c) (- i))))))
(if (<= c -4.8e+158)
t_3
(if (<= c -1.65e+127)
t_1
(if (<= c -3.8e+88)
(* 2.0 (* c (* b (* c (- i)))))
(if (<= c -1.95e+62)
t_2
(if (<= c -6e+48)
t_3
(if (<= c 1.55e-149) t_1 (if (<= c 2.7e+166) 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 = ((x * y) + (z * t)) * 2.0;
double t_2 = 2.0 * ((z * t) - (a * (c * i)));
double t_3 = 2.0 * (c * ((b * c) * -i));
double tmp;
if (c <= -4.8e+158) {
tmp = t_3;
} else if (c <= -1.65e+127) {
tmp = t_1;
} else if (c <= -3.8e+88) {
tmp = 2.0 * (c * (b * (c * -i)));
} else if (c <= -1.95e+62) {
tmp = t_2;
} else if (c <= -6e+48) {
tmp = t_3;
} else if (c <= 1.55e-149) {
tmp = t_1;
} else if (c <= 2.7e+166) {
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 = ((x * y) + (z * t)) * 2.0d0
t_2 = 2.0d0 * ((z * t) - (a * (c * i)))
t_3 = 2.0d0 * (c * ((b * c) * -i))
if (c <= (-4.8d+158)) then
tmp = t_3
else if (c <= (-1.65d+127)) then
tmp = t_1
else if (c <= (-3.8d+88)) then
tmp = 2.0d0 * (c * (b * (c * -i)))
else if (c <= (-1.95d+62)) then
tmp = t_2
else if (c <= (-6d+48)) then
tmp = t_3
else if (c <= 1.55d-149) then
tmp = t_1
else if (c <= 2.7d+166) 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 = ((x * y) + (z * t)) * 2.0;
double t_2 = 2.0 * ((z * t) - (a * (c * i)));
double t_3 = 2.0 * (c * ((b * c) * -i));
double tmp;
if (c <= -4.8e+158) {
tmp = t_3;
} else if (c <= -1.65e+127) {
tmp = t_1;
} else if (c <= -3.8e+88) {
tmp = 2.0 * (c * (b * (c * -i)));
} else if (c <= -1.95e+62) {
tmp = t_2;
} else if (c <= -6e+48) {
tmp = t_3;
} else if (c <= 1.55e-149) {
tmp = t_1;
} else if (c <= 2.7e+166) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = ((x * y) + (z * t)) * 2.0 t_2 = 2.0 * ((z * t) - (a * (c * i))) t_3 = 2.0 * (c * ((b * c) * -i)) tmp = 0 if c <= -4.8e+158: tmp = t_3 elif c <= -1.65e+127: tmp = t_1 elif c <= -3.8e+88: tmp = 2.0 * (c * (b * (c * -i))) elif c <= -1.95e+62: tmp = t_2 elif c <= -6e+48: tmp = t_3 elif c <= 1.55e-149: tmp = t_1 elif c <= 2.7e+166: tmp = t_2 else: tmp = t_3 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(Float64(z * t) - Float64(a * Float64(c * i)))) t_3 = Float64(2.0 * Float64(c * Float64(Float64(b * c) * Float64(-i)))) tmp = 0.0 if (c <= -4.8e+158) tmp = t_3; elseif (c <= -1.65e+127) tmp = t_1; elseif (c <= -3.8e+88) tmp = Float64(2.0 * Float64(c * Float64(b * Float64(c * Float64(-i))))); elseif (c <= -1.95e+62) tmp = t_2; elseif (c <= -6e+48) tmp = t_3; elseif (c <= 1.55e-149) tmp = t_1; elseif (c <= 2.7e+166) 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 = ((x * y) + (z * t)) * 2.0; t_2 = 2.0 * ((z * t) - (a * (c * i))); t_3 = 2.0 * (c * ((b * c) * -i)); tmp = 0.0; if (c <= -4.8e+158) tmp = t_3; elseif (c <= -1.65e+127) tmp = t_1; elseif (c <= -3.8e+88) tmp = 2.0 * (c * (b * (c * -i))); elseif (c <= -1.95e+62) tmp = t_2; elseif (c <= -6e+48) tmp = t_3; elseif (c <= 1.55e-149) tmp = t_1; elseif (c <= 2.7e+166) 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[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(2.0 * N[(c * N[(N[(b * c), $MachinePrecision] * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -4.8e+158], t$95$3, If[LessEqual[c, -1.65e+127], t$95$1, If[LessEqual[c, -3.8e+88], N[(2.0 * N[(c * N[(b * N[(c * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -1.95e+62], t$95$2, If[LessEqual[c, -6e+48], t$95$3, If[LessEqual[c, 1.55e-149], t$95$1, If[LessEqual[c, 2.7e+166], t$95$2, t$95$3]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot y + z \cdot t\right) \cdot 2\\
t_2 := 2 \cdot \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\\
t_3 := 2 \cdot \left(c \cdot \left(\left(b \cdot c\right) \cdot \left(-i\right)\right)\right)\\
\mathbf{if}\;c \leq -4.8 \cdot 10^{+158}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;c \leq -1.65 \cdot 10^{+127}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq -3.8 \cdot 10^{+88}:\\
\;\;\;\;2 \cdot \left(c \cdot \left(b \cdot \left(c \cdot \left(-i\right)\right)\right)\right)\\
\mathbf{elif}\;c \leq -1.95 \cdot 10^{+62}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;c \leq -6 \cdot 10^{+48}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;c \leq 1.55 \cdot 10^{-149}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 2.7 \cdot 10^{+166}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if c < -4.80000000000000016e158 or -1.95e62 < c < -5.9999999999999999e48 or 2.70000000000000012e166 < c Initial program 87.2%
Taylor expanded in i around inf 94.3%
Taylor expanded in a around 0 85.7%
if -4.80000000000000016e158 < c < -1.64999999999999988e127 or -5.9999999999999999e48 < c < 1.54999999999999994e-149Initial program 95.5%
Taylor expanded in c around 0 76.1%
if -1.64999999999999988e127 < c < -3.7999999999999997e88Initial program 68.0%
Taylor expanded in i around inf 77.5%
Taylor expanded in a around 0 78.1%
Taylor expanded in i around 0 78.3%
if -3.7999999999999997e88 < c < -1.95e62 or 1.54999999999999994e-149 < c < 2.70000000000000012e166Initial program 89.5%
Taylor expanded in a around inf 69.7%
*-commutative69.7%
Simplified69.7%
Taylor expanded in x around 0 56.5%
Final simplification73.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (* b c))) (t_2 (* (* c t_1) i)))
(if (<= t_2 (- INFINITY))
(* 2.0 (* c (* t_1 (- i))))
(if (<= t_2 2e+304)
(* (- (+ (* x y) (* z t)) t_2) 2.0)
(* 2.0 (- (* z t) (* c (* t_1 i))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double t_2 = (c * t_1) * i;
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = 2.0 * (c * (t_1 * -i));
} else if (t_2 <= 2e+304) {
tmp = (((x * y) + (z * t)) - t_2) * 2.0;
} else {
tmp = 2.0 * ((z * t) - (c * (t_1 * i)));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double t_2 = (c * t_1) * i;
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = 2.0 * (c * (t_1 * -i));
} else if (t_2 <= 2e+304) {
tmp = (((x * y) + (z * t)) - t_2) * 2.0;
} else {
tmp = 2.0 * ((z * t) - (c * (t_1 * i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a + (b * c) t_2 = (c * t_1) * i tmp = 0 if t_2 <= -math.inf: tmp = 2.0 * (c * (t_1 * -i)) elif t_2 <= 2e+304: tmp = (((x * y) + (z * t)) - t_2) * 2.0 else: tmp = 2.0 * ((z * t) - (c * (t_1 * i))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(b * c)) t_2 = Float64(Float64(c * t_1) * i) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(2.0 * Float64(c * Float64(t_1 * Float64(-i)))); elseif (t_2 <= 2e+304) tmp = Float64(Float64(Float64(Float64(x * y) + Float64(z * t)) - t_2) * 2.0); else tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(t_1 * i)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = a + (b * c); t_2 = (c * t_1) * i; tmp = 0.0; if (t_2 <= -Inf) tmp = 2.0 * (c * (t_1 * -i)); elseif (t_2 <= 2e+304) tmp = (((x * y) + (z * t)) - t_2) * 2.0; else tmp = 2.0 * ((z * t) - (c * (t_1 * i))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(c * t$95$1), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(2.0 * N[(c * N[(t$95$1 * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+304], N[(N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision] * 2.0), $MachinePrecision], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(t$95$1 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + b \cdot c\\
t_2 := \left(c \cdot t\_1\right) \cdot i\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;2 \cdot \left(c \cdot \left(t\_1 \cdot \left(-i\right)\right)\right)\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+304}:\\
\;\;\;\;\left(\left(x \cdot y + z \cdot t\right) - t\_2\right) \cdot 2\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(t\_1 \cdot i\right)\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -inf.0Initial program 82.1%
Taylor expanded in i around inf 96.4%
if -inf.0 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 1.9999999999999999e304Initial program 98.6%
if 1.9999999999999999e304 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) Initial program 76.5%
Taylor expanded in x around 0 90.0%
Final simplification96.4%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= (* x y) -2e+177)
(* (* x y) 2.0)
(if (<= (* x y) -2e-195)
(* 2.0 (* x (* t (/ z x))))
(if (<= (* x y) 0.0)
(* 2.0 (* i (* a (- c))))
(if (<= (* x y) 5e-109)
(* 2.0 (* z t))
(if (<= (* x y) 2e+208)
(* 2.0 (* (* c i) (- a)))
(* x (* y 2.0))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x * y) <= -2e+177) {
tmp = (x * y) * 2.0;
} else if ((x * y) <= -2e-195) {
tmp = 2.0 * (x * (t * (z / x)));
} else if ((x * y) <= 0.0) {
tmp = 2.0 * (i * (a * -c));
} else if ((x * y) <= 5e-109) {
tmp = 2.0 * (z * t);
} else if ((x * y) <= 2e+208) {
tmp = 2.0 * ((c * i) * -a);
} else {
tmp = x * (y * 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 ((x * y) <= (-2d+177)) then
tmp = (x * y) * 2.0d0
else if ((x * y) <= (-2d-195)) then
tmp = 2.0d0 * (x * (t * (z / x)))
else if ((x * y) <= 0.0d0) then
tmp = 2.0d0 * (i * (a * -c))
else if ((x * y) <= 5d-109) then
tmp = 2.0d0 * (z * t)
else if ((x * y) <= 2d+208) then
tmp = 2.0d0 * ((c * i) * -a)
else
tmp = x * (y * 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 ((x * y) <= -2e+177) {
tmp = (x * y) * 2.0;
} else if ((x * y) <= -2e-195) {
tmp = 2.0 * (x * (t * (z / x)));
} else if ((x * y) <= 0.0) {
tmp = 2.0 * (i * (a * -c));
} else if ((x * y) <= 5e-109) {
tmp = 2.0 * (z * t);
} else if ((x * y) <= 2e+208) {
tmp = 2.0 * ((c * i) * -a);
} else {
tmp = x * (y * 2.0);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x * y) <= -2e+177: tmp = (x * y) * 2.0 elif (x * y) <= -2e-195: tmp = 2.0 * (x * (t * (z / x))) elif (x * y) <= 0.0: tmp = 2.0 * (i * (a * -c)) elif (x * y) <= 5e-109: tmp = 2.0 * (z * t) elif (x * y) <= 2e+208: tmp = 2.0 * ((c * i) * -a) else: tmp = x * (y * 2.0) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(x * y) <= -2e+177) tmp = Float64(Float64(x * y) * 2.0); elseif (Float64(x * y) <= -2e-195) tmp = Float64(2.0 * Float64(x * Float64(t * Float64(z / x)))); elseif (Float64(x * y) <= 0.0) tmp = Float64(2.0 * Float64(i * Float64(a * Float64(-c)))); elseif (Float64(x * y) <= 5e-109) tmp = Float64(2.0 * Float64(z * t)); elseif (Float64(x * y) <= 2e+208) tmp = Float64(2.0 * Float64(Float64(c * i) * Float64(-a))); else tmp = Float64(x * Float64(y * 2.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x * y) <= -2e+177) tmp = (x * y) * 2.0; elseif ((x * y) <= -2e-195) tmp = 2.0 * (x * (t * (z / x))); elseif ((x * y) <= 0.0) tmp = 2.0 * (i * (a * -c)); elseif ((x * y) <= 5e-109) tmp = 2.0 * (z * t); elseif ((x * y) <= 2e+208) tmp = 2.0 * ((c * i) * -a); else tmp = x * (y * 2.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(x * y), $MachinePrecision], -2e+177], N[(N[(x * y), $MachinePrecision] * 2.0), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -2e-195], N[(2.0 * N[(x * N[(t * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 0.0], N[(2.0 * N[(i * N[(a * (-c)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 5e-109], N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 2e+208], N[(2.0 * N[(N[(c * i), $MachinePrecision] * (-a)), $MachinePrecision]), $MachinePrecision], N[(x * N[(y * 2.0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -2 \cdot 10^{+177}:\\
\;\;\;\;\left(x \cdot y\right) \cdot 2\\
\mathbf{elif}\;x \cdot y \leq -2 \cdot 10^{-195}:\\
\;\;\;\;2 \cdot \left(x \cdot \left(t \cdot \frac{z}{x}\right)\right)\\
\mathbf{elif}\;x \cdot y \leq 0:\\
\;\;\;\;2 \cdot \left(i \cdot \left(a \cdot \left(-c\right)\right)\right)\\
\mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{-109}:\\
\;\;\;\;2 \cdot \left(z \cdot t\right)\\
\mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{+208}:\\
\;\;\;\;2 \cdot \left(\left(c \cdot i\right) \cdot \left(-a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot 2\right)\\
\end{array}
\end{array}
if (*.f64 x y) < -2e177Initial program 90.6%
Taylor expanded in x around inf 67.0%
if -2e177 < (*.f64 x y) < -2.0000000000000002e-195Initial program 91.5%
Taylor expanded in a around inf 62.2%
*-commutative62.2%
Simplified62.2%
Taylor expanded in x around inf 60.7%
Taylor expanded in t around inf 31.8%
associate-/l*33.4%
Simplified33.4%
if -2.0000000000000002e-195 < (*.f64 x y) < 0.0Initial program 95.3%
Taylor expanded in a around inf 41.9%
mul-1-neg41.9%
*-commutative41.9%
associate-*l*35.3%
*-commutative35.3%
distribute-rgt-neg-in35.3%
*-commutative35.3%
distribute-rgt-neg-in35.3%
Simplified35.3%
distribute-rgt-neg-out35.3%
*-commutative35.3%
distribute-rgt-neg-out35.3%
associate-*r*44.0%
Applied egg-rr44.0%
if 0.0 < (*.f64 x y) < 5.0000000000000002e-109Initial program 96.2%
Taylor expanded in z around inf 46.2%
if 5.0000000000000002e-109 < (*.f64 x y) < 2e208Initial program 91.8%
fma-define91.8%
associate-*l*98.1%
Simplified98.1%
fma-define98.1%
+-commutative98.1%
Applied egg-rr98.1%
Taylor expanded in c around 0 83.5%
Taylor expanded in a around inf 32.2%
associate-*r*32.2%
mul-1-neg32.2%
Simplified32.2%
if 2e208 < (*.f64 x y) Initial program 79.2%
Taylor expanded in x around inf 61.2%
pow161.2%
*-commutative61.2%
associate-*r*61.2%
Applied egg-rr61.2%
unpow161.2%
*-commutative61.2%
Simplified61.2%
Final simplification44.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (* b c))) (t_2 (+ (* x y) (* z t))))
(if (<= (- t_2 (* (* c t_1) i)) INFINITY)
(* 2.0 (- t_2 (* t_1 (* c i))))
(* 2.0 (* c (- (* b (* c (- i))) (* a i)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double t_2 = (x * y) + (z * t);
double tmp;
if ((t_2 - ((c * t_1) * i)) <= ((double) INFINITY)) {
tmp = 2.0 * (t_2 - (t_1 * (c * i)));
} else {
tmp = 2.0 * (c * ((b * (c * -i)) - (a * 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);
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 * ((b * (c * -i)) - (a * i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a + (b * c) t_2 = (x * y) + (z * t) tmp = 0 if (t_2 - ((c * t_1) * i)) <= math.inf: tmp = 2.0 * (t_2 - (t_1 * (c * i))) else: tmp = 2.0 * (c * ((b * (c * -i)) - (a * i))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(b * c)) t_2 = Float64(Float64(x * y) + Float64(z * t)) tmp = 0.0 if (Float64(t_2 - Float64(Float64(c * t_1) * i)) <= Inf) tmp = Float64(2.0 * Float64(t_2 - Float64(t_1 * Float64(c * i)))); else tmp = Float64(2.0 * Float64(c * Float64(Float64(b * Float64(c * Float64(-i))) - Float64(a * 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); 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 * ((b * (c * -i)) - (a * 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[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$2 - N[(N[(c * t$95$1), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision], Infinity], N[(2.0 * N[(t$95$2 - N[(t$95$1 * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(c * N[(N[(b * N[(c * (-i)), $MachinePrecision]), $MachinePrecision] - N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + b \cdot c\\
t_2 := x \cdot y + z \cdot t\\
\mathbf{if}\;t\_2 - \left(c \cdot t\_1\right) \cdot i \leq \infty:\\
\;\;\;\;2 \cdot \left(t\_2 - t\_1 \cdot \left(c \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(c \cdot \left(b \cdot \left(c \cdot \left(-i\right)\right) - a \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 96.0%
fma-define96.0%
associate-*l*99.9%
Simplified99.9%
fma-define99.9%
+-commutative99.9%
Applied egg-rr99.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 43.1%
distribute-rgt-in43.1%
*-commutative43.1%
associate-*r*43.1%
Applied egg-rr43.1%
Final simplification96.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (* i (* a (- c)))))
(t_2 (* 2.0 (* z t)))
(t_3 (* x (* y 2.0))))
(if (<= z -1.1e+122)
t_2
(if (<= z -4.7e-8)
t_1
(if (<= z -2.5e-229)
t_3
(if (<= z 1.32e-278)
t_1
(if (<= z 1.9e-174)
t_3
(if (<= z 7.2e+21) (* 2.0 (* (* c i) (- a))) 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 * (i * (a * -c));
double t_2 = 2.0 * (z * t);
double t_3 = x * (y * 2.0);
double tmp;
if (z <= -1.1e+122) {
tmp = t_2;
} else if (z <= -4.7e-8) {
tmp = t_1;
} else if (z <= -2.5e-229) {
tmp = t_3;
} else if (z <= 1.32e-278) {
tmp = t_1;
} else if (z <= 1.9e-174) {
tmp = t_3;
} else if (z <= 7.2e+21) {
tmp = 2.0 * ((c * i) * -a);
} 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 * (i * (a * -c))
t_2 = 2.0d0 * (z * t)
t_3 = x * (y * 2.0d0)
if (z <= (-1.1d+122)) then
tmp = t_2
else if (z <= (-4.7d-8)) then
tmp = t_1
else if (z <= (-2.5d-229)) then
tmp = t_3
else if (z <= 1.32d-278) then
tmp = t_1
else if (z <= 1.9d-174) then
tmp = t_3
else if (z <= 7.2d+21) then
tmp = 2.0d0 * ((c * i) * -a)
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 * (i * (a * -c));
double t_2 = 2.0 * (z * t);
double t_3 = x * (y * 2.0);
double tmp;
if (z <= -1.1e+122) {
tmp = t_2;
} else if (z <= -4.7e-8) {
tmp = t_1;
} else if (z <= -2.5e-229) {
tmp = t_3;
} else if (z <= 1.32e-278) {
tmp = t_1;
} else if (z <= 1.9e-174) {
tmp = t_3;
} else if (z <= 7.2e+21) {
tmp = 2.0 * ((c * i) * -a);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * (i * (a * -c)) t_2 = 2.0 * (z * t) t_3 = x * (y * 2.0) tmp = 0 if z <= -1.1e+122: tmp = t_2 elif z <= -4.7e-8: tmp = t_1 elif z <= -2.5e-229: tmp = t_3 elif z <= 1.32e-278: tmp = t_1 elif z <= 1.9e-174: tmp = t_3 elif z <= 7.2e+21: tmp = 2.0 * ((c * i) * -a) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(i * Float64(a * Float64(-c)))) t_2 = Float64(2.0 * Float64(z * t)) t_3 = Float64(x * Float64(y * 2.0)) tmp = 0.0 if (z <= -1.1e+122) tmp = t_2; elseif (z <= -4.7e-8) tmp = t_1; elseif (z <= -2.5e-229) tmp = t_3; elseif (z <= 1.32e-278) tmp = t_1; elseif (z <= 1.9e-174) tmp = t_3; elseif (z <= 7.2e+21) tmp = Float64(2.0 * Float64(Float64(c * i) * Float64(-a))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 2.0 * (i * (a * -c)); t_2 = 2.0 * (z * t); t_3 = x * (y * 2.0); tmp = 0.0; if (z <= -1.1e+122) tmp = t_2; elseif (z <= -4.7e-8) tmp = t_1; elseif (z <= -2.5e-229) tmp = t_3; elseif (z <= 1.32e-278) tmp = t_1; elseif (z <= 1.9e-174) tmp = t_3; elseif (z <= 7.2e+21) tmp = 2.0 * ((c * i) * -a); 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[(i * N[(a * (-c)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(y * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.1e+122], t$95$2, If[LessEqual[z, -4.7e-8], t$95$1, If[LessEqual[z, -2.5e-229], t$95$3, If[LessEqual[z, 1.32e-278], t$95$1, If[LessEqual[z, 1.9e-174], t$95$3, If[LessEqual[z, 7.2e+21], N[(2.0 * N[(N[(c * i), $MachinePrecision] * (-a)), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(i \cdot \left(a \cdot \left(-c\right)\right)\right)\\
t_2 := 2 \cdot \left(z \cdot t\right)\\
t_3 := x \cdot \left(y \cdot 2\right)\\
\mathbf{if}\;z \leq -1.1 \cdot 10^{+122}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -4.7 \cdot 10^{-8}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.5 \cdot 10^{-229}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq 1.32 \cdot 10^{-278}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{-174}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{+21}:\\
\;\;\;\;2 \cdot \left(\left(c \cdot i\right) \cdot \left(-a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -1.1e122 or 7.2e21 < z Initial program 85.8%
Taylor expanded in z around inf 43.2%
if -1.1e122 < z < -4.6999999999999997e-8 or -2.50000000000000008e-229 < z < 1.32e-278Initial program 90.2%
Taylor expanded in a around inf 36.8%
mul-1-neg36.8%
*-commutative36.8%
associate-*l*34.9%
*-commutative34.9%
distribute-rgt-neg-in34.9%
*-commutative34.9%
distribute-rgt-neg-in34.9%
Simplified34.9%
distribute-rgt-neg-out34.9%
*-commutative34.9%
distribute-rgt-neg-out34.9%
associate-*r*34.9%
Applied egg-rr34.9%
if -4.6999999999999997e-8 < z < -2.50000000000000008e-229 or 1.32e-278 < z < 1.9000000000000001e-174Initial program 94.3%
Taylor expanded in x around inf 41.3%
pow141.3%
*-commutative41.3%
associate-*r*41.3%
Applied egg-rr41.3%
unpow141.3%
*-commutative41.3%
Simplified41.3%
if 1.9000000000000001e-174 < z < 7.2e21Initial program 97.4%
fma-define97.4%
associate-*l*100.0%
Simplified100.0%
fma-define100.0%
+-commutative100.0%
Applied egg-rr100.0%
Taylor expanded in c around 0 90.0%
Taylor expanded in a around inf 29.4%
associate-*r*29.4%
mul-1-neg29.4%
Simplified29.4%
Final simplification38.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (* i (* a (- c)))))
(t_2 (* 2.0 (* z t)))
(t_3 (* x (* y 2.0))))
(if (<= z -2.3e+122)
t_2
(if (<= z -2.1e-8)
t_1
(if (<= z -3.6e-228)
t_3
(if (<= z 1.3e-281)
t_1
(if (<= z 4.5e-170) t_3 (if (<= z 3e+19) 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 * (i * (a * -c));
double t_2 = 2.0 * (z * t);
double t_3 = x * (y * 2.0);
double tmp;
if (z <= -2.3e+122) {
tmp = t_2;
} else if (z <= -2.1e-8) {
tmp = t_1;
} else if (z <= -3.6e-228) {
tmp = t_3;
} else if (z <= 1.3e-281) {
tmp = t_1;
} else if (z <= 4.5e-170) {
tmp = t_3;
} else if (z <= 3e+19) {
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) :: t_3
real(8) :: tmp
t_1 = 2.0d0 * (i * (a * -c))
t_2 = 2.0d0 * (z * t)
t_3 = x * (y * 2.0d0)
if (z <= (-2.3d+122)) then
tmp = t_2
else if (z <= (-2.1d-8)) then
tmp = t_1
else if (z <= (-3.6d-228)) then
tmp = t_3
else if (z <= 1.3d-281) then
tmp = t_1
else if (z <= 4.5d-170) then
tmp = t_3
else if (z <= 3d+19) 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 * (i * (a * -c));
double t_2 = 2.0 * (z * t);
double t_3 = x * (y * 2.0);
double tmp;
if (z <= -2.3e+122) {
tmp = t_2;
} else if (z <= -2.1e-8) {
tmp = t_1;
} else if (z <= -3.6e-228) {
tmp = t_3;
} else if (z <= 1.3e-281) {
tmp = t_1;
} else if (z <= 4.5e-170) {
tmp = t_3;
} else if (z <= 3e+19) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * (i * (a * -c)) t_2 = 2.0 * (z * t) t_3 = x * (y * 2.0) tmp = 0 if z <= -2.3e+122: tmp = t_2 elif z <= -2.1e-8: tmp = t_1 elif z <= -3.6e-228: tmp = t_3 elif z <= 1.3e-281: tmp = t_1 elif z <= 4.5e-170: tmp = t_3 elif z <= 3e+19: 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(i * Float64(a * Float64(-c)))) t_2 = Float64(2.0 * Float64(z * t)) t_3 = Float64(x * Float64(y * 2.0)) tmp = 0.0 if (z <= -2.3e+122) tmp = t_2; elseif (z <= -2.1e-8) tmp = t_1; elseif (z <= -3.6e-228) tmp = t_3; elseif (z <= 1.3e-281) tmp = t_1; elseif (z <= 4.5e-170) tmp = t_3; elseif (z <= 3e+19) 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 * (i * (a * -c)); t_2 = 2.0 * (z * t); t_3 = x * (y * 2.0); tmp = 0.0; if (z <= -2.3e+122) tmp = t_2; elseif (z <= -2.1e-8) tmp = t_1; elseif (z <= -3.6e-228) tmp = t_3; elseif (z <= 1.3e-281) tmp = t_1; elseif (z <= 4.5e-170) tmp = t_3; elseif (z <= 3e+19) 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[(i * N[(a * (-c)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(y * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.3e+122], t$95$2, If[LessEqual[z, -2.1e-8], t$95$1, If[LessEqual[z, -3.6e-228], t$95$3, If[LessEqual[z, 1.3e-281], t$95$1, If[LessEqual[z, 4.5e-170], t$95$3, If[LessEqual[z, 3e+19], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(i \cdot \left(a \cdot \left(-c\right)\right)\right)\\
t_2 := 2 \cdot \left(z \cdot t\right)\\
t_3 := x \cdot \left(y \cdot 2\right)\\
\mathbf{if}\;z \leq -2.3 \cdot 10^{+122}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -2.1 \cdot 10^{-8}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3.6 \cdot 10^{-228}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{-281}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{-170}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq 3 \cdot 10^{+19}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -2.3000000000000001e122 or 3e19 < z Initial program 85.8%
Taylor expanded in z around inf 43.2%
if -2.3000000000000001e122 < z < -2.09999999999999994e-8 or -3.6000000000000002e-228 < z < 1.30000000000000002e-281 or 4.50000000000000002e-170 < z < 3e19Initial program 93.4%
Taylor expanded in a around inf 33.9%
mul-1-neg33.9%
*-commutative33.9%
associate-*l*29.6%
*-commutative29.6%
distribute-rgt-neg-in29.6%
*-commutative29.6%
distribute-rgt-neg-in29.6%
Simplified29.6%
distribute-rgt-neg-out29.6%
*-commutative29.6%
distribute-rgt-neg-out29.6%
associate-*r*31.7%
Applied egg-rr31.7%
if -2.09999999999999994e-8 < z < -3.6000000000000002e-228 or 1.30000000000000002e-281 < z < 4.50000000000000002e-170Initial program 94.4%
Taylor expanded in x around inf 40.8%
pow140.8%
*-commutative40.8%
associate-*r*40.8%
Applied egg-rr40.8%
unpow140.8%
*-commutative40.8%
Simplified40.8%
Final simplification38.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (* i (* a (- c)))))
(t_2 (* 2.0 (* z t)))
(t_3 (* x (* y 2.0))))
(if (<= z -5.6e+121)
t_2
(if (<= z -1.8e-8)
t_1
(if (<= z -1.6e-229)
t_3
(if (<= z 6.8e-286)
t_1
(if (<= z 4.2e-175) t_3 (if (<= z 90000000000.0) 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 * (i * (a * -c));
double t_2 = 2.0 * (z * t);
double t_3 = x * (y * 2.0);
double tmp;
if (z <= -5.6e+121) {
tmp = t_2;
} else if (z <= -1.8e-8) {
tmp = t_1;
} else if (z <= -1.6e-229) {
tmp = t_3;
} else if (z <= 6.8e-286) {
tmp = t_1;
} else if (z <= 4.2e-175) {
tmp = t_3;
} else if (z <= 90000000000.0) {
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) :: t_3
real(8) :: tmp
t_1 = 2.0d0 * (i * (a * -c))
t_2 = 2.0d0 * (z * t)
t_3 = x * (y * 2.0d0)
if (z <= (-5.6d+121)) then
tmp = t_2
else if (z <= (-1.8d-8)) then
tmp = t_1
else if (z <= (-1.6d-229)) then
tmp = t_3
else if (z <= 6.8d-286) then
tmp = t_1
else if (z <= 4.2d-175) then
tmp = t_3
else if (z <= 90000000000.0d0) 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 * (i * (a * -c));
double t_2 = 2.0 * (z * t);
double t_3 = x * (y * 2.0);
double tmp;
if (z <= -5.6e+121) {
tmp = t_2;
} else if (z <= -1.8e-8) {
tmp = t_1;
} else if (z <= -1.6e-229) {
tmp = t_3;
} else if (z <= 6.8e-286) {
tmp = t_1;
} else if (z <= 4.2e-175) {
tmp = t_3;
} else if (z <= 90000000000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * (i * (a * -c)) t_2 = 2.0 * (z * t) t_3 = x * (y * 2.0) tmp = 0 if z <= -5.6e+121: tmp = t_2 elif z <= -1.8e-8: tmp = t_1 elif z <= -1.6e-229: tmp = t_3 elif z <= 6.8e-286: tmp = t_1 elif z <= 4.2e-175: tmp = t_3 elif z <= 90000000000.0: 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(i * Float64(a * Float64(-c)))) t_2 = Float64(2.0 * Float64(z * t)) t_3 = Float64(x * Float64(y * 2.0)) tmp = 0.0 if (z <= -5.6e+121) tmp = t_2; elseif (z <= -1.8e-8) tmp = t_1; elseif (z <= -1.6e-229) tmp = t_3; elseif (z <= 6.8e-286) tmp = t_1; elseif (z <= 4.2e-175) tmp = t_3; elseif (z <= 90000000000.0) 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 * (i * (a * -c)); t_2 = 2.0 * (z * t); t_3 = x * (y * 2.0); tmp = 0.0; if (z <= -5.6e+121) tmp = t_2; elseif (z <= -1.8e-8) tmp = t_1; elseif (z <= -1.6e-229) tmp = t_3; elseif (z <= 6.8e-286) tmp = t_1; elseif (z <= 4.2e-175) tmp = t_3; elseif (z <= 90000000000.0) 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[(i * N[(a * (-c)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(y * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.6e+121], t$95$2, If[LessEqual[z, -1.8e-8], t$95$1, If[LessEqual[z, -1.6e-229], t$95$3, If[LessEqual[z, 6.8e-286], t$95$1, If[LessEqual[z, 4.2e-175], t$95$3, If[LessEqual[z, 90000000000.0], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(i \cdot \left(a \cdot \left(-c\right)\right)\right)\\
t_2 := 2 \cdot \left(z \cdot t\right)\\
t_3 := x \cdot \left(y \cdot 2\right)\\
\mathbf{if}\;z \leq -5.6 \cdot 10^{+121}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -1.8 \cdot 10^{-8}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.6 \cdot 10^{-229}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{-286}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{-175}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq 90000000000:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -5.60000000000000012e121 or 9e10 < z Initial program 86.0%
Taylor expanded in z around inf 42.8%
if -5.60000000000000012e121 < z < -1.79999999999999991e-8 or -1.60000000000000007e-229 < z < 6.8000000000000002e-286 or 4.2e-175 < z < 9e10Initial program 93.4%
fma-define93.4%
associate-*l*97.7%
Simplified97.7%
fma-define97.7%
+-commutative97.7%
Applied egg-rr97.7%
Taylor expanded in a around inf 32.7%
mul-1-neg32.7%
associate-*r*30.6%
distribute-lft-neg-out30.6%
*-commutative30.6%
distribute-rgt-neg-out30.6%
*-commutative30.6%
Simplified30.6%
if -1.79999999999999991e-8 < z < -1.60000000000000007e-229 or 6.8000000000000002e-286 < z < 4.2e-175Initial program 94.3%
Taylor expanded in x around inf 41.3%
pow141.3%
*-commutative41.3%
associate-*r*41.3%
Applied egg-rr41.3%
unpow141.3%
*-commutative41.3%
Simplified41.3%
Final simplification38.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* a (* c i))) (t_2 (* 2.0 (* c (* (+ a (* b c)) (- i))))))
(if (<= c -42000000000.0)
t_2
(if (<= c 1.22e-148)
(* (+ (* x y) (* z t)) 2.0)
(if (<= c 4.1e-61)
(* 2.0 (- (* z t) t_1))
(if (or (<= c 6.8e+37) (not (<= c 1.05e+118)))
t_2
(* 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 = a * (c * i);
double t_2 = 2.0 * (c * ((a + (b * c)) * -i));
double tmp;
if (c <= -42000000000.0) {
tmp = t_2;
} else if (c <= 1.22e-148) {
tmp = ((x * y) + (z * t)) * 2.0;
} else if (c <= 4.1e-61) {
tmp = 2.0 * ((z * t) - t_1);
} else if ((c <= 6.8e+37) || !(c <= 1.05e+118)) {
tmp = t_2;
} 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) :: tmp
t_1 = a * (c * i)
t_2 = 2.0d0 * (c * ((a + (b * c)) * -i))
if (c <= (-42000000000.0d0)) then
tmp = t_2
else if (c <= 1.22d-148) then
tmp = ((x * y) + (z * t)) * 2.0d0
else if (c <= 4.1d-61) then
tmp = 2.0d0 * ((z * t) - t_1)
else if ((c <= 6.8d+37) .or. (.not. (c <= 1.05d+118))) then
tmp = t_2
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 = a * (c * i);
double t_2 = 2.0 * (c * ((a + (b * c)) * -i));
double tmp;
if (c <= -42000000000.0) {
tmp = t_2;
} else if (c <= 1.22e-148) {
tmp = ((x * y) + (z * t)) * 2.0;
} else if (c <= 4.1e-61) {
tmp = 2.0 * ((z * t) - t_1);
} else if ((c <= 6.8e+37) || !(c <= 1.05e+118)) {
tmp = t_2;
} else {
tmp = 2.0 * ((x * y) - t_1);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a * (c * i) t_2 = 2.0 * (c * ((a + (b * c)) * -i)) tmp = 0 if c <= -42000000000.0: tmp = t_2 elif c <= 1.22e-148: tmp = ((x * y) + (z * t)) * 2.0 elif c <= 4.1e-61: tmp = 2.0 * ((z * t) - t_1) elif (c <= 6.8e+37) or not (c <= 1.05e+118): tmp = t_2 else: tmp = 2.0 * ((x * y) - t_1) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a * Float64(c * i)) t_2 = Float64(2.0 * Float64(c * Float64(Float64(a + Float64(b * c)) * Float64(-i)))) tmp = 0.0 if (c <= -42000000000.0) tmp = t_2; elseif (c <= 1.22e-148) tmp = Float64(Float64(Float64(x * y) + Float64(z * t)) * 2.0); elseif (c <= 4.1e-61) tmp = Float64(2.0 * Float64(Float64(z * t) - t_1)); elseif ((c <= 6.8e+37) || !(c <= 1.05e+118)) tmp = t_2; 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 = a * (c * i); t_2 = 2.0 * (c * ((a + (b * c)) * -i)); tmp = 0.0; if (c <= -42000000000.0) tmp = t_2; elseif (c <= 1.22e-148) tmp = ((x * y) + (z * t)) * 2.0; elseif (c <= 4.1e-61) tmp = 2.0 * ((z * t) - t_1); elseif ((c <= 6.8e+37) || ~((c <= 1.05e+118))) tmp = t_2; 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[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -42000000000.0], t$95$2, If[LessEqual[c, 1.22e-148], N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision], If[LessEqual[c, 4.1e-61], N[(2.0 * N[(N[(z * t), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[c, 6.8e+37], N[Not[LessEqual[c, 1.05e+118]], $MachinePrecision]], t$95$2, N[(2.0 * N[(N[(x * y), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(c \cdot i\right)\\
t_2 := 2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot \left(-i\right)\right)\right)\\
\mathbf{if}\;c \leq -42000000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;c \leq 1.22 \cdot 10^{-148}:\\
\;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\
\mathbf{elif}\;c \leq 4.1 \cdot 10^{-61}:\\
\;\;\;\;2 \cdot \left(z \cdot t - t\_1\right)\\
\mathbf{elif}\;c \leq 6.8 \cdot 10^{+37} \lor \neg \left(c \leq 1.05 \cdot 10^{+118}\right):\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y - t\_1\right)\\
\end{array}
\end{array}
if c < -4.2e10 or 4.09999999999999999e-61 < c < 6.80000000000000011e37 or 1.05e118 < c Initial program 86.2%
Taylor expanded in i around inf 80.2%
if -4.2e10 < c < 1.21999999999999992e-148Initial program 98.9%
Taylor expanded in c around 0 79.8%
if 1.21999999999999992e-148 < c < 4.09999999999999999e-61Initial program 99.8%
Taylor expanded in a around inf 91.7%
*-commutative91.7%
Simplified91.7%
Taylor expanded in x around 0 81.0%
if 6.80000000000000011e37 < c < 1.05e118Initial program 78.2%
Taylor expanded in a around inf 72.0%
*-commutative72.0%
Simplified72.0%
Taylor expanded in z around 0 63.1%
Final simplification78.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* c (* (+ a (* b c)) i)))
(t_2 (+ (* x y) (* z t)))
(t_3 (* 2.0 (- t_2 (* i (* a c))))))
(if (<= c -8.5e-10)
(* 2.0 (- (* x y) t_1))
(if (<= c 3.1e-59)
t_3
(if (<= c 7.6e+49)
(* 2.0 (- t_2 (* i (* c (* b c)))))
(if (<= c 2.2e+85) t_3 (* 2.0 (- (* z t) 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 = (x * y) + (z * t);
double t_3 = 2.0 * (t_2 - (i * (a * c)));
double tmp;
if (c <= -8.5e-10) {
tmp = 2.0 * ((x * y) - t_1);
} else if (c <= 3.1e-59) {
tmp = t_3;
} else if (c <= 7.6e+49) {
tmp = 2.0 * (t_2 - (i * (c * (b * c))));
} else if (c <= 2.2e+85) {
tmp = t_3;
} else {
tmp = 2.0 * ((z * t) - 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 = (x * y) + (z * t)
t_3 = 2.0d0 * (t_2 - (i * (a * c)))
if (c <= (-8.5d-10)) then
tmp = 2.0d0 * ((x * y) - t_1)
else if (c <= 3.1d-59) then
tmp = t_3
else if (c <= 7.6d+49) then
tmp = 2.0d0 * (t_2 - (i * (c * (b * c))))
else if (c <= 2.2d+85) then
tmp = t_3
else
tmp = 2.0d0 * ((z * t) - 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 = (x * y) + (z * t);
double t_3 = 2.0 * (t_2 - (i * (a * c)));
double tmp;
if (c <= -8.5e-10) {
tmp = 2.0 * ((x * y) - t_1);
} else if (c <= 3.1e-59) {
tmp = t_3;
} else if (c <= 7.6e+49) {
tmp = 2.0 * (t_2 - (i * (c * (b * c))));
} else if (c <= 2.2e+85) {
tmp = t_3;
} else {
tmp = 2.0 * ((z * t) - t_1);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = c * ((a + (b * c)) * i) t_2 = (x * y) + (z * t) t_3 = 2.0 * (t_2 - (i * (a * c))) tmp = 0 if c <= -8.5e-10: tmp = 2.0 * ((x * y) - t_1) elif c <= 3.1e-59: tmp = t_3 elif c <= 7.6e+49: tmp = 2.0 * (t_2 - (i * (c * (b * c)))) elif c <= 2.2e+85: tmp = t_3 else: tmp = 2.0 * ((z * t) - 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(Float64(x * y) + Float64(z * t)) t_3 = Float64(2.0 * Float64(t_2 - Float64(i * Float64(a * c)))) tmp = 0.0 if (c <= -8.5e-10) tmp = Float64(2.0 * Float64(Float64(x * y) - t_1)); elseif (c <= 3.1e-59) tmp = t_3; elseif (c <= 7.6e+49) tmp = Float64(2.0 * Float64(t_2 - Float64(i * Float64(c * Float64(b * c))))); elseif (c <= 2.2e+85) tmp = t_3; else tmp = Float64(2.0 * Float64(Float64(z * t) - 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 = (x * y) + (z * t); t_3 = 2.0 * (t_2 - (i * (a * c))); tmp = 0.0; if (c <= -8.5e-10) tmp = 2.0 * ((x * y) - t_1); elseif (c <= 3.1e-59) tmp = t_3; elseif (c <= 7.6e+49) tmp = 2.0 * (t_2 - (i * (c * (b * c)))); elseif (c <= 2.2e+85) tmp = t_3; else tmp = 2.0 * ((z * t) - 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[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(2.0 * N[(t$95$2 - N[(i * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -8.5e-10], N[(2.0 * N[(N[(x * y), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 3.1e-59], t$95$3, If[LessEqual[c, 7.6e+49], N[(2.0 * N[(t$95$2 - N[(i * N[(c * N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.2e+85], t$95$3, N[(2.0 * N[(N[(z * t), $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 := x \cdot y + z \cdot t\\
t_3 := 2 \cdot \left(t\_2 - i \cdot \left(a \cdot c\right)\right)\\
\mathbf{if}\;c \leq -8.5 \cdot 10^{-10}:\\
\;\;\;\;2 \cdot \left(x \cdot y - t\_1\right)\\
\mathbf{elif}\;c \leq 3.1 \cdot 10^{-59}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;c \leq 7.6 \cdot 10^{+49}:\\
\;\;\;\;2 \cdot \left(t\_2 - i \cdot \left(c \cdot \left(b \cdot c\right)\right)\right)\\
\mathbf{elif}\;c \leq 2.2 \cdot 10^{+85}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(z \cdot t - t\_1\right)\\
\end{array}
\end{array}
if c < -8.4999999999999996e-10Initial program 85.2%
Taylor expanded in z around 0 87.8%
if -8.4999999999999996e-10 < c < 3.09999999999999999e-59 or 7.5999999999999997e49 < c < 2.2000000000000002e85Initial program 98.0%
Taylor expanded in a around inf 96.3%
*-commutative96.3%
Simplified96.3%
if 3.09999999999999999e-59 < c < 7.5999999999999997e49Initial program 87.2%
Taylor expanded in a around 0 83.5%
if 2.2000000000000002e85 < c Initial program 85.5%
Taylor expanded in x around 0 98.1%
Final simplification93.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* c (* (+ a (* b c)) i))) (t_2 (+ (* x y) (* z t))))
(if (<= c -2.75e-11)
(* 2.0 (- (* x y) t_1))
(if (<= c 3.4e-59)
(* 2.0 (- t_2 (* i (* a c))))
(if (<= c 2.2e+67)
(* 2.0 (- t_2 (* (* b c) (* c i))))
(* 2.0 (- (* z t) 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 = (x * y) + (z * t);
double tmp;
if (c <= -2.75e-11) {
tmp = 2.0 * ((x * y) - t_1);
} else if (c <= 3.4e-59) {
tmp = 2.0 * (t_2 - (i * (a * c)));
} else if (c <= 2.2e+67) {
tmp = 2.0 * (t_2 - ((b * c) * (c * i)));
} else {
tmp = 2.0 * ((z * t) - 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) :: tmp
t_1 = c * ((a + (b * c)) * i)
t_2 = (x * y) + (z * t)
if (c <= (-2.75d-11)) then
tmp = 2.0d0 * ((x * y) - t_1)
else if (c <= 3.4d-59) then
tmp = 2.0d0 * (t_2 - (i * (a * c)))
else if (c <= 2.2d+67) then
tmp = 2.0d0 * (t_2 - ((b * c) * (c * i)))
else
tmp = 2.0d0 * ((z * t) - 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 = (x * y) + (z * t);
double tmp;
if (c <= -2.75e-11) {
tmp = 2.0 * ((x * y) - t_1);
} else if (c <= 3.4e-59) {
tmp = 2.0 * (t_2 - (i * (a * c)));
} else if (c <= 2.2e+67) {
tmp = 2.0 * (t_2 - ((b * c) * (c * i)));
} else {
tmp = 2.0 * ((z * t) - t_1);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = c * ((a + (b * c)) * i) t_2 = (x * y) + (z * t) tmp = 0 if c <= -2.75e-11: tmp = 2.0 * ((x * y) - t_1) elif c <= 3.4e-59: tmp = 2.0 * (t_2 - (i * (a * c))) elif c <= 2.2e+67: tmp = 2.0 * (t_2 - ((b * c) * (c * i))) else: tmp = 2.0 * ((z * t) - 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(Float64(x * y) + Float64(z * t)) tmp = 0.0 if (c <= -2.75e-11) tmp = Float64(2.0 * Float64(Float64(x * y) - t_1)); elseif (c <= 3.4e-59) tmp = Float64(2.0 * Float64(t_2 - Float64(i * Float64(a * c)))); elseif (c <= 2.2e+67) tmp = Float64(2.0 * Float64(t_2 - Float64(Float64(b * c) * Float64(c * i)))); else tmp = Float64(2.0 * Float64(Float64(z * t) - 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 = (x * y) + (z * t); tmp = 0.0; if (c <= -2.75e-11) tmp = 2.0 * ((x * y) - t_1); elseif (c <= 3.4e-59) tmp = 2.0 * (t_2 - (i * (a * c))); elseif (c <= 2.2e+67) tmp = 2.0 * (t_2 - ((b * c) * (c * i))); else tmp = 2.0 * ((z * t) - 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[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -2.75e-11], N[(2.0 * N[(N[(x * y), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 3.4e-59], N[(2.0 * N[(t$95$2 - N[(i * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.2e+67], N[(2.0 * N[(t$95$2 - N[(N[(b * c), $MachinePrecision] * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(z * t), $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 := x \cdot y + z \cdot t\\
\mathbf{if}\;c \leq -2.75 \cdot 10^{-11}:\\
\;\;\;\;2 \cdot \left(x \cdot y - t\_1\right)\\
\mathbf{elif}\;c \leq 3.4 \cdot 10^{-59}:\\
\;\;\;\;2 \cdot \left(t\_2 - i \cdot \left(a \cdot c\right)\right)\\
\mathbf{elif}\;c \leq 2.2 \cdot 10^{+67}:\\
\;\;\;\;2 \cdot \left(t\_2 - \left(b \cdot c\right) \cdot \left(c \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(z \cdot t - t\_1\right)\\
\end{array}
\end{array}
if c < -2.74999999999999987e-11Initial program 85.2%
Taylor expanded in z around 0 87.8%
if -2.74999999999999987e-11 < c < 3.40000000000000018e-59Initial program 98.9%
Taylor expanded in a around inf 97.1%
*-commutative97.1%
Simplified97.1%
if 3.40000000000000018e-59 < c < 2.2e67Initial program 89.1%
fma-define89.1%
associate-*l*89.1%
Simplified89.1%
fma-define89.1%
+-commutative89.1%
Applied egg-rr89.1%
Taylor expanded in a around 0 82.3%
if 2.2e67 < c Initial program 85.0%
Taylor expanded in x around 0 96.5%
Final simplification92.7%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= c -3e+159)
(and (not (<= c -1.35e+127))
(or (<= c -9.6e+46) (not (<= c 7.6e+81)))))
(* 2.0 (* c (* b (* c (- i)))))
(* (+ (* x y) (* z t)) 2.0)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c <= -3e+159) || (!(c <= -1.35e+127) && ((c <= -9.6e+46) || !(c <= 7.6e+81)))) {
tmp = 2.0 * (c * (b * (c * -i)));
} else {
tmp = ((x * y) + (z * t)) * 2.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((c <= (-3d+159)) .or. (.not. (c <= (-1.35d+127))) .and. (c <= (-9.6d+46)) .or. (.not. (c <= 7.6d+81))) then
tmp = 2.0d0 * (c * (b * (c * -i)))
else
tmp = ((x * y) + (z * t)) * 2.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c <= -3e+159) || (!(c <= -1.35e+127) && ((c <= -9.6e+46) || !(c <= 7.6e+81)))) {
tmp = 2.0 * (c * (b * (c * -i)));
} else {
tmp = ((x * y) + (z * t)) * 2.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c <= -3e+159) or (not (c <= -1.35e+127) and ((c <= -9.6e+46) or not (c <= 7.6e+81))): tmp = 2.0 * (c * (b * (c * -i))) else: tmp = ((x * y) + (z * t)) * 2.0 return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((c <= -3e+159) || (!(c <= -1.35e+127) && ((c <= -9.6e+46) || !(c <= 7.6e+81)))) tmp = Float64(2.0 * Float64(c * Float64(b * Float64(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 <= -3e+159) || (~((c <= -1.35e+127)) && ((c <= -9.6e+46) || ~((c <= 7.6e+81))))) tmp = 2.0 * (c * (b * (c * -i))); else tmp = ((x * y) + (z * t)) * 2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[c, -3e+159], And[N[Not[LessEqual[c, -1.35e+127]], $MachinePrecision], Or[LessEqual[c, -9.6e+46], N[Not[LessEqual[c, 7.6e+81]], $MachinePrecision]]]], N[(2.0 * N[(c * N[(b * N[(c * (-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 -3 \cdot 10^{+159} \lor \neg \left(c \leq -1.35 \cdot 10^{+127}\right) \land \left(c \leq -9.6 \cdot 10^{+46} \lor \neg \left(c \leq 7.6 \cdot 10^{+81}\right)\right):\\
\;\;\;\;2 \cdot \left(c \cdot \left(b \cdot \left(c \cdot \left(-i\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\
\end{array}
\end{array}
if c < -3.0000000000000002e159 or -1.3500000000000001e127 < c < -9.60000000000000034e46 or 7.599999999999999e81 < c Initial program 85.9%
Taylor expanded in i around inf 89.5%
Taylor expanded in a around 0 70.6%
Taylor expanded in i around 0 70.6%
if -3.0000000000000002e159 < c < -1.3500000000000001e127 or -9.60000000000000034e46 < c < 7.599999999999999e81Initial program 94.1%
Taylor expanded in c around 0 68.5%
Final simplification69.3%
(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 (* (* b c) (- i))))))
(if (<= c -6.2e+158)
t_2
(if (<= c -3.3e+124)
t_1
(if (<= c -3.55e+47)
(* 2.0 (* c (* b (* c (- i)))))
(if (<= c 2.7e+84) 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 * ((b * c) * -i));
double tmp;
if (c <= -6.2e+158) {
tmp = t_2;
} else if (c <= -3.3e+124) {
tmp = t_1;
} else if (c <= -3.55e+47) {
tmp = 2.0 * (c * (b * (c * -i)));
} else if (c <= 2.7e+84) {
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 * ((b * c) * -i))
if (c <= (-6.2d+158)) then
tmp = t_2
else if (c <= (-3.3d+124)) then
tmp = t_1
else if (c <= (-3.55d+47)) then
tmp = 2.0d0 * (c * (b * (c * -i)))
else if (c <= 2.7d+84) 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 * ((b * c) * -i));
double tmp;
if (c <= -6.2e+158) {
tmp = t_2;
} else if (c <= -3.3e+124) {
tmp = t_1;
} else if (c <= -3.55e+47) {
tmp = 2.0 * (c * (b * (c * -i)));
} else if (c <= 2.7e+84) {
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 * ((b * c) * -i)) tmp = 0 if c <= -6.2e+158: tmp = t_2 elif c <= -3.3e+124: tmp = t_1 elif c <= -3.55e+47: tmp = 2.0 * (c * (b * (c * -i))) elif c <= 2.7e+84: 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(b * c) * Float64(-i)))) tmp = 0.0 if (c <= -6.2e+158) tmp = t_2; elseif (c <= -3.3e+124) tmp = t_1; elseif (c <= -3.55e+47) tmp = Float64(2.0 * Float64(c * Float64(b * Float64(c * Float64(-i))))); elseif (c <= 2.7e+84) 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 * ((b * c) * -i)); tmp = 0.0; if (c <= -6.2e+158) tmp = t_2; elseif (c <= -3.3e+124) tmp = t_1; elseif (c <= -3.55e+47) tmp = 2.0 * (c * (b * (c * -i))); elseif (c <= 2.7e+84) 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[(b * c), $MachinePrecision] * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -6.2e+158], t$95$2, If[LessEqual[c, -3.3e+124], t$95$1, If[LessEqual[c, -3.55e+47], N[(2.0 * N[(c * N[(b * N[(c * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.7e+84], 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(b \cdot c\right) \cdot \left(-i\right)\right)\right)\\
\mathbf{if}\;c \leq -6.2 \cdot 10^{+158}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;c \leq -3.3 \cdot 10^{+124}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq -3.55 \cdot 10^{+47}:\\
\;\;\;\;2 \cdot \left(c \cdot \left(b \cdot \left(c \cdot \left(-i\right)\right)\right)\right)\\
\mathbf{elif}\;c \leq 2.7 \cdot 10^{+84}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if c < -6.2000000000000004e158 or 2.7e84 < c Initial program 85.5%
Taylor expanded in i around inf 91.5%
Taylor expanded in a around 0 74.5%
if -6.2000000000000004e158 < c < -3.30000000000000015e124 or -3.5500000000000001e47 < c < 2.7e84Initial program 94.1%
Taylor expanded in c around 0 68.5%
if -3.30000000000000015e124 < c < -3.5500000000000001e47Initial program 87.4%
Taylor expanded in i around inf 82.6%
Taylor expanded in a around 0 57.0%
Taylor expanded in i around 0 57.0%
Final simplification69.3%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= i -2e+139)
(not
(or (<= i -2.2e+91) (and (not (<= i -1.05e-46)) (<= i 8.5e+149)))))
(* 2.0 (* (* c i) (- a)))
(* (+ (* 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 ((i <= -2e+139) || !((i <= -2.2e+91) || (!(i <= -1.05e-46) && (i <= 8.5e+149)))) {
tmp = 2.0 * ((c * i) * -a);
} 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 ((i <= (-2d+139)) .or. (.not. (i <= (-2.2d+91)) .or. (.not. (i <= (-1.05d-46))) .and. (i <= 8.5d+149))) then
tmp = 2.0d0 * ((c * i) * -a)
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 ((i <= -2e+139) || !((i <= -2.2e+91) || (!(i <= -1.05e-46) && (i <= 8.5e+149)))) {
tmp = 2.0 * ((c * i) * -a);
} else {
tmp = ((x * y) + (z * t)) * 2.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (i <= -2e+139) or not ((i <= -2.2e+91) or (not (i <= -1.05e-46) and (i <= 8.5e+149))): tmp = 2.0 * ((c * i) * -a) else: tmp = ((x * y) + (z * t)) * 2.0 return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((i <= -2e+139) || !((i <= -2.2e+91) || (!(i <= -1.05e-46) && (i <= 8.5e+149)))) tmp = Float64(2.0 * Float64(Float64(c * i) * Float64(-a))); 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 ((i <= -2e+139) || ~(((i <= -2.2e+91) || (~((i <= -1.05e-46)) && (i <= 8.5e+149))))) tmp = 2.0 * ((c * i) * -a); 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[i, -2e+139], N[Not[Or[LessEqual[i, -2.2e+91], And[N[Not[LessEqual[i, -1.05e-46]], $MachinePrecision], LessEqual[i, 8.5e+149]]]], $MachinePrecision]], N[(2.0 * N[(N[(c * i), $MachinePrecision] * (-a)), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;i \leq -2 \cdot 10^{+139} \lor \neg \left(i \leq -2.2 \cdot 10^{+91} \lor \neg \left(i \leq -1.05 \cdot 10^{-46}\right) \land i \leq 8.5 \cdot 10^{+149}\right):\\
\;\;\;\;2 \cdot \left(\left(c \cdot i\right) \cdot \left(-a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\
\end{array}
\end{array}
if i < -2.00000000000000007e139Initial program 90.8%
Taylor expanded in a around inf 58.1%
mul-1-neg58.1%
Simplified58.1%
if -2.00000000000000007e139 < i < -2.19999999999999999e91 or -1.04999999999999994e-46 < i < 8.49999999999999956e149Initial program 89.2%
Taylor expanded in c around 0 62.8%
if -2.19999999999999999e91 < i < -1.04999999999999994e-46 or 8.49999999999999956e149 < i Initial program 94.1%
fma-define94.1%
associate-*l*94.2%
Simplified94.2%
fma-define94.2%
+-commutative94.2%
Applied egg-rr94.2%
Taylor expanded in c around 0 69.0%
Taylor expanded in a around inf 48.7%
associate-*r*48.7%
mul-1-neg48.7%
Simplified48.7%
Final simplification58.3%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= (* x y) -2e+177)
(* (* x y) 2.0)
(if (<= (* x y) 5e-109)
(* 2.0 (* z t))
(if (<= (* x y) 2e+208) (* 2.0 (* (* c i) (- a))) (* x (* y 2.0))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x * y) <= -2e+177) {
tmp = (x * y) * 2.0;
} else if ((x * y) <= 5e-109) {
tmp = 2.0 * (z * t);
} else if ((x * y) <= 2e+208) {
tmp = 2.0 * ((c * i) * -a);
} else {
tmp = x * (y * 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 ((x * y) <= (-2d+177)) then
tmp = (x * y) * 2.0d0
else if ((x * y) <= 5d-109) then
tmp = 2.0d0 * (z * t)
else if ((x * y) <= 2d+208) then
tmp = 2.0d0 * ((c * i) * -a)
else
tmp = x * (y * 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 ((x * y) <= -2e+177) {
tmp = (x * y) * 2.0;
} else if ((x * y) <= 5e-109) {
tmp = 2.0 * (z * t);
} else if ((x * y) <= 2e+208) {
tmp = 2.0 * ((c * i) * -a);
} else {
tmp = x * (y * 2.0);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x * y) <= -2e+177: tmp = (x * y) * 2.0 elif (x * y) <= 5e-109: tmp = 2.0 * (z * t) elif (x * y) <= 2e+208: tmp = 2.0 * ((c * i) * -a) else: tmp = x * (y * 2.0) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(x * y) <= -2e+177) tmp = Float64(Float64(x * y) * 2.0); elseif (Float64(x * y) <= 5e-109) tmp = Float64(2.0 * Float64(z * t)); elseif (Float64(x * y) <= 2e+208) tmp = Float64(2.0 * Float64(Float64(c * i) * Float64(-a))); else tmp = Float64(x * Float64(y * 2.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x * y) <= -2e+177) tmp = (x * y) * 2.0; elseif ((x * y) <= 5e-109) tmp = 2.0 * (z * t); elseif ((x * y) <= 2e+208) tmp = 2.0 * ((c * i) * -a); else tmp = x * (y * 2.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(x * y), $MachinePrecision], -2e+177], N[(N[(x * y), $MachinePrecision] * 2.0), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 5e-109], N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 2e+208], N[(2.0 * N[(N[(c * i), $MachinePrecision] * (-a)), $MachinePrecision]), $MachinePrecision], N[(x * N[(y * 2.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -2 \cdot 10^{+177}:\\
\;\;\;\;\left(x \cdot y\right) \cdot 2\\
\mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{-109}:\\
\;\;\;\;2 \cdot \left(z \cdot t\right)\\
\mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{+208}:\\
\;\;\;\;2 \cdot \left(\left(c \cdot i\right) \cdot \left(-a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot 2\right)\\
\end{array}
\end{array}
if (*.f64 x y) < -2e177Initial program 90.6%
Taylor expanded in x around inf 67.0%
if -2e177 < (*.f64 x y) < 5.0000000000000002e-109Initial program 93.8%
Taylor expanded in z around inf 37.1%
if 5.0000000000000002e-109 < (*.f64 x y) < 2e208Initial program 91.8%
Taylor expanded in a around inf 32.2%
mul-1-neg32.2%
Simplified32.2%
if 2e208 < (*.f64 x y) Initial program 79.2%
Taylor expanded in x around inf 61.2%
pow161.2%
*-commutative61.2%
associate-*r*61.2%
Applied egg-rr61.2%
unpow161.2%
*-commutative61.2%
Simplified61.2%
Final simplification43.3%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= c -1.05e-36) (not (<= c 8.4e-169))) (* 2.0 (- (* z t) (* c (* (+ a (* b c)) i)))) (* (+ (* x y) (* z t)) 2.0)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c <= -1.05e-36) || !(c <= 8.4e-169)) {
tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i)));
} else {
tmp = ((x * y) + (z * t)) * 2.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((c <= (-1.05d-36)) .or. (.not. (c <= 8.4d-169))) then
tmp = 2.0d0 * ((z * t) - (c * ((a + (b * c)) * i)))
else
tmp = ((x * y) + (z * t)) * 2.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c <= -1.05e-36) || !(c <= 8.4e-169)) {
tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i)));
} else {
tmp = ((x * y) + (z * t)) * 2.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c <= -1.05e-36) or not (c <= 8.4e-169): tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i))) else: tmp = ((x * y) + (z * t)) * 2.0 return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((c <= -1.05e-36) || !(c <= 8.4e-169)) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(Float64(a + Float64(b * c)) * i)))); else tmp = Float64(Float64(Float64(x * y) + Float64(z * t)) * 2.0); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((c <= -1.05e-36) || ~((c <= 8.4e-169))) tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i))); else tmp = ((x * y) + (z * t)) * 2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[c, -1.05e-36], N[Not[LessEqual[c, 8.4e-169]], $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[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -1.05 \cdot 10^{-36} \lor \neg \left(c \leq 8.4 \cdot 10^{-169}\right):\\
\;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\
\end{array}
\end{array}
if c < -1.04999999999999995e-36 or 8.4000000000000002e-169 < c Initial program 87.0%
Taylor expanded in x around 0 83.1%
if -1.04999999999999995e-36 < c < 8.4000000000000002e-169Initial program 98.7%
Taylor expanded in c around 0 82.8%
Final simplification83.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* c (* (+ a (* b c)) i))))
(if (<= c -2.75e-11)
(* 2.0 (- (* x y) t_1))
(if (<= c 5e-59)
(* 2.0 (- (+ (* x y) (* z t)) (* i (* a c))))
(* 2.0 (- (* z t) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = c * ((a + (b * c)) * i);
double tmp;
if (c <= -2.75e-11) {
tmp = 2.0 * ((x * y) - t_1);
} else if (c <= 5e-59) {
tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c)));
} else {
tmp = 2.0 * ((z * t) - t_1);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = c * ((a + (b * c)) * i)
if (c <= (-2.75d-11)) then
tmp = 2.0d0 * ((x * y) - t_1)
else if (c <= 5d-59) then
tmp = 2.0d0 * (((x * y) + (z * t)) - (i * (a * c)))
else
tmp = 2.0d0 * ((z * t) - t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = c * ((a + (b * c)) * i);
double tmp;
if (c <= -2.75e-11) {
tmp = 2.0 * ((x * y) - t_1);
} else if (c <= 5e-59) {
tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c)));
} else {
tmp = 2.0 * ((z * t) - t_1);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = c * ((a + (b * c)) * i) tmp = 0 if c <= -2.75e-11: tmp = 2.0 * ((x * y) - t_1) elif c <= 5e-59: tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c))) else: tmp = 2.0 * ((z * t) - t_1) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(c * Float64(Float64(a + Float64(b * c)) * i)) tmp = 0.0 if (c <= -2.75e-11) tmp = Float64(2.0 * Float64(Float64(x * y) - t_1)); elseif (c <= 5e-59) tmp = Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(i * Float64(a * c)))); else tmp = Float64(2.0 * Float64(Float64(z * t) - t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = c * ((a + (b * c)) * i); tmp = 0.0; if (c <= -2.75e-11) tmp = 2.0 * ((x * y) - t_1); elseif (c <= 5e-59) tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c))); else tmp = 2.0 * ((z * t) - t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -2.75e-11], N[(2.0 * N[(N[(x * y), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 5e-59], 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[(z * t), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\\
\mathbf{if}\;c \leq -2.75 \cdot 10^{-11}:\\
\;\;\;\;2 \cdot \left(x \cdot y - t\_1\right)\\
\mathbf{elif}\;c \leq 5 \cdot 10^{-59}:\\
\;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - i \cdot \left(a \cdot c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(z \cdot t - t\_1\right)\\
\end{array}
\end{array}
if c < -2.74999999999999987e-11Initial program 85.2%
Taylor expanded in z around 0 87.8%
if -2.74999999999999987e-11 < c < 5.0000000000000001e-59Initial program 98.9%
Taylor expanded in a around inf 97.1%
*-commutative97.1%
Simplified97.1%
if 5.0000000000000001e-59 < c Initial program 86.3%
Taylor expanded in x around 0 87.3%
Final simplification91.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* c (* (+ a (* b c)) i))))
(if (<= c -1.3e-42)
(* 2.0 (- (* x y) t_1))
(if (<= c 1.56e-169)
(* (+ (* x y) (* z t)) 2.0)
(* 2.0 (- (* z t) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = c * ((a + (b * c)) * i);
double tmp;
if (c <= -1.3e-42) {
tmp = 2.0 * ((x * y) - t_1);
} else if (c <= 1.56e-169) {
tmp = ((x * y) + (z * t)) * 2.0;
} else {
tmp = 2.0 * ((z * t) - t_1);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = c * ((a + (b * c)) * i)
if (c <= (-1.3d-42)) then
tmp = 2.0d0 * ((x * y) - t_1)
else if (c <= 1.56d-169) then
tmp = ((x * y) + (z * t)) * 2.0d0
else
tmp = 2.0d0 * ((z * t) - t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = c * ((a + (b * c)) * i);
double tmp;
if (c <= -1.3e-42) {
tmp = 2.0 * ((x * y) - t_1);
} else if (c <= 1.56e-169) {
tmp = ((x * y) + (z * t)) * 2.0;
} else {
tmp = 2.0 * ((z * t) - t_1);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = c * ((a + (b * c)) * i) tmp = 0 if c <= -1.3e-42: tmp = 2.0 * ((x * y) - t_1) elif c <= 1.56e-169: tmp = ((x * y) + (z * t)) * 2.0 else: tmp = 2.0 * ((z * t) - t_1) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(c * Float64(Float64(a + Float64(b * c)) * i)) tmp = 0.0 if (c <= -1.3e-42) tmp = Float64(2.0 * Float64(Float64(x * y) - t_1)); elseif (c <= 1.56e-169) tmp = Float64(Float64(Float64(x * y) + Float64(z * t)) * 2.0); else tmp = Float64(2.0 * Float64(Float64(z * t) - t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = c * ((a + (b * c)) * i); tmp = 0.0; if (c <= -1.3e-42) tmp = 2.0 * ((x * y) - t_1); elseif (c <= 1.56e-169) tmp = ((x * y) + (z * t)) * 2.0; else tmp = 2.0 * ((z * t) - t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.3e-42], N[(2.0 * N[(N[(x * y), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.56e-169], N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision], N[(2.0 * N[(N[(z * t), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\\
\mathbf{if}\;c \leq -1.3 \cdot 10^{-42}:\\
\;\;\;\;2 \cdot \left(x \cdot y - t\_1\right)\\
\mathbf{elif}\;c \leq 1.56 \cdot 10^{-169}:\\
\;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(z \cdot t - t\_1\right)\\
\end{array}
\end{array}
if c < -1.3e-42Initial program 85.8%
Taylor expanded in z around 0 87.0%
if -1.3e-42 < c < 1.56000000000000008e-169Initial program 98.7%
Taylor expanded in c around 0 82.5%
if 1.56000000000000008e-169 < c Initial program 88.1%
Taylor expanded in x around 0 85.2%
Final simplification84.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (* x y) -1.32e+177) (not (<= (* x y) 3.3e+90))) (* (* 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) <= -1.32e+177) || !((x * y) <= 3.3e+90)) {
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) <= (-1.32d+177)) .or. (.not. ((x * y) <= 3.3d+90))) 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) <= -1.32e+177) || !((x * y) <= 3.3e+90)) {
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) <= -1.32e+177) or not ((x * y) <= 3.3e+90): 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) <= -1.32e+177) || !(Float64(x * y) <= 3.3e+90)) 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) <= -1.32e+177) || ~(((x * y) <= 3.3e+90))) 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], -1.32e+177], N[Not[LessEqual[N[(x * y), $MachinePrecision], 3.3e+90]], $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 -1.32 \cdot 10^{+177} \lor \neg \left(x \cdot y \leq 3.3 \cdot 10^{+90}\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) < -1.3200000000000001e177 or 3.30000000000000008e90 < (*.f64 x y) Initial program 87.3%
Taylor expanded in x around inf 55.8%
if -1.3200000000000001e177 < (*.f64 x y) < 3.30000000000000008e90Initial program 92.5%
Taylor expanded in z around inf 33.4%
Final simplification40.9%
(FPCore (x y z t a b c i) :precision binary64 (if (<= (* x y) -2e+177) (* (* x y) 2.0) (if (<= (* x y) 5e+89) (* 2.0 (* z t)) (* x (* y 2.0)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x * y) <= -2e+177) {
tmp = (x * y) * 2.0;
} else if ((x * y) <= 5e+89) {
tmp = 2.0 * (z * t);
} else {
tmp = x * (y * 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 ((x * y) <= (-2d+177)) then
tmp = (x * y) * 2.0d0
else if ((x * y) <= 5d+89) then
tmp = 2.0d0 * (z * t)
else
tmp = x * (y * 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 ((x * y) <= -2e+177) {
tmp = (x * y) * 2.0;
} else if ((x * y) <= 5e+89) {
tmp = 2.0 * (z * t);
} else {
tmp = x * (y * 2.0);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x * y) <= -2e+177: tmp = (x * y) * 2.0 elif (x * y) <= 5e+89: tmp = 2.0 * (z * t) else: tmp = x * (y * 2.0) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(x * y) <= -2e+177) tmp = Float64(Float64(x * y) * 2.0); elseif (Float64(x * y) <= 5e+89) tmp = Float64(2.0 * Float64(z * t)); else tmp = Float64(x * Float64(y * 2.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x * y) <= -2e+177) tmp = (x * y) * 2.0; elseif ((x * y) <= 5e+89) tmp = 2.0 * (z * t); else tmp = x * (y * 2.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(x * y), $MachinePrecision], -2e+177], N[(N[(x * y), $MachinePrecision] * 2.0), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 5e+89], N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision], N[(x * N[(y * 2.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -2 \cdot 10^{+177}:\\
\;\;\;\;\left(x \cdot y\right) \cdot 2\\
\mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{+89}:\\
\;\;\;\;2 \cdot \left(z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot 2\right)\\
\end{array}
\end{array}
if (*.f64 x y) < -2e177Initial program 90.6%
Taylor expanded in x around inf 67.0%
if -2e177 < (*.f64 x y) < 4.99999999999999983e89Initial program 92.5%
Taylor expanded in z around inf 33.4%
if 4.99999999999999983e89 < (*.f64 x y) Initial program 85.3%
Taylor expanded in x around inf 49.2%
pow149.2%
*-commutative49.2%
associate-*r*49.2%
Applied egg-rr49.2%
unpow149.2%
*-commutative49.2%
Simplified49.2%
Final simplification40.9%
(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.8%
Taylor expanded in z around inf 25.2%
Final simplification25.2%
(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 2024103
(FPCore (x y z t a b c i)
:name "Diagrams.ThreeD.Shapes:frustum from diagrams-lib-1.3.0.3, A"
:precision binary64
:alt
(* 2.0 (- (+ (* x y) (* z t)) (* (+ a (* b c)) (* c i))))
(* 2.0 (- (+ (* x y) (* z t)) (* (* (+ a (* b c)) c) i))))