
(FPCore (x y z t a b c i) :precision binary64 (* 2.0 (- (+ (* x y) (* z t)) (* (* (+ a (* b c)) c) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i));
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = 2.0d0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i));
}
def code(x, y, z, t, a, b, c, i): return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i))
function code(x, y, z, t, a, b, c, i) return Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(Float64(Float64(a + Float64(b * c)) * c) * i))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i)); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i) :precision binary64 (* 2.0 (- (+ (* x y) (* z t)) (* (* (+ a (* b c)) c) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i));
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = 2.0d0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i));
}
def code(x, y, z, t, a, b, c, i): return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i))
function code(x, y, z, t, a, b, c, i) return Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(Float64(Float64(a + Float64(b * c)) * c) * i))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i)); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right)
\end{array}
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (* b c))) (t_2 (+ (* z t) (* x y))))
(if (<= (- t_2 (* i (* c t_1))) INFINITY)
(* 2.0 (- t_2 (* t_1 (* c i))))
(* 2.0 (fma t z (* i (* a (- c))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double t_2 = (z * t) + (x * y);
double tmp;
if ((t_2 - (i * (c * t_1))) <= ((double) INFINITY)) {
tmp = 2.0 * (t_2 - (t_1 * (c * i)));
} else {
tmp = 2.0 * fma(t, z, (i * (a * -c)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(b * c)) t_2 = Float64(Float64(z * t) + Float64(x * y)) tmp = 0.0 if (Float64(t_2 - Float64(i * Float64(c * t_1))) <= Inf) tmp = Float64(2.0 * Float64(t_2 - Float64(t_1 * Float64(c * i)))); else tmp = Float64(2.0 * fma(t, z, Float64(i * Float64(a * Float64(-c))))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$2 - N[(i * N[(c * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(2.0 * N[(t$95$2 - N[(t$95$1 * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(t * z + N[(i * N[(a * (-c)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + b \cdot c\\
t_2 := z \cdot t + x \cdot y\\
\mathbf{if}\;t_2 - i \cdot \left(c \cdot t_1\right) \leq \infty:\\
\;\;\;\;2 \cdot \left(t_2 - t_1 \cdot \left(c \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \mathsf{fma}\left(t, z, i \cdot \left(a \cdot \left(-c\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 97.2%
fma-def97.2%
associate-*l*99.1%
Simplified99.1%
fma-def99.1%
+-commutative99.1%
Applied egg-rr99.1%
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 a around inf 11.1%
*-commutative11.1%
Simplified11.1%
add-cbrt-cube0.0%
pow30.0%
*-commutative0.0%
associate-*l*0.0%
Applied egg-rr0.0%
rem-cbrt-cube11.1%
associate--l+11.1%
+-commutative11.1%
fma-neg22.2%
*-commutative22.2%
distribute-rgt-neg-in22.2%
Applied egg-rr22.2%
Taylor expanded in x around 0 44.4%
mul-1-neg44.4%
+-commutative44.4%
sub-neg44.4%
fma-neg55.6%
*-commutative55.6%
associate-*r*55.6%
*-commutative55.6%
associate-*l*55.6%
distribute-lft-neg-in55.6%
*-commutative55.6%
*-commutative55.6%
Simplified55.6%
Final simplification97.6%
(FPCore (x y z t a b c i) :precision binary64 (* 2.0 (- (fma x y (* z t)) (* (+ a (* b c)) (* c i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (fma(x, y, (z * t)) - ((a + (b * c)) * (c * i)));
}
function code(x, y, z, t, a, b, c, i) return Float64(2.0 * Float64(fma(x, y, Float64(z * t)) - Float64(Float64(a + Float64(b * c)) * Float64(c * i)))) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(2.0 * N[(N[(x * y + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(\mathsf{fma}\left(x, y, z \cdot t\right) - \left(a + b \cdot c\right) \cdot \left(c \cdot i\right)\right)
\end{array}
Initial program 93.7%
fma-def94.5%
associate-*l*96.4%
Simplified96.4%
Final simplification96.4%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (* b c))) (t_2 (+ (* z t) (* x y))))
(if (<= (- t_2 (* i (* c t_1))) INFINITY)
(* 2.0 (- t_2 (* t_1 (* c i))))
(* 2.0 (* z t)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double t_2 = (z * t) + (x * y);
double tmp;
if ((t_2 - (i * (c * t_1))) <= ((double) INFINITY)) {
tmp = 2.0 * (t_2 - (t_1 * (c * i)));
} else {
tmp = 2.0 * (z * t);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double t_2 = (z * t) + (x * y);
double tmp;
if ((t_2 - (i * (c * t_1))) <= Double.POSITIVE_INFINITY) {
tmp = 2.0 * (t_2 - (t_1 * (c * i)));
} else {
tmp = 2.0 * (z * t);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a + (b * c) t_2 = (z * t) + (x * y) tmp = 0 if (t_2 - (i * (c * t_1))) <= math.inf: tmp = 2.0 * (t_2 - (t_1 * (c * i))) else: tmp = 2.0 * (z * t) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(b * c)) t_2 = Float64(Float64(z * t) + Float64(x * y)) tmp = 0.0 if (Float64(t_2 - Float64(i * Float64(c * t_1))) <= Inf) tmp = Float64(2.0 * Float64(t_2 - Float64(t_1 * Float64(c * i)))); else tmp = Float64(2.0 * Float64(z * t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = a + (b * c); t_2 = (z * t) + (x * y); tmp = 0.0; if ((t_2 - (i * (c * t_1))) <= Inf) tmp = 2.0 * (t_2 - (t_1 * (c * i))); else tmp = 2.0 * (z * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$2 - N[(i * N[(c * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(2.0 * N[(t$95$2 - N[(t$95$1 * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + b \cdot c\\
t_2 := z \cdot t + x \cdot y\\
\mathbf{if}\;t_2 - i \cdot \left(c \cdot t_1\right) \leq \infty:\\
\;\;\;\;2 \cdot \left(t_2 - t_1 \cdot \left(c \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(z \cdot t\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 97.2%
fma-def97.2%
associate-*l*99.1%
Simplified99.1%
fma-def99.1%
+-commutative99.1%
Applied egg-rr99.1%
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 45.2%
Final simplification97.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* c (* (+ a (* b c)) i))))
(if (<= (* z t) -5e+117)
(* 2.0 (- (* z t) t_1))
(if (or (<= (* z t) -5e-56) (not (<= (* z t) 5e-6)))
(* 2.0 (- (+ (* z t) (* x y)) (* i (* c (* b c)))))
(* 2.0 (- (* x y) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = c * ((a + (b * c)) * i);
double tmp;
if ((z * t) <= -5e+117) {
tmp = 2.0 * ((z * t) - t_1);
} else if (((z * t) <= -5e-56) || !((z * t) <= 5e-6)) {
tmp = 2.0 * (((z * t) + (x * y)) - (i * (c * (b * c))));
} else {
tmp = 2.0 * ((x * y) - t_1);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = c * ((a + (b * c)) * i)
if ((z * t) <= (-5d+117)) then
tmp = 2.0d0 * ((z * t) - t_1)
else if (((z * t) <= (-5d-56)) .or. (.not. ((z * t) <= 5d-6))) then
tmp = 2.0d0 * (((z * t) + (x * y)) - (i * (c * (b * c))))
else
tmp = 2.0d0 * ((x * y) - t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = c * ((a + (b * c)) * i);
double tmp;
if ((z * t) <= -5e+117) {
tmp = 2.0 * ((z * t) - t_1);
} else if (((z * t) <= -5e-56) || !((z * t) <= 5e-6)) {
tmp = 2.0 * (((z * t) + (x * y)) - (i * (c * (b * c))));
} else {
tmp = 2.0 * ((x * y) - t_1);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = c * ((a + (b * c)) * i) tmp = 0 if (z * t) <= -5e+117: tmp = 2.0 * ((z * t) - t_1) elif ((z * t) <= -5e-56) or not ((z * t) <= 5e-6): tmp = 2.0 * (((z * t) + (x * y)) - (i * (c * (b * c)))) else: tmp = 2.0 * ((x * y) - t_1) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(c * Float64(Float64(a + Float64(b * c)) * i)) tmp = 0.0 if (Float64(z * t) <= -5e+117) tmp = Float64(2.0 * Float64(Float64(z * t) - t_1)); elseif ((Float64(z * t) <= -5e-56) || !(Float64(z * t) <= 5e-6)) tmp = Float64(2.0 * Float64(Float64(Float64(z * t) + Float64(x * y)) - Float64(i * Float64(c * Float64(b * c))))); else tmp = Float64(2.0 * Float64(Float64(x * y) - t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = c * ((a + (b * c)) * i); tmp = 0.0; if ((z * t) <= -5e+117) tmp = 2.0 * ((z * t) - t_1); elseif (((z * t) <= -5e-56) || ~(((z * t) <= 5e-6))) tmp = 2.0 * (((z * t) + (x * y)) - (i * (c * (b * c)))); else tmp = 2.0 * ((x * y) - t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(z * t), $MachinePrecision], -5e+117], N[(2.0 * N[(N[(z * t), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[N[(z * t), $MachinePrecision], -5e-56], N[Not[LessEqual[N[(z * t), $MachinePrecision], 5e-6]], $MachinePrecision]], N[(2.0 * N[(N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] - N[(i * N[(c * N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(x * y), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\\
\mathbf{if}\;z \cdot t \leq -5 \cdot 10^{+117}:\\
\;\;\;\;2 \cdot \left(z \cdot t - t_1\right)\\
\mathbf{elif}\;z \cdot t \leq -5 \cdot 10^{-56} \lor \neg \left(z \cdot t \leq 5 \cdot 10^{-6}\right):\\
\;\;\;\;2 \cdot \left(\left(z \cdot t + x \cdot y\right) - i \cdot \left(c \cdot \left(b \cdot c\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y - t_1\right)\\
\end{array}
\end{array}
if (*.f64 z t) < -4.99999999999999983e117Initial program 90.4%
Taylor expanded in x around 0 90.6%
if -4.99999999999999983e117 < (*.f64 z t) < -4.99999999999999997e-56 or 5.00000000000000041e-6 < (*.f64 z t) Initial program 94.8%
Taylor expanded in a around 0 93.1%
if -4.99999999999999997e-56 < (*.f64 z t) < 5.00000000000000041e-6Initial program 94.1%
Taylor expanded in z around 0 92.8%
Final simplification92.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (* b c))) (t_2 (* c t_1)))
(if (<= t_2 2e+269)
(* 2.0 (- (+ (* z t) (* x y)) (* i t_2)))
(* 2.0 (- (* x y) (* 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;
double tmp;
if (t_2 <= 2e+269) {
tmp = 2.0 * (((z * t) + (x * y)) - (i * t_2));
} else {
tmp = 2.0 * ((x * y) - (c * (t_1 * i)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = a + (b * c)
t_2 = c * t_1
if (t_2 <= 2d+269) then
tmp = 2.0d0 * (((z * t) + (x * y)) - (i * t_2))
else
tmp = 2.0d0 * ((x * y) - (c * (t_1 * 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 = a + (b * c);
double t_2 = c * t_1;
double tmp;
if (t_2 <= 2e+269) {
tmp = 2.0 * (((z * t) + (x * y)) - (i * t_2));
} else {
tmp = 2.0 * ((x * y) - (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 tmp = 0 if t_2 <= 2e+269: tmp = 2.0 * (((z * t) + (x * y)) - (i * t_2)) else: tmp = 2.0 * ((x * y) - (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(c * t_1) tmp = 0.0 if (t_2 <= 2e+269) tmp = Float64(2.0 * Float64(Float64(Float64(z * t) + Float64(x * y)) - Float64(i * t_2))); else tmp = Float64(2.0 * Float64(Float64(x * y) - 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; tmp = 0.0; if (t_2 <= 2e+269) tmp = 2.0 * (((z * t) + (x * y)) - (i * t_2)); else tmp = 2.0 * ((x * y) - (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[(c * t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, 2e+269], N[(2.0 * N[(N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] - N[(i * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(x * y), $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 := c \cdot t_1\\
\mathbf{if}\;t_2 \leq 2 \cdot 10^{+269}:\\
\;\;\;\;2 \cdot \left(\left(z \cdot t + x \cdot y\right) - i \cdot t_2\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(t_1 \cdot i\right)\right)\\
\end{array}
\end{array}
if (*.f64 (+.f64 a (*.f64 b c)) c) < 2.0000000000000001e269Initial program 95.2%
if 2.0000000000000001e269 < (*.f64 (+.f64 a (*.f64 b c)) c) Initial program 85.7%
Taylor expanded in z around 0 97.5%
Final simplification95.6%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= c -1.05e-9)
(* 2.0 (* c (* i (- (- a) (* b c)))))
(if (<= c 3.8e+20)
(* 2.0 (+ (* z t) (* x y)))
(if (<= c 8.2e+101)
(* 2.0 (- (* z t) (* a (* c i))))
(if (<= c 3.8e+124)
(* 2.0 (+ (* x y) (+ (* z t) (* c (* a i)))))
(* 2.0 (* c (- (* a (- i)) (* (* b c) i)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (c <= -1.05e-9) {
tmp = 2.0 * (c * (i * (-a - (b * c))));
} else if (c <= 3.8e+20) {
tmp = 2.0 * ((z * t) + (x * y));
} else if (c <= 8.2e+101) {
tmp = 2.0 * ((z * t) - (a * (c * i)));
} else if (c <= 3.8e+124) {
tmp = 2.0 * ((x * y) + ((z * t) + (c * (a * i))));
} else {
tmp = 2.0 * (c * ((a * -i) - ((b * c) * i)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (c <= (-1.05d-9)) then
tmp = 2.0d0 * (c * (i * (-a - (b * c))))
else if (c <= 3.8d+20) then
tmp = 2.0d0 * ((z * t) + (x * y))
else if (c <= 8.2d+101) then
tmp = 2.0d0 * ((z * t) - (a * (c * i)))
else if (c <= 3.8d+124) then
tmp = 2.0d0 * ((x * y) + ((z * t) + (c * (a * i))))
else
tmp = 2.0d0 * (c * ((a * -i) - ((b * c) * i)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (c <= -1.05e-9) {
tmp = 2.0 * (c * (i * (-a - (b * c))));
} else if (c <= 3.8e+20) {
tmp = 2.0 * ((z * t) + (x * y));
} else if (c <= 8.2e+101) {
tmp = 2.0 * ((z * t) - (a * (c * i)));
} else if (c <= 3.8e+124) {
tmp = 2.0 * ((x * y) + ((z * t) + (c * (a * i))));
} else {
tmp = 2.0 * (c * ((a * -i) - ((b * c) * i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if c <= -1.05e-9: tmp = 2.0 * (c * (i * (-a - (b * c)))) elif c <= 3.8e+20: tmp = 2.0 * ((z * t) + (x * y)) elif c <= 8.2e+101: tmp = 2.0 * ((z * t) - (a * (c * i))) elif c <= 3.8e+124: tmp = 2.0 * ((x * y) + ((z * t) + (c * (a * i)))) else: tmp = 2.0 * (c * ((a * -i) - ((b * c) * i))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (c <= -1.05e-9) tmp = Float64(2.0 * Float64(c * Float64(i * Float64(Float64(-a) - Float64(b * c))))); elseif (c <= 3.8e+20) tmp = Float64(2.0 * Float64(Float64(z * t) + Float64(x * y))); elseif (c <= 8.2e+101) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(a * Float64(c * i)))); elseif (c <= 3.8e+124) tmp = Float64(2.0 * Float64(Float64(x * y) + Float64(Float64(z * t) + Float64(c * Float64(a * i))))); else tmp = Float64(2.0 * Float64(c * Float64(Float64(a * Float64(-i)) - Float64(Float64(b * c) * i)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (c <= -1.05e-9) tmp = 2.0 * (c * (i * (-a - (b * c)))); elseif (c <= 3.8e+20) tmp = 2.0 * ((z * t) + (x * y)); elseif (c <= 8.2e+101) tmp = 2.0 * ((z * t) - (a * (c * i))); elseif (c <= 3.8e+124) tmp = 2.0 * ((x * y) + ((z * t) + (c * (a * i)))); else tmp = 2.0 * (c * ((a * -i) - ((b * c) * i))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[c, -1.05e-9], N[(2.0 * N[(c * N[(i * N[((-a) - N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 3.8e+20], N[(2.0 * N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 8.2e+101], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 3.8e+124], N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] + N[(c * N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(c * N[(N[(a * (-i)), $MachinePrecision] - N[(N[(b * c), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -1.05 \cdot 10^{-9}:\\
\;\;\;\;2 \cdot \left(c \cdot \left(i \cdot \left(\left(-a\right) - b \cdot c\right)\right)\right)\\
\mathbf{elif}\;c \leq 3.8 \cdot 10^{+20}:\\
\;\;\;\;2 \cdot \left(z \cdot t + x \cdot y\right)\\
\mathbf{elif}\;c \leq 8.2 \cdot 10^{+101}:\\
\;\;\;\;2 \cdot \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\\
\mathbf{elif}\;c \leq 3.8 \cdot 10^{+124}:\\
\;\;\;\;2 \cdot \left(x \cdot y + \left(z \cdot t + c \cdot \left(a \cdot i\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(c \cdot \left(a \cdot \left(-i\right) - \left(b \cdot c\right) \cdot i\right)\right)\\
\end{array}
\end{array}
if c < -1.0500000000000001e-9Initial program 93.2%
Taylor expanded in i around inf 84.2%
if -1.0500000000000001e-9 < c < 3.8e20Initial program 95.5%
Taylor expanded in c around 0 78.2%
if 3.8e20 < c < 8.1999999999999999e101Initial program 93.4%
Taylor expanded in a around inf 79.2%
*-commutative79.2%
Simplified79.2%
Taylor expanded in x around 0 77.9%
if 8.1999999999999999e101 < c < 3.7999999999999998e124Initial program 100.0%
Taylor expanded in a around inf 66.7%
*-commutative66.7%
Simplified66.7%
add-cbrt-cube50.1%
pow350.1%
*-commutative50.1%
associate-*l*50.1%
Applied egg-rr50.1%
rem-cbrt-cube66.7%
associate--l+66.7%
+-commutative66.7%
fma-neg66.7%
*-commutative66.7%
distribute-rgt-neg-in66.7%
Applied egg-rr66.7%
fma-udef66.7%
associate-*l*66.7%
add-sqr-sqrt50.1%
sqrt-unprod68.8%
sqr-neg68.8%
sqrt-unprod18.7%
add-sqr-sqrt69.3%
Applied egg-rr69.3%
if 3.7999999999999998e124 < c Initial program 87.4%
Taylor expanded in i around inf 82.8%
distribute-rgt-in82.8%
*-commutative82.8%
*-commutative82.8%
Applied egg-rr82.8%
Final simplification80.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* z t) (* x y))))
(if (<= c -8.5e-9)
(* 2.0 (- (* x y) (* c (* (+ a (* b c)) i))))
(if (or (<= c -5.2e-159) (not (<= c 7.2e+95)))
(* 2.0 (- t_1 (* (* b c) (* c i))))
(* 2.0 (- t_1 (* i (* a c))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (z * t) + (x * y);
double tmp;
if (c <= -8.5e-9) {
tmp = 2.0 * ((x * y) - (c * ((a + (b * c)) * i)));
} else if ((c <= -5.2e-159) || !(c <= 7.2e+95)) {
tmp = 2.0 * (t_1 - ((b * c) * (c * i)));
} else {
tmp = 2.0 * (t_1 - (i * (a * c)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = (z * t) + (x * y)
if (c <= (-8.5d-9)) then
tmp = 2.0d0 * ((x * y) - (c * ((a + (b * c)) * i)))
else if ((c <= (-5.2d-159)) .or. (.not. (c <= 7.2d+95))) then
tmp = 2.0d0 * (t_1 - ((b * c) * (c * i)))
else
tmp = 2.0d0 * (t_1 - (i * (a * c)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (z * t) + (x * y);
double tmp;
if (c <= -8.5e-9) {
tmp = 2.0 * ((x * y) - (c * ((a + (b * c)) * i)));
} else if ((c <= -5.2e-159) || !(c <= 7.2e+95)) {
tmp = 2.0 * (t_1 - ((b * c) * (c * i)));
} else {
tmp = 2.0 * (t_1 - (i * (a * c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (z * t) + (x * y) tmp = 0 if c <= -8.5e-9: tmp = 2.0 * ((x * y) - (c * ((a + (b * c)) * i))) elif (c <= -5.2e-159) or not (c <= 7.2e+95): tmp = 2.0 * (t_1 - ((b * c) * (c * i))) else: tmp = 2.0 * (t_1 - (i * (a * c))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(z * t) + Float64(x * y)) tmp = 0.0 if (c <= -8.5e-9) tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(c * Float64(Float64(a + Float64(b * c)) * i)))); elseif ((c <= -5.2e-159) || !(c <= 7.2e+95)) tmp = Float64(2.0 * Float64(t_1 - Float64(Float64(b * c) * Float64(c * i)))); else tmp = Float64(2.0 * Float64(t_1 - Float64(i * Float64(a * c)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (z * t) + (x * y); tmp = 0.0; if (c <= -8.5e-9) tmp = 2.0 * ((x * y) - (c * ((a + (b * c)) * i))); elseif ((c <= -5.2e-159) || ~((c <= 7.2e+95))) tmp = 2.0 * (t_1 - ((b * c) * (c * i))); else tmp = 2.0 * (t_1 - (i * (a * c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -8.5e-9], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[c, -5.2e-159], N[Not[LessEqual[c, 7.2e+95]], $MachinePrecision]], N[(2.0 * N[(t$95$1 - N[(N[(b * c), $MachinePrecision] * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(t$95$1 - N[(i * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot t + x \cdot y\\
\mathbf{if}\;c \leq -8.5 \cdot 10^{-9}:\\
\;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\
\mathbf{elif}\;c \leq -5.2 \cdot 10^{-159} \lor \neg \left(c \leq 7.2 \cdot 10^{+95}\right):\\
\;\;\;\;2 \cdot \left(t_1 - \left(b \cdot c\right) \cdot \left(c \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(t_1 - i \cdot \left(a \cdot c\right)\right)\\
\end{array}
\end{array}
if c < -8.5e-9Initial program 93.1%
Taylor expanded in z around 0 94.6%
if -8.5e-9 < c < -5.1999999999999997e-159 or 7.19999999999999955e95 < c Initial program 89.6%
fma-def90.7%
associate-*l*93.1%
Simplified93.1%
fma-def91.9%
+-commutative91.9%
Applied egg-rr91.9%
Taylor expanded in a around 0 87.4%
if -5.1999999999999997e-159 < c < 7.19999999999999955e95Initial program 97.3%
Taylor expanded in a around inf 96.1%
*-commutative96.1%
Simplified96.1%
Final simplification92.8%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= (* x y) -7.2e+254)
(* 2.0 (+ (* z t) (* x y)))
(if (<= (* x y) 3.9e+63)
(* 2.0 (- (* z t) (* c (* (+ a (* b c)) i))))
(* 2.0 (- (* x y) (* a (* 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) <= -7.2e+254) {
tmp = 2.0 * ((z * t) + (x * y));
} else if ((x * y) <= 3.9e+63) {
tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i)));
} else {
tmp = 2.0 * ((x * y) - (a * (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) <= (-7.2d+254)) then
tmp = 2.0d0 * ((z * t) + (x * y))
else if ((x * y) <= 3.9d+63) then
tmp = 2.0d0 * ((z * t) - (c * ((a + (b * c)) * i)))
else
tmp = 2.0d0 * ((x * y) - (a * (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) <= -7.2e+254) {
tmp = 2.0 * ((z * t) + (x * y));
} else if ((x * y) <= 3.9e+63) {
tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i)));
} else {
tmp = 2.0 * ((x * y) - (a * (c * i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x * y) <= -7.2e+254: tmp = 2.0 * ((z * t) + (x * y)) elif (x * y) <= 3.9e+63: tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i))) else: tmp = 2.0 * ((x * y) - (a * (c * i))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(x * y) <= -7.2e+254) tmp = Float64(2.0 * Float64(Float64(z * t) + Float64(x * y))); elseif (Float64(x * y) <= 3.9e+63) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(Float64(a + Float64(b * c)) * i)))); else tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(a * Float64(c * i)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x * y) <= -7.2e+254) tmp = 2.0 * ((z * t) + (x * y)); elseif ((x * y) <= 3.9e+63) tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i))); else tmp = 2.0 * ((x * y) - (a * (c * i))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(x * y), $MachinePrecision], -7.2e+254], N[(2.0 * N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 3.9e+63], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -7.2 \cdot 10^{+254}:\\
\;\;\;\;2 \cdot \left(z \cdot t + x \cdot y\right)\\
\mathbf{elif}\;x \cdot y \leq 3.9 \cdot 10^{+63}:\\
\;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y - a \cdot \left(c \cdot i\right)\right)\\
\end{array}
\end{array}
if (*.f64 x y) < -7.19999999999999954e254Initial program 82.4%
Taylor expanded in c around 0 94.1%
if -7.19999999999999954e254 < (*.f64 x y) < 3.9e63Initial program 95.6%
Taylor expanded in x around 0 85.2%
if 3.9e63 < (*.f64 x y) Initial program 90.8%
Taylor expanded in a around inf 83.0%
*-commutative83.0%
Simplified83.0%
Taylor expanded in z around 0 79.7%
Final simplification84.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* c (* (+ a (* b c)) i))))
(if (<= (* z t) -1e-5)
(* 2.0 (- (* z t) t_1))
(if (<= (* z t) 5e+90)
(* 2.0 (- (* x y) t_1))
(* 2.0 (+ (* z t) (* x y)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = c * ((a + (b * c)) * i);
double tmp;
if ((z * t) <= -1e-5) {
tmp = 2.0 * ((z * t) - t_1);
} else if ((z * t) <= 5e+90) {
tmp = 2.0 * ((x * y) - t_1);
} else {
tmp = 2.0 * ((z * t) + (x * y));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = c * ((a + (b * c)) * i)
if ((z * t) <= (-1d-5)) then
tmp = 2.0d0 * ((z * t) - t_1)
else if ((z * t) <= 5d+90) then
tmp = 2.0d0 * ((x * y) - t_1)
else
tmp = 2.0d0 * ((z * t) + (x * y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = c * ((a + (b * c)) * i);
double tmp;
if ((z * t) <= -1e-5) {
tmp = 2.0 * ((z * t) - t_1);
} else if ((z * t) <= 5e+90) {
tmp = 2.0 * ((x * y) - t_1);
} else {
tmp = 2.0 * ((z * t) + (x * y));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = c * ((a + (b * c)) * i) tmp = 0 if (z * t) <= -1e-5: tmp = 2.0 * ((z * t) - t_1) elif (z * t) <= 5e+90: tmp = 2.0 * ((x * y) - t_1) else: tmp = 2.0 * ((z * t) + (x * y)) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(c * Float64(Float64(a + Float64(b * c)) * i)) tmp = 0.0 if (Float64(z * t) <= -1e-5) tmp = Float64(2.0 * Float64(Float64(z * t) - t_1)); elseif (Float64(z * t) <= 5e+90) tmp = Float64(2.0 * Float64(Float64(x * y) - t_1)); else tmp = Float64(2.0 * Float64(Float64(z * t) + Float64(x * y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = c * ((a + (b * c)) * i); tmp = 0.0; if ((z * t) <= -1e-5) tmp = 2.0 * ((z * t) - t_1); elseif ((z * t) <= 5e+90) tmp = 2.0 * ((x * y) - t_1); else tmp = 2.0 * ((z * t) + (x * y)); 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[(z * t), $MachinePrecision], -1e-5], N[(2.0 * N[(N[(z * t), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z * t), $MachinePrecision], 5e+90], N[(2.0 * N[(N[(x * y), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(z * t), $MachinePrecision] + N[(x * y), $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}\;z \cdot t \leq -1 \cdot 10^{-5}:\\
\;\;\;\;2 \cdot \left(z \cdot t - t_1\right)\\
\mathbf{elif}\;z \cdot t \leq 5 \cdot 10^{+90}:\\
\;\;\;\;2 \cdot \left(x \cdot y - t_1\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(z \cdot t + x \cdot y\right)\\
\end{array}
\end{array}
if (*.f64 z t) < -1.00000000000000008e-5Initial program 92.4%
Taylor expanded in x around 0 88.1%
if -1.00000000000000008e-5 < (*.f64 z t) < 5.0000000000000004e90Initial program 94.7%
Taylor expanded in z around 0 89.3%
if 5.0000000000000004e90 < (*.f64 z t) Initial program 92.1%
Taylor expanded in c around 0 84.2%
Final simplification88.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (+ (* z t) (* x y)))))
(if (<= c -7e-10)
(* 2.0 (* c (* i (- (- a) (* b c)))))
(if (<= c 3.9e+20)
t_1
(if (<= c 2.8e+60)
(* 2.0 (- (* z t) (* a (* c i))))
(if (<= c 1.66e+92)
t_1
(* 2.0 (* c (- (* a (- i)) (* (* 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 * ((z * t) + (x * y));
double tmp;
if (c <= -7e-10) {
tmp = 2.0 * (c * (i * (-a - (b * c))));
} else if (c <= 3.9e+20) {
tmp = t_1;
} else if (c <= 2.8e+60) {
tmp = 2.0 * ((z * t) - (a * (c * i)));
} else if (c <= 1.66e+92) {
tmp = t_1;
} else {
tmp = 2.0 * (c * ((a * -i) - ((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 * ((z * t) + (x * y))
if (c <= (-7d-10)) then
tmp = 2.0d0 * (c * (i * (-a - (b * c))))
else if (c <= 3.9d+20) then
tmp = t_1
else if (c <= 2.8d+60) then
tmp = 2.0d0 * ((z * t) - (a * (c * i)))
else if (c <= 1.66d+92) then
tmp = t_1
else
tmp = 2.0d0 * (c * ((a * -i) - ((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 * ((z * t) + (x * y));
double tmp;
if (c <= -7e-10) {
tmp = 2.0 * (c * (i * (-a - (b * c))));
} else if (c <= 3.9e+20) {
tmp = t_1;
} else if (c <= 2.8e+60) {
tmp = 2.0 * ((z * t) - (a * (c * i)));
} else if (c <= 1.66e+92) {
tmp = t_1;
} else {
tmp = 2.0 * (c * ((a * -i) - ((b * c) * i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * ((z * t) + (x * y)) tmp = 0 if c <= -7e-10: tmp = 2.0 * (c * (i * (-a - (b * c)))) elif c <= 3.9e+20: tmp = t_1 elif c <= 2.8e+60: tmp = 2.0 * ((z * t) - (a * (c * i))) elif c <= 1.66e+92: tmp = t_1 else: tmp = 2.0 * (c * ((a * -i) - ((b * c) * i))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(Float64(z * t) + Float64(x * y))) tmp = 0.0 if (c <= -7e-10) tmp = Float64(2.0 * Float64(c * Float64(i * Float64(Float64(-a) - Float64(b * c))))); elseif (c <= 3.9e+20) tmp = t_1; elseif (c <= 2.8e+60) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(a * Float64(c * i)))); elseif (c <= 1.66e+92) tmp = t_1; else tmp = Float64(2.0 * Float64(c * Float64(Float64(a * Float64(-i)) - Float64(Float64(b * c) * i)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 2.0 * ((z * t) + (x * y)); tmp = 0.0; if (c <= -7e-10) tmp = 2.0 * (c * (i * (-a - (b * c)))); elseif (c <= 3.9e+20) tmp = t_1; elseif (c <= 2.8e+60) tmp = 2.0 * ((z * t) - (a * (c * i))); elseif (c <= 1.66e+92) tmp = t_1; else tmp = 2.0 * (c * ((a * -i) - ((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[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -7e-10], N[(2.0 * N[(c * N[(i * N[((-a) - N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 3.9e+20], t$95$1, If[LessEqual[c, 2.8e+60], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.66e+92], t$95$1, N[(2.0 * N[(c * N[(N[(a * (-i)), $MachinePrecision] - N[(N[(b * c), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(z \cdot t + x \cdot y\right)\\
\mathbf{if}\;c \leq -7 \cdot 10^{-10}:\\
\;\;\;\;2 \cdot \left(c \cdot \left(i \cdot \left(\left(-a\right) - b \cdot c\right)\right)\right)\\
\mathbf{elif}\;c \leq 3.9 \cdot 10^{+20}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq 2.8 \cdot 10^{+60}:\\
\;\;\;\;2 \cdot \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\\
\mathbf{elif}\;c \leq 1.66 \cdot 10^{+92}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(c \cdot \left(a \cdot \left(-i\right) - \left(b \cdot c\right) \cdot i\right)\right)\\
\end{array}
\end{array}
if c < -6.99999999999999961e-10Initial program 93.2%
Taylor expanded in i around inf 84.2%
if -6.99999999999999961e-10 < c < 3.9e20 or 2.8e60 < c < 1.65999999999999993e92Initial program 95.6%
Taylor expanded in c around 0 78.5%
if 3.9e20 < c < 2.8e60Initial program 90.7%
Taylor expanded in a around inf 80.8%
*-commutative80.8%
Simplified80.8%
Taylor expanded in x around 0 88.6%
if 1.65999999999999993e92 < c Initial program 89.5%
Taylor expanded in i around inf 77.5%
distribute-rgt-in77.6%
*-commutative77.6%
*-commutative77.6%
Applied egg-rr77.6%
Final simplification80.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (+ (* z t) (* x y))))
(t_2 (* 2.0 (- (* z t) (* a (* c i))))))
(if (<= c -1.6e+92)
(* 2.0 (* c (* (* b c) (- i))))
(if (<= c -4.9e-56)
t_2
(if (<= c 2.95e+20)
t_1
(if (<= c 2.85e+103)
t_2
(if (<= c 3.8e+124) 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 * ((z * t) + (x * y));
double t_2 = 2.0 * ((z * t) - (a * (c * i)));
double tmp;
if (c <= -1.6e+92) {
tmp = 2.0 * (c * ((b * c) * -i));
} else if (c <= -4.9e-56) {
tmp = t_2;
} else if (c <= 2.95e+20) {
tmp = t_1;
} else if (c <= 2.85e+103) {
tmp = t_2;
} else if (c <= 3.8e+124) {
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) :: t_2
real(8) :: tmp
t_1 = 2.0d0 * ((z * t) + (x * y))
t_2 = 2.0d0 * ((z * t) - (a * (c * i)))
if (c <= (-1.6d+92)) then
tmp = 2.0d0 * (c * ((b * c) * -i))
else if (c <= (-4.9d-56)) then
tmp = t_2
else if (c <= 2.95d+20) then
tmp = t_1
else if (c <= 2.85d+103) then
tmp = t_2
else if (c <= 3.8d+124) 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 * ((z * t) + (x * y));
double t_2 = 2.0 * ((z * t) - (a * (c * i)));
double tmp;
if (c <= -1.6e+92) {
tmp = 2.0 * (c * ((b * c) * -i));
} else if (c <= -4.9e-56) {
tmp = t_2;
} else if (c <= 2.95e+20) {
tmp = t_1;
} else if (c <= 2.85e+103) {
tmp = t_2;
} else if (c <= 3.8e+124) {
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 * ((z * t) + (x * y)) t_2 = 2.0 * ((z * t) - (a * (c * i))) tmp = 0 if c <= -1.6e+92: tmp = 2.0 * (c * ((b * c) * -i)) elif c <= -4.9e-56: tmp = t_2 elif c <= 2.95e+20: tmp = t_1 elif c <= 2.85e+103: tmp = t_2 elif c <= 3.8e+124: 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(z * t) + Float64(x * y))) t_2 = Float64(2.0 * Float64(Float64(z * t) - Float64(a * Float64(c * i)))) tmp = 0.0 if (c <= -1.6e+92) tmp = Float64(2.0 * Float64(c * Float64(Float64(b * c) * Float64(-i)))); elseif (c <= -4.9e-56) tmp = t_2; elseif (c <= 2.95e+20) tmp = t_1; elseif (c <= 2.85e+103) tmp = t_2; elseif (c <= 3.8e+124) tmp = t_1; else tmp = Float64(2.0 * Float64(c * Float64(b * Float64(c * Float64(-i))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 2.0 * ((z * t) + (x * y)); t_2 = 2.0 * ((z * t) - (a * (c * i))); tmp = 0.0; if (c <= -1.6e+92) tmp = 2.0 * (c * ((b * c) * -i)); elseif (c <= -4.9e-56) tmp = t_2; elseif (c <= 2.95e+20) tmp = t_1; elseif (c <= 2.85e+103) tmp = t_2; elseif (c <= 3.8e+124) 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[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.6e+92], N[(2.0 * N[(c * N[(N[(b * c), $MachinePrecision] * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -4.9e-56], t$95$2, If[LessEqual[c, 2.95e+20], t$95$1, If[LessEqual[c, 2.85e+103], t$95$2, If[LessEqual[c, 3.8e+124], 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(z \cdot t + x \cdot y\right)\\
t_2 := 2 \cdot \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\\
\mathbf{if}\;c \leq -1.6 \cdot 10^{+92}:\\
\;\;\;\;2 \cdot \left(c \cdot \left(\left(b \cdot c\right) \cdot \left(-i\right)\right)\right)\\
\mathbf{elif}\;c \leq -4.9 \cdot 10^{-56}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq 2.95 \cdot 10^{+20}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq 2.85 \cdot 10^{+103}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq 3.8 \cdot 10^{+124}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(c \cdot \left(b \cdot \left(c \cdot \left(-i\right)\right)\right)\right)\\
\end{array}
\end{array}
if c < -1.60000000000000013e92Initial program 92.9%
Taylor expanded in i around inf 87.7%
Taylor expanded in a around 0 78.9%
if -1.60000000000000013e92 < c < -4.9e-56 or 2.95e20 < c < 2.85000000000000016e103Initial program 90.9%
Taylor expanded in a around inf 75.2%
*-commutative75.2%
Simplified75.2%
Taylor expanded in x around 0 72.6%
if -4.9e-56 < c < 2.95e20 or 2.85000000000000016e103 < c < 3.7999999999999998e124Initial program 96.8%
Taylor expanded in c around 0 79.3%
if 3.7999999999999998e124 < c Initial program 87.4%
Taylor expanded in i around inf 82.8%
Taylor expanded in a around 0 73.0%
Final simplification77.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (+ (* z t) (* x y))))
(t_2 (* 2.0 (* c (* i (- (- a) (* b c)))))))
(if (<= c -8e-10)
t_2
(if (<= c 2.65e+20)
t_1
(if (<= c 5e+58)
(* 2.0 (- (* z t) (* a (* c i))))
(if (<= c 2.1e+90) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * ((z * t) + (x * y));
double t_2 = 2.0 * (c * (i * (-a - (b * c))));
double tmp;
if (c <= -8e-10) {
tmp = t_2;
} else if (c <= 2.65e+20) {
tmp = t_1;
} else if (c <= 5e+58) {
tmp = 2.0 * ((z * t) - (a * (c * i)));
} else if (c <= 2.1e+90) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 2.0d0 * ((z * t) + (x * y))
t_2 = 2.0d0 * (c * (i * (-a - (b * c))))
if (c <= (-8d-10)) then
tmp = t_2
else if (c <= 2.65d+20) then
tmp = t_1
else if (c <= 5d+58) then
tmp = 2.0d0 * ((z * t) - (a * (c * i)))
else if (c <= 2.1d+90) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * ((z * t) + (x * y));
double t_2 = 2.0 * (c * (i * (-a - (b * c))));
double tmp;
if (c <= -8e-10) {
tmp = t_2;
} else if (c <= 2.65e+20) {
tmp = t_1;
} else if (c <= 5e+58) {
tmp = 2.0 * ((z * t) - (a * (c * i)));
} else if (c <= 2.1e+90) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * ((z * t) + (x * y)) t_2 = 2.0 * (c * (i * (-a - (b * c)))) tmp = 0 if c <= -8e-10: tmp = t_2 elif c <= 2.65e+20: tmp = t_1 elif c <= 5e+58: tmp = 2.0 * ((z * t) - (a * (c * i))) elif c <= 2.1e+90: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(Float64(z * t) + Float64(x * y))) t_2 = Float64(2.0 * Float64(c * Float64(i * Float64(Float64(-a) - Float64(b * c))))) tmp = 0.0 if (c <= -8e-10) tmp = t_2; elseif (c <= 2.65e+20) tmp = t_1; elseif (c <= 5e+58) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(a * Float64(c * i)))); elseif (c <= 2.1e+90) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 2.0 * ((z * t) + (x * y)); t_2 = 2.0 * (c * (i * (-a - (b * c)))); tmp = 0.0; if (c <= -8e-10) tmp = t_2; elseif (c <= 2.65e+20) tmp = t_1; elseif (c <= 5e+58) tmp = 2.0 * ((z * t) - (a * (c * i))); elseif (c <= 2.1e+90) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(c * N[(i * N[((-a) - N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -8e-10], t$95$2, If[LessEqual[c, 2.65e+20], t$95$1, If[LessEqual[c, 5e+58], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.1e+90], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(z \cdot t + x \cdot y\right)\\
t_2 := 2 \cdot \left(c \cdot \left(i \cdot \left(\left(-a\right) - b \cdot c\right)\right)\right)\\
\mathbf{if}\;c \leq -8 \cdot 10^{-10}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq 2.65 \cdot 10^{+20}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq 5 \cdot 10^{+58}:\\
\;\;\;\;2 \cdot \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\\
\mathbf{elif}\;c \leq 2.1 \cdot 10^{+90}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if c < -8.00000000000000029e-10 or 2.09999999999999981e90 < c Initial program 91.5%
Taylor expanded in i around inf 81.2%
if -8.00000000000000029e-10 < c < 2.65e20 or 4.99999999999999986e58 < c < 2.09999999999999981e90Initial program 95.6%
Taylor expanded in c around 0 78.5%
if 2.65e20 < c < 4.99999999999999986e58Initial program 90.7%
Taylor expanded in a around inf 80.8%
*-commutative80.8%
Simplified80.8%
Taylor expanded in x around 0 88.6%
Final simplification80.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (* x y))))
(if (<= (* x y) -1.3e+34)
t_1
(if (<= (* x y) 2.8e-96)
(* 2.0 (* z t))
(if (<= (* x y) 1.15e+67) (* 2.0 (* a (* c (- i)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * (x * y);
double tmp;
if ((x * y) <= -1.3e+34) {
tmp = t_1;
} else if ((x * y) <= 2.8e-96) {
tmp = 2.0 * (z * t);
} else if ((x * y) <= 1.15e+67) {
tmp = 2.0 * (a * (c * -i));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = 2.0d0 * (x * y)
if ((x * y) <= (-1.3d+34)) then
tmp = t_1
else if ((x * y) <= 2.8d-96) then
tmp = 2.0d0 * (z * t)
else if ((x * y) <= 1.15d+67) then
tmp = 2.0d0 * (a * (c * -i))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * (x * y);
double tmp;
if ((x * y) <= -1.3e+34) {
tmp = t_1;
} else if ((x * y) <= 2.8e-96) {
tmp = 2.0 * (z * t);
} else if ((x * y) <= 1.15e+67) {
tmp = 2.0 * (a * (c * -i));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * (x * y) tmp = 0 if (x * y) <= -1.3e+34: tmp = t_1 elif (x * y) <= 2.8e-96: tmp = 2.0 * (z * t) elif (x * y) <= 1.15e+67: tmp = 2.0 * (a * (c * -i)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(x * y)) tmp = 0.0 if (Float64(x * y) <= -1.3e+34) tmp = t_1; elseif (Float64(x * y) <= 2.8e-96) tmp = Float64(2.0 * Float64(z * t)); elseif (Float64(x * y) <= 1.15e+67) tmp = Float64(2.0 * Float64(a * Float64(c * Float64(-i)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 2.0 * (x * y); tmp = 0.0; if ((x * y) <= -1.3e+34) tmp = t_1; elseif ((x * y) <= 2.8e-96) tmp = 2.0 * (z * t); elseif ((x * y) <= 1.15e+67) tmp = 2.0 * (a * (c * -i)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -1.3e+34], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 2.8e-96], N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 1.15e+67], N[(2.0 * N[(a * N[(c * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(x \cdot y\right)\\
\mathbf{if}\;x \cdot y \leq -1.3 \cdot 10^{+34}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \cdot y \leq 2.8 \cdot 10^{-96}:\\
\;\;\;\;2 \cdot \left(z \cdot t\right)\\
\mathbf{elif}\;x \cdot y \leq 1.15 \cdot 10^{+67}:\\
\;\;\;\;2 \cdot \left(a \cdot \left(c \cdot \left(-i\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (*.f64 x y) < -1.29999999999999999e34 or 1.1499999999999999e67 < (*.f64 x y) Initial program 91.2%
Taylor expanded in x around inf 60.6%
if -1.29999999999999999e34 < (*.f64 x y) < 2.80000000000000015e-96Initial program 95.9%
Taylor expanded in z around inf 47.0%
if 2.80000000000000015e-96 < (*.f64 x y) < 1.1499999999999999e67Initial program 93.3%
Taylor expanded in a around inf 39.3%
mul-1-neg39.3%
*-commutative39.3%
distribute-rgt-neg-in39.3%
Simplified39.3%
Final simplification51.5%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= c -1.25e-9) (not (<= c 3e+64))) (* 2.0 (- (* x y) (* c (* (+ a (* b c)) i)))) (* 2.0 (- (+ (* z t) (* x y)) (* i (* a c))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c <= -1.25e-9) || !(c <= 3e+64)) {
tmp = 2.0 * ((x * y) - (c * ((a + (b * c)) * i)));
} else {
tmp = 2.0 * (((z * t) + (x * y)) - (i * (a * c)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((c <= (-1.25d-9)) .or. (.not. (c <= 3d+64))) then
tmp = 2.0d0 * ((x * y) - (c * ((a + (b * c)) * i)))
else
tmp = 2.0d0 * (((z * t) + (x * y)) - (i * (a * c)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c <= -1.25e-9) || !(c <= 3e+64)) {
tmp = 2.0 * ((x * y) - (c * ((a + (b * c)) * i)));
} else {
tmp = 2.0 * (((z * t) + (x * y)) - (i * (a * c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c <= -1.25e-9) or not (c <= 3e+64): tmp = 2.0 * ((x * y) - (c * ((a + (b * c)) * i))) else: tmp = 2.0 * (((z * t) + (x * y)) - (i * (a * c))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((c <= -1.25e-9) || !(c <= 3e+64)) tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(c * Float64(Float64(a + Float64(b * c)) * i)))); else tmp = Float64(2.0 * Float64(Float64(Float64(z * t) + Float64(x * y)) - Float64(i * Float64(a * c)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((c <= -1.25e-9) || ~((c <= 3e+64))) tmp = 2.0 * ((x * y) - (c * ((a + (b * c)) * i))); else tmp = 2.0 * (((z * t) + (x * y)) - (i * (a * c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[c, -1.25e-9], N[Not[LessEqual[c, 3e+64]], $MachinePrecision]], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] - N[(i * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -1.25 \cdot 10^{-9} \lor \neg \left(c \leq 3 \cdot 10^{+64}\right):\\
\;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(z \cdot t + x \cdot y\right) - i \cdot \left(a \cdot c\right)\right)\\
\end{array}
\end{array}
if c < -1.25e-9 or 3.0000000000000002e64 < c Initial program 91.6%
Taylor expanded in z around 0 91.2%
if -1.25e-9 < c < 3.0000000000000002e64Initial program 95.2%
Taylor expanded in a around inf 89.4%
*-commutative89.4%
Simplified89.4%
Final simplification90.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (* c (* b (* c (- i)))))))
(if (<= c -4.6e+91)
t_1
(if (<= c -2.8e-6)
(* 2.0 (* c (* a (- i))))
(if (or (<= c -1.25e-9) (not (<= c 3.8e+124)))
t_1
(* 2.0 (+ (* z t) (* x y))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * (c * (b * (c * -i)));
double tmp;
if (c <= -4.6e+91) {
tmp = t_1;
} else if (c <= -2.8e-6) {
tmp = 2.0 * (c * (a * -i));
} else if ((c <= -1.25e-9) || !(c <= 3.8e+124)) {
tmp = t_1;
} else {
tmp = 2.0 * ((z * t) + (x * y));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = 2.0d0 * (c * (b * (c * -i)))
if (c <= (-4.6d+91)) then
tmp = t_1
else if (c <= (-2.8d-6)) then
tmp = 2.0d0 * (c * (a * -i))
else if ((c <= (-1.25d-9)) .or. (.not. (c <= 3.8d+124))) then
tmp = t_1
else
tmp = 2.0d0 * ((z * t) + (x * y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * (c * (b * (c * -i)));
double tmp;
if (c <= -4.6e+91) {
tmp = t_1;
} else if (c <= -2.8e-6) {
tmp = 2.0 * (c * (a * -i));
} else if ((c <= -1.25e-9) || !(c <= 3.8e+124)) {
tmp = t_1;
} else {
tmp = 2.0 * ((z * t) + (x * y));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * (c * (b * (c * -i))) tmp = 0 if c <= -4.6e+91: tmp = t_1 elif c <= -2.8e-6: tmp = 2.0 * (c * (a * -i)) elif (c <= -1.25e-9) or not (c <= 3.8e+124): tmp = t_1 else: tmp = 2.0 * ((z * t) + (x * y)) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(c * Float64(b * Float64(c * Float64(-i))))) tmp = 0.0 if (c <= -4.6e+91) tmp = t_1; elseif (c <= -2.8e-6) tmp = Float64(2.0 * Float64(c * Float64(a * Float64(-i)))); elseif ((c <= -1.25e-9) || !(c <= 3.8e+124)) tmp = t_1; else tmp = Float64(2.0 * Float64(Float64(z * t) + Float64(x * y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 2.0 * (c * (b * (c * -i))); tmp = 0.0; if (c <= -4.6e+91) tmp = t_1; elseif (c <= -2.8e-6) tmp = 2.0 * (c * (a * -i)); elseif ((c <= -1.25e-9) || ~((c <= 3.8e+124))) tmp = t_1; else tmp = 2.0 * ((z * t) + (x * y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(c * N[(b * N[(c * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -4.6e+91], t$95$1, If[LessEqual[c, -2.8e-6], N[(2.0 * N[(c * N[(a * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[c, -1.25e-9], N[Not[LessEqual[c, 3.8e+124]], $MachinePrecision]], t$95$1, N[(2.0 * N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(c \cdot \left(b \cdot \left(c \cdot \left(-i\right)\right)\right)\right)\\
\mathbf{if}\;c \leq -4.6 \cdot 10^{+91}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq -2.8 \cdot 10^{-6}:\\
\;\;\;\;2 \cdot \left(c \cdot \left(a \cdot \left(-i\right)\right)\right)\\
\mathbf{elif}\;c \leq -1.25 \cdot 10^{-9} \lor \neg \left(c \leq 3.8 \cdot 10^{+124}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(z \cdot t + x \cdot y\right)\\
\end{array}
\end{array}
if c < -4.59999999999999982e91 or -2.79999999999999987e-6 < c < -1.25e-9 or 3.7999999999999998e124 < c Initial program 90.4%
Taylor expanded in i around inf 85.6%
Taylor expanded in a around 0 74.3%
if -4.59999999999999982e91 < c < -2.79999999999999987e-6Initial program 93.0%
Taylor expanded in a around inf 52.0%
mul-1-neg52.0%
*-commutative52.0%
associate-*l*52.1%
Simplified52.1%
if -1.25e-9 < c < 3.7999999999999998e124Initial program 95.5%
Taylor expanded in c around 0 75.1%
Final simplification73.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (* c (* c (* b (- i)))))))
(if (<= c -3e+92)
t_1
(if (<= c -0.000105)
(* 2.0 (* c (* a (- i))))
(if (<= c -7.5e-13)
t_1
(if (<= c 7e+124)
(* 2.0 (+ (* z t) (* x y)))
(* 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 * (c * (c * (b * -i)));
double tmp;
if (c <= -3e+92) {
tmp = t_1;
} else if (c <= -0.000105) {
tmp = 2.0 * (c * (a * -i));
} else if (c <= -7.5e-13) {
tmp = t_1;
} else if (c <= 7e+124) {
tmp = 2.0 * ((z * t) + (x * y));
} 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 * (c * (c * (b * -i)))
if (c <= (-3d+92)) then
tmp = t_1
else if (c <= (-0.000105d0)) then
tmp = 2.0d0 * (c * (a * -i))
else if (c <= (-7.5d-13)) then
tmp = t_1
else if (c <= 7d+124) then
tmp = 2.0d0 * ((z * t) + (x * y))
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 * (c * (c * (b * -i)));
double tmp;
if (c <= -3e+92) {
tmp = t_1;
} else if (c <= -0.000105) {
tmp = 2.0 * (c * (a * -i));
} else if (c <= -7.5e-13) {
tmp = t_1;
} else if (c <= 7e+124) {
tmp = 2.0 * ((z * t) + (x * y));
} else {
tmp = 2.0 * (c * (b * (c * -i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * (c * (c * (b * -i))) tmp = 0 if c <= -3e+92: tmp = t_1 elif c <= -0.000105: tmp = 2.0 * (c * (a * -i)) elif c <= -7.5e-13: tmp = t_1 elif c <= 7e+124: tmp = 2.0 * ((z * t) + (x * y)) 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(c * Float64(c * Float64(b * Float64(-i))))) tmp = 0.0 if (c <= -3e+92) tmp = t_1; elseif (c <= -0.000105) tmp = Float64(2.0 * Float64(c * Float64(a * Float64(-i)))); elseif (c <= -7.5e-13) tmp = t_1; elseif (c <= 7e+124) tmp = Float64(2.0 * Float64(Float64(z * t) + Float64(x * y))); else tmp = Float64(2.0 * Float64(c * Float64(b * Float64(c * Float64(-i))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 2.0 * (c * (c * (b * -i))); tmp = 0.0; if (c <= -3e+92) tmp = t_1; elseif (c <= -0.000105) tmp = 2.0 * (c * (a * -i)); elseif (c <= -7.5e-13) tmp = t_1; elseif (c <= 7e+124) tmp = 2.0 * ((z * t) + (x * y)); 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[(c * N[(c * N[(b * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -3e+92], t$95$1, If[LessEqual[c, -0.000105], N[(2.0 * N[(c * N[(a * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -7.5e-13], t$95$1, If[LessEqual[c, 7e+124], N[(2.0 * N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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(c \cdot \left(c \cdot \left(b \cdot \left(-i\right)\right)\right)\right)\\
\mathbf{if}\;c \leq -3 \cdot 10^{+92}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq -0.000105:\\
\;\;\;\;2 \cdot \left(c \cdot \left(a \cdot \left(-i\right)\right)\right)\\
\mathbf{elif}\;c \leq -7.5 \cdot 10^{-13}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq 7 \cdot 10^{+124}:\\
\;\;\;\;2 \cdot \left(z \cdot t + x \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(c \cdot \left(b \cdot \left(c \cdot \left(-i\right)\right)\right)\right)\\
\end{array}
\end{array}
if c < -3.00000000000000013e92 or -1.05e-4 < c < -7.5000000000000004e-13Initial program 91.3%
Taylor expanded in i around inf 84.6%
Taylor expanded in a around 0 72.4%
*-commutative72.4%
associate-*r*76.5%
Simplified76.5%
if -3.00000000000000013e92 < c < -1.05e-4Initial program 93.0%
Taylor expanded in a around inf 52.0%
mul-1-neg52.0%
*-commutative52.0%
associate-*l*52.1%
Simplified52.1%
if -7.5000000000000004e-13 < c < 7.0000000000000002e124Initial program 96.1%
Taylor expanded in c around 0 75.4%
if 7.0000000000000002e124 < c Initial program 87.4%
Taylor expanded in i around inf 82.8%
Taylor expanded in a around 0 73.0%
Final simplification73.9%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= c -2.2e+92)
(* 2.0 (* c (* (* b c) (- i))))
(if (<= c -0.000135)
(* 2.0 (* c (* a (- i))))
(if (<= c -7.5e-13)
(* 2.0 (* c (* c (* b (- i)))))
(if (<= c 4e+124)
(* 2.0 (+ (* z t) (* x y)))
(* 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 tmp;
if (c <= -2.2e+92) {
tmp = 2.0 * (c * ((b * c) * -i));
} else if (c <= -0.000135) {
tmp = 2.0 * (c * (a * -i));
} else if (c <= -7.5e-13) {
tmp = 2.0 * (c * (c * (b * -i)));
} else if (c <= 4e+124) {
tmp = 2.0 * ((z * t) + (x * y));
} 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) :: tmp
if (c <= (-2.2d+92)) then
tmp = 2.0d0 * (c * ((b * c) * -i))
else if (c <= (-0.000135d0)) then
tmp = 2.0d0 * (c * (a * -i))
else if (c <= (-7.5d-13)) then
tmp = 2.0d0 * (c * (c * (b * -i)))
else if (c <= 4d+124) then
tmp = 2.0d0 * ((z * t) + (x * y))
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 tmp;
if (c <= -2.2e+92) {
tmp = 2.0 * (c * ((b * c) * -i));
} else if (c <= -0.000135) {
tmp = 2.0 * (c * (a * -i));
} else if (c <= -7.5e-13) {
tmp = 2.0 * (c * (c * (b * -i)));
} else if (c <= 4e+124) {
tmp = 2.0 * ((z * t) + (x * y));
} else {
tmp = 2.0 * (c * (b * (c * -i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if c <= -2.2e+92: tmp = 2.0 * (c * ((b * c) * -i)) elif c <= -0.000135: tmp = 2.0 * (c * (a * -i)) elif c <= -7.5e-13: tmp = 2.0 * (c * (c * (b * -i))) elif c <= 4e+124: tmp = 2.0 * ((z * t) + (x * y)) else: tmp = 2.0 * (c * (b * (c * -i))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (c <= -2.2e+92) tmp = Float64(2.0 * Float64(c * Float64(Float64(b * c) * Float64(-i)))); elseif (c <= -0.000135) tmp = Float64(2.0 * Float64(c * Float64(a * Float64(-i)))); elseif (c <= -7.5e-13) tmp = Float64(2.0 * Float64(c * Float64(c * Float64(b * Float64(-i))))); elseif (c <= 4e+124) tmp = Float64(2.0 * Float64(Float64(z * t) + Float64(x * y))); else tmp = Float64(2.0 * Float64(c * Float64(b * Float64(c * Float64(-i))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (c <= -2.2e+92) tmp = 2.0 * (c * ((b * c) * -i)); elseif (c <= -0.000135) tmp = 2.0 * (c * (a * -i)); elseif (c <= -7.5e-13) tmp = 2.0 * (c * (c * (b * -i))); elseif (c <= 4e+124) tmp = 2.0 * ((z * t) + (x * y)); else tmp = 2.0 * (c * (b * (c * -i))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[c, -2.2e+92], N[(2.0 * N[(c * N[(N[(b * c), $MachinePrecision] * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -0.000135], N[(2.0 * N[(c * N[(a * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -7.5e-13], N[(2.0 * N[(c * N[(c * N[(b * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 4e+124], N[(2.0 * N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(c * N[(b * N[(c * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -2.2 \cdot 10^{+92}:\\
\;\;\;\;2 \cdot \left(c \cdot \left(\left(b \cdot c\right) \cdot \left(-i\right)\right)\right)\\
\mathbf{elif}\;c \leq -0.000135:\\
\;\;\;\;2 \cdot \left(c \cdot \left(a \cdot \left(-i\right)\right)\right)\\
\mathbf{elif}\;c \leq -7.5 \cdot 10^{-13}:\\
\;\;\;\;2 \cdot \left(c \cdot \left(c \cdot \left(b \cdot \left(-i\right)\right)\right)\right)\\
\mathbf{elif}\;c \leq 4 \cdot 10^{+124}:\\
\;\;\;\;2 \cdot \left(z \cdot t + x \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(c \cdot \left(b \cdot \left(c \cdot \left(-i\right)\right)\right)\right)\\
\end{array}
\end{array}
if c < -2.19999999999999992e92Initial program 92.9%
Taylor expanded in i around inf 87.7%
Taylor expanded in a around 0 78.9%
if -2.19999999999999992e92 < c < -1.35000000000000002e-4Initial program 93.0%
Taylor expanded in a around inf 52.0%
mul-1-neg52.0%
*-commutative52.0%
associate-*l*52.1%
Simplified52.1%
if -1.35000000000000002e-4 < c < -7.5000000000000004e-13Initial program 74.6%
Taylor expanded in i around inf 53.3%
Taylor expanded in a around 0 52.9%
*-commutative52.9%
associate-*r*75.7%
Simplified75.7%
if -7.5000000000000004e-13 < c < 3.99999999999999979e124Initial program 96.1%
Taylor expanded in c around 0 75.4%
if 3.99999999999999979e124 < c Initial program 87.4%
Taylor expanded in i around inf 82.8%
Taylor expanded in a around 0 73.0%
Final simplification74.3%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (* x y) -4.8e+33) (not (<= (* x y) 1.1e+55))) (* 2.0 (* x y)) (* 2.0 (* z t))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((x * y) <= -4.8e+33) || !((x * y) <= 1.1e+55)) {
tmp = 2.0 * (x * y);
} else {
tmp = 2.0 * (z * t);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (((x * y) <= (-4.8d+33)) .or. (.not. ((x * y) <= 1.1d+55))) then
tmp = 2.0d0 * (x * y)
else
tmp = 2.0d0 * (z * t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((x * y) <= -4.8e+33) || !((x * y) <= 1.1e+55)) {
tmp = 2.0 * (x * y);
} else {
tmp = 2.0 * (z * t);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((x * y) <= -4.8e+33) or not ((x * y) <= 1.1e+55): tmp = 2.0 * (x * y) else: tmp = 2.0 * (z * t) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(x * y) <= -4.8e+33) || !(Float64(x * y) <= 1.1e+55)) tmp = Float64(2.0 * Float64(x * y)); else tmp = Float64(2.0 * Float64(z * t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (((x * y) <= -4.8e+33) || ~(((x * y) <= 1.1e+55))) tmp = 2.0 * (x * y); else tmp = 2.0 * (z * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(x * y), $MachinePrecision], -4.8e+33], N[Not[LessEqual[N[(x * y), $MachinePrecision], 1.1e+55]], $MachinePrecision]], N[(2.0 * N[(x * y), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -4.8 \cdot 10^{+33} \lor \neg \left(x \cdot y \leq 1.1 \cdot 10^{+55}\right):\\
\;\;\;\;2 \cdot \left(x \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(z \cdot t\right)\\
\end{array}
\end{array}
if (*.f64 x y) < -4.8e33 or 1.10000000000000005e55 < (*.f64 x y) Initial program 91.4%
Taylor expanded in x around inf 59.5%
if -4.8e33 < (*.f64 x y) < 1.10000000000000005e55Initial program 95.4%
Taylor expanded in z around inf 42.6%
Final simplification49.5%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= c -3.9e-10) (not (<= c 6.5e+199))) (* 2.0 (* a (* c (- i)))) (* 2.0 (+ (* z t) (* x y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c <= -3.9e-10) || !(c <= 6.5e+199)) {
tmp = 2.0 * (a * (c * -i));
} else {
tmp = 2.0 * ((z * t) + (x * y));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((c <= (-3.9d-10)) .or. (.not. (c <= 6.5d+199))) then
tmp = 2.0d0 * (a * (c * -i))
else
tmp = 2.0d0 * ((z * t) + (x * y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c <= -3.9e-10) || !(c <= 6.5e+199)) {
tmp = 2.0 * (a * (c * -i));
} else {
tmp = 2.0 * ((z * t) + (x * y));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c <= -3.9e-10) or not (c <= 6.5e+199): tmp = 2.0 * (a * (c * -i)) else: tmp = 2.0 * ((z * t) + (x * y)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((c <= -3.9e-10) || !(c <= 6.5e+199)) tmp = Float64(2.0 * Float64(a * Float64(c * Float64(-i)))); else tmp = Float64(2.0 * Float64(Float64(z * t) + Float64(x * y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((c <= -3.9e-10) || ~((c <= 6.5e+199))) tmp = 2.0 * (a * (c * -i)); else tmp = 2.0 * ((z * t) + (x * y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[c, -3.9e-10], N[Not[LessEqual[c, 6.5e+199]], $MachinePrecision]], N[(2.0 * N[(a * N[(c * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -3.9 \cdot 10^{-10} \lor \neg \left(c \leq 6.5 \cdot 10^{+199}\right):\\
\;\;\;\;2 \cdot \left(a \cdot \left(c \cdot \left(-i\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(z \cdot t + x \cdot y\right)\\
\end{array}
\end{array}
if c < -3.9e-10 or 6.5000000000000003e199 < c Initial program 91.7%
Taylor expanded in a around inf 37.0%
mul-1-neg37.0%
*-commutative37.0%
distribute-rgt-neg-in37.0%
Simplified37.0%
if -3.9e-10 < c < 6.5000000000000003e199Initial program 94.7%
Taylor expanded in c around 0 72.5%
Final simplification61.1%
(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 93.7%
Taylor expanded in z around inf 31.1%
Final simplification31.1%
(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 2023310
(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))))