
(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 (* c b))) (t_2 (* i (* c t_1))))
(if (<= t_2 (- INFINITY))
(* 2.0 (- (* x y) (* c (* i t_1))))
(if (<= t_2 5e+220)
(* 2.0 (- (+ (* x y) (* z t)) t_2))
(* 2.0 (* (* c i) (- (- a) (* c b))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (c * b);
double t_2 = i * (c * t_1);
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = 2.0 * ((x * y) - (c * (i * t_1)));
} else if (t_2 <= 5e+220) {
tmp = 2.0 * (((x * y) + (z * t)) - t_2);
} else {
tmp = 2.0 * ((c * i) * (-a - (c * b)));
}
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 + (c * b);
double t_2 = i * (c * t_1);
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = 2.0 * ((x * y) - (c * (i * t_1)));
} else if (t_2 <= 5e+220) {
tmp = 2.0 * (((x * y) + (z * t)) - t_2);
} else {
tmp = 2.0 * ((c * i) * (-a - (c * b)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a + (c * b) t_2 = i * (c * t_1) tmp = 0 if t_2 <= -math.inf: tmp = 2.0 * ((x * y) - (c * (i * t_1))) elif t_2 <= 5e+220: tmp = 2.0 * (((x * y) + (z * t)) - t_2) else: tmp = 2.0 * ((c * i) * (-a - (c * b))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(c * b)) t_2 = Float64(i * Float64(c * t_1)) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(c * Float64(i * t_1)))); elseif (t_2 <= 5e+220) tmp = Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - t_2)); else tmp = Float64(2.0 * Float64(Float64(c * i) * Float64(Float64(-a) - Float64(c * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = a + (c * b); t_2 = i * (c * t_1); tmp = 0.0; if (t_2 <= -Inf) tmp = 2.0 * ((x * y) - (c * (i * t_1))); elseif (t_2 <= 5e+220) tmp = 2.0 * (((x * y) + (z * t)) - t_2); else tmp = 2.0 * ((c * i) * (-a - (c * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(c * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(i * N[(c * t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(c * N[(i * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+220], N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(c * i), $MachinePrecision] * N[((-a) - N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + c \cdot b\\
t_2 := i \cdot \left(c \cdot t_1\right)\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(i \cdot t_1\right)\right)\\
\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+220}:\\
\;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - t_2\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(c \cdot i\right) \cdot \left(\left(-a\right) - c \cdot b\right)\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -inf.0Initial program 73.6%
Taylor expanded in z around 0 95.4%
if -inf.0 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 5.0000000000000002e220Initial program 99.2%
if 5.0000000000000002e220 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) Initial program 78.1%
associate-*r*88.7%
*-commutative88.7%
flip-+52.5%
associate-*r/49.5%
pow249.5%
Applied egg-rr49.5%
associate-/l*52.5%
*-commutative52.5%
*-commutative52.5%
Simplified52.5%
Taylor expanded in c around inf 68.2%
distribute-lft-out68.2%
*-commutative68.2%
mul-1-neg68.2%
unpow268.2%
associate-*r*70.0%
*-commutative70.0%
associate-*l*73.1%
associate-*r*77.6%
*-commutative77.6%
associate-*r*72.7%
*-commutative72.7%
distribute-rgt-out92.1%
Simplified92.1%
Final simplification96.9%
(FPCore (x y z t a b c i) :precision binary64 (if (<= c -6.6e-65) (* 2.0 (fma z t (fma c (* (fma b c a) (- i)) (* x y)))) (* 2.0 (- (+ (* x y) (* z t)) (* (* c i) (+ a (* c b)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (c <= -6.6e-65) {
tmp = 2.0 * fma(z, t, fma(c, (fma(b, c, a) * -i), (x * y)));
} else {
tmp = 2.0 * (((x * y) + (z * t)) - ((c * i) * (a + (c * b))));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (c <= -6.6e-65) tmp = Float64(2.0 * fma(z, t, fma(c, Float64(fma(b, c, a) * Float64(-i)), Float64(x * y)))); else tmp = Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(Float64(c * i) * Float64(a + Float64(c * b))))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[c, -6.6e-65], N[(2.0 * N[(z * t + N[(c * N[(N[(b * c + a), $MachinePrecision] * (-i)), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(c * i), $MachinePrecision] * N[(a + N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -6.6 \cdot 10^{-65}:\\
\;\;\;\;2 \cdot \mathsf{fma}\left(z, t, \mathsf{fma}\left(c, \mathsf{fma}\left(b, c, a\right) \cdot \left(-i\right), x \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(c \cdot i\right) \cdot \left(a + c \cdot b\right)\right)\\
\end{array}
\end{array}
if c < -6.6000000000000002e-65Initial program 83.0%
associate--l+83.0%
+-commutative83.0%
associate-+l-83.0%
fma-neg87.0%
neg-sub087.0%
associate-+l-87.0%
neg-sub087.0%
distribute-rgt-neg-in87.0%
*-commutative87.0%
associate-*l*94.6%
fma-def94.7%
+-commutative94.7%
fma-def94.6%
Simplified94.6%
if -6.6000000000000002e-65 < c Initial program 93.0%
associate-*l*97.2%
fma-def97.2%
Simplified97.2%
fma-def97.2%
+-commutative97.2%
Applied egg-rr97.2%
Final simplification96.4%
(FPCore (x y z t a b c i) :precision binary64 (* 2.0 (- (fma x y (* z t)) (* (* c i) (+ a (* c b))))))
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)) - ((c * i) * (a + (c * b))));
}
function code(x, y, z, t, a, b, c, i) return Float64(2.0 * Float64(fma(x, y, Float64(z * t)) - Float64(Float64(c * i) * Float64(a + Float64(c * b))))) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(2.0 * N[(N[(x * y + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(c * i), $MachinePrecision] * N[(a + N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(\mathsf{fma}\left(x, y, z \cdot t\right) - \left(c \cdot i\right) \cdot \left(a + c \cdot b\right)\right)
\end{array}
Initial program 90.1%
associate-*l*94.5%
fma-def94.5%
Simplified94.5%
Final simplification94.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (- (* x y) (* (* c c) (* b i)))))
(t_2 (* 2.0 (- (* z t) (* c (* i (* c b)))))))
(if (<= t -6.2e-140)
t_2
(if (<= t 1.6e-274)
(* 2.0 (- (* x y) (* c (* a i))))
(if (<= t 3.7e-81)
t_1
(if (<= t 0.195)
(* 2.0 (* (* c i) (- (- a) (* c b))))
(if (<= t 1.85e+139)
t_2
(if (or (<= t 7.2e+183) (not (<= t 1.55e+211)))
(* 2.0 (- (* z t) (* 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) - ((c * c) * (b * i)));
double t_2 = 2.0 * ((z * t) - (c * (i * (c * b))));
double tmp;
if (t <= -6.2e-140) {
tmp = t_2;
} else if (t <= 1.6e-274) {
tmp = 2.0 * ((x * y) - (c * (a * i)));
} else if (t <= 3.7e-81) {
tmp = t_1;
} else if (t <= 0.195) {
tmp = 2.0 * ((c * i) * (-a - (c * b)));
} else if (t <= 1.85e+139) {
tmp = t_2;
} else if ((t <= 7.2e+183) || !(t <= 1.55e+211)) {
tmp = 2.0 * ((z * t) - (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) :: t_2
real(8) :: tmp
t_1 = 2.0d0 * ((x * y) - ((c * c) * (b * i)))
t_2 = 2.0d0 * ((z * t) - (c * (i * (c * b))))
if (t <= (-6.2d-140)) then
tmp = t_2
else if (t <= 1.6d-274) then
tmp = 2.0d0 * ((x * y) - (c * (a * i)))
else if (t <= 3.7d-81) then
tmp = t_1
else if (t <= 0.195d0) then
tmp = 2.0d0 * ((c * i) * (-a - (c * b)))
else if (t <= 1.85d+139) then
tmp = t_2
else if ((t <= 7.2d+183) .or. (.not. (t <= 1.55d+211))) then
tmp = 2.0d0 * ((z * t) - (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) - ((c * c) * (b * i)));
double t_2 = 2.0 * ((z * t) - (c * (i * (c * b))));
double tmp;
if (t <= -6.2e-140) {
tmp = t_2;
} else if (t <= 1.6e-274) {
tmp = 2.0 * ((x * y) - (c * (a * i)));
} else if (t <= 3.7e-81) {
tmp = t_1;
} else if (t <= 0.195) {
tmp = 2.0 * ((c * i) * (-a - (c * b)));
} else if (t <= 1.85e+139) {
tmp = t_2;
} else if ((t <= 7.2e+183) || !(t <= 1.55e+211)) {
tmp = 2.0 * ((z * t) - (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) - ((c * c) * (b * i))) t_2 = 2.0 * ((z * t) - (c * (i * (c * b)))) tmp = 0 if t <= -6.2e-140: tmp = t_2 elif t <= 1.6e-274: tmp = 2.0 * ((x * y) - (c * (a * i))) elif t <= 3.7e-81: tmp = t_1 elif t <= 0.195: tmp = 2.0 * ((c * i) * (-a - (c * b))) elif t <= 1.85e+139: tmp = t_2 elif (t <= 7.2e+183) or not (t <= 1.55e+211): tmp = 2.0 * ((z * t) - (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(Float64(x * y) - Float64(Float64(c * c) * Float64(b * i)))) t_2 = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(i * Float64(c * b))))) tmp = 0.0 if (t <= -6.2e-140) tmp = t_2; elseif (t <= 1.6e-274) tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(c * Float64(a * i)))); elseif (t <= 3.7e-81) tmp = t_1; elseif (t <= 0.195) tmp = Float64(2.0 * Float64(Float64(c * i) * Float64(Float64(-a) - Float64(c * b)))); elseif (t <= 1.85e+139) tmp = t_2; elseif ((t <= 7.2e+183) || !(t <= 1.55e+211)) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(a * Float64(c * 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) - ((c * c) * (b * i))); t_2 = 2.0 * ((z * t) - (c * (i * (c * b)))); tmp = 0.0; if (t <= -6.2e-140) tmp = t_2; elseif (t <= 1.6e-274) tmp = 2.0 * ((x * y) - (c * (a * i))); elseif (t <= 3.7e-81) tmp = t_1; elseif (t <= 0.195) tmp = 2.0 * ((c * i) * (-a - (c * b))); elseif (t <= 1.85e+139) tmp = t_2; elseif ((t <= 7.2e+183) || ~((t <= 1.55e+211))) tmp = 2.0 * ((z * t) - (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[(N[(x * y), $MachinePrecision] - N[(N[(c * c), $MachinePrecision] * N[(b * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(i * N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.2e-140], t$95$2, If[LessEqual[t, 1.6e-274], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(c * N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.7e-81], t$95$1, If[LessEqual[t, 0.195], N[(2.0 * N[(N[(c * i), $MachinePrecision] * N[((-a) - N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.85e+139], t$95$2, If[Or[LessEqual[t, 7.2e+183], N[Not[LessEqual[t, 1.55e+211]], $MachinePrecision]], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(x \cdot y - \left(c \cdot c\right) \cdot \left(b \cdot i\right)\right)\\
t_2 := 2 \cdot \left(z \cdot t - c \cdot \left(i \cdot \left(c \cdot b\right)\right)\right)\\
\mathbf{if}\;t \leq -6.2 \cdot 10^{-140}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{-274}:\\
\;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(a \cdot i\right)\right)\\
\mathbf{elif}\;t \leq 3.7 \cdot 10^{-81}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 0.195:\\
\;\;\;\;2 \cdot \left(\left(c \cdot i\right) \cdot \left(\left(-a\right) - c \cdot b\right)\right)\\
\mathbf{elif}\;t \leq 1.85 \cdot 10^{+139}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 7.2 \cdot 10^{+183} \lor \neg \left(t \leq 1.55 \cdot 10^{+211}\right):\\
\;\;\;\;2 \cdot \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -6.1999999999999998e-140 or 0.19500000000000001 < t < 1.84999999999999996e139Initial program 92.5%
Taylor expanded in x around 0 79.3%
Taylor expanded in c around inf 63.4%
if -6.1999999999999998e-140 < t < 1.59999999999999989e-274Initial program 85.3%
associate-*r*93.3%
*-commutative93.3%
flip-+61.8%
associate-*r/57.1%
pow257.1%
Applied egg-rr57.1%
associate-/l*61.8%
*-commutative61.8%
*-commutative61.8%
Simplified61.8%
Taylor expanded in a around inf 73.1%
Taylor expanded in z around 0 67.5%
if 1.59999999999999989e-274 < t < 3.69999999999999986e-81 or 7.20000000000000046e183 < t < 1.5500000000000001e211Initial program 94.7%
Taylor expanded in a around 0 86.7%
Taylor expanded in z around 0 81.8%
unpow281.8%
Simplified81.8%
if 3.69999999999999986e-81 < t < 0.19500000000000001Initial program 89.2%
associate-*r*94.6%
*-commutative94.6%
flip-+72.6%
associate-*r/66.9%
pow266.9%
Applied egg-rr66.9%
associate-/l*72.5%
*-commutative72.5%
*-commutative72.5%
Simplified72.5%
Taylor expanded in c around inf 30.1%
distribute-lft-out30.1%
*-commutative30.1%
mul-1-neg30.1%
unpow230.1%
associate-*r*30.4%
*-commutative30.4%
associate-*l*35.9%
associate-*r*36.1%
*-commutative36.1%
associate-*r*35.4%
*-commutative35.4%
distribute-rgt-out52.1%
Simplified52.1%
if 1.84999999999999996e139 < t < 7.20000000000000046e183 or 1.5500000000000001e211 < t Initial program 83.4%
Taylor expanded in x around 0 77.9%
Taylor expanded in c around 0 82.0%
mul-1-neg82.0%
sub-neg82.0%
*-commutative82.0%
associate-*r*94.2%
*-commutative94.2%
Simplified94.2%
Final simplification69.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (* (* c i) (- (- a) (* c b)))))
(t_2 (* 2.0 (- (* x y) (* c (* a i)))))
(t_3 (* 2.0 (- (* z t) (* c (* i (* c b)))))))
(if (<= z -2.9e+47)
t_3
(if (<= z -3e+14)
t_1
(if (<= z -182000.0)
(* 2.0 (+ (* x y) (* z t)))
(if (<= z -4.8e-76)
t_2
(if (<= z -2.2e-277) t_1 (if (<= z 9.5e-283) t_2 t_3))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * ((c * i) * (-a - (c * b)));
double t_2 = 2.0 * ((x * y) - (c * (a * i)));
double t_3 = 2.0 * ((z * t) - (c * (i * (c * b))));
double tmp;
if (z <= -2.9e+47) {
tmp = t_3;
} else if (z <= -3e+14) {
tmp = t_1;
} else if (z <= -182000.0) {
tmp = 2.0 * ((x * y) + (z * t));
} else if (z <= -4.8e-76) {
tmp = t_2;
} else if (z <= -2.2e-277) {
tmp = t_1;
} else if (z <= 9.5e-283) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = 2.0d0 * ((c * i) * (-a - (c * b)))
t_2 = 2.0d0 * ((x * y) - (c * (a * i)))
t_3 = 2.0d0 * ((z * t) - (c * (i * (c * b))))
if (z <= (-2.9d+47)) then
tmp = t_3
else if (z <= (-3d+14)) then
tmp = t_1
else if (z <= (-182000.0d0)) then
tmp = 2.0d0 * ((x * y) + (z * t))
else if (z <= (-4.8d-76)) then
tmp = t_2
else if (z <= (-2.2d-277)) then
tmp = t_1
else if (z <= 9.5d-283) then
tmp = t_2
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * ((c * i) * (-a - (c * b)));
double t_2 = 2.0 * ((x * y) - (c * (a * i)));
double t_3 = 2.0 * ((z * t) - (c * (i * (c * b))));
double tmp;
if (z <= -2.9e+47) {
tmp = t_3;
} else if (z <= -3e+14) {
tmp = t_1;
} else if (z <= -182000.0) {
tmp = 2.0 * ((x * y) + (z * t));
} else if (z <= -4.8e-76) {
tmp = t_2;
} else if (z <= -2.2e-277) {
tmp = t_1;
} else if (z <= 9.5e-283) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * ((c * i) * (-a - (c * b))) t_2 = 2.0 * ((x * y) - (c * (a * i))) t_3 = 2.0 * ((z * t) - (c * (i * (c * b)))) tmp = 0 if z <= -2.9e+47: tmp = t_3 elif z <= -3e+14: tmp = t_1 elif z <= -182000.0: tmp = 2.0 * ((x * y) + (z * t)) elif z <= -4.8e-76: tmp = t_2 elif z <= -2.2e-277: tmp = t_1 elif z <= 9.5e-283: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(Float64(c * i) * Float64(Float64(-a) - Float64(c * b)))) t_2 = Float64(2.0 * Float64(Float64(x * y) - Float64(c * Float64(a * i)))) t_3 = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(i * Float64(c * b))))) tmp = 0.0 if (z <= -2.9e+47) tmp = t_3; elseif (z <= -3e+14) tmp = t_1; elseif (z <= -182000.0) tmp = Float64(2.0 * Float64(Float64(x * y) + Float64(z * t))); elseif (z <= -4.8e-76) tmp = t_2; elseif (z <= -2.2e-277) tmp = t_1; elseif (z <= 9.5e-283) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 2.0 * ((c * i) * (-a - (c * b))); t_2 = 2.0 * ((x * y) - (c * (a * i))); t_3 = 2.0 * ((z * t) - (c * (i * (c * b)))); tmp = 0.0; if (z <= -2.9e+47) tmp = t_3; elseif (z <= -3e+14) tmp = t_1; elseif (z <= -182000.0) tmp = 2.0 * ((x * y) + (z * t)); elseif (z <= -4.8e-76) tmp = t_2; elseif (z <= -2.2e-277) tmp = t_1; elseif (z <= 9.5e-283) tmp = t_2; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(N[(c * i), $MachinePrecision] * N[((-a) - N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(c * N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(i * N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.9e+47], t$95$3, If[LessEqual[z, -3e+14], t$95$1, If[LessEqual[z, -182000.0], N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.8e-76], t$95$2, If[LessEqual[z, -2.2e-277], t$95$1, If[LessEqual[z, 9.5e-283], t$95$2, t$95$3]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(\left(c \cdot i\right) \cdot \left(\left(-a\right) - c \cdot b\right)\right)\\
t_2 := 2 \cdot \left(x \cdot y - c \cdot \left(a \cdot i\right)\right)\\
t_3 := 2 \cdot \left(z \cdot t - c \cdot \left(i \cdot \left(c \cdot b\right)\right)\right)\\
\mathbf{if}\;z \leq -2.9 \cdot 10^{+47}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq -3 \cdot 10^{+14}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -182000:\\
\;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\
\mathbf{elif}\;z \leq -4.8 \cdot 10^{-76}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -2.2 \cdot 10^{-277}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{-283}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if z < -2.8999999999999998e47 or 9.49999999999999979e-283 < z Initial program 90.6%
Taylor expanded in x around 0 78.4%
Taylor expanded in c around inf 66.6%
if -2.8999999999999998e47 < z < -3e14 or -4.80000000000000026e-76 < z < -2.19999999999999996e-277Initial program 90.8%
associate-*r*97.4%
*-commutative97.4%
flip-+53.9%
associate-*r/53.9%
pow253.9%
Applied egg-rr53.9%
associate-/l*53.9%
*-commutative53.9%
*-commutative53.9%
Simplified53.9%
Taylor expanded in c around inf 48.6%
distribute-lft-out48.6%
*-commutative48.6%
mul-1-neg48.6%
unpow248.6%
associate-*r*49.0%
*-commutative49.0%
associate-*l*51.7%
associate-*r*53.8%
*-commutative53.8%
associate-*r*55.8%
*-commutative55.8%
distribute-rgt-out70.1%
Simplified70.1%
if -3e14 < z < -182000Initial program 100.0%
Taylor expanded in c around 0 75.0%
if -182000 < z < -4.80000000000000026e-76 or -2.19999999999999996e-277 < z < 9.49999999999999979e-283Initial program 85.1%
associate-*r*96.8%
*-commutative96.8%
flip-+60.1%
associate-*r/57.3%
pow257.3%
Applied egg-rr57.3%
associate-/l*60.0%
*-commutative60.0%
*-commutative60.0%
Simplified60.0%
Taylor expanded in a around inf 81.5%
Taylor expanded in z around 0 66.5%
Final simplification67.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (- (* z t) (* c (* i (+ a (* c b))))))))
(if (<= c -3.8e-118)
t_1
(if (<= c 3.1e-147)
(* 2.0 (+ (* x y) (* z t)))
(if (or (<= c 1.75e-32) (not (<= c 5.5e+21)))
t_1
(* 2.0 (- (* x y) (* (* c c) (* b i)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * ((z * t) - (c * (i * (a + (c * b)))));
double tmp;
if (c <= -3.8e-118) {
tmp = t_1;
} else if (c <= 3.1e-147) {
tmp = 2.0 * ((x * y) + (z * t));
} else if ((c <= 1.75e-32) || !(c <= 5.5e+21)) {
tmp = t_1;
} else {
tmp = 2.0 * ((x * y) - ((c * c) * (b * i)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = 2.0d0 * ((z * t) - (c * (i * (a + (c * b)))))
if (c <= (-3.8d-118)) then
tmp = t_1
else if (c <= 3.1d-147) then
tmp = 2.0d0 * ((x * y) + (z * t))
else if ((c <= 1.75d-32) .or. (.not. (c <= 5.5d+21))) then
tmp = t_1
else
tmp = 2.0d0 * ((x * y) - ((c * c) * (b * i)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * ((z * t) - (c * (i * (a + (c * b)))));
double tmp;
if (c <= -3.8e-118) {
tmp = t_1;
} else if (c <= 3.1e-147) {
tmp = 2.0 * ((x * y) + (z * t));
} else if ((c <= 1.75e-32) || !(c <= 5.5e+21)) {
tmp = t_1;
} else {
tmp = 2.0 * ((x * y) - ((c * c) * (b * i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * ((z * t) - (c * (i * (a + (c * b))))) tmp = 0 if c <= -3.8e-118: tmp = t_1 elif c <= 3.1e-147: tmp = 2.0 * ((x * y) + (z * t)) elif (c <= 1.75e-32) or not (c <= 5.5e+21): tmp = t_1 else: tmp = 2.0 * ((x * y) - ((c * c) * (b * i))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(i * Float64(a + Float64(c * b)))))) tmp = 0.0 if (c <= -3.8e-118) tmp = t_1; elseif (c <= 3.1e-147) tmp = Float64(2.0 * Float64(Float64(x * y) + Float64(z * t))); elseif ((c <= 1.75e-32) || !(c <= 5.5e+21)) tmp = t_1; else tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(Float64(c * c) * Float64(b * i)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 2.0 * ((z * t) - (c * (i * (a + (c * b))))); tmp = 0.0; if (c <= -3.8e-118) tmp = t_1; elseif (c <= 3.1e-147) tmp = 2.0 * ((x * y) + (z * t)); elseif ((c <= 1.75e-32) || ~((c <= 5.5e+21))) tmp = t_1; else tmp = 2.0 * ((x * y) - ((c * c) * (b * i))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(i * N[(a + N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -3.8e-118], t$95$1, If[LessEqual[c, 3.1e-147], N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[c, 1.75e-32], N[Not[LessEqual[c, 5.5e+21]], $MachinePrecision]], t$95$1, N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(N[(c * c), $MachinePrecision] * N[(b * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(z \cdot t - c \cdot \left(i \cdot \left(a + c \cdot b\right)\right)\right)\\
\mathbf{if}\;c \leq -3.8 \cdot 10^{-118}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq 3.1 \cdot 10^{-147}:\\
\;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\
\mathbf{elif}\;c \leq 1.75 \cdot 10^{-32} \lor \neg \left(c \leq 5.5 \cdot 10^{+21}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y - \left(c \cdot c\right) \cdot \left(b \cdot i\right)\right)\\
\end{array}
\end{array}
if c < -3.8000000000000001e-118 or 3.1000000000000003e-147 < c < 1.7499999999999999e-32 or 5.5e21 < c Initial program 86.7%
Taylor expanded in x around 0 81.2%
if -3.8000000000000001e-118 < c < 3.1000000000000003e-147Initial program 96.8%
Taylor expanded in c around 0 85.5%
if 1.7499999999999999e-32 < c < 5.5e21Initial program 99.8%
Taylor expanded in a around 0 88.1%
Taylor expanded in z around 0 88.2%
unpow288.2%
Simplified88.2%
Final simplification82.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* c (* i (+ a (* c b))))) (t_2 (* 2.0 (- (* z t) t_1))))
(if (<= c -1.35e-14)
t_2
(if (<= c 1.4e-32)
(* 2.0 (- (+ (* x y) (* z t)) (* i (* c a))))
(if (or (<= c 7.8e+21) (not (<= c 1.2e+164)))
(* 2.0 (- (* x y) 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 = c * (i * (a + (c * b)));
double t_2 = 2.0 * ((z * t) - t_1);
double tmp;
if (c <= -1.35e-14) {
tmp = t_2;
} else if (c <= 1.4e-32) {
tmp = 2.0 * (((x * y) + (z * t)) - (i * (c * a)));
} else if ((c <= 7.8e+21) || !(c <= 1.2e+164)) {
tmp = 2.0 * ((x * y) - 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 = c * (i * (a + (c * b)))
t_2 = 2.0d0 * ((z * t) - t_1)
if (c <= (-1.35d-14)) then
tmp = t_2
else if (c <= 1.4d-32) then
tmp = 2.0d0 * (((x * y) + (z * t)) - (i * (c * a)))
else if ((c <= 7.8d+21) .or. (.not. (c <= 1.2d+164))) then
tmp = 2.0d0 * ((x * y) - 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 = c * (i * (a + (c * b)));
double t_2 = 2.0 * ((z * t) - t_1);
double tmp;
if (c <= -1.35e-14) {
tmp = t_2;
} else if (c <= 1.4e-32) {
tmp = 2.0 * (((x * y) + (z * t)) - (i * (c * a)));
} else if ((c <= 7.8e+21) || !(c <= 1.2e+164)) {
tmp = 2.0 * ((x * y) - t_1);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = c * (i * (a + (c * b))) t_2 = 2.0 * ((z * t) - t_1) tmp = 0 if c <= -1.35e-14: tmp = t_2 elif c <= 1.4e-32: tmp = 2.0 * (((x * y) + (z * t)) - (i * (c * a))) elif (c <= 7.8e+21) or not (c <= 1.2e+164): tmp = 2.0 * ((x * y) - t_1) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(c * Float64(i * Float64(a + Float64(c * b)))) t_2 = Float64(2.0 * Float64(Float64(z * t) - t_1)) tmp = 0.0 if (c <= -1.35e-14) tmp = t_2; elseif (c <= 1.4e-32) tmp = Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(i * Float64(c * a)))); elseif ((c <= 7.8e+21) || !(c <= 1.2e+164)) tmp = Float64(2.0 * Float64(Float64(x * y) - t_1)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = c * (i * (a + (c * b))); t_2 = 2.0 * ((z * t) - t_1); tmp = 0.0; if (c <= -1.35e-14) tmp = t_2; elseif (c <= 1.4e-32) tmp = 2.0 * (((x * y) + (z * t)) - (i * (c * a))); elseif ((c <= 7.8e+21) || ~((c <= 1.2e+164))) tmp = 2.0 * ((x * y) - 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[(c * N[(i * N[(a + N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(N[(z * t), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.35e-14], t$95$2, If[LessEqual[c, 1.4e-32], N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(i * N[(c * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[c, 7.8e+21], N[Not[LessEqual[c, 1.2e+164]], $MachinePrecision]], N[(2.0 * N[(N[(x * y), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot \left(i \cdot \left(a + c \cdot b\right)\right)\\
t_2 := 2 \cdot \left(z \cdot t - t_1\right)\\
\mathbf{if}\;c \leq -1.35 \cdot 10^{-14}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq 1.4 \cdot 10^{-32}:\\
\;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - i \cdot \left(c \cdot a\right)\right)\\
\mathbf{elif}\;c \leq 7.8 \cdot 10^{+21} \lor \neg \left(c \leq 1.2 \cdot 10^{+164}\right):\\
\;\;\;\;2 \cdot \left(x \cdot y - t_1\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if c < -1.3499999999999999e-14 or 7.8e21 < c < 1.20000000000000005e164Initial program 81.0%
Taylor expanded in x around 0 84.8%
if -1.3499999999999999e-14 < c < 1.3999999999999999e-32Initial program 97.3%
Taylor expanded in a around inf 91.6%
if 1.3999999999999999e-32 < c < 7.8e21 or 1.20000000000000005e164 < c Initial program 89.8%
Taylor expanded in z around 0 99.9%
Final simplification90.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* x y) (* z t))))
(if (or (<= a -1.2e+16) (not (<= a 3.8e+126)))
(* 2.0 (- t_1 (/ (* c i) (/ 1.0 a))))
(* 2.0 (- t_1 (* i (* c (* c b))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (x * y) + (z * t);
double tmp;
if ((a <= -1.2e+16) || !(a <= 3.8e+126)) {
tmp = 2.0 * (t_1 - ((c * i) / (1.0 / a)));
} else {
tmp = 2.0 * (t_1 - (i * (c * (c * b))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = (x * y) + (z * t)
if ((a <= (-1.2d+16)) .or. (.not. (a <= 3.8d+126))) then
tmp = 2.0d0 * (t_1 - ((c * i) / (1.0d0 / a)))
else
tmp = 2.0d0 * (t_1 - (i * (c * (c * b))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (x * y) + (z * t);
double tmp;
if ((a <= -1.2e+16) || !(a <= 3.8e+126)) {
tmp = 2.0 * (t_1 - ((c * i) / (1.0 / a)));
} else {
tmp = 2.0 * (t_1 - (i * (c * (c * b))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (x * y) + (z * t) tmp = 0 if (a <= -1.2e+16) or not (a <= 3.8e+126): tmp = 2.0 * (t_1 - ((c * i) / (1.0 / a))) else: tmp = 2.0 * (t_1 - (i * (c * (c * b)))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(x * y) + Float64(z * t)) tmp = 0.0 if ((a <= -1.2e+16) || !(a <= 3.8e+126)) tmp = Float64(2.0 * Float64(t_1 - Float64(Float64(c * i) / Float64(1.0 / a)))); else tmp = Float64(2.0 * Float64(t_1 - Float64(i * Float64(c * Float64(c * b))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (x * y) + (z * t); tmp = 0.0; if ((a <= -1.2e+16) || ~((a <= 3.8e+126))) tmp = 2.0 * (t_1 - ((c * i) / (1.0 / a))); else tmp = 2.0 * (t_1 - (i * (c * (c * b)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[a, -1.2e+16], N[Not[LessEqual[a, 3.8e+126]], $MachinePrecision]], N[(2.0 * N[(t$95$1 - N[(N[(c * i), $MachinePrecision] / N[(1.0 / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(t$95$1 - N[(i * N[(c * N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot y + z \cdot t\\
\mathbf{if}\;a \leq -1.2 \cdot 10^{+16} \lor \neg \left(a \leq 3.8 \cdot 10^{+126}\right):\\
\;\;\;\;2 \cdot \left(t_1 - \frac{c \cdot i}{\frac{1}{a}}\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(t_1 - i \cdot \left(c \cdot \left(c \cdot b\right)\right)\right)\\
\end{array}
\end{array}
if a < -1.2e16 or 3.80000000000000017e126 < a Initial program 84.7%
associate-*r*94.0%
*-commutative94.0%
flip-+46.4%
associate-*r/43.6%
pow243.6%
Applied egg-rr43.6%
associate-/l*46.3%
*-commutative46.3%
*-commutative46.3%
Simplified46.3%
Taylor expanded in a around inf 90.1%
if -1.2e16 < a < 3.80000000000000017e126Initial program 93.6%
Taylor expanded in a around 0 88.2%
Final simplification88.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* x y) (* z t))))
(if (or (<= a -1.45e+39) (not (<= a 1.9e+126)))
(* 2.0 (- t_1 (/ (* c i) (/ 1.0 a))))
(* 2.0 (- t_1 (* (* c i) (* c b)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (x * y) + (z * t);
double tmp;
if ((a <= -1.45e+39) || !(a <= 1.9e+126)) {
tmp = 2.0 * (t_1 - ((c * i) / (1.0 / a)));
} else {
tmp = 2.0 * (t_1 - ((c * i) * (c * b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = (x * y) + (z * t)
if ((a <= (-1.45d+39)) .or. (.not. (a <= 1.9d+126))) then
tmp = 2.0d0 * (t_1 - ((c * i) / (1.0d0 / a)))
else
tmp = 2.0d0 * (t_1 - ((c * i) * (c * b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (x * y) + (z * t);
double tmp;
if ((a <= -1.45e+39) || !(a <= 1.9e+126)) {
tmp = 2.0 * (t_1 - ((c * i) / (1.0 / a)));
} else {
tmp = 2.0 * (t_1 - ((c * i) * (c * b)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (x * y) + (z * t) tmp = 0 if (a <= -1.45e+39) or not (a <= 1.9e+126): tmp = 2.0 * (t_1 - ((c * i) / (1.0 / a))) else: tmp = 2.0 * (t_1 - ((c * i) * (c * b))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(x * y) + Float64(z * t)) tmp = 0.0 if ((a <= -1.45e+39) || !(a <= 1.9e+126)) tmp = Float64(2.0 * Float64(t_1 - Float64(Float64(c * i) / Float64(1.0 / a)))); else tmp = Float64(2.0 * Float64(t_1 - Float64(Float64(c * i) * Float64(c * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (x * y) + (z * t); tmp = 0.0; if ((a <= -1.45e+39) || ~((a <= 1.9e+126))) tmp = 2.0 * (t_1 - ((c * i) / (1.0 / a))); else tmp = 2.0 * (t_1 - ((c * i) * (c * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[a, -1.45e+39], N[Not[LessEqual[a, 1.9e+126]], $MachinePrecision]], N[(2.0 * N[(t$95$1 - N[(N[(c * i), $MachinePrecision] / N[(1.0 / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(t$95$1 - N[(N[(c * i), $MachinePrecision] * N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot y + z \cdot t\\
\mathbf{if}\;a \leq -1.45 \cdot 10^{+39} \lor \neg \left(a \leq 1.9 \cdot 10^{+126}\right):\\
\;\;\;\;2 \cdot \left(t_1 - \frac{c \cdot i}{\frac{1}{a}}\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(t_1 - \left(c \cdot i\right) \cdot \left(c \cdot b\right)\right)\\
\end{array}
\end{array}
if a < -1.45000000000000015e39 or 1.90000000000000008e126 < a Initial program 84.8%
associate-*r*93.7%
*-commutative93.7%
flip-+43.0%
associate-*r/40.1%
pow240.1%
Applied egg-rr40.1%
associate-/l*43.0%
*-commutative43.0%
*-commutative43.0%
Simplified43.0%
Taylor expanded in a around inf 90.5%
if -1.45000000000000015e39 < a < 1.90000000000000008e126Initial program 93.2%
associate-*l*95.0%
fma-def95.0%
Simplified95.0%
fma-def95.0%
+-commutative95.0%
Applied egg-rr95.0%
Taylor expanded in a around 0 88.9%
Final simplification89.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* c (* i (+ a (* c b))))))
(if (or (<= t -3.85e-131) (not (<= t 9.2e+23)))
(* 2.0 (- (* z t) t_1))
(* 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 * (i * (a + (c * b)));
double tmp;
if ((t <= -3.85e-131) || !(t <= 9.2e+23)) {
tmp = 2.0 * ((z * t) - t_1);
} 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 * (i * (a + (c * b)))
if ((t <= (-3.85d-131)) .or. (.not. (t <= 9.2d+23))) then
tmp = 2.0d0 * ((z * t) - t_1)
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 * (i * (a + (c * b)));
double tmp;
if ((t <= -3.85e-131) || !(t <= 9.2e+23)) {
tmp = 2.0 * ((z * t) - t_1);
} else {
tmp = 2.0 * ((x * y) - t_1);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = c * (i * (a + (c * b))) tmp = 0 if (t <= -3.85e-131) or not (t <= 9.2e+23): tmp = 2.0 * ((z * t) - t_1) 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(i * Float64(a + Float64(c * b)))) tmp = 0.0 if ((t <= -3.85e-131) || !(t <= 9.2e+23)) tmp = Float64(2.0 * Float64(Float64(z * t) - t_1)); 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 * (i * (a + (c * b))); tmp = 0.0; if ((t <= -3.85e-131) || ~((t <= 9.2e+23))) tmp = 2.0 * ((z * t) - t_1); 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[(i * N[(a + N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t, -3.85e-131], N[Not[LessEqual[t, 9.2e+23]], $MachinePrecision]], N[(2.0 * N[(N[(z * t), $MachinePrecision] - t$95$1), $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(i \cdot \left(a + c \cdot b\right)\right)\\
\mathbf{if}\;t \leq -3.85 \cdot 10^{-131} \lor \neg \left(t \leq 9.2 \cdot 10^{+23}\right):\\
\;\;\;\;2 \cdot \left(z \cdot t - t_1\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y - t_1\right)\\
\end{array}
\end{array}
if t < -3.85000000000000007e-131 or 9.2000000000000002e23 < t Initial program 90.7%
Taylor expanded in x around 0 79.3%
if -3.85000000000000007e-131 < t < 9.2000000000000002e23Initial program 89.4%
Taylor expanded in z around 0 77.4%
Final simplification78.4%
(FPCore (x y z t a b c i) :precision binary64 (* 2.0 (- (+ (* x y) (* z t)) (* (* c i) (+ a (* c b))))))
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)) - ((c * i) * (a + (c * b))));
}
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)) - ((c * i) * (a + (c * b))))
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)) - ((c * i) * (a + (c * b))));
}
def code(x, y, z, t, a, b, c, i): return 2.0 * (((x * y) + (z * t)) - ((c * i) * (a + (c * b))))
function code(x, y, z, t, a, b, c, i) return Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(Float64(c * i) * Float64(a + Float64(c * b))))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = 2.0 * (((x * y) + (z * t)) - ((c * i) * (a + (c * b)))); 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[(c * i), $MachinePrecision] * N[(a + N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(c \cdot i\right) \cdot \left(a + c \cdot b\right)\right)
\end{array}
Initial program 90.1%
associate-*l*94.5%
fma-def94.5%
Simplified94.5%
fma-def94.5%
+-commutative94.5%
Applied egg-rr94.5%
Final simplification94.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (* c (* i (* c b))) -2.0)))
(if (<= c -2e+71)
t_1
(if (<= c 1.35e-33)
(* 2.0 (* z t))
(if (or (<= c 9.5e+121) (not (<= c 4.2e+189)))
t_1
(* a (* c (* i -2.0))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (c * (i * (c * b))) * -2.0;
double tmp;
if (c <= -2e+71) {
tmp = t_1;
} else if (c <= 1.35e-33) {
tmp = 2.0 * (z * t);
} else if ((c <= 9.5e+121) || !(c <= 4.2e+189)) {
tmp = t_1;
} else {
tmp = a * (c * (i * -2.0));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = (c * (i * (c * b))) * (-2.0d0)
if (c <= (-2d+71)) then
tmp = t_1
else if (c <= 1.35d-33) then
tmp = 2.0d0 * (z * t)
else if ((c <= 9.5d+121) .or. (.not. (c <= 4.2d+189))) then
tmp = t_1
else
tmp = a * (c * (i * (-2.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (c * (i * (c * b))) * -2.0;
double tmp;
if (c <= -2e+71) {
tmp = t_1;
} else if (c <= 1.35e-33) {
tmp = 2.0 * (z * t);
} else if ((c <= 9.5e+121) || !(c <= 4.2e+189)) {
tmp = t_1;
} else {
tmp = a * (c * (i * -2.0));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (c * (i * (c * b))) * -2.0 tmp = 0 if c <= -2e+71: tmp = t_1 elif c <= 1.35e-33: tmp = 2.0 * (z * t) elif (c <= 9.5e+121) or not (c <= 4.2e+189): tmp = t_1 else: tmp = a * (c * (i * -2.0)) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(c * Float64(i * Float64(c * b))) * -2.0) tmp = 0.0 if (c <= -2e+71) tmp = t_1; elseif (c <= 1.35e-33) tmp = Float64(2.0 * Float64(z * t)); elseif ((c <= 9.5e+121) || !(c <= 4.2e+189)) tmp = t_1; else tmp = Float64(a * Float64(c * Float64(i * -2.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (c * (i * (c * b))) * -2.0; tmp = 0.0; if (c <= -2e+71) tmp = t_1; elseif (c <= 1.35e-33) tmp = 2.0 * (z * t); elseif ((c <= 9.5e+121) || ~((c <= 4.2e+189))) tmp = t_1; else tmp = a * (c * (i * -2.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(c * N[(i * N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]}, If[LessEqual[c, -2e+71], t$95$1, If[LessEqual[c, 1.35e-33], N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[c, 9.5e+121], N[Not[LessEqual[c, 4.2e+189]], $MachinePrecision]], t$95$1, N[(a * N[(c * N[(i * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(c \cdot \left(i \cdot \left(c \cdot b\right)\right)\right) \cdot -2\\
\mathbf{if}\;c \leq -2 \cdot 10^{+71}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq 1.35 \cdot 10^{-33}:\\
\;\;\;\;2 \cdot \left(z \cdot t\right)\\
\mathbf{elif}\;c \leq 9.5 \cdot 10^{+121} \lor \neg \left(c \leq 4.2 \cdot 10^{+189}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(c \cdot \left(i \cdot -2\right)\right)\\
\end{array}
\end{array}
if c < -2.0000000000000001e71 or 1.35e-33 < c < 9.49999999999999949e121 or 4.19999999999999985e189 < c Initial program 84.8%
associate-*l*92.7%
fma-def92.7%
Simplified92.7%
fma-def92.7%
+-commutative92.7%
Applied egg-rr92.7%
Taylor expanded in a around 0 78.7%
Taylor expanded in c around inf 62.5%
mul-1-neg62.5%
unpow262.5%
*-commutative62.5%
*-commutative62.5%
distribute-rgt-neg-in62.5%
*-commutative62.5%
associate-*l*60.0%
distribute-rgt-neg-in60.0%
Simplified60.0%
Taylor expanded in i around 0 62.5%
associate-*r*61.5%
unpow261.5%
associate-*l*62.3%
*-commutative62.3%
associate-*r*61.4%
associate-*l*62.6%
Simplified62.6%
if -2.0000000000000001e71 < c < 1.35e-33Initial program 96.8%
Taylor expanded in z around inf 45.1%
if 9.49999999999999949e121 < c < 4.19999999999999985e189Initial program 75.9%
Taylor expanded in x around 0 85.1%
Taylor expanded in c around 0 71.1%
mul-1-neg71.1%
sub-neg71.1%
*-commutative71.1%
associate-*r*75.7%
*-commutative75.7%
Simplified75.7%
Taylor expanded in t around 0 51.1%
*-commutative51.1%
*-commutative51.1%
associate-*r*37.0%
associate-*l*37.0%
Simplified37.0%
Taylor expanded in c around 0 51.1%
*-commutative51.1%
associate-*r*37.0%
associate-*r*37.0%
associate-*r*51.1%
*-commutative51.1%
associate-*r*55.7%
Simplified55.7%
Final simplification53.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (* c (* i (* c b))) -2.0)))
(if (<= c -1.25e+73)
t_1
(if (<= c 2.7e-33)
(* 2.0 (* z t))
(if (<= c 7.5e+121)
(* (* (* c c) (* b i)) -2.0)
(if (<= c 4.2e+189) (* a (* c (* i -2.0))) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (c * (i * (c * b))) * -2.0;
double tmp;
if (c <= -1.25e+73) {
tmp = t_1;
} else if (c <= 2.7e-33) {
tmp = 2.0 * (z * t);
} else if (c <= 7.5e+121) {
tmp = ((c * c) * (b * i)) * -2.0;
} else if (c <= 4.2e+189) {
tmp = a * (c * (i * -2.0));
} 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 = (c * (i * (c * b))) * (-2.0d0)
if (c <= (-1.25d+73)) then
tmp = t_1
else if (c <= 2.7d-33) then
tmp = 2.0d0 * (z * t)
else if (c <= 7.5d+121) then
tmp = ((c * c) * (b * i)) * (-2.0d0)
else if (c <= 4.2d+189) then
tmp = a * (c * (i * (-2.0d0)))
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 = (c * (i * (c * b))) * -2.0;
double tmp;
if (c <= -1.25e+73) {
tmp = t_1;
} else if (c <= 2.7e-33) {
tmp = 2.0 * (z * t);
} else if (c <= 7.5e+121) {
tmp = ((c * c) * (b * i)) * -2.0;
} else if (c <= 4.2e+189) {
tmp = a * (c * (i * -2.0));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (c * (i * (c * b))) * -2.0 tmp = 0 if c <= -1.25e+73: tmp = t_1 elif c <= 2.7e-33: tmp = 2.0 * (z * t) elif c <= 7.5e+121: tmp = ((c * c) * (b * i)) * -2.0 elif c <= 4.2e+189: tmp = a * (c * (i * -2.0)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(c * Float64(i * Float64(c * b))) * -2.0) tmp = 0.0 if (c <= -1.25e+73) tmp = t_1; elseif (c <= 2.7e-33) tmp = Float64(2.0 * Float64(z * t)); elseif (c <= 7.5e+121) tmp = Float64(Float64(Float64(c * c) * Float64(b * i)) * -2.0); elseif (c <= 4.2e+189) tmp = Float64(a * Float64(c * Float64(i * -2.0))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (c * (i * (c * b))) * -2.0; tmp = 0.0; if (c <= -1.25e+73) tmp = t_1; elseif (c <= 2.7e-33) tmp = 2.0 * (z * t); elseif (c <= 7.5e+121) tmp = ((c * c) * (b * i)) * -2.0; elseif (c <= 4.2e+189) tmp = a * (c * (i * -2.0)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(c * N[(i * N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]}, If[LessEqual[c, -1.25e+73], t$95$1, If[LessEqual[c, 2.7e-33], N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 7.5e+121], N[(N[(N[(c * c), $MachinePrecision] * N[(b * i), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision], If[LessEqual[c, 4.2e+189], N[(a * N[(c * N[(i * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(c \cdot \left(i \cdot \left(c \cdot b\right)\right)\right) \cdot -2\\
\mathbf{if}\;c \leq -1.25 \cdot 10^{+73}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq 2.7 \cdot 10^{-33}:\\
\;\;\;\;2 \cdot \left(z \cdot t\right)\\
\mathbf{elif}\;c \leq 7.5 \cdot 10^{+121}:\\
\;\;\;\;\left(\left(c \cdot c\right) \cdot \left(b \cdot i\right)\right) \cdot -2\\
\mathbf{elif}\;c \leq 4.2 \cdot 10^{+189}:\\
\;\;\;\;a \cdot \left(c \cdot \left(i \cdot -2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if c < -1.24999999999999994e73 or 4.19999999999999985e189 < c Initial program 80.3%
associate-*l*90.6%
fma-def90.6%
Simplified90.6%
fma-def90.6%
+-commutative90.6%
Applied egg-rr90.6%
Taylor expanded in a around 0 75.5%
Taylor expanded in c around inf 68.7%
mul-1-neg68.7%
unpow268.7%
*-commutative68.7%
*-commutative68.7%
distribute-rgt-neg-in68.7%
*-commutative68.7%
associate-*l*66.3%
distribute-rgt-neg-in66.3%
Simplified66.3%
Taylor expanded in i around 0 68.7%
associate-*r*67.2%
unpow267.2%
associate-*l*68.4%
*-commutative68.4%
associate-*r*67.1%
associate-*l*68.9%
Simplified68.9%
if -1.24999999999999994e73 < c < 2.7000000000000001e-33Initial program 96.8%
Taylor expanded in z around inf 45.1%
if 2.7000000000000001e-33 < c < 7.49999999999999965e121Initial program 94.3%
associate-*l*97.0%
fma-def97.0%
Simplified97.0%
fma-def97.0%
+-commutative97.0%
Applied egg-rr97.0%
Taylor expanded in a around 0 85.5%
Taylor expanded in c around inf 49.7%
mul-1-neg49.7%
unpow249.7%
*-commutative49.7%
*-commutative49.7%
distribute-rgt-neg-in49.7%
*-commutative49.7%
associate-*l*47.0%
distribute-rgt-neg-in47.0%
Simplified47.0%
Taylor expanded in i around 0 49.7%
unpow249.7%
Simplified49.7%
if 7.49999999999999965e121 < c < 4.19999999999999985e189Initial program 75.9%
Taylor expanded in x around 0 85.1%
Taylor expanded in c around 0 71.1%
mul-1-neg71.1%
sub-neg71.1%
*-commutative71.1%
associate-*r*75.7%
*-commutative75.7%
Simplified75.7%
Taylor expanded in t around 0 51.1%
*-commutative51.1%
*-commutative51.1%
associate-*r*37.0%
associate-*l*37.0%
Simplified37.0%
Taylor expanded in c around 0 51.1%
*-commutative51.1%
associate-*r*37.0%
associate-*r*37.0%
associate-*r*51.1%
*-commutative51.1%
associate-*r*55.7%
Simplified55.7%
Final simplification53.3%
(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))))
(if (<= t -3.4e-129)
t_2
(if (<= t -2.4e-237)
t_1
(if (<= t 3e-76) (* 2.0 (* x y)) (if (<= t 0.22) 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 = a * (c * (i * -2.0));
double t_2 = 2.0 * (z * t);
double tmp;
if (t <= -3.4e-129) {
tmp = t_2;
} else if (t <= -2.4e-237) {
tmp = t_1;
} else if (t <= 3e-76) {
tmp = 2.0 * (x * y);
} else if (t <= 0.22) {
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 = a * (c * (i * (-2.0d0)))
t_2 = 2.0d0 * (z * t)
if (t <= (-3.4d-129)) then
tmp = t_2
else if (t <= (-2.4d-237)) then
tmp = t_1
else if (t <= 3d-76) then
tmp = 2.0d0 * (x * y)
else if (t <= 0.22d0) 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 = a * (c * (i * -2.0));
double t_2 = 2.0 * (z * t);
double tmp;
if (t <= -3.4e-129) {
tmp = t_2;
} else if (t <= -2.4e-237) {
tmp = t_1;
} else if (t <= 3e-76) {
tmp = 2.0 * (x * y);
} else if (t <= 0.22) {
tmp = t_1;
} else {
tmp = t_2;
}
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) tmp = 0 if t <= -3.4e-129: tmp = t_2 elif t <= -2.4e-237: tmp = t_1 elif t <= 3e-76: tmp = 2.0 * (x * y) elif t <= 0.22: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a * Float64(c * Float64(i * -2.0))) t_2 = Float64(2.0 * Float64(z * t)) tmp = 0.0 if (t <= -3.4e-129) tmp = t_2; elseif (t <= -2.4e-237) tmp = t_1; elseif (t <= 3e-76) tmp = Float64(2.0 * Float64(x * y)); elseif (t <= 0.22) 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 = a * (c * (i * -2.0)); t_2 = 2.0 * (z * t); tmp = 0.0; if (t <= -3.4e-129) tmp = t_2; elseif (t <= -2.4e-237) tmp = t_1; elseif (t <= 3e-76) tmp = 2.0 * (x * y); elseif (t <= 0.22) 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[(a * N[(c * N[(i * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.4e-129], t$95$2, If[LessEqual[t, -2.4e-237], t$95$1, If[LessEqual[t, 3e-76], N[(2.0 * N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 0.22], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(c \cdot \left(i \cdot -2\right)\right)\\
t_2 := 2 \cdot \left(z \cdot t\right)\\
\mathbf{if}\;t \leq -3.4 \cdot 10^{-129}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -2.4 \cdot 10^{-237}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 3 \cdot 10^{-76}:\\
\;\;\;\;2 \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;t \leq 0.22:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -3.40000000000000013e-129 or 0.220000000000000001 < t Initial program 90.4%
Taylor expanded in z around inf 41.2%
if -3.40000000000000013e-129 < t < -2.4e-237 or 3.00000000000000024e-76 < t < 0.220000000000000001Initial program 84.6%
Taylor expanded in x around 0 69.6%
Taylor expanded in c around 0 45.9%
mul-1-neg45.9%
sub-neg45.9%
*-commutative45.9%
associate-*r*52.2%
*-commutative52.2%
Simplified52.2%
Taylor expanded in t around 0 33.7%
*-commutative33.7%
*-commutative33.7%
associate-*r*33.7%
associate-*l*33.7%
Simplified33.7%
Taylor expanded in c around 0 33.7%
*-commutative33.7%
associate-*r*33.7%
associate-*r*33.7%
associate-*r*33.7%
*-commutative33.7%
associate-*r*37.8%
Simplified37.8%
if -2.4e-237 < t < 3.00000000000000024e-76Initial program 92.9%
Taylor expanded in x around inf 33.5%
Final simplification38.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (* z t))))
(if (<= t -3.4e-134)
t_1
(if (<= t -3.65e-236)
(* (* c (* a i)) -2.0)
(if (<= t 1.25e-75)
(* 2.0 (* x y))
(if (<= t 0.205) (* a (* c (* i -2.0))) 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 * (z * t);
double tmp;
if (t <= -3.4e-134) {
tmp = t_1;
} else if (t <= -3.65e-236) {
tmp = (c * (a * i)) * -2.0;
} else if (t <= 1.25e-75) {
tmp = 2.0 * (x * y);
} else if (t <= 0.205) {
tmp = a * (c * (i * -2.0));
} 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 * (z * t)
if (t <= (-3.4d-134)) then
tmp = t_1
else if (t <= (-3.65d-236)) then
tmp = (c * (a * i)) * (-2.0d0)
else if (t <= 1.25d-75) then
tmp = 2.0d0 * (x * y)
else if (t <= 0.205d0) then
tmp = a * (c * (i * (-2.0d0)))
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 * (z * t);
double tmp;
if (t <= -3.4e-134) {
tmp = t_1;
} else if (t <= -3.65e-236) {
tmp = (c * (a * i)) * -2.0;
} else if (t <= 1.25e-75) {
tmp = 2.0 * (x * y);
} else if (t <= 0.205) {
tmp = a * (c * (i * -2.0));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * (z * t) tmp = 0 if t <= -3.4e-134: tmp = t_1 elif t <= -3.65e-236: tmp = (c * (a * i)) * -2.0 elif t <= 1.25e-75: tmp = 2.0 * (x * y) elif t <= 0.205: tmp = a * (c * (i * -2.0)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(z * t)) tmp = 0.0 if (t <= -3.4e-134) tmp = t_1; elseif (t <= -3.65e-236) tmp = Float64(Float64(c * Float64(a * i)) * -2.0); elseif (t <= 1.25e-75) tmp = Float64(2.0 * Float64(x * y)); elseif (t <= 0.205) tmp = Float64(a * Float64(c * Float64(i * -2.0))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 2.0 * (z * t); tmp = 0.0; if (t <= -3.4e-134) tmp = t_1; elseif (t <= -3.65e-236) tmp = (c * (a * i)) * -2.0; elseif (t <= 1.25e-75) tmp = 2.0 * (x * y); elseif (t <= 0.205) tmp = a * (c * (i * -2.0)); 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[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.4e-134], t$95$1, If[LessEqual[t, -3.65e-236], N[(N[(c * N[(a * i), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision], If[LessEqual[t, 1.25e-75], N[(2.0 * N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 0.205], N[(a * N[(c * N[(i * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(z \cdot t\right)\\
\mathbf{if}\;t \leq -3.4 \cdot 10^{-134}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -3.65 \cdot 10^{-236}:\\
\;\;\;\;\left(c \cdot \left(a \cdot i\right)\right) \cdot -2\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{-75}:\\
\;\;\;\;2 \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;t \leq 0.205:\\
\;\;\;\;a \cdot \left(c \cdot \left(i \cdot -2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -3.39999999999999977e-134 or 0.204999999999999988 < t Initial program 90.5%
Taylor expanded in z around inf 41.0%
if -3.39999999999999977e-134 < t < -3.65000000000000014e-236Initial program 82.2%
Taylor expanded in x around 0 75.4%
Taylor expanded in c around 0 50.0%
mul-1-neg50.0%
sub-neg50.0%
*-commutative50.0%
associate-*r*49.7%
*-commutative49.7%
Simplified49.7%
Taylor expanded in t around 0 46.0%
*-commutative46.0%
Simplified46.0%
if -3.65000000000000014e-236 < t < 1.24999999999999995e-75Initial program 92.9%
Taylor expanded in x around inf 33.5%
if 1.24999999999999995e-75 < t < 0.204999999999999988Initial program 87.8%
Taylor expanded in x around 0 57.9%
Taylor expanded in c around 0 41.5%
mul-1-neg41.5%
sub-neg41.5%
*-commutative41.5%
associate-*r*59.4%
*-commutative59.4%
Simplified59.4%
Taylor expanded in t around 0 15.0%
*-commutative15.0%
*-commutative15.0%
associate-*r*26.8%
associate-*l*26.8%
Simplified26.8%
Taylor expanded in c around 0 15.0%
*-commutative15.0%
associate-*r*26.8%
associate-*r*26.8%
associate-*r*15.0%
*-commutative15.0%
associate-*r*26.7%
Simplified26.7%
Final simplification38.6%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= c -2.3e+75) (not (<= c 1.35e-49))) (* (* c (* i (+ a (* c b)))) -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 <= -2.3e+75) || !(c <= 1.35e-49)) {
tmp = (c * (i * (a + (c * b)))) * -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 <= (-2.3d+75)) .or. (.not. (c <= 1.35d-49))) then
tmp = (c * (i * (a + (c * b)))) * (-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 <= -2.3e+75) || !(c <= 1.35e-49)) {
tmp = (c * (i * (a + (c * b)))) * -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 <= -2.3e+75) or not (c <= 1.35e-49): tmp = (c * (i * (a + (c * b)))) * -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 <= -2.3e+75) || !(c <= 1.35e-49)) tmp = Float64(Float64(c * Float64(i * Float64(a + Float64(c * b)))) * -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 <= -2.3e+75) || ~((c <= 1.35e-49))) tmp = (c * (i * (a + (c * b)))) * -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, -2.3e+75], N[Not[LessEqual[c, 1.35e-49]], $MachinePrecision]], N[(N[(c * N[(i * N[(a + N[(c * b), $MachinePrecision]), $MachinePrecision]), $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 -2.3 \cdot 10^{+75} \lor \neg \left(c \leq 1.35 \cdot 10^{-49}\right):\\
\;\;\;\;\left(c \cdot \left(i \cdot \left(a + c \cdot b\right)\right)\right) \cdot -2\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\
\end{array}
\end{array}
if c < -2.2999999999999999e75 or 1.35e-49 < c Initial program 83.8%
associate-*r*92.4%
*-commutative92.4%
flip-+57.9%
associate-*r/55.1%
pow255.1%
Applied egg-rr55.1%
associate-/l*57.9%
*-commutative57.9%
*-commutative57.9%
Simplified57.9%
Taylor expanded in c around inf 59.7%
distribute-lft-out59.7%
*-commutative59.7%
mul-1-neg59.7%
unpow259.7%
associate-*r*57.0%
*-commutative57.0%
associate-*l*60.7%
associate-*r*64.5%
*-commutative64.5%
associate-*r*59.9%
*-commutative59.9%
distribute-rgt-out73.6%
Simplified73.6%
Taylor expanded in i around 0 75.1%
if -2.2999999999999999e75 < c < 1.35e-49Initial program 96.7%
Taylor expanded in c around 0 71.2%
Final simplification73.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (* z t))))
(if (<= t -6.6e-100)
t_1
(if (<= t 1.9e-75)
(* 2.0 (* x y))
(if (<= t 0.216) (* (* c a) (* i -2.0)) 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 * (z * t);
double tmp;
if (t <= -6.6e-100) {
tmp = t_1;
} else if (t <= 1.9e-75) {
tmp = 2.0 * (x * y);
} else if (t <= 0.216) {
tmp = (c * a) * (i * -2.0);
} 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 * (z * t)
if (t <= (-6.6d-100)) then
tmp = t_1
else if (t <= 1.9d-75) then
tmp = 2.0d0 * (x * y)
else if (t <= 0.216d0) then
tmp = (c * a) * (i * (-2.0d0))
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 * (z * t);
double tmp;
if (t <= -6.6e-100) {
tmp = t_1;
} else if (t <= 1.9e-75) {
tmp = 2.0 * (x * y);
} else if (t <= 0.216) {
tmp = (c * a) * (i * -2.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * (z * t) tmp = 0 if t <= -6.6e-100: tmp = t_1 elif t <= 1.9e-75: tmp = 2.0 * (x * y) elif t <= 0.216: tmp = (c * a) * (i * -2.0) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(z * t)) tmp = 0.0 if (t <= -6.6e-100) tmp = t_1; elseif (t <= 1.9e-75) tmp = Float64(2.0 * Float64(x * y)); elseif (t <= 0.216) tmp = Float64(Float64(c * a) * Float64(i * -2.0)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 2.0 * (z * t); tmp = 0.0; if (t <= -6.6e-100) tmp = t_1; elseif (t <= 1.9e-75) tmp = 2.0 * (x * y); elseif (t <= 0.216) tmp = (c * a) * (i * -2.0); 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[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.6e-100], t$95$1, If[LessEqual[t, 1.9e-75], N[(2.0 * N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 0.216], N[(N[(c * a), $MachinePrecision] * N[(i * -2.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(z \cdot t\right)\\
\mathbf{if}\;t \leq -6.6 \cdot 10^{-100}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{-75}:\\
\;\;\;\;2 \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;t \leq 0.216:\\
\;\;\;\;\left(c \cdot a\right) \cdot \left(i \cdot -2\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -6.59999999999999993e-100 or 0.215999999999999998 < t Initial program 90.0%
Taylor expanded in z around inf 42.5%
if -6.59999999999999993e-100 < t < 1.89999999999999997e-75Initial program 90.6%
Taylor expanded in x around inf 31.7%
if 1.89999999999999997e-75 < t < 0.215999999999999998Initial program 87.8%
Taylor expanded in x around 0 57.9%
Taylor expanded in c around 0 41.5%
mul-1-neg41.5%
sub-neg41.5%
*-commutative41.5%
associate-*r*59.4%
*-commutative59.4%
Simplified59.4%
Taylor expanded in t around 0 15.0%
*-commutative15.0%
*-commutative15.0%
associate-*r*26.8%
associate-*l*26.8%
Simplified26.8%
Final simplification37.2%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= c -4.4e+76) (not (<= c 5e+57))) (* (* c (* i (* c b))) -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 <= -4.4e+76) || !(c <= 5e+57)) {
tmp = (c * (i * (c * b))) * -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 <= (-4.4d+76)) .or. (.not. (c <= 5d+57))) then
tmp = (c * (i * (c * b))) * (-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 <= -4.4e+76) || !(c <= 5e+57)) {
tmp = (c * (i * (c * b))) * -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 <= -4.4e+76) or not (c <= 5e+57): tmp = (c * (i * (c * b))) * -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 <= -4.4e+76) || !(c <= 5e+57)) tmp = Float64(Float64(c * Float64(i * Float64(c * b))) * -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 <= -4.4e+76) || ~((c <= 5e+57))) tmp = (c * (i * (c * b))) * -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, -4.4e+76], N[Not[LessEqual[c, 5e+57]], $MachinePrecision]], N[(N[(c * N[(i * N[(c * b), $MachinePrecision]), $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 -4.4 \cdot 10^{+76} \lor \neg \left(c \leq 5 \cdot 10^{+57}\right):\\
\;\;\;\;\left(c \cdot \left(i \cdot \left(c \cdot b\right)\right)\right) \cdot -2\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\
\end{array}
\end{array}
if c < -4.4000000000000001e76 or 4.99999999999999972e57 < c Initial program 79.4%
associate-*l*90.3%
fma-def90.3%
Simplified90.3%
fma-def90.3%
+-commutative90.3%
Applied egg-rr90.3%
Taylor expanded in a around 0 72.0%
Taylor expanded in c around inf 61.6%
mul-1-neg61.6%
unpow261.6%
*-commutative61.6%
*-commutative61.6%
distribute-rgt-neg-in61.6%
*-commutative61.6%
associate-*l*58.1%
distribute-rgt-neg-in58.1%
Simplified58.1%
Taylor expanded in i around 0 61.6%
associate-*r*60.6%
unpow260.6%
associate-*l*61.3%
*-commutative61.3%
associate-*r*60.4%
associate-*l*61.7%
Simplified61.7%
if -4.4000000000000001e76 < c < 4.99999999999999972e57Initial program 97.2%
Taylor expanded in c around 0 67.1%
Final simplification64.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -7.2e-103) (not (<= y 2.45e+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 ((y <= -7.2e-103) || !(y <= 2.45e+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 ((y <= (-7.2d-103)) .or. (.not. (y <= 2.45d+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 ((y <= -7.2e-103) || !(y <= 2.45e+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 (y <= -7.2e-103) or not (y <= 2.45e+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 ((y <= -7.2e-103) || !(y <= 2.45e+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 ((y <= -7.2e-103) || ~((y <= 2.45e+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[y, -7.2e-103], N[Not[LessEqual[y, 2.45e+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}\;y \leq -7.2 \cdot 10^{-103} \lor \neg \left(y \leq 2.45 \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 y < -7.1999999999999996e-103 or 2.45000000000000007e55 < y Initial program 88.1%
Taylor expanded in x around inf 39.2%
if -7.1999999999999996e-103 < y < 2.45000000000000007e55Initial program 91.9%
Taylor expanded in z around inf 35.4%
Final simplification37.2%
(FPCore (x y z t a b c i) :precision binary64 (* 2.0 (* z t)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (z * t);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = 2.0d0 * (z * t)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (z * t);
}
def code(x, y, z, t, a, b, c, i): return 2.0 * (z * t)
function code(x, y, z, t, a, b, c, i) return Float64(2.0 * Float64(z * t)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = 2.0 * (z * t); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(z \cdot t\right)
\end{array}
Initial program 90.1%
Taylor expanded in z around inf 29.0%
Final simplification29.0%
(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 2023227
(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))))