
(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 19 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 (- (* x y) (* (* b c) (* c 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 * ((x * y) - ((b * c) * (c * 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 * ((x * y) - ((b * c) * (c * 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 * ((x * y) - ((b * c) * (c * 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(Float64(x * y) - Float64(Float64(b * c) * Float64(c * 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 * ((x * y) - ((b * c) * (c * 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[(N[(x * y), $MachinePrecision] - N[(N[(b * c), $MachinePrecision] * N[(c * 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(x \cdot y - \left(b \cdot c\right) \cdot \left(c \cdot i\right)\right)\\
\end{array}
\end{array}
if (-.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)) < +inf.0Initial program 94.1%
associate-*l*98.2%
fma-def98.2%
Simplified98.2%
fma-def98.2%
+-commutative98.2%
Applied egg-rr98.2%
if +inf.0 < (-.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)) Initial program 0.0%
associate-*r*16.7%
*-commutative16.7%
flip-+0.0%
associate-*r/0.0%
pow20.0%
Applied egg-rr0.0%
associate-/l*0.0%
Simplified0.0%
Taylor expanded in a around 0 25.0%
associate-/r*25.0%
Simplified25.0%
Taylor expanded in z around 0 66.7%
unpow266.7%
associate-*r*66.7%
associate-*l*66.7%
*-commutative66.7%
*-commutative66.7%
*-commutative66.7%
Simplified66.7%
Final simplification96.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (* a (* c i)) (- 2.0)))
(t_2 (* 2.0 (* z t)))
(t_3 (* (* x y) 2.0)))
(if (<= (* x y) -4.5e+49)
t_3
(if (<= (* x y) -6e-92)
t_1
(if (<= (* x y) 2.7e-180)
t_2
(if (<= (* x y) 3.2e-129)
t_1
(if (<= (* x y) 1.95e-47)
t_2
(if (<= (* x y) 3.6e+14) t_1 t_3))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (a * (c * i)) * -2.0;
double t_2 = 2.0 * (z * t);
double t_3 = (x * y) * 2.0;
double tmp;
if ((x * y) <= -4.5e+49) {
tmp = t_3;
} else if ((x * y) <= -6e-92) {
tmp = t_1;
} else if ((x * y) <= 2.7e-180) {
tmp = t_2;
} else if ((x * y) <= 3.2e-129) {
tmp = t_1;
} else if ((x * y) <= 1.95e-47) {
tmp = t_2;
} else if ((x * y) <= 3.6e+14) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (a * (c * i)) * -2.0d0
t_2 = 2.0d0 * (z * t)
t_3 = (x * y) * 2.0d0
if ((x * y) <= (-4.5d+49)) then
tmp = t_3
else if ((x * y) <= (-6d-92)) then
tmp = t_1
else if ((x * y) <= 2.7d-180) then
tmp = t_2
else if ((x * y) <= 3.2d-129) then
tmp = t_1
else if ((x * y) <= 1.95d-47) then
tmp = t_2
else if ((x * y) <= 3.6d+14) then
tmp = t_1
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (a * (c * i)) * -2.0;
double t_2 = 2.0 * (z * t);
double t_3 = (x * y) * 2.0;
double tmp;
if ((x * y) <= -4.5e+49) {
tmp = t_3;
} else if ((x * y) <= -6e-92) {
tmp = t_1;
} else if ((x * y) <= 2.7e-180) {
tmp = t_2;
} else if ((x * y) <= 3.2e-129) {
tmp = t_1;
} else if ((x * y) <= 1.95e-47) {
tmp = t_2;
} else if ((x * y) <= 3.6e+14) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (a * (c * i)) * -2.0 t_2 = 2.0 * (z * t) t_3 = (x * y) * 2.0 tmp = 0 if (x * y) <= -4.5e+49: tmp = t_3 elif (x * y) <= -6e-92: tmp = t_1 elif (x * y) <= 2.7e-180: tmp = t_2 elif (x * y) <= 3.2e-129: tmp = t_1 elif (x * y) <= 1.95e-47: tmp = t_2 elif (x * y) <= 3.6e+14: tmp = t_1 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(a * Float64(c * i)) * Float64(-2.0)) t_2 = Float64(2.0 * Float64(z * t)) t_3 = Float64(Float64(x * y) * 2.0) tmp = 0.0 if (Float64(x * y) <= -4.5e+49) tmp = t_3; elseif (Float64(x * y) <= -6e-92) tmp = t_1; elseif (Float64(x * y) <= 2.7e-180) tmp = t_2; elseif (Float64(x * y) <= 3.2e-129) tmp = t_1; elseif (Float64(x * y) <= 1.95e-47) tmp = t_2; elseif (Float64(x * y) <= 3.6e+14) tmp = t_1; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (a * (c * i)) * -2.0; t_2 = 2.0 * (z * t); t_3 = (x * y) * 2.0; tmp = 0.0; if ((x * y) <= -4.5e+49) tmp = t_3; elseif ((x * y) <= -6e-92) tmp = t_1; elseif ((x * y) <= 2.7e-180) tmp = t_2; elseif ((x * y) <= 3.2e-129) tmp = t_1; elseif ((x * y) <= 1.95e-47) tmp = t_2; elseif ((x * y) <= 3.6e+14) tmp = t_1; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision] * (-2.0)), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * y), $MachinePrecision] * 2.0), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -4.5e+49], t$95$3, If[LessEqual[N[(x * y), $MachinePrecision], -6e-92], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 2.7e-180], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], 3.2e-129], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 1.95e-47], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], 3.6e+14], t$95$1, t$95$3]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot \left(c \cdot i\right)\right) \cdot \left(-2\right)\\
t_2 := 2 \cdot \left(z \cdot t\right)\\
t_3 := \left(x \cdot y\right) \cdot 2\\
\mathbf{if}\;x \cdot y \leq -4.5 \cdot 10^{+49}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \cdot y \leq -6 \cdot 10^{-92}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \cdot y \leq 2.7 \cdot 10^{-180}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \cdot y \leq 3.2 \cdot 10^{-129}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \cdot y \leq 1.95 \cdot 10^{-47}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \cdot y \leq 3.6 \cdot 10^{+14}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if (*.f64 x y) < -4.49999999999999982e49 or 3.6e14 < (*.f64 x y) Initial program 87.0%
Taylor expanded in x around inf 54.7%
if -4.49999999999999982e49 < (*.f64 x y) < -6.00000000000000027e-92 or 2.70000000000000014e-180 < (*.f64 x y) < 3.2000000000000003e-129 or 1.94999999999999989e-47 < (*.f64 x y) < 3.6e14Initial program 90.6%
associate-*l*92.4%
fma-def92.4%
Simplified92.4%
fma-def92.4%
+-commutative92.4%
Applied egg-rr92.4%
Taylor expanded in a around inf 51.2%
mul-1-neg51.2%
distribute-rgt-neg-in51.2%
distribute-rgt-neg-in51.2%
Simplified51.2%
if -6.00000000000000027e-92 < (*.f64 x y) < 2.70000000000000014e-180 or 3.2000000000000003e-129 < (*.f64 x y) < 1.94999999999999989e-47Initial program 92.0%
Taylor expanded in z around inf 45.9%
Final simplification50.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (* a (* c i)) (- 2.0)))
(t_2 (* 2.0 (* z t)))
(t_3 (* (* x y) 2.0)))
(if (<= (* x y) -4.5e+49)
t_3
(if (<= (* x y) -8e-91)
t_1
(if (<= (* x y) 1.42e-176)
t_2
(if (<= (* x y) 6.2e-130)
t_1
(if (<= (* x y) 3.2e-47)
t_2
(if (<= (* x y) 130000000000.0)
(* 2.0 (* c (* a (- i))))
t_3))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (a * (c * i)) * -2.0;
double t_2 = 2.0 * (z * t);
double t_3 = (x * y) * 2.0;
double tmp;
if ((x * y) <= -4.5e+49) {
tmp = t_3;
} else if ((x * y) <= -8e-91) {
tmp = t_1;
} else if ((x * y) <= 1.42e-176) {
tmp = t_2;
} else if ((x * y) <= 6.2e-130) {
tmp = t_1;
} else if ((x * y) <= 3.2e-47) {
tmp = t_2;
} else if ((x * y) <= 130000000000.0) {
tmp = 2.0 * (c * (a * -i));
} 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 = (a * (c * i)) * -2.0d0
t_2 = 2.0d0 * (z * t)
t_3 = (x * y) * 2.0d0
if ((x * y) <= (-4.5d+49)) then
tmp = t_3
else if ((x * y) <= (-8d-91)) then
tmp = t_1
else if ((x * y) <= 1.42d-176) then
tmp = t_2
else if ((x * y) <= 6.2d-130) then
tmp = t_1
else if ((x * y) <= 3.2d-47) then
tmp = t_2
else if ((x * y) <= 130000000000.0d0) then
tmp = 2.0d0 * (c * (a * -i))
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 = (a * (c * i)) * -2.0;
double t_2 = 2.0 * (z * t);
double t_3 = (x * y) * 2.0;
double tmp;
if ((x * y) <= -4.5e+49) {
tmp = t_3;
} else if ((x * y) <= -8e-91) {
tmp = t_1;
} else if ((x * y) <= 1.42e-176) {
tmp = t_2;
} else if ((x * y) <= 6.2e-130) {
tmp = t_1;
} else if ((x * y) <= 3.2e-47) {
tmp = t_2;
} else if ((x * y) <= 130000000000.0) {
tmp = 2.0 * (c * (a * -i));
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (a * (c * i)) * -2.0 t_2 = 2.0 * (z * t) t_3 = (x * y) * 2.0 tmp = 0 if (x * y) <= -4.5e+49: tmp = t_3 elif (x * y) <= -8e-91: tmp = t_1 elif (x * y) <= 1.42e-176: tmp = t_2 elif (x * y) <= 6.2e-130: tmp = t_1 elif (x * y) <= 3.2e-47: tmp = t_2 elif (x * y) <= 130000000000.0: tmp = 2.0 * (c * (a * -i)) else: tmp = t_3 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(a * Float64(c * i)) * Float64(-2.0)) t_2 = Float64(2.0 * Float64(z * t)) t_3 = Float64(Float64(x * y) * 2.0) tmp = 0.0 if (Float64(x * y) <= -4.5e+49) tmp = t_3; elseif (Float64(x * y) <= -8e-91) tmp = t_1; elseif (Float64(x * y) <= 1.42e-176) tmp = t_2; elseif (Float64(x * y) <= 6.2e-130) tmp = t_1; elseif (Float64(x * y) <= 3.2e-47) tmp = t_2; elseif (Float64(x * y) <= 130000000000.0) tmp = Float64(2.0 * Float64(c * Float64(a * Float64(-i)))); else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (a * (c * i)) * -2.0; t_2 = 2.0 * (z * t); t_3 = (x * y) * 2.0; tmp = 0.0; if ((x * y) <= -4.5e+49) tmp = t_3; elseif ((x * y) <= -8e-91) tmp = t_1; elseif ((x * y) <= 1.42e-176) tmp = t_2; elseif ((x * y) <= 6.2e-130) tmp = t_1; elseif ((x * y) <= 3.2e-47) tmp = t_2; elseif ((x * y) <= 130000000000.0) tmp = 2.0 * (c * (a * -i)); else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision] * (-2.0)), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * y), $MachinePrecision] * 2.0), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -4.5e+49], t$95$3, If[LessEqual[N[(x * y), $MachinePrecision], -8e-91], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 1.42e-176], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], 6.2e-130], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 3.2e-47], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], 130000000000.0], N[(2.0 * N[(c * N[(a * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot \left(c \cdot i\right)\right) \cdot \left(-2\right)\\
t_2 := 2 \cdot \left(z \cdot t\right)\\
t_3 := \left(x \cdot y\right) \cdot 2\\
\mathbf{if}\;x \cdot y \leq -4.5 \cdot 10^{+49}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \cdot y \leq -8 \cdot 10^{-91}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \cdot y \leq 1.42 \cdot 10^{-176}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \cdot y \leq 6.2 \cdot 10^{-130}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \cdot y \leq 3.2 \cdot 10^{-47}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \cdot y \leq 130000000000:\\
\;\;\;\;2 \cdot \left(c \cdot \left(a \cdot \left(-i\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if (*.f64 x y) < -4.49999999999999982e49 or 1.3e11 < (*.f64 x y) Initial program 87.0%
Taylor expanded in x around inf 54.7%
if -4.49999999999999982e49 < (*.f64 x y) < -8.00000000000000018e-91 or 1.42000000000000009e-176 < (*.f64 x y) < 6.20000000000000021e-130Initial program 94.4%
associate-*l*91.8%
fma-def91.8%
Simplified91.8%
fma-def91.8%
+-commutative91.8%
Applied egg-rr91.8%
Taylor expanded in a around inf 57.8%
mul-1-neg57.8%
distribute-rgt-neg-in57.8%
distribute-rgt-neg-in57.8%
Simplified57.8%
if -8.00000000000000018e-91 < (*.f64 x y) < 1.42000000000000009e-176 or 6.20000000000000021e-130 < (*.f64 x y) < 3.1999999999999999e-47Initial program 92.0%
Taylor expanded in z around inf 45.9%
if 3.1999999999999999e-47 < (*.f64 x y) < 1.3e11Initial program 82.8%
Taylor expanded in a around inf 37.6%
mul-1-neg37.6%
*-commutative37.6%
associate-*l*37.7%
*-commutative37.7%
distribute-rgt-neg-in37.7%
*-commutative37.7%
Simplified37.7%
Final simplification50.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (* z t))) (t_2 (* (* x y) 2.0)))
(if (<= (* x y) -4.4e+49)
t_2
(if (<= (* x y) -1.15e-98)
(* 2.0 (* (* a c) (- i)))
(if (<= (* x y) 2.1e-178)
t_1
(if (<= (* x y) 5.7e-129)
(* (* a (* c i)) (- 2.0))
(if (<= (* x y) 2.1e-47)
t_1
(if (<= (* x y) 3.2e+14) (* 2.0 (* c (* a (- i)))) t_2))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * (z * t);
double t_2 = (x * y) * 2.0;
double tmp;
if ((x * y) <= -4.4e+49) {
tmp = t_2;
} else if ((x * y) <= -1.15e-98) {
tmp = 2.0 * ((a * c) * -i);
} else if ((x * y) <= 2.1e-178) {
tmp = t_1;
} else if ((x * y) <= 5.7e-129) {
tmp = (a * (c * i)) * -2.0;
} else if ((x * y) <= 2.1e-47) {
tmp = t_1;
} else if ((x * y) <= 3.2e+14) {
tmp = 2.0 * (c * (a * -i));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 2.0d0 * (z * t)
t_2 = (x * y) * 2.0d0
if ((x * y) <= (-4.4d+49)) then
tmp = t_2
else if ((x * y) <= (-1.15d-98)) then
tmp = 2.0d0 * ((a * c) * -i)
else if ((x * y) <= 2.1d-178) then
tmp = t_1
else if ((x * y) <= 5.7d-129) then
tmp = (a * (c * i)) * -2.0d0
else if ((x * y) <= 2.1d-47) then
tmp = t_1
else if ((x * y) <= 3.2d+14) then
tmp = 2.0d0 * (c * (a * -i))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * (z * t);
double t_2 = (x * y) * 2.0;
double tmp;
if ((x * y) <= -4.4e+49) {
tmp = t_2;
} else if ((x * y) <= -1.15e-98) {
tmp = 2.0 * ((a * c) * -i);
} else if ((x * y) <= 2.1e-178) {
tmp = t_1;
} else if ((x * y) <= 5.7e-129) {
tmp = (a * (c * i)) * -2.0;
} else if ((x * y) <= 2.1e-47) {
tmp = t_1;
} else if ((x * y) <= 3.2e+14) {
tmp = 2.0 * (c * (a * -i));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * (z * t) t_2 = (x * y) * 2.0 tmp = 0 if (x * y) <= -4.4e+49: tmp = t_2 elif (x * y) <= -1.15e-98: tmp = 2.0 * ((a * c) * -i) elif (x * y) <= 2.1e-178: tmp = t_1 elif (x * y) <= 5.7e-129: tmp = (a * (c * i)) * -2.0 elif (x * y) <= 2.1e-47: tmp = t_1 elif (x * y) <= 3.2e+14: tmp = 2.0 * (c * (a * -i)) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(z * t)) t_2 = Float64(Float64(x * y) * 2.0) tmp = 0.0 if (Float64(x * y) <= -4.4e+49) tmp = t_2; elseif (Float64(x * y) <= -1.15e-98) tmp = Float64(2.0 * Float64(Float64(a * c) * Float64(-i))); elseif (Float64(x * y) <= 2.1e-178) tmp = t_1; elseif (Float64(x * y) <= 5.7e-129) tmp = Float64(Float64(a * Float64(c * i)) * Float64(-2.0)); elseif (Float64(x * y) <= 2.1e-47) tmp = t_1; elseif (Float64(x * y) <= 3.2e+14) tmp = Float64(2.0 * Float64(c * Float64(a * Float64(-i)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 2.0 * (z * t); t_2 = (x * y) * 2.0; tmp = 0.0; if ((x * y) <= -4.4e+49) tmp = t_2; elseif ((x * y) <= -1.15e-98) tmp = 2.0 * ((a * c) * -i); elseif ((x * y) <= 2.1e-178) tmp = t_1; elseif ((x * y) <= 5.7e-129) tmp = (a * (c * i)) * -2.0; elseif ((x * y) <= 2.1e-47) tmp = t_1; elseif ((x * y) <= 3.2e+14) tmp = 2.0 * (c * (a * -i)); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y), $MachinePrecision] * 2.0), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -4.4e+49], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], -1.15e-98], N[(2.0 * N[(N[(a * c), $MachinePrecision] * (-i)), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 2.1e-178], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 5.7e-129], N[(N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision] * (-2.0)), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 2.1e-47], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 3.2e+14], N[(2.0 * N[(c * N[(a * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(z \cdot t\right)\\
t_2 := \left(x \cdot y\right) \cdot 2\\
\mathbf{if}\;x \cdot y \leq -4.4 \cdot 10^{+49}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \cdot y \leq -1.15 \cdot 10^{-98}:\\
\;\;\;\;2 \cdot \left(\left(a \cdot c\right) \cdot \left(-i\right)\right)\\
\mathbf{elif}\;x \cdot y \leq 2.1 \cdot 10^{-178}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \cdot y \leq 5.7 \cdot 10^{-129}:\\
\;\;\;\;\left(a \cdot \left(c \cdot i\right)\right) \cdot \left(-2\right)\\
\mathbf{elif}\;x \cdot y \leq 2.1 \cdot 10^{-47}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \cdot y \leq 3.2 \cdot 10^{+14}:\\
\;\;\;\;2 \cdot \left(c \cdot \left(a \cdot \left(-i\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if (*.f64 x y) < -4.4000000000000001e49 or 3.2e14 < (*.f64 x y) Initial program 87.0%
Taylor expanded in x around inf 54.7%
if -4.4000000000000001e49 < (*.f64 x y) < -1.15e-98Initial program 99.9%
associate-*r*93.3%
*-commutative93.3%
flip-+62.4%
associate-*r/52.8%
pow252.8%
Applied egg-rr52.8%
associate-/l*62.3%
Simplified62.3%
associate--l+62.3%
associate-/l*58.4%
clear-num58.4%
unpow258.4%
flip-+92.4%
+-commutative92.4%
fma-def92.4%
Applied egg-rr92.4%
Taylor expanded in a around inf 49.2%
associate-*r*49.2%
*-commutative49.2%
*-commutative49.2%
associate-*r*52.7%
neg-mul-152.7%
Simplified52.7%
if -1.15e-98 < (*.f64 x y) < 2.1e-178 or 5.7000000000000001e-129 < (*.f64 x y) < 2.1000000000000001e-47Initial program 91.6%
Taylor expanded in z around inf 47.1%
if 2.1e-178 < (*.f64 x y) < 5.7000000000000001e-129Initial program 82.2%
associate-*l*82.4%
fma-def82.4%
Simplified82.4%
fma-def82.4%
+-commutative82.4%
Applied egg-rr82.4%
Taylor expanded in a around inf 63.7%
mul-1-neg63.7%
distribute-rgt-neg-in63.7%
distribute-rgt-neg-in63.7%
Simplified63.7%
if 2.1000000000000001e-47 < (*.f64 x y) < 3.2e14Initial program 82.8%
Taylor expanded in a around inf 37.6%
mul-1-neg37.6%
*-commutative37.6%
associate-*l*37.7%
*-commutative37.7%
distribute-rgt-neg-in37.7%
*-commutative37.7%
Simplified37.7%
Final simplification51.0%
(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 (- (* x y) (* c (* t_1 i))))
(* (- (+ (* x y) (* z t)) t_2) 2.0))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double t_2 = (c * t_1) * i;
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = 2.0 * ((x * y) - (c * (t_1 * i)));
} else {
tmp = (((x * y) + (z * t)) - t_2) * 2.0;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double t_2 = (c * t_1) * i;
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = 2.0 * ((x * y) - (c * (t_1 * i)));
} else {
tmp = (((x * y) + (z * t)) - t_2) * 2.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a + (b * c) t_2 = (c * t_1) * i tmp = 0 if t_2 <= -math.inf: tmp = 2.0 * ((x * y) - (c * (t_1 * i))) else: tmp = (((x * y) + (z * t)) - t_2) * 2.0 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(b * c)) t_2 = Float64(Float64(c * t_1) * i) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(c * Float64(t_1 * i)))); else tmp = Float64(Float64(Float64(Float64(x * y) + Float64(z * t)) - t_2) * 2.0); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = a + (b * c); t_2 = (c * t_1) * i; tmp = 0.0; if (t_2 <= -Inf) tmp = 2.0 * ((x * y) - (c * (t_1 * i))); else tmp = (((x * y) + (z * t)) - t_2) * 2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(c * t$95$1), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(c * N[(t$95$1 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision] * 2.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + b \cdot c\\
t_2 := \left(c \cdot t_1\right) \cdot i\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(t_1 \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(x \cdot y + z \cdot t\right) - t_2\right) \cdot 2\\
\end{array}
\end{array}
if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -inf.0Initial program 69.7%
Taylor expanded in z around 0 90.6%
if -inf.0 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) Initial program 96.3%
Final simplification94.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* c (* (+ a (* b c)) i))))
(if (<= (* x y) -2.4e-68)
(* 2.0 (- (* x y) t_1))
(if (<= (* x y) 460000000000.0)
(* 2.0 (- (* z t) t_1))
(* 2.0 (- (+ (* x y) (* z t)) (* (* b c) (* c i))))))))
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 ((x * y) <= -2.4e-68) {
tmp = 2.0 * ((x * y) - t_1);
} else if ((x * y) <= 460000000000.0) {
tmp = 2.0 * ((z * t) - t_1);
} else {
tmp = 2.0 * (((x * y) + (z * t)) - ((b * c) * (c * i)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = c * ((a + (b * c)) * i)
if ((x * y) <= (-2.4d-68)) then
tmp = 2.0d0 * ((x * y) - t_1)
else if ((x * y) <= 460000000000.0d0) then
tmp = 2.0d0 * ((z * t) - t_1)
else
tmp = 2.0d0 * (((x * y) + (z * t)) - ((b * c) * (c * i)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = c * ((a + (b * c)) * i);
double tmp;
if ((x * y) <= -2.4e-68) {
tmp = 2.0 * ((x * y) - t_1);
} else if ((x * y) <= 460000000000.0) {
tmp = 2.0 * ((z * t) - t_1);
} else {
tmp = 2.0 * (((x * y) + (z * t)) - ((b * c) * (c * i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = c * ((a + (b * c)) * i) tmp = 0 if (x * y) <= -2.4e-68: tmp = 2.0 * ((x * y) - t_1) elif (x * y) <= 460000000000.0: tmp = 2.0 * ((z * t) - t_1) else: tmp = 2.0 * (((x * y) + (z * t)) - ((b * c) * (c * i))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(c * Float64(Float64(a + Float64(b * c)) * i)) tmp = 0.0 if (Float64(x * y) <= -2.4e-68) tmp = Float64(2.0 * Float64(Float64(x * y) - t_1)); elseif (Float64(x * y) <= 460000000000.0) tmp = Float64(2.0 * Float64(Float64(z * t) - t_1)); else tmp = Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(Float64(b * c) * Float64(c * i)))); 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 ((x * y) <= -2.4e-68) tmp = 2.0 * ((x * y) - t_1); elseif ((x * y) <= 460000000000.0) tmp = 2.0 * ((z * t) - t_1); else tmp = 2.0 * (((x * y) + (z * t)) - ((b * c) * (c * i))); 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[N[(x * y), $MachinePrecision], -2.4e-68], N[(2.0 * N[(N[(x * y), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 460000000000.0], N[(2.0 * N[(N[(z * t), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(b * c), $MachinePrecision] * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\\
\mathbf{if}\;x \cdot y \leq -2.4 \cdot 10^{-68}:\\
\;\;\;\;2 \cdot \left(x \cdot y - t_1\right)\\
\mathbf{elif}\;x \cdot y \leq 460000000000:\\
\;\;\;\;2 \cdot \left(z \cdot t - t_1\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(b \cdot c\right) \cdot \left(c \cdot i\right)\right)\\
\end{array}
\end{array}
if (*.f64 x y) < -2.39999999999999991e-68Initial program 87.5%
Taylor expanded in z around 0 80.9%
if -2.39999999999999991e-68 < (*.f64 x y) < 4.6e11Initial program 90.2%
Taylor expanded in x around 0 91.5%
if 4.6e11 < (*.f64 x y) Initial program 91.3%
associate-*l*98.2%
fma-def98.2%
Simplified98.2%
fma-def98.2%
+-commutative98.2%
Applied egg-rr98.2%
Taylor expanded in a around 0 91.2%
Final simplification88.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (+ (* x y) (* z t)))))
(if (<= c -8.2e+112)
(* (* (* b c) (* c i)) (- 2.0))
(if (<= c -4.0)
t_1
(if (<= c -2.05e-22)
(* c (* (* c (* b i)) -2.0))
(if (<= c -1.5e-116)
(* 2.0 (- (* z t) (* c (* a i))))
(if (<= c 1.12e+30)
t_1
(if (<= c 1.1e+159)
(* 2.0 (- (* x y) (* a (* c i))))
(* 2.0 (* b (* c (* c (- i)))))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * ((x * y) + (z * t));
double tmp;
if (c <= -8.2e+112) {
tmp = ((b * c) * (c * i)) * -2.0;
} else if (c <= -4.0) {
tmp = t_1;
} else if (c <= -2.05e-22) {
tmp = c * ((c * (b * i)) * -2.0);
} else if (c <= -1.5e-116) {
tmp = 2.0 * ((z * t) - (c * (a * i)));
} else if (c <= 1.12e+30) {
tmp = t_1;
} else if (c <= 1.1e+159) {
tmp = 2.0 * ((x * y) - (a * (c * i)));
} else {
tmp = 2.0 * (b * (c * (c * -i)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = 2.0d0 * ((x * y) + (z * t))
if (c <= (-8.2d+112)) then
tmp = ((b * c) * (c * i)) * -2.0d0
else if (c <= (-4.0d0)) then
tmp = t_1
else if (c <= (-2.05d-22)) then
tmp = c * ((c * (b * i)) * (-2.0d0))
else if (c <= (-1.5d-116)) then
tmp = 2.0d0 * ((z * t) - (c * (a * i)))
else if (c <= 1.12d+30) then
tmp = t_1
else if (c <= 1.1d+159) then
tmp = 2.0d0 * ((x * y) - (a * (c * i)))
else
tmp = 2.0d0 * (b * (c * (c * -i)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * ((x * y) + (z * t));
double tmp;
if (c <= -8.2e+112) {
tmp = ((b * c) * (c * i)) * -2.0;
} else if (c <= -4.0) {
tmp = t_1;
} else if (c <= -2.05e-22) {
tmp = c * ((c * (b * i)) * -2.0);
} else if (c <= -1.5e-116) {
tmp = 2.0 * ((z * t) - (c * (a * i)));
} else if (c <= 1.12e+30) {
tmp = t_1;
} else if (c <= 1.1e+159) {
tmp = 2.0 * ((x * y) - (a * (c * i)));
} else {
tmp = 2.0 * (b * (c * (c * -i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * ((x * y) + (z * t)) tmp = 0 if c <= -8.2e+112: tmp = ((b * c) * (c * i)) * -2.0 elif c <= -4.0: tmp = t_1 elif c <= -2.05e-22: tmp = c * ((c * (b * i)) * -2.0) elif c <= -1.5e-116: tmp = 2.0 * ((z * t) - (c * (a * i))) elif c <= 1.12e+30: tmp = t_1 elif c <= 1.1e+159: tmp = 2.0 * ((x * y) - (a * (c * i))) else: tmp = 2.0 * (b * (c * (c * -i))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(Float64(x * y) + Float64(z * t))) tmp = 0.0 if (c <= -8.2e+112) tmp = Float64(Float64(Float64(b * c) * Float64(c * i)) * Float64(-2.0)); elseif (c <= -4.0) tmp = t_1; elseif (c <= -2.05e-22) tmp = Float64(c * Float64(Float64(c * Float64(b * i)) * -2.0)); elseif (c <= -1.5e-116) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(a * i)))); elseif (c <= 1.12e+30) tmp = t_1; elseif (c <= 1.1e+159) tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(a * Float64(c * i)))); else tmp = Float64(2.0 * Float64(b * Float64(c * Float64(c * Float64(-i))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 2.0 * ((x * y) + (z * t)); tmp = 0.0; if (c <= -8.2e+112) tmp = ((b * c) * (c * i)) * -2.0; elseif (c <= -4.0) tmp = t_1; elseif (c <= -2.05e-22) tmp = c * ((c * (b * i)) * -2.0); elseif (c <= -1.5e-116) tmp = 2.0 * ((z * t) - (c * (a * i))); elseif (c <= 1.12e+30) tmp = t_1; elseif (c <= 1.1e+159) tmp = 2.0 * ((x * y) - (a * (c * i))); else tmp = 2.0 * (b * (c * (c * -i))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -8.2e+112], N[(N[(N[(b * c), $MachinePrecision] * N[(c * i), $MachinePrecision]), $MachinePrecision] * (-2.0)), $MachinePrecision], If[LessEqual[c, -4.0], t$95$1, If[LessEqual[c, -2.05e-22], N[(c * N[(N[(c * N[(b * i), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -1.5e-116], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.12e+30], t$95$1, If[LessEqual[c, 1.1e+159], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(b * N[(c * N[(c * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(x \cdot y + z \cdot t\right)\\
\mathbf{if}\;c \leq -8.2 \cdot 10^{+112}:\\
\;\;\;\;\left(\left(b \cdot c\right) \cdot \left(c \cdot i\right)\right) \cdot \left(-2\right)\\
\mathbf{elif}\;c \leq -4:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq -2.05 \cdot 10^{-22}:\\
\;\;\;\;c \cdot \left(\left(c \cdot \left(b \cdot i\right)\right) \cdot -2\right)\\
\mathbf{elif}\;c \leq -1.5 \cdot 10^{-116}:\\
\;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(a \cdot i\right)\right)\\
\mathbf{elif}\;c \leq 1.12 \cdot 10^{+30}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq 1.1 \cdot 10^{+159}:\\
\;\;\;\;2 \cdot \left(x \cdot y - a \cdot \left(c \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(b \cdot \left(c \cdot \left(c \cdot \left(-i\right)\right)\right)\right)\\
\end{array}
\end{array}
if c < -8.19999999999999951e112Initial program 85.8%
associate-*r*95.1%
*-commutative95.1%
flip-+39.2%
associate-*r/39.2%
pow239.2%
Applied egg-rr39.2%
associate-/l*39.2%
Simplified39.2%
associate--l+39.2%
associate-/l*39.2%
clear-num39.2%
unpow239.2%
flip-+95.1%
+-commutative95.1%
fma-def95.1%
Applied egg-rr95.1%
Taylor expanded in c around inf 81.2%
unpow281.2%
associate-*r*81.1%
*-commutative81.1%
neg-mul-181.1%
distribute-rgt-neg-in81.1%
*-commutative81.1%
associate-*l*83.3%
Simplified83.3%
if -8.19999999999999951e112 < c < -4 or -1.50000000000000013e-116 < c < 1.12e30Initial program 94.6%
Taylor expanded in c around 0 74.0%
if -4 < c < -2.05e-22Initial program 99.2%
Taylor expanded in b around inf 83.2%
mul-1-neg83.2%
*-commutative83.2%
distribute-rgt-neg-in83.2%
unpow283.2%
associate-*r*83.5%
Simplified83.5%
Taylor expanded in c around 0 83.2%
*-commutative83.2%
unpow283.2%
associate-*r*83.5%
*-commutative83.5%
associate-*l*83.2%
*-commutative83.2%
associate-*l*83.2%
associate-*r*83.2%
*-commutative83.2%
associate-*l*83.8%
Simplified83.8%
if -2.05e-22 < c < -1.50000000000000013e-116Initial program 99.4%
Taylor expanded in x around 0 78.6%
Taylor expanded in a around inf 68.1%
*-commutative68.1%
Simplified68.1%
if 1.12e30 < c < 1.1e159Initial program 85.1%
Taylor expanded in a around inf 61.3%
*-commutative61.3%
Simplified61.3%
Taylor expanded in z around 0 60.9%
if 1.1e159 < c Initial program 74.5%
Taylor expanded in b around inf 69.2%
mul-1-neg69.2%
*-commutative69.2%
distribute-rgt-neg-in69.2%
unpow269.2%
associate-*r*76.6%
Simplified76.6%
Final simplification74.4%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* c (* (+ a (* b c)) i)))
(t_2 (* 2.0 (- (* x y) t_1)))
(t_3 (* 2.0 (- (* z t) t_1))))
(if (<= c -3.8e+43)
t_2
(if (<= c -2.3e-56)
t_3
(if (<= c -3.65e-75)
t_2
(if (<= c 19.0)
(* 2.0 (- (+ (* x y) (* z t)) (* i (* a c))))
t_3))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = c * ((a + (b * c)) * i);
double t_2 = 2.0 * ((x * y) - t_1);
double t_3 = 2.0 * ((z * t) - t_1);
double tmp;
if (c <= -3.8e+43) {
tmp = t_2;
} else if (c <= -2.3e-56) {
tmp = t_3;
} else if (c <= -3.65e-75) {
tmp = t_2;
} else if (c <= 19.0) {
tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c)));
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = c * ((a + (b * c)) * i)
t_2 = 2.0d0 * ((x * y) - t_1)
t_3 = 2.0d0 * ((z * t) - t_1)
if (c <= (-3.8d+43)) then
tmp = t_2
else if (c <= (-2.3d-56)) then
tmp = t_3
else if (c <= (-3.65d-75)) then
tmp = t_2
else if (c <= 19.0d0) then
tmp = 2.0d0 * (((x * y) + (z * t)) - (i * (a * c)))
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = c * ((a + (b * c)) * i);
double t_2 = 2.0 * ((x * y) - t_1);
double t_3 = 2.0 * ((z * t) - t_1);
double tmp;
if (c <= -3.8e+43) {
tmp = t_2;
} else if (c <= -2.3e-56) {
tmp = t_3;
} else if (c <= -3.65e-75) {
tmp = t_2;
} else if (c <= 19.0) {
tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c)));
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = c * ((a + (b * c)) * i) t_2 = 2.0 * ((x * y) - t_1) t_3 = 2.0 * ((z * t) - t_1) tmp = 0 if c <= -3.8e+43: tmp = t_2 elif c <= -2.3e-56: tmp = t_3 elif c <= -3.65e-75: tmp = t_2 elif c <= 19.0: tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c))) else: tmp = t_3 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(c * Float64(Float64(a + Float64(b * c)) * i)) t_2 = Float64(2.0 * Float64(Float64(x * y) - t_1)) t_3 = Float64(2.0 * Float64(Float64(z * t) - t_1)) tmp = 0.0 if (c <= -3.8e+43) tmp = t_2; elseif (c <= -2.3e-56) tmp = t_3; elseif (c <= -3.65e-75) tmp = t_2; elseif (c <= 19.0) tmp = Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(i * Float64(a * c)))); else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = c * ((a + (b * c)) * i); t_2 = 2.0 * ((x * y) - t_1); t_3 = 2.0 * ((z * t) - t_1); tmp = 0.0; if (c <= -3.8e+43) tmp = t_2; elseif (c <= -2.3e-56) tmp = t_3; elseif (c <= -3.65e-75) tmp = t_2; elseif (c <= 19.0) tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c))); else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(N[(x * y), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(2.0 * N[(N[(z * t), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -3.8e+43], t$95$2, If[LessEqual[c, -2.3e-56], t$95$3, If[LessEqual[c, -3.65e-75], t$95$2, If[LessEqual[c, 19.0], N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(i * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\\
t_2 := 2 \cdot \left(x \cdot y - t_1\right)\\
t_3 := 2 \cdot \left(z \cdot t - t_1\right)\\
\mathbf{if}\;c \leq -3.8 \cdot 10^{+43}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq -2.3 \cdot 10^{-56}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;c \leq -3.65 \cdot 10^{-75}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq 19:\\
\;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - i \cdot \left(a \cdot c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if c < -3.80000000000000008e43 or -2.30000000000000002e-56 < c < -3.6499999999999999e-75Initial program 81.4%
Taylor expanded in z around 0 92.1%
if -3.80000000000000008e43 < c < -2.30000000000000002e-56 or 19 < c Initial program 85.6%
Taylor expanded in x around 0 88.1%
if -3.6499999999999999e-75 < c < 19Initial program 98.9%
Taylor expanded in a around inf 91.7%
*-commutative91.7%
Simplified91.7%
Final simplification90.5%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (* x y) -4.4e+49) (not (<= (* x y) 1.22e+66))) (* 2.0 (- (* x y) (* (* b c) (* c i)))) (* 2.0 (- (* z t) (* c (* (+ a (* b c)) i))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((x * y) <= -4.4e+49) || !((x * y) <= 1.22e+66)) {
tmp = 2.0 * ((x * y) - ((b * c) * (c * i)));
} else {
tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (((x * y) <= (-4.4d+49)) .or. (.not. ((x * y) <= 1.22d+66))) then
tmp = 2.0d0 * ((x * y) - ((b * c) * (c * i)))
else
tmp = 2.0d0 * ((z * t) - (c * ((a + (b * c)) * i)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((x * y) <= -4.4e+49) || !((x * y) <= 1.22e+66)) {
tmp = 2.0 * ((x * y) - ((b * c) * (c * i)));
} else {
tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((x * y) <= -4.4e+49) or not ((x * y) <= 1.22e+66): tmp = 2.0 * ((x * y) - ((b * c) * (c * i))) else: tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(x * y) <= -4.4e+49) || !(Float64(x * y) <= 1.22e+66)) tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(Float64(b * c) * Float64(c * i)))); else tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(Float64(a + Float64(b * c)) * i)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (((x * y) <= -4.4e+49) || ~(((x * y) <= 1.22e+66))) tmp = 2.0 * ((x * y) - ((b * c) * (c * i))); else tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(x * y), $MachinePrecision], -4.4e+49], N[Not[LessEqual[N[(x * y), $MachinePrecision], 1.22e+66]], $MachinePrecision]], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(N[(b * c), $MachinePrecision] * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -4.4 \cdot 10^{+49} \lor \neg \left(x \cdot y \leq 1.22 \cdot 10^{+66}\right):\\
\;\;\;\;2 \cdot \left(x \cdot y - \left(b \cdot c\right) \cdot \left(c \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\
\end{array}
\end{array}
if (*.f64 x y) < -4.4000000000000001e49 or 1.21999999999999993e66 < (*.f64 x y) Initial program 87.8%
associate-*r*93.8%
*-commutative93.8%
flip-+61.2%
associate-*r/61.2%
pow261.2%
Applied egg-rr61.2%
associate-/l*61.2%
Simplified61.2%
Taylor expanded in a around 0 87.7%
associate-/r*87.7%
Simplified87.7%
Taylor expanded in z around 0 78.0%
unpow278.0%
associate-*r*78.9%
associate-*l*81.0%
*-commutative81.0%
*-commutative81.0%
*-commutative81.0%
Simplified81.0%
if -4.4000000000000001e49 < (*.f64 x y) < 1.21999999999999993e66Initial program 90.8%
Taylor expanded in x around 0 86.6%
Final simplification84.4%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* c (* (+ a (* b c)) i))))
(if (or (<= (* x y) -2.8e-68) (not (<= (* x y) 4.15e-47)))
(* 2.0 (- (* x y) t_1))
(* 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 (((x * y) <= -2.8e-68) || !((x * y) <= 4.15e-47)) {
tmp = 2.0 * ((x * y) - t_1);
} 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 (((x * y) <= (-2.8d-68)) .or. (.not. ((x * y) <= 4.15d-47))) then
tmp = 2.0d0 * ((x * y) - t_1)
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 (((x * y) <= -2.8e-68) || !((x * y) <= 4.15e-47)) {
tmp = 2.0 * ((x * y) - t_1);
} 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 ((x * y) <= -2.8e-68) or not ((x * y) <= 4.15e-47): tmp = 2.0 * ((x * y) - t_1) 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 ((Float64(x * y) <= -2.8e-68) || !(Float64(x * y) <= 4.15e-47)) tmp = Float64(2.0 * Float64(Float64(x * y) - t_1)); 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 (((x * y) <= -2.8e-68) || ~(((x * y) <= 4.15e-47))) tmp = 2.0 * ((x * y) - t_1); 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[Or[LessEqual[N[(x * y), $MachinePrecision], -2.8e-68], N[Not[LessEqual[N[(x * y), $MachinePrecision], 4.15e-47]], $MachinePrecision]], N[(2.0 * N[(N[(x * y), $MachinePrecision] - t$95$1), $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}\;x \cdot y \leq -2.8 \cdot 10^{-68} \lor \neg \left(x \cdot y \leq 4.15 \cdot 10^{-47}\right):\\
\;\;\;\;2 \cdot \left(x \cdot y - t_1\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(z \cdot t - t_1\right)\\
\end{array}
\end{array}
if (*.f64 x y) < -2.8000000000000001e-68 or 4.1499999999999998e-47 < (*.f64 x y) Initial program 88.4%
Taylor expanded in z around 0 82.6%
if -2.8000000000000001e-68 < (*.f64 x y) < 4.1499999999999998e-47Initial program 91.3%
Taylor expanded in x around 0 92.0%
Final simplification86.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (+ (* x y) (* z t)))))
(if (<= c -3.8e+111)
(* (* (* b c) (* c i)) (- 2.0))
(if (<= c -4.0)
t_1
(if (<= c -8.8e-23)
(* c (* (* c (* b i)) -2.0))
(if (<= c -8.6e-115)
(* 2.0 (* (* a c) (- i)))
(if (<= c 7e+82) t_1 (* 2.0 (* b (* c (* c (- i))))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * ((x * y) + (z * t));
double tmp;
if (c <= -3.8e+111) {
tmp = ((b * c) * (c * i)) * -2.0;
} else if (c <= -4.0) {
tmp = t_1;
} else if (c <= -8.8e-23) {
tmp = c * ((c * (b * i)) * -2.0);
} else if (c <= -8.6e-115) {
tmp = 2.0 * ((a * c) * -i);
} else if (c <= 7e+82) {
tmp = t_1;
} else {
tmp = 2.0 * (b * (c * (c * -i)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = 2.0d0 * ((x * y) + (z * t))
if (c <= (-3.8d+111)) then
tmp = ((b * c) * (c * i)) * -2.0d0
else if (c <= (-4.0d0)) then
tmp = t_1
else if (c <= (-8.8d-23)) then
tmp = c * ((c * (b * i)) * (-2.0d0))
else if (c <= (-8.6d-115)) then
tmp = 2.0d0 * ((a * c) * -i)
else if (c <= 7d+82) then
tmp = t_1
else
tmp = 2.0d0 * (b * (c * (c * -i)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * ((x * y) + (z * t));
double tmp;
if (c <= -3.8e+111) {
tmp = ((b * c) * (c * i)) * -2.0;
} else if (c <= -4.0) {
tmp = t_1;
} else if (c <= -8.8e-23) {
tmp = c * ((c * (b * i)) * -2.0);
} else if (c <= -8.6e-115) {
tmp = 2.0 * ((a * c) * -i);
} else if (c <= 7e+82) {
tmp = t_1;
} else {
tmp = 2.0 * (b * (c * (c * -i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * ((x * y) + (z * t)) tmp = 0 if c <= -3.8e+111: tmp = ((b * c) * (c * i)) * -2.0 elif c <= -4.0: tmp = t_1 elif c <= -8.8e-23: tmp = c * ((c * (b * i)) * -2.0) elif c <= -8.6e-115: tmp = 2.0 * ((a * c) * -i) elif c <= 7e+82: tmp = t_1 else: tmp = 2.0 * (b * (c * (c * -i))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(Float64(x * y) + Float64(z * t))) tmp = 0.0 if (c <= -3.8e+111) tmp = Float64(Float64(Float64(b * c) * Float64(c * i)) * Float64(-2.0)); elseif (c <= -4.0) tmp = t_1; elseif (c <= -8.8e-23) tmp = Float64(c * Float64(Float64(c * Float64(b * i)) * -2.0)); elseif (c <= -8.6e-115) tmp = Float64(2.0 * Float64(Float64(a * c) * Float64(-i))); elseif (c <= 7e+82) tmp = t_1; else tmp = Float64(2.0 * Float64(b * Float64(c * Float64(c * Float64(-i))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 2.0 * ((x * y) + (z * t)); tmp = 0.0; if (c <= -3.8e+111) tmp = ((b * c) * (c * i)) * -2.0; elseif (c <= -4.0) tmp = t_1; elseif (c <= -8.8e-23) tmp = c * ((c * (b * i)) * -2.0); elseif (c <= -8.6e-115) tmp = 2.0 * ((a * c) * -i); elseif (c <= 7e+82) tmp = t_1; else tmp = 2.0 * (b * (c * (c * -i))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -3.8e+111], N[(N[(N[(b * c), $MachinePrecision] * N[(c * i), $MachinePrecision]), $MachinePrecision] * (-2.0)), $MachinePrecision], If[LessEqual[c, -4.0], t$95$1, If[LessEqual[c, -8.8e-23], N[(c * N[(N[(c * N[(b * i), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -8.6e-115], N[(2.0 * N[(N[(a * c), $MachinePrecision] * (-i)), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 7e+82], t$95$1, N[(2.0 * N[(b * N[(c * N[(c * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(x \cdot y + z \cdot t\right)\\
\mathbf{if}\;c \leq -3.8 \cdot 10^{+111}:\\
\;\;\;\;\left(\left(b \cdot c\right) \cdot \left(c \cdot i\right)\right) \cdot \left(-2\right)\\
\mathbf{elif}\;c \leq -4:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq -8.8 \cdot 10^{-23}:\\
\;\;\;\;c \cdot \left(\left(c \cdot \left(b \cdot i\right)\right) \cdot -2\right)\\
\mathbf{elif}\;c \leq -8.6 \cdot 10^{-115}:\\
\;\;\;\;2 \cdot \left(\left(a \cdot c\right) \cdot \left(-i\right)\right)\\
\mathbf{elif}\;c \leq 7 \cdot 10^{+82}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(b \cdot \left(c \cdot \left(c \cdot \left(-i\right)\right)\right)\right)\\
\end{array}
\end{array}
if c < -3.79999999999999976e111Initial program 85.8%
associate-*r*95.1%
*-commutative95.1%
flip-+39.2%
associate-*r/39.2%
pow239.2%
Applied egg-rr39.2%
associate-/l*39.2%
Simplified39.2%
associate--l+39.2%
associate-/l*39.2%
clear-num39.2%
unpow239.2%
flip-+95.1%
+-commutative95.1%
fma-def95.1%
Applied egg-rr95.1%
Taylor expanded in c around inf 81.2%
unpow281.2%
associate-*r*81.1%
*-commutative81.1%
neg-mul-181.1%
distribute-rgt-neg-in81.1%
*-commutative81.1%
associate-*l*83.3%
Simplified83.3%
if -3.79999999999999976e111 < c < -4 or -8.6000000000000008e-115 < c < 7.0000000000000001e82Initial program 95.0%
Taylor expanded in c around 0 71.7%
if -4 < c < -8.7999999999999998e-23Initial program 99.2%
Taylor expanded in b around inf 83.2%
mul-1-neg83.2%
*-commutative83.2%
distribute-rgt-neg-in83.2%
unpow283.2%
associate-*r*83.5%
Simplified83.5%
Taylor expanded in c around 0 83.2%
*-commutative83.2%
unpow283.2%
associate-*r*83.5%
*-commutative83.5%
associate-*l*83.2%
*-commutative83.2%
associate-*l*83.2%
associate-*r*83.2%
*-commutative83.2%
associate-*l*83.8%
Simplified83.8%
if -8.7999999999999998e-23 < c < -8.6000000000000008e-115Initial program 99.4%
associate-*r*94.1%
*-commutative94.1%
flip-+54.6%
associate-*r/54.5%
pow254.5%
Applied egg-rr54.5%
associate-/l*54.5%
Simplified54.5%
associate--l+54.5%
associate-/l*53.0%
clear-num53.1%
unpow253.1%
flip-+92.3%
+-commutative92.3%
fma-def92.3%
Applied egg-rr92.3%
Taylor expanded in a around inf 50.6%
associate-*r*50.6%
*-commutative50.6%
*-commutative50.6%
associate-*r*55.8%
neg-mul-155.8%
Simplified55.8%
if 7.0000000000000001e82 < c Initial program 74.9%
Taylor expanded in b around inf 61.9%
mul-1-neg61.9%
*-commutative61.9%
distribute-rgt-neg-in61.9%
unpow261.9%
associate-*r*67.1%
Simplified67.1%
Final simplification71.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (+ (* x y) (* z t)))))
(if (<= c -8.2e+112)
(* (* (* b c) (* c i)) (- 2.0))
(if (<= c -0.0058)
t_1
(if (<= c -2.05e-22)
(* c (* (* c (* b i)) -2.0))
(if (<= c -8e-115)
(* 2.0 (- (* z t) (* c (* a i))))
(if (<= c 1.7e+83) t_1 (* 2.0 (* b (* c (* c (- i))))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * ((x * y) + (z * t));
double tmp;
if (c <= -8.2e+112) {
tmp = ((b * c) * (c * i)) * -2.0;
} else if (c <= -0.0058) {
tmp = t_1;
} else if (c <= -2.05e-22) {
tmp = c * ((c * (b * i)) * -2.0);
} else if (c <= -8e-115) {
tmp = 2.0 * ((z * t) - (c * (a * i)));
} else if (c <= 1.7e+83) {
tmp = t_1;
} else {
tmp = 2.0 * (b * (c * (c * -i)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = 2.0d0 * ((x * y) + (z * t))
if (c <= (-8.2d+112)) then
tmp = ((b * c) * (c * i)) * -2.0d0
else if (c <= (-0.0058d0)) then
tmp = t_1
else if (c <= (-2.05d-22)) then
tmp = c * ((c * (b * i)) * (-2.0d0))
else if (c <= (-8d-115)) then
tmp = 2.0d0 * ((z * t) - (c * (a * i)))
else if (c <= 1.7d+83) then
tmp = t_1
else
tmp = 2.0d0 * (b * (c * (c * -i)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * ((x * y) + (z * t));
double tmp;
if (c <= -8.2e+112) {
tmp = ((b * c) * (c * i)) * -2.0;
} else if (c <= -0.0058) {
tmp = t_1;
} else if (c <= -2.05e-22) {
tmp = c * ((c * (b * i)) * -2.0);
} else if (c <= -8e-115) {
tmp = 2.0 * ((z * t) - (c * (a * i)));
} else if (c <= 1.7e+83) {
tmp = t_1;
} else {
tmp = 2.0 * (b * (c * (c * -i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * ((x * y) + (z * t)) tmp = 0 if c <= -8.2e+112: tmp = ((b * c) * (c * i)) * -2.0 elif c <= -0.0058: tmp = t_1 elif c <= -2.05e-22: tmp = c * ((c * (b * i)) * -2.0) elif c <= -8e-115: tmp = 2.0 * ((z * t) - (c * (a * i))) elif c <= 1.7e+83: tmp = t_1 else: tmp = 2.0 * (b * (c * (c * -i))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(Float64(x * y) + Float64(z * t))) tmp = 0.0 if (c <= -8.2e+112) tmp = Float64(Float64(Float64(b * c) * Float64(c * i)) * Float64(-2.0)); elseif (c <= -0.0058) tmp = t_1; elseif (c <= -2.05e-22) tmp = Float64(c * Float64(Float64(c * Float64(b * i)) * -2.0)); elseif (c <= -8e-115) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(a * i)))); elseif (c <= 1.7e+83) tmp = t_1; else tmp = Float64(2.0 * Float64(b * Float64(c * Float64(c * Float64(-i))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 2.0 * ((x * y) + (z * t)); tmp = 0.0; if (c <= -8.2e+112) tmp = ((b * c) * (c * i)) * -2.0; elseif (c <= -0.0058) tmp = t_1; elseif (c <= -2.05e-22) tmp = c * ((c * (b * i)) * -2.0); elseif (c <= -8e-115) tmp = 2.0 * ((z * t) - (c * (a * i))); elseif (c <= 1.7e+83) tmp = t_1; else tmp = 2.0 * (b * (c * (c * -i))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -8.2e+112], N[(N[(N[(b * c), $MachinePrecision] * N[(c * i), $MachinePrecision]), $MachinePrecision] * (-2.0)), $MachinePrecision], If[LessEqual[c, -0.0058], t$95$1, If[LessEqual[c, -2.05e-22], N[(c * N[(N[(c * N[(b * i), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -8e-115], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.7e+83], t$95$1, N[(2.0 * N[(b * N[(c * N[(c * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(x \cdot y + z \cdot t\right)\\
\mathbf{if}\;c \leq -8.2 \cdot 10^{+112}:\\
\;\;\;\;\left(\left(b \cdot c\right) \cdot \left(c \cdot i\right)\right) \cdot \left(-2\right)\\
\mathbf{elif}\;c \leq -0.0058:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq -2.05 \cdot 10^{-22}:\\
\;\;\;\;c \cdot \left(\left(c \cdot \left(b \cdot i\right)\right) \cdot -2\right)\\
\mathbf{elif}\;c \leq -8 \cdot 10^{-115}:\\
\;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(a \cdot i\right)\right)\\
\mathbf{elif}\;c \leq 1.7 \cdot 10^{+83}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(b \cdot \left(c \cdot \left(c \cdot \left(-i\right)\right)\right)\right)\\
\end{array}
\end{array}
if c < -8.19999999999999951e112Initial program 85.8%
associate-*r*95.1%
*-commutative95.1%
flip-+39.2%
associate-*r/39.2%
pow239.2%
Applied egg-rr39.2%
associate-/l*39.2%
Simplified39.2%
associate--l+39.2%
associate-/l*39.2%
clear-num39.2%
unpow239.2%
flip-+95.1%
+-commutative95.1%
fma-def95.1%
Applied egg-rr95.1%
Taylor expanded in c around inf 81.2%
unpow281.2%
associate-*r*81.1%
*-commutative81.1%
neg-mul-181.1%
distribute-rgt-neg-in81.1%
*-commutative81.1%
associate-*l*83.3%
Simplified83.3%
if -8.19999999999999951e112 < c < -0.0058 or -8.0000000000000004e-115 < c < 1.6999999999999999e83Initial program 95.0%
Taylor expanded in c around 0 71.7%
if -0.0058 < c < -2.05e-22Initial program 99.2%
Taylor expanded in b around inf 83.2%
mul-1-neg83.2%
*-commutative83.2%
distribute-rgt-neg-in83.2%
unpow283.2%
associate-*r*83.5%
Simplified83.5%
Taylor expanded in c around 0 83.2%
*-commutative83.2%
unpow283.2%
associate-*r*83.5%
*-commutative83.5%
associate-*l*83.2%
*-commutative83.2%
associate-*l*83.2%
associate-*r*83.2%
*-commutative83.2%
associate-*l*83.8%
Simplified83.8%
if -2.05e-22 < c < -8.0000000000000004e-115Initial program 99.4%
Taylor expanded in x around 0 78.6%
Taylor expanded in a around inf 68.1%
*-commutative68.1%
Simplified68.1%
if 1.6999999999999999e83 < c Initial program 74.9%
Taylor expanded in b around inf 61.9%
mul-1-neg61.9%
*-commutative61.9%
distribute-rgt-neg-in61.9%
unpow261.9%
associate-*r*67.1%
Simplified67.1%
Final simplification72.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (+ (* x y) (* z t)))) (t_2 (* c (* (* c (* b i)) -2.0))))
(if (<= c -4e+113)
t_2
(if (<= c -0.175)
t_1
(if (<= c -1.25e-22)
t_2
(if (<= c -8.6e-115)
(* 2.0 (* (* a c) (- i)))
(if (<= c 6.2e+83) 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 * ((x * y) + (z * t));
double t_2 = c * ((c * (b * i)) * -2.0);
double tmp;
if (c <= -4e+113) {
tmp = t_2;
} else if (c <= -0.175) {
tmp = t_1;
} else if (c <= -1.25e-22) {
tmp = t_2;
} else if (c <= -8.6e-115) {
tmp = 2.0 * ((a * c) * -i);
} else if (c <= 6.2e+83) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 2.0d0 * ((x * y) + (z * t))
t_2 = c * ((c * (b * i)) * (-2.0d0))
if (c <= (-4d+113)) then
tmp = t_2
else if (c <= (-0.175d0)) then
tmp = t_1
else if (c <= (-1.25d-22)) then
tmp = t_2
else if (c <= (-8.6d-115)) then
tmp = 2.0d0 * ((a * c) * -i)
else if (c <= 6.2d+83) 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 * ((x * y) + (z * t));
double t_2 = c * ((c * (b * i)) * -2.0);
double tmp;
if (c <= -4e+113) {
tmp = t_2;
} else if (c <= -0.175) {
tmp = t_1;
} else if (c <= -1.25e-22) {
tmp = t_2;
} else if (c <= -8.6e-115) {
tmp = 2.0 * ((a * c) * -i);
} else if (c <= 6.2e+83) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * ((x * y) + (z * t)) t_2 = c * ((c * (b * i)) * -2.0) tmp = 0 if c <= -4e+113: tmp = t_2 elif c <= -0.175: tmp = t_1 elif c <= -1.25e-22: tmp = t_2 elif c <= -8.6e-115: tmp = 2.0 * ((a * c) * -i) elif c <= 6.2e+83: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(Float64(x * y) + Float64(z * t))) t_2 = Float64(c * Float64(Float64(c * Float64(b * i)) * -2.0)) tmp = 0.0 if (c <= -4e+113) tmp = t_2; elseif (c <= -0.175) tmp = t_1; elseif (c <= -1.25e-22) tmp = t_2; elseif (c <= -8.6e-115) tmp = Float64(2.0 * Float64(Float64(a * c) * Float64(-i))); elseif (c <= 6.2e+83) 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 * ((x * y) + (z * t)); t_2 = c * ((c * (b * i)) * -2.0); tmp = 0.0; if (c <= -4e+113) tmp = t_2; elseif (c <= -0.175) tmp = t_1; elseif (c <= -1.25e-22) tmp = t_2; elseif (c <= -8.6e-115) tmp = 2.0 * ((a * c) * -i); elseif (c <= 6.2e+83) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(c * N[(N[(c * N[(b * i), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -4e+113], t$95$2, If[LessEqual[c, -0.175], t$95$1, If[LessEqual[c, -1.25e-22], t$95$2, If[LessEqual[c, -8.6e-115], N[(2.0 * N[(N[(a * c), $MachinePrecision] * (-i)), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 6.2e+83], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(x \cdot y + z \cdot t\right)\\
t_2 := c \cdot \left(\left(c \cdot \left(b \cdot i\right)\right) \cdot -2\right)\\
\mathbf{if}\;c \leq -4 \cdot 10^{+113}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq -0.175:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq -1.25 \cdot 10^{-22}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq -8.6 \cdot 10^{-115}:\\
\;\;\;\;2 \cdot \left(\left(a \cdot c\right) \cdot \left(-i\right)\right)\\
\mathbf{elif}\;c \leq 6.2 \cdot 10^{+83}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if c < -4e113 or -0.17499999999999999 < c < -1.24999999999999988e-22 or 6.19999999999999984e83 < c Initial program 80.7%
Taylor expanded in b around inf 71.0%
mul-1-neg71.0%
*-commutative71.0%
distribute-rgt-neg-in71.0%
unpow271.0%
associate-*r*73.8%
Simplified73.8%
Taylor expanded in c around 0 71.0%
*-commutative71.0%
unpow271.0%
associate-*r*73.8%
*-commutative73.8%
associate-*l*73.7%
*-commutative73.7%
associate-*l*73.7%
associate-*r*71.9%
*-commutative71.9%
associate-*l*71.9%
Simplified71.9%
if -4e113 < c < -0.17499999999999999 or -8.6000000000000008e-115 < c < 6.19999999999999984e83Initial program 95.0%
Taylor expanded in c around 0 71.7%
if -1.24999999999999988e-22 < c < -8.6000000000000008e-115Initial program 99.4%
associate-*r*94.1%
*-commutative94.1%
flip-+54.6%
associate-*r/54.5%
pow254.5%
Applied egg-rr54.5%
associate-/l*54.5%
Simplified54.5%
associate--l+54.5%
associate-/l*53.0%
clear-num53.1%
unpow253.1%
flip-+92.3%
+-commutative92.3%
fma-def92.3%
Applied egg-rr92.3%
Taylor expanded in a around inf 50.6%
associate-*r*50.6%
*-commutative50.6%
*-commutative50.6%
associate-*r*55.8%
neg-mul-155.8%
Simplified55.8%
Final simplification70.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (+ (* x y) (* z t)))) (t_2 (* -2.0 (* c (* b (* c i))))))
(if (<= c -2.4e+112)
t_2
(if (<= c -0.0046)
t_1
(if (<= c -3.7e-23)
(* c (* (* c (* b i)) -2.0))
(if (<= c -8.6e-115)
(* 2.0 (* (* a c) (- i)))
(if (<= c 8.5e+82) 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 * ((x * y) + (z * t));
double t_2 = -2.0 * (c * (b * (c * i)));
double tmp;
if (c <= -2.4e+112) {
tmp = t_2;
} else if (c <= -0.0046) {
tmp = t_1;
} else if (c <= -3.7e-23) {
tmp = c * ((c * (b * i)) * -2.0);
} else if (c <= -8.6e-115) {
tmp = 2.0 * ((a * c) * -i);
} else if (c <= 8.5e+82) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 2.0d0 * ((x * y) + (z * t))
t_2 = (-2.0d0) * (c * (b * (c * i)))
if (c <= (-2.4d+112)) then
tmp = t_2
else if (c <= (-0.0046d0)) then
tmp = t_1
else if (c <= (-3.7d-23)) then
tmp = c * ((c * (b * i)) * (-2.0d0))
else if (c <= (-8.6d-115)) then
tmp = 2.0d0 * ((a * c) * -i)
else if (c <= 8.5d+82) 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 * ((x * y) + (z * t));
double t_2 = -2.0 * (c * (b * (c * i)));
double tmp;
if (c <= -2.4e+112) {
tmp = t_2;
} else if (c <= -0.0046) {
tmp = t_1;
} else if (c <= -3.7e-23) {
tmp = c * ((c * (b * i)) * -2.0);
} else if (c <= -8.6e-115) {
tmp = 2.0 * ((a * c) * -i);
} else if (c <= 8.5e+82) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * ((x * y) + (z * t)) t_2 = -2.0 * (c * (b * (c * i))) tmp = 0 if c <= -2.4e+112: tmp = t_2 elif c <= -0.0046: tmp = t_1 elif c <= -3.7e-23: tmp = c * ((c * (b * i)) * -2.0) elif c <= -8.6e-115: tmp = 2.0 * ((a * c) * -i) elif c <= 8.5e+82: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(Float64(x * y) + Float64(z * t))) t_2 = Float64(-2.0 * Float64(c * Float64(b * Float64(c * i)))) tmp = 0.0 if (c <= -2.4e+112) tmp = t_2; elseif (c <= -0.0046) tmp = t_1; elseif (c <= -3.7e-23) tmp = Float64(c * Float64(Float64(c * Float64(b * i)) * -2.0)); elseif (c <= -8.6e-115) tmp = Float64(2.0 * Float64(Float64(a * c) * Float64(-i))); elseif (c <= 8.5e+82) 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 * ((x * y) + (z * t)); t_2 = -2.0 * (c * (b * (c * i))); tmp = 0.0; if (c <= -2.4e+112) tmp = t_2; elseif (c <= -0.0046) tmp = t_1; elseif (c <= -3.7e-23) tmp = c * ((c * (b * i)) * -2.0); elseif (c <= -8.6e-115) tmp = 2.0 * ((a * c) * -i); elseif (c <= 8.5e+82) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-2.0 * N[(c * N[(b * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -2.4e+112], t$95$2, If[LessEqual[c, -0.0046], t$95$1, If[LessEqual[c, -3.7e-23], N[(c * N[(N[(c * N[(b * i), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -8.6e-115], N[(2.0 * N[(N[(a * c), $MachinePrecision] * (-i)), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 8.5e+82], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(x \cdot y + z \cdot t\right)\\
t_2 := -2 \cdot \left(c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\
\mathbf{if}\;c \leq -2.4 \cdot 10^{+112}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq -0.0046:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq -3.7 \cdot 10^{-23}:\\
\;\;\;\;c \cdot \left(\left(c \cdot \left(b \cdot i\right)\right) \cdot -2\right)\\
\mathbf{elif}\;c \leq -8.6 \cdot 10^{-115}:\\
\;\;\;\;2 \cdot \left(\left(a \cdot c\right) \cdot \left(-i\right)\right)\\
\mathbf{elif}\;c \leq 8.5 \cdot 10^{+82}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if c < -2.4e112 or 8.4999999999999995e82 < c Initial program 79.6%
Taylor expanded in b around inf 70.3%
mul-1-neg70.3%
*-commutative70.3%
distribute-rgt-neg-in70.3%
unpow270.3%
associate-*r*73.2%
Simplified73.2%
Taylor expanded in c around 0 70.3%
*-commutative70.3%
unpow270.3%
associate-*r*73.2%
*-commutative73.2%
associate-*l*73.1%
Simplified73.1%
if -2.4e112 < c < -0.0045999999999999999 or -8.6000000000000008e-115 < c < 8.4999999999999995e82Initial program 95.0%
Taylor expanded in c around 0 71.7%
if -0.0045999999999999999 < c < -3.7000000000000003e-23Initial program 99.2%
Taylor expanded in b around inf 83.2%
mul-1-neg83.2%
*-commutative83.2%
distribute-rgt-neg-in83.2%
unpow283.2%
associate-*r*83.5%
Simplified83.5%
Taylor expanded in c around 0 83.2%
*-commutative83.2%
unpow283.2%
associate-*r*83.5%
*-commutative83.5%
associate-*l*83.2%
*-commutative83.2%
associate-*l*83.2%
associate-*r*83.2%
*-commutative83.2%
associate-*l*83.8%
Simplified83.8%
if -3.7000000000000003e-23 < c < -8.6000000000000008e-115Initial program 99.4%
associate-*r*94.1%
*-commutative94.1%
flip-+54.6%
associate-*r/54.5%
pow254.5%
Applied egg-rr54.5%
associate-/l*54.5%
Simplified54.5%
associate--l+54.5%
associate-/l*53.0%
clear-num53.1%
unpow253.1%
flip-+92.3%
+-commutative92.3%
fma-def92.3%
Applied egg-rr92.3%
Taylor expanded in a around inf 50.6%
associate-*r*50.6%
*-commutative50.6%
*-commutative50.6%
associate-*r*55.8%
neg-mul-155.8%
Simplified55.8%
Final simplification71.4%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (+ (* x y) (* z t)))))
(if (<= c -4.5e+111)
(* (* (* b c) (* c i)) (- 2.0))
(if (<= c -0.0052)
t_1
(if (<= c -1.25e-22)
(* c (* (* c (* b i)) -2.0))
(if (<= c -8.6e-115)
(* 2.0 (* (* a c) (- i)))
(if (<= c 8e+82) t_1 (* -2.0 (* c (* b (* c i)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * ((x * y) + (z * t));
double tmp;
if (c <= -4.5e+111) {
tmp = ((b * c) * (c * i)) * -2.0;
} else if (c <= -0.0052) {
tmp = t_1;
} else if (c <= -1.25e-22) {
tmp = c * ((c * (b * i)) * -2.0);
} else if (c <= -8.6e-115) {
tmp = 2.0 * ((a * c) * -i);
} else if (c <= 8e+82) {
tmp = t_1;
} else {
tmp = -2.0 * (c * (b * (c * i)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = 2.0d0 * ((x * y) + (z * t))
if (c <= (-4.5d+111)) then
tmp = ((b * c) * (c * i)) * -2.0d0
else if (c <= (-0.0052d0)) then
tmp = t_1
else if (c <= (-1.25d-22)) then
tmp = c * ((c * (b * i)) * (-2.0d0))
else if (c <= (-8.6d-115)) then
tmp = 2.0d0 * ((a * c) * -i)
else if (c <= 8d+82) then
tmp = t_1
else
tmp = (-2.0d0) * (c * (b * (c * i)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * ((x * y) + (z * t));
double tmp;
if (c <= -4.5e+111) {
tmp = ((b * c) * (c * i)) * -2.0;
} else if (c <= -0.0052) {
tmp = t_1;
} else if (c <= -1.25e-22) {
tmp = c * ((c * (b * i)) * -2.0);
} else if (c <= -8.6e-115) {
tmp = 2.0 * ((a * c) * -i);
} else if (c <= 8e+82) {
tmp = t_1;
} else {
tmp = -2.0 * (c * (b * (c * i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * ((x * y) + (z * t)) tmp = 0 if c <= -4.5e+111: tmp = ((b * c) * (c * i)) * -2.0 elif c <= -0.0052: tmp = t_1 elif c <= -1.25e-22: tmp = c * ((c * (b * i)) * -2.0) elif c <= -8.6e-115: tmp = 2.0 * ((a * c) * -i) elif c <= 8e+82: tmp = t_1 else: tmp = -2.0 * (c * (b * (c * i))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(Float64(x * y) + Float64(z * t))) tmp = 0.0 if (c <= -4.5e+111) tmp = Float64(Float64(Float64(b * c) * Float64(c * i)) * Float64(-2.0)); elseif (c <= -0.0052) tmp = t_1; elseif (c <= -1.25e-22) tmp = Float64(c * Float64(Float64(c * Float64(b * i)) * -2.0)); elseif (c <= -8.6e-115) tmp = Float64(2.0 * Float64(Float64(a * c) * Float64(-i))); elseif (c <= 8e+82) tmp = t_1; else tmp = Float64(-2.0 * Float64(c * Float64(b * Float64(c * i)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 2.0 * ((x * y) + (z * t)); tmp = 0.0; if (c <= -4.5e+111) tmp = ((b * c) * (c * i)) * -2.0; elseif (c <= -0.0052) tmp = t_1; elseif (c <= -1.25e-22) tmp = c * ((c * (b * i)) * -2.0); elseif (c <= -8.6e-115) tmp = 2.0 * ((a * c) * -i); elseif (c <= 8e+82) tmp = t_1; else tmp = -2.0 * (c * (b * (c * i))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -4.5e+111], N[(N[(N[(b * c), $MachinePrecision] * N[(c * i), $MachinePrecision]), $MachinePrecision] * (-2.0)), $MachinePrecision], If[LessEqual[c, -0.0052], t$95$1, If[LessEqual[c, -1.25e-22], N[(c * N[(N[(c * N[(b * i), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -8.6e-115], N[(2.0 * N[(N[(a * c), $MachinePrecision] * (-i)), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 8e+82], t$95$1, N[(-2.0 * N[(c * N[(b * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(x \cdot y + z \cdot t\right)\\
\mathbf{if}\;c \leq -4.5 \cdot 10^{+111}:\\
\;\;\;\;\left(\left(b \cdot c\right) \cdot \left(c \cdot i\right)\right) \cdot \left(-2\right)\\
\mathbf{elif}\;c \leq -0.0052:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq -1.25 \cdot 10^{-22}:\\
\;\;\;\;c \cdot \left(\left(c \cdot \left(b \cdot i\right)\right) \cdot -2\right)\\
\mathbf{elif}\;c \leq -8.6 \cdot 10^{-115}:\\
\;\;\;\;2 \cdot \left(\left(a \cdot c\right) \cdot \left(-i\right)\right)\\
\mathbf{elif}\;c \leq 8 \cdot 10^{+82}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;-2 \cdot \left(c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\
\end{array}
\end{array}
if c < -4.50000000000000001e111Initial program 85.8%
associate-*r*95.1%
*-commutative95.1%
flip-+39.2%
associate-*r/39.2%
pow239.2%
Applied egg-rr39.2%
associate-/l*39.2%
Simplified39.2%
associate--l+39.2%
associate-/l*39.2%
clear-num39.2%
unpow239.2%
flip-+95.1%
+-commutative95.1%
fma-def95.1%
Applied egg-rr95.1%
Taylor expanded in c around inf 81.2%
unpow281.2%
associate-*r*81.1%
*-commutative81.1%
neg-mul-181.1%
distribute-rgt-neg-in81.1%
*-commutative81.1%
associate-*l*83.3%
Simplified83.3%
if -4.50000000000000001e111 < c < -0.0051999999999999998 or -8.6000000000000008e-115 < c < 7.9999999999999997e82Initial program 95.0%
Taylor expanded in c around 0 71.7%
if -0.0051999999999999998 < c < -1.24999999999999988e-22Initial program 99.2%
Taylor expanded in b around inf 83.2%
mul-1-neg83.2%
*-commutative83.2%
distribute-rgt-neg-in83.2%
unpow283.2%
associate-*r*83.5%
Simplified83.5%
Taylor expanded in c around 0 83.2%
*-commutative83.2%
unpow283.2%
associate-*r*83.5%
*-commutative83.5%
associate-*l*83.2%
*-commutative83.2%
associate-*l*83.2%
associate-*r*83.2%
*-commutative83.2%
associate-*l*83.8%
Simplified83.8%
if -1.24999999999999988e-22 < c < -8.6000000000000008e-115Initial program 99.4%
associate-*r*94.1%
*-commutative94.1%
flip-+54.6%
associate-*r/54.5%
pow254.5%
Applied egg-rr54.5%
associate-/l*54.5%
Simplified54.5%
associate--l+54.5%
associate-/l*53.0%
clear-num53.1%
unpow253.1%
flip-+92.3%
+-commutative92.3%
fma-def92.3%
Applied egg-rr92.3%
Taylor expanded in a around inf 50.6%
associate-*r*50.6%
*-commutative50.6%
*-commutative50.6%
associate-*r*55.8%
neg-mul-155.8%
Simplified55.8%
if 7.9999999999999997e82 < c Initial program 74.9%
Taylor expanded in b around inf 61.9%
mul-1-neg61.9%
*-commutative61.9%
distribute-rgt-neg-in61.9%
unpow261.9%
associate-*r*67.1%
Simplified67.1%
Taylor expanded in c around 0 61.9%
*-commutative61.9%
unpow261.9%
associate-*r*67.1%
*-commutative67.1%
associate-*l*65.4%
Simplified65.4%
Final simplification71.4%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= c -8.6e-115) (not (<= c 1.2e+32))) (* (* c (* (+ a (* b c)) i)) (- 2.0)) (* 2.0 (+ (* x y) (* z t)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c <= -8.6e-115) || !(c <= 1.2e+32)) {
tmp = (c * ((a + (b * c)) * i)) * -2.0;
} else {
tmp = 2.0 * ((x * y) + (z * t));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((c <= (-8.6d-115)) .or. (.not. (c <= 1.2d+32))) then
tmp = (c * ((a + (b * c)) * i)) * -2.0d0
else
tmp = 2.0d0 * ((x * y) + (z * t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c <= -8.6e-115) || !(c <= 1.2e+32)) {
tmp = (c * ((a + (b * c)) * i)) * -2.0;
} else {
tmp = 2.0 * ((x * y) + (z * t));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c <= -8.6e-115) or not (c <= 1.2e+32): tmp = (c * ((a + (b * c)) * i)) * -2.0 else: tmp = 2.0 * ((x * y) + (z * t)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((c <= -8.6e-115) || !(c <= 1.2e+32)) tmp = Float64(Float64(c * Float64(Float64(a + Float64(b * c)) * i)) * Float64(-2.0)); else tmp = Float64(2.0 * Float64(Float64(x * y) + Float64(z * t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((c <= -8.6e-115) || ~((c <= 1.2e+32))) tmp = (c * ((a + (b * c)) * i)) * -2.0; else tmp = 2.0 * ((x * y) + (z * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[c, -8.6e-115], N[Not[LessEqual[c, 1.2e+32]], $MachinePrecision]], N[(N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] * (-2.0)), $MachinePrecision], N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -8.6 \cdot 10^{-115} \lor \neg \left(c \leq 1.2 \cdot 10^{+32}\right):\\
\;\;\;\;\left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right) \cdot \left(-2\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\
\end{array}
\end{array}
if c < -8.6000000000000008e-115 or 1.19999999999999996e32 < c Initial program 83.9%
Taylor expanded in i around inf 76.9%
if -8.6000000000000008e-115 < c < 1.19999999999999996e32Initial program 98.9%
Taylor expanded in c around 0 79.7%
Final simplification78.0%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (* x y) -3.8e-92) (not (<= (* x y) 3.2e-40))) (* (* 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) <= -3.8e-92) || !((x * y) <= 3.2e-40)) {
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) <= (-3.8d-92)) .or. (.not. ((x * y) <= 3.2d-40))) 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) <= -3.8e-92) || !((x * y) <= 3.2e-40)) {
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) <= -3.8e-92) or not ((x * y) <= 3.2e-40): 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) <= -3.8e-92) || !(Float64(x * y) <= 3.2e-40)) 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) <= -3.8e-92) || ~(((x * y) <= 3.2e-40))) 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], -3.8e-92], N[Not[LessEqual[N[(x * y), $MachinePrecision], 3.2e-40]], $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 -3.8 \cdot 10^{-92} \lor \neg \left(x \cdot y \leq 3.2 \cdot 10^{-40}\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) < -3.8000000000000001e-92 or 3.20000000000000002e-40 < (*.f64 x y) Initial program 88.6%
Taylor expanded in x around inf 44.6%
if -3.8000000000000001e-92 < (*.f64 x y) < 3.20000000000000002e-40Initial program 91.1%
Taylor expanded in z around inf 41.1%
Final simplification43.1%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= i -2.1e+189) (not (<= i 8.8e+106))) (* (* a (* c i)) (- 2.0)) (* 2.0 (+ (* x y) (* z t)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((i <= -2.1e+189) || !(i <= 8.8e+106)) {
tmp = (a * (c * i)) * -2.0;
} else {
tmp = 2.0 * ((x * y) + (z * t));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((i <= (-2.1d+189)) .or. (.not. (i <= 8.8d+106))) then
tmp = (a * (c * i)) * -2.0d0
else
tmp = 2.0d0 * ((x * y) + (z * t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((i <= -2.1e+189) || !(i <= 8.8e+106)) {
tmp = (a * (c * i)) * -2.0;
} else {
tmp = 2.0 * ((x * y) + (z * t));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (i <= -2.1e+189) or not (i <= 8.8e+106): tmp = (a * (c * i)) * -2.0 else: tmp = 2.0 * ((x * y) + (z * t)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((i <= -2.1e+189) || !(i <= 8.8e+106)) tmp = Float64(Float64(a * Float64(c * i)) * Float64(-2.0)); else tmp = Float64(2.0 * Float64(Float64(x * y) + Float64(z * t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((i <= -2.1e+189) || ~((i <= 8.8e+106))) tmp = (a * (c * i)) * -2.0; else tmp = 2.0 * ((x * y) + (z * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[i, -2.1e+189], N[Not[LessEqual[i, 8.8e+106]], $MachinePrecision]], N[(N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision] * (-2.0)), $MachinePrecision], N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;i \leq -2.1 \cdot 10^{+189} \lor \neg \left(i \leq 8.8 \cdot 10^{+106}\right):\\
\;\;\;\;\left(a \cdot \left(c \cdot i\right)\right) \cdot \left(-2\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\
\end{array}
\end{array}
if i < -2.09999999999999992e189 or 8.79999999999999966e106 < i Initial program 95.0%
associate-*l*92.0%
fma-def92.0%
Simplified92.0%
fma-def92.0%
+-commutative92.0%
Applied egg-rr92.0%
Taylor expanded in a around inf 50.0%
mul-1-neg50.0%
distribute-rgt-neg-in50.0%
distribute-rgt-neg-in50.0%
Simplified50.0%
if -2.09999999999999992e189 < i < 8.79999999999999966e106Initial program 88.0%
Taylor expanded in c around 0 60.4%
Final simplification57.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 89.7%
Taylor expanded in z around inf 26.4%
Final simplification26.4%
(FPCore (x y z t a b c i) :precision binary64 (* 2.0 (- (+ (* x y) (* z t)) (* (+ a (* b c)) (* c i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - ((a + (b * c)) * (c * i)));
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = 2.0d0 * (((x * y) + (z * t)) - ((a + (b * c)) * (c * i)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - ((a + (b * c)) * (c * i)));
}
def code(x, y, z, t, a, b, c, i): return 2.0 * (((x * y) + (z * t)) - ((a + (b * c)) * (c * i)))
function code(x, y, z, t, a, b, c, i) return Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(Float64(a + Float64(b * c)) * Float64(c * i)))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = 2.0 * (((x * y) + (z * t)) - ((a + (b * c)) * (c * i))); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(a + b \cdot c\right) \cdot \left(c \cdot i\right)\right)
\end{array}
herbie shell --seed 2023287
(FPCore (x y z t a b c i)
:name "Diagrams.ThreeD.Shapes:frustum from diagrams-lib-1.3.0.3, A"
:precision binary64
:herbie-target
(* 2.0 (- (+ (* x y) (* z t)) (* (+ a (* b c)) (* c i))))
(* 2.0 (- (+ (* x y) (* z t)) (* (* (+ a (* b c)) c) i))))