
(FPCore (x y z t a b c i) :precision binary64 (* 2.0 (- (+ (* x y) (* z t)) (* (* (+ a (* b c)) c) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i));
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = 2.0d0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i));
}
def code(x, y, z, t, a, b, c, i): return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i))
function code(x, y, z, t, a, b, c, i) return Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(Float64(Float64(a + Float64(b * c)) * c) * i))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i)); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i) :precision binary64 (* 2.0 (- (+ (* x y) (* z t)) (* (* (+ a (* b c)) c) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i));
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = 2.0d0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i));
}
def code(x, y, z, t, a, b, c, i): return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i))
function code(x, y, z, t, a, b, c, i) return Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(Float64(Float64(a + Float64(b * c)) * c) * i))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i)); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right)
\end{array}
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (* b c))))
(if (<= (- (+ (* x y) (* z t)) (* (* c t_1) i)) INFINITY)
(* 2.0 (- (fma x y (* z t)) (* t_1 (* c i))))
(* 2.0 (fma y x (* c (* i (- (fma b c a)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double tmp;
if ((((x * y) + (z * t)) - ((c * t_1) * i)) <= ((double) INFINITY)) {
tmp = 2.0 * (fma(x, y, (z * t)) - (t_1 * (c * i)));
} else {
tmp = 2.0 * fma(y, x, (c * (i * -fma(b, c, a))));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(b * c)) tmp = 0.0 if (Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(Float64(c * t_1) * i)) <= Inf) tmp = Float64(2.0 * Float64(fma(x, y, Float64(z * t)) - Float64(t_1 * Float64(c * i)))); else tmp = Float64(2.0 * fma(y, x, Float64(c * Float64(i * Float64(-fma(b, c, a)))))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(c * t$95$1), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision], Infinity], N[(2.0 * N[(N[(x * y + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(t$95$1 * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(y * x + N[(c * N[(i * (-N[(b * c + a), $MachinePrecision])), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + b \cdot c\\
\mathbf{if}\;\left(x \cdot y + z \cdot t\right) - \left(c \cdot t_1\right) \cdot i \leq \infty:\\
\;\;\;\;2 \cdot \left(\mathsf{fma}\left(x, y, z \cdot t\right) - t_1 \cdot \left(c \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \mathsf{fma}\left(y, x, c \cdot \left(i \cdot \left(-\mathsf{fma}\left(b, c, a\right)\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 94.8%
associate-*l*98.7%
fma-def98.8%
Simplified98.8%
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 0 38.5%
cancel-sign-sub-inv38.5%
fma-def69.2%
*-commutative69.2%
*-commutative69.2%
fma-def69.2%
Applied egg-rr69.2%
Final simplification97.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (* b c))))
(if (<= (- (+ (* x y) (* z t)) (* (* c t_1) i)) INFINITY)
(* 2.0 (- (fma x y (* z t)) (* t_1 (* c i))))
(* 2.0 (* c (* c (* b (- i))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double tmp;
if ((((x * y) + (z * t)) - ((c * t_1) * i)) <= ((double) INFINITY)) {
tmp = 2.0 * (fma(x, y, (z * t)) - (t_1 * (c * i)));
} else {
tmp = 2.0 * (c * (c * (b * -i)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(b * c)) tmp = 0.0 if (Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(Float64(c * t_1) * i)) <= Inf) tmp = Float64(2.0 * Float64(fma(x, y, Float64(z * t)) - Float64(t_1 * Float64(c * i)))); else tmp = Float64(2.0 * Float64(c * Float64(c * Float64(b * Float64(-i))))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(c * t$95$1), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision], Infinity], N[(2.0 * N[(N[(x * y + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(t$95$1 * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(c * N[(c * N[(b * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + b \cdot c\\
\mathbf{if}\;\left(x \cdot y + z \cdot t\right) - \left(c \cdot t_1\right) \cdot i \leq \infty:\\
\;\;\;\;2 \cdot \left(\mathsf{fma}\left(x, y, z \cdot t\right) - t_1 \cdot \left(c \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(c \cdot \left(c \cdot \left(b \cdot \left(-i\right)\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 94.8%
associate-*l*98.7%
fma-def98.8%
Simplified98.8%
if +inf.0 < (-.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)) Initial program 0.0%
associate-*l*15.4%
fma-def15.4%
Simplified15.4%
fma-def15.4%
+-commutative15.4%
Applied egg-rr15.4%
Taylor expanded in b around inf 61.6%
mul-1-neg61.6%
unpow261.6%
*-commutative61.6%
associate-*l*61.6%
*-commutative61.6%
*-commutative61.6%
associate-*r*61.5%
distribute-rgt-neg-in61.5%
associate-*r*61.6%
*-commutative61.6%
*-commutative61.6%
distribute-rgt-neg-in61.6%
*-commutative61.6%
distribute-rgt-neg-in61.6%
Simplified61.6%
Final simplification96.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (* b c))) (t_2 (* (* c t_1) i)))
(if (<= t_2 (- INFINITY))
(* 2.0 (- (* x y) (* c (* t_1 i))))
(if (<= t_2 5e+296)
(* (- (+ (* x y) (* z t)) t_2) 2.0)
(* 2.0 (* c (* t_1 (- i))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double t_2 = (c * t_1) * i;
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = 2.0 * ((x * y) - (c * (t_1 * i)));
} else if (t_2 <= 5e+296) {
tmp = (((x * y) + (z * t)) - t_2) * 2.0;
} else {
tmp = 2.0 * (c * (t_1 * -i));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double t_2 = (c * t_1) * i;
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = 2.0 * ((x * y) - (c * (t_1 * i)));
} else if (t_2 <= 5e+296) {
tmp = (((x * y) + (z * t)) - t_2) * 2.0;
} else {
tmp = 2.0 * (c * (t_1 * -i));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a + (b * c) t_2 = (c * t_1) * i tmp = 0 if t_2 <= -math.inf: tmp = 2.0 * ((x * y) - (c * (t_1 * i))) elif t_2 <= 5e+296: tmp = (((x * y) + (z * t)) - t_2) * 2.0 else: tmp = 2.0 * (c * (t_1 * -i)) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(b * c)) t_2 = Float64(Float64(c * t_1) * i) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(c * Float64(t_1 * i)))); elseif (t_2 <= 5e+296) tmp = Float64(Float64(Float64(Float64(x * y) + Float64(z * t)) - t_2) * 2.0); else tmp = Float64(2.0 * Float64(c * Float64(t_1 * Float64(-i)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = a + (b * c); t_2 = (c * t_1) * i; tmp = 0.0; if (t_2 <= -Inf) tmp = 2.0 * ((x * y) - (c * (t_1 * i))); elseif (t_2 <= 5e+296) tmp = (((x * y) + (z * t)) - t_2) * 2.0; else tmp = 2.0 * (c * (t_1 * -i)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(c * t$95$1), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(c * N[(t$95$1 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+296], N[(N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision] * 2.0), $MachinePrecision], N[(2.0 * N[(c * N[(t$95$1 * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + b \cdot c\\
t_2 := \left(c \cdot t_1\right) \cdot i\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(t_1 \cdot i\right)\right)\\
\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+296}:\\
\;\;\;\;\left(\left(x \cdot y + z \cdot t\right) - t_2\right) \cdot 2\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(c \cdot \left(t_1 \cdot \left(-i\right)\right)\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -inf.0Initial program 71.4%
Taylor expanded in z around 0 83.4%
if -inf.0 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 5.0000000000000001e296Initial program 99.0%
if 5.0000000000000001e296 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) Initial program 76.8%
Taylor expanded in i around inf 91.6%
Final simplification94.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (* b c))) (t_2 (+ (* x y) (* z t))))
(if (<= (- t_2 (* (* c t_1) i)) INFINITY)
(* 2.0 (- t_2 (* t_1 (* c i))))
(* 2.0 (* c (* c (* b (- i))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double t_2 = (x * y) + (z * t);
double tmp;
if ((t_2 - ((c * t_1) * i)) <= ((double) INFINITY)) {
tmp = 2.0 * (t_2 - (t_1 * (c * i)));
} else {
tmp = 2.0 * (c * (c * (b * -i)));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double t_2 = (x * y) + (z * t);
double tmp;
if ((t_2 - ((c * t_1) * i)) <= Double.POSITIVE_INFINITY) {
tmp = 2.0 * (t_2 - (t_1 * (c * i)));
} else {
tmp = 2.0 * (c * (c * (b * -i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a + (b * c) t_2 = (x * y) + (z * t) tmp = 0 if (t_2 - ((c * t_1) * i)) <= math.inf: tmp = 2.0 * (t_2 - (t_1 * (c * i))) else: tmp = 2.0 * (c * (c * (b * -i))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(b * c)) t_2 = Float64(Float64(x * y) + Float64(z * t)) tmp = 0.0 if (Float64(t_2 - Float64(Float64(c * t_1) * i)) <= Inf) tmp = Float64(2.0 * Float64(t_2 - Float64(t_1 * Float64(c * i)))); else tmp = Float64(2.0 * Float64(c * Float64(c * Float64(b * Float64(-i))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = a + (b * c); t_2 = (x * y) + (z * t); tmp = 0.0; if ((t_2 - ((c * t_1) * i)) <= Inf) tmp = 2.0 * (t_2 - (t_1 * (c * i))); else tmp = 2.0 * (c * (c * (b * -i))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$2 - N[(N[(c * t$95$1), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision], Infinity], N[(2.0 * N[(t$95$2 - N[(t$95$1 * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(c * N[(c * N[(b * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + b \cdot c\\
t_2 := x \cdot y + z \cdot t\\
\mathbf{if}\;t_2 - \left(c \cdot t_1\right) \cdot i \leq \infty:\\
\;\;\;\;2 \cdot \left(t_2 - t_1 \cdot \left(c \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(c \cdot \left(c \cdot \left(b \cdot \left(-i\right)\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 94.8%
associate-*l*98.7%
fma-def98.8%
Simplified98.8%
fma-def98.7%
+-commutative98.7%
Applied egg-rr98.7%
if +inf.0 < (-.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)) Initial program 0.0%
associate-*l*15.4%
fma-def15.4%
Simplified15.4%
fma-def15.4%
+-commutative15.4%
Applied egg-rr15.4%
Taylor expanded in b around inf 61.6%
mul-1-neg61.6%
unpow261.6%
*-commutative61.6%
associate-*l*61.6%
*-commutative61.6%
*-commutative61.6%
associate-*r*61.5%
distribute-rgt-neg-in61.5%
associate-*r*61.6%
*-commutative61.6%
*-commutative61.6%
distribute-rgt-neg-in61.6%
*-commutative61.6%
distribute-rgt-neg-in61.6%
Simplified61.6%
Final simplification96.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* c (* a i)))
(t_2 (* 2.0 (- (* x y) t_1)))
(t_3 (* 2.0 (* c (* (+ a (* b c)) (- i))))))
(if (<= c -1.1e+82)
t_3
(if (<= c -2.2e+14)
(* 2.0 (- (* z t) (* i (* a c))))
(if (<= c -1.1e-36)
t_2
(if (<= c 6.5e-7)
(* 2.0 (+ (* x y) (* z t)))
(if (<= c 6.6e+38)
t_2
(if (<= c 8e+74) (* 2.0 (- (* z t) t_1)) t_3))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = c * (a * i);
double t_2 = 2.0 * ((x * y) - t_1);
double t_3 = 2.0 * (c * ((a + (b * c)) * -i));
double tmp;
if (c <= -1.1e+82) {
tmp = t_3;
} else if (c <= -2.2e+14) {
tmp = 2.0 * ((z * t) - (i * (a * c)));
} else if (c <= -1.1e-36) {
tmp = t_2;
} else if (c <= 6.5e-7) {
tmp = 2.0 * ((x * y) + (z * t));
} else if (c <= 6.6e+38) {
tmp = t_2;
} else if (c <= 8e+74) {
tmp = 2.0 * ((z * t) - t_1);
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = c * (a * i)
t_2 = 2.0d0 * ((x * y) - t_1)
t_3 = 2.0d0 * (c * ((a + (b * c)) * -i))
if (c <= (-1.1d+82)) then
tmp = t_3
else if (c <= (-2.2d+14)) then
tmp = 2.0d0 * ((z * t) - (i * (a * c)))
else if (c <= (-1.1d-36)) then
tmp = t_2
else if (c <= 6.5d-7) then
tmp = 2.0d0 * ((x * y) + (z * t))
else if (c <= 6.6d+38) then
tmp = t_2
else if (c <= 8d+74) then
tmp = 2.0d0 * ((z * t) - t_1)
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = c * (a * i);
double t_2 = 2.0 * ((x * y) - t_1);
double t_3 = 2.0 * (c * ((a + (b * c)) * -i));
double tmp;
if (c <= -1.1e+82) {
tmp = t_3;
} else if (c <= -2.2e+14) {
tmp = 2.0 * ((z * t) - (i * (a * c)));
} else if (c <= -1.1e-36) {
tmp = t_2;
} else if (c <= 6.5e-7) {
tmp = 2.0 * ((x * y) + (z * t));
} else if (c <= 6.6e+38) {
tmp = t_2;
} else if (c <= 8e+74) {
tmp = 2.0 * ((z * t) - t_1);
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = c * (a * i) t_2 = 2.0 * ((x * y) - t_1) t_3 = 2.0 * (c * ((a + (b * c)) * -i)) tmp = 0 if c <= -1.1e+82: tmp = t_3 elif c <= -2.2e+14: tmp = 2.0 * ((z * t) - (i * (a * c))) elif c <= -1.1e-36: tmp = t_2 elif c <= 6.5e-7: tmp = 2.0 * ((x * y) + (z * t)) elif c <= 6.6e+38: tmp = t_2 elif c <= 8e+74: tmp = 2.0 * ((z * t) - t_1) else: tmp = t_3 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(c * Float64(a * i)) t_2 = Float64(2.0 * Float64(Float64(x * y) - t_1)) t_3 = Float64(2.0 * Float64(c * Float64(Float64(a + Float64(b * c)) * Float64(-i)))) tmp = 0.0 if (c <= -1.1e+82) tmp = t_3; elseif (c <= -2.2e+14) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(i * Float64(a * c)))); elseif (c <= -1.1e-36) tmp = t_2; elseif (c <= 6.5e-7) tmp = Float64(2.0 * Float64(Float64(x * y) + Float64(z * t))); elseif (c <= 6.6e+38) tmp = t_2; elseif (c <= 8e+74) tmp = Float64(2.0 * Float64(Float64(z * t) - t_1)); else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = c * (a * i); t_2 = 2.0 * ((x * y) - t_1); t_3 = 2.0 * (c * ((a + (b * c)) * -i)); tmp = 0.0; if (c <= -1.1e+82) tmp = t_3; elseif (c <= -2.2e+14) tmp = 2.0 * ((z * t) - (i * (a * c))); elseif (c <= -1.1e-36) tmp = t_2; elseif (c <= 6.5e-7) tmp = 2.0 * ((x * y) + (z * t)); elseif (c <= 6.6e+38) tmp = t_2; elseif (c <= 8e+74) tmp = 2.0 * ((z * t) - t_1); else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(c * N[(a * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(N[(x * y), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(2.0 * N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.1e+82], t$95$3, If[LessEqual[c, -2.2e+14], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(i * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -1.1e-36], t$95$2, If[LessEqual[c, 6.5e-7], N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 6.6e+38], t$95$2, If[LessEqual[c, 8e+74], N[(2.0 * N[(N[(z * t), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot \left(a \cdot i\right)\\
t_2 := 2 \cdot \left(x \cdot y - t_1\right)\\
t_3 := 2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot \left(-i\right)\right)\right)\\
\mathbf{if}\;c \leq -1.1 \cdot 10^{+82}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;c \leq -2.2 \cdot 10^{+14}:\\
\;\;\;\;2 \cdot \left(z \cdot t - i \cdot \left(a \cdot c\right)\right)\\
\mathbf{elif}\;c \leq -1.1 \cdot 10^{-36}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq 6.5 \cdot 10^{-7}:\\
\;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\
\mathbf{elif}\;c \leq 6.6 \cdot 10^{+38}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq 8 \cdot 10^{+74}:\\
\;\;\;\;2 \cdot \left(z \cdot t - t_1\right)\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if c < -1.1000000000000001e82 or 7.99999999999999961e74 < c Initial program 75.7%
Taylor expanded in i around inf 86.2%
if -1.1000000000000001e82 < c < -2.2e14Initial program 88.9%
associate-*l*88.9%
fma-def88.9%
Simplified88.9%
fma-def88.9%
+-commutative88.9%
Applied egg-rr88.9%
Taylor expanded in a around inf 100.0%
Taylor expanded in x around 0 81.7%
*-commutative81.7%
*-commutative81.7%
associate-*r*81.7%
*-commutative81.7%
Simplified81.7%
if -2.2e14 < c < -1.1e-36 or 6.50000000000000024e-7 < c < 6.5999999999999998e38Initial program 99.7%
Taylor expanded in z around 0 97.8%
Taylor expanded in c around 0 80.6%
*-commutative80.6%
Simplified80.6%
if -1.1e-36 < c < 6.50000000000000024e-7Initial program 98.7%
Taylor expanded in c around 0 76.3%
if 6.5999999999999998e38 < c < 7.99999999999999961e74Initial program 100.0%
associate-*l*100.0%
fma-def100.0%
Simplified100.0%
fma-def100.0%
+-commutative100.0%
Applied egg-rr100.0%
Taylor expanded in a around inf 100.0%
Taylor expanded in x around 0 100.0%
Final simplification81.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (- (* x y) (* a (* c i))))))
(if (<= c -7e+83)
(* (* b (* c (* c i))) -2.0)
(if (<= c -8.8e+14)
(* 2.0 (- (* z t) (* i (* a c))))
(if (<= c -1.05e-40)
t_1
(if (<= c 5e-7)
(* 2.0 (+ (* x y) (* z t)))
(if (<= c 1.1e+39)
t_1
(if (<= c 5.5e+74)
(* 2.0 (- (* z t) (* c (* a i))))
(* -2.0 (* (* c i) (* b c)))))))))))
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) - (a * (c * i)));
double tmp;
if (c <= -7e+83) {
tmp = (b * (c * (c * i))) * -2.0;
} else if (c <= -8.8e+14) {
tmp = 2.0 * ((z * t) - (i * (a * c)));
} else if (c <= -1.05e-40) {
tmp = t_1;
} else if (c <= 5e-7) {
tmp = 2.0 * ((x * y) + (z * t));
} else if (c <= 1.1e+39) {
tmp = t_1;
} else if (c <= 5.5e+74) {
tmp = 2.0 * ((z * t) - (c * (a * i)));
} else {
tmp = -2.0 * ((c * i) * (b * c));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = 2.0d0 * ((x * y) - (a * (c * i)))
if (c <= (-7d+83)) then
tmp = (b * (c * (c * i))) * (-2.0d0)
else if (c <= (-8.8d+14)) then
tmp = 2.0d0 * ((z * t) - (i * (a * c)))
else if (c <= (-1.05d-40)) then
tmp = t_1
else if (c <= 5d-7) then
tmp = 2.0d0 * ((x * y) + (z * t))
else if (c <= 1.1d+39) then
tmp = t_1
else if (c <= 5.5d+74) then
tmp = 2.0d0 * ((z * t) - (c * (a * i)))
else
tmp = (-2.0d0) * ((c * i) * (b * c))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * ((x * y) - (a * (c * i)));
double tmp;
if (c <= -7e+83) {
tmp = (b * (c * (c * i))) * -2.0;
} else if (c <= -8.8e+14) {
tmp = 2.0 * ((z * t) - (i * (a * c)));
} else if (c <= -1.05e-40) {
tmp = t_1;
} else if (c <= 5e-7) {
tmp = 2.0 * ((x * y) + (z * t));
} else if (c <= 1.1e+39) {
tmp = t_1;
} else if (c <= 5.5e+74) {
tmp = 2.0 * ((z * t) - (c * (a * i)));
} else {
tmp = -2.0 * ((c * i) * (b * c));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * ((x * y) - (a * (c * i))) tmp = 0 if c <= -7e+83: tmp = (b * (c * (c * i))) * -2.0 elif c <= -8.8e+14: tmp = 2.0 * ((z * t) - (i * (a * c))) elif c <= -1.05e-40: tmp = t_1 elif c <= 5e-7: tmp = 2.0 * ((x * y) + (z * t)) elif c <= 1.1e+39: tmp = t_1 elif c <= 5.5e+74: tmp = 2.0 * ((z * t) - (c * (a * i))) else: tmp = -2.0 * ((c * i) * (b * c)) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(Float64(x * y) - Float64(a * Float64(c * i)))) tmp = 0.0 if (c <= -7e+83) tmp = Float64(Float64(b * Float64(c * Float64(c * i))) * -2.0); elseif (c <= -8.8e+14) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(i * Float64(a * c)))); elseif (c <= -1.05e-40) tmp = t_1; elseif (c <= 5e-7) tmp = Float64(2.0 * Float64(Float64(x * y) + Float64(z * t))); elseif (c <= 1.1e+39) tmp = t_1; elseif (c <= 5.5e+74) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(a * i)))); else tmp = Float64(-2.0 * Float64(Float64(c * i) * Float64(b * c))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 2.0 * ((x * y) - (a * (c * i))); tmp = 0.0; if (c <= -7e+83) tmp = (b * (c * (c * i))) * -2.0; elseif (c <= -8.8e+14) tmp = 2.0 * ((z * t) - (i * (a * c))); elseif (c <= -1.05e-40) tmp = t_1; elseif (c <= 5e-7) tmp = 2.0 * ((x * y) + (z * t)); elseif (c <= 1.1e+39) tmp = t_1; elseif (c <= 5.5e+74) tmp = 2.0 * ((z * t) - (c * (a * i))); else tmp = -2.0 * ((c * i) * (b * c)); 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[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -7e+83], N[(N[(b * N[(c * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision], If[LessEqual[c, -8.8e+14], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(i * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -1.05e-40], t$95$1, If[LessEqual[c, 5e-7], N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.1e+39], t$95$1, If[LessEqual[c, 5.5e+74], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-2.0 * N[(N[(c * i), $MachinePrecision] * N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(x \cdot y - a \cdot \left(c \cdot i\right)\right)\\
\mathbf{if}\;c \leq -7 \cdot 10^{+83}:\\
\;\;\;\;\left(b \cdot \left(c \cdot \left(c \cdot i\right)\right)\right) \cdot -2\\
\mathbf{elif}\;c \leq -8.8 \cdot 10^{+14}:\\
\;\;\;\;2 \cdot \left(z \cdot t - i \cdot \left(a \cdot c\right)\right)\\
\mathbf{elif}\;c \leq -1.05 \cdot 10^{-40}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq 5 \cdot 10^{-7}:\\
\;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\
\mathbf{elif}\;c \leq 1.1 \cdot 10^{+39}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq 5.5 \cdot 10^{+74}:\\
\;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(a \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;-2 \cdot \left(\left(c \cdot i\right) \cdot \left(b \cdot c\right)\right)\\
\end{array}
\end{array}
if c < -6.99999999999999954e83Initial program 81.1%
associate-*l*87.2%
fma-def87.2%
Simplified87.2%
fma-def87.2%
+-commutative87.2%
Applied egg-rr87.2%
Taylor expanded in b around inf 74.2%
mul-1-neg74.2%
unpow274.2%
*-commutative74.2%
associate-*r*74.8%
*-commutative74.8%
distribute-lft-neg-out74.8%
*-commutative74.8%
distribute-rgt-neg-in74.8%
Simplified74.8%
Taylor expanded in i around 0 74.2%
*-commutative74.2%
associate-*r*76.7%
unpow276.7%
Simplified76.7%
Taylor expanded in c around 0 76.7%
unpow276.7%
associate-*r*78.7%
Simplified78.7%
if -6.99999999999999954e83 < c < -8.8e14Initial program 88.9%
associate-*l*88.9%
fma-def88.9%
Simplified88.9%
fma-def88.9%
+-commutative88.9%
Applied egg-rr88.9%
Taylor expanded in a around inf 100.0%
Taylor expanded in x around 0 81.7%
*-commutative81.7%
*-commutative81.7%
associate-*r*81.7%
*-commutative81.7%
Simplified81.7%
if -8.8e14 < c < -1.05000000000000009e-40 or 4.99999999999999977e-7 < c < 1.1000000000000001e39Initial program 99.7%
associate-*l*99.8%
fma-def99.8%
Simplified99.8%
fma-def99.8%
+-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in a around inf 82.6%
Taylor expanded in z around 0 80.6%
associate-*r*80.5%
*-commutative80.5%
associate-*r*80.5%
Simplified80.5%
if -1.05000000000000009e-40 < c < 4.99999999999999977e-7Initial program 98.7%
Taylor expanded in c around 0 76.3%
if 1.1000000000000001e39 < c < 5.5000000000000003e74Initial program 100.0%
associate-*l*100.0%
fma-def100.0%
Simplified100.0%
fma-def100.0%
+-commutative100.0%
Applied egg-rr100.0%
Taylor expanded in a around inf 100.0%
Taylor expanded in x around 0 100.0%
if 5.5000000000000003e74 < c Initial program 70.1%
associate-*l*88.8%
fma-def88.8%
Simplified88.8%
fma-def88.8%
+-commutative88.8%
Applied egg-rr88.8%
Taylor expanded in b around inf 63.2%
mul-1-neg63.2%
unpow263.2%
*-commutative63.2%
associate-*r*66.1%
*-commutative66.1%
distribute-lft-neg-out66.1%
*-commutative66.1%
distribute-rgt-neg-in66.1%
Simplified66.1%
Taylor expanded in i around 0 63.2%
*-commutative63.2%
associate-*r*68.1%
unpow268.1%
Simplified68.1%
expm1-log1p-u33.5%
expm1-udef33.6%
*-commutative33.6%
associate-*l*33.6%
associate-*r*35.3%
Applied egg-rr35.3%
expm1-def35.3%
expm1-log1p71.8%
*-commutative71.8%
*-commutative71.8%
Simplified71.8%
Final simplification77.4%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* c (* a i))) (t_2 (* 2.0 (- (* x y) t_1))))
(if (<= c -1.7e+83)
(* (* b (* c (* c i))) -2.0)
(if (<= c -6e+14)
(* 2.0 (- (* z t) (* i (* a c))))
(if (<= c -6.2e-37)
t_2
(if (<= c 7.2e-7)
(* 2.0 (+ (* x y) (* z t)))
(if (<= c 3.5e+48)
t_2
(if (<= c 9e+75)
(* 2.0 (- (* z t) t_1))
(* -2.0 (* (* c i) (* b c)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = c * (a * i);
double t_2 = 2.0 * ((x * y) - t_1);
double tmp;
if (c <= -1.7e+83) {
tmp = (b * (c * (c * i))) * -2.0;
} else if (c <= -6e+14) {
tmp = 2.0 * ((z * t) - (i * (a * c)));
} else if (c <= -6.2e-37) {
tmp = t_2;
} else if (c <= 7.2e-7) {
tmp = 2.0 * ((x * y) + (z * t));
} else if (c <= 3.5e+48) {
tmp = t_2;
} else if (c <= 9e+75) {
tmp = 2.0 * ((z * t) - t_1);
} else {
tmp = -2.0 * ((c * i) * (b * c));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = c * (a * i)
t_2 = 2.0d0 * ((x * y) - t_1)
if (c <= (-1.7d+83)) then
tmp = (b * (c * (c * i))) * (-2.0d0)
else if (c <= (-6d+14)) then
tmp = 2.0d0 * ((z * t) - (i * (a * c)))
else if (c <= (-6.2d-37)) then
tmp = t_2
else if (c <= 7.2d-7) then
tmp = 2.0d0 * ((x * y) + (z * t))
else if (c <= 3.5d+48) then
tmp = t_2
else if (c <= 9d+75) then
tmp = 2.0d0 * ((z * t) - t_1)
else
tmp = (-2.0d0) * ((c * i) * (b * c))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = c * (a * i);
double t_2 = 2.0 * ((x * y) - t_1);
double tmp;
if (c <= -1.7e+83) {
tmp = (b * (c * (c * i))) * -2.0;
} else if (c <= -6e+14) {
tmp = 2.0 * ((z * t) - (i * (a * c)));
} else if (c <= -6.2e-37) {
tmp = t_2;
} else if (c <= 7.2e-7) {
tmp = 2.0 * ((x * y) + (z * t));
} else if (c <= 3.5e+48) {
tmp = t_2;
} else if (c <= 9e+75) {
tmp = 2.0 * ((z * t) - t_1);
} else {
tmp = -2.0 * ((c * i) * (b * c));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = c * (a * i) t_2 = 2.0 * ((x * y) - t_1) tmp = 0 if c <= -1.7e+83: tmp = (b * (c * (c * i))) * -2.0 elif c <= -6e+14: tmp = 2.0 * ((z * t) - (i * (a * c))) elif c <= -6.2e-37: tmp = t_2 elif c <= 7.2e-7: tmp = 2.0 * ((x * y) + (z * t)) elif c <= 3.5e+48: tmp = t_2 elif c <= 9e+75: tmp = 2.0 * ((z * t) - t_1) else: tmp = -2.0 * ((c * i) * (b * c)) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(c * Float64(a * i)) t_2 = Float64(2.0 * Float64(Float64(x * y) - t_1)) tmp = 0.0 if (c <= -1.7e+83) tmp = Float64(Float64(b * Float64(c * Float64(c * i))) * -2.0); elseif (c <= -6e+14) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(i * Float64(a * c)))); elseif (c <= -6.2e-37) tmp = t_2; elseif (c <= 7.2e-7) tmp = Float64(2.0 * Float64(Float64(x * y) + Float64(z * t))); elseif (c <= 3.5e+48) tmp = t_2; elseif (c <= 9e+75) tmp = Float64(2.0 * Float64(Float64(z * t) - t_1)); else tmp = Float64(-2.0 * Float64(Float64(c * i) * Float64(b * c))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = c * (a * i); t_2 = 2.0 * ((x * y) - t_1); tmp = 0.0; if (c <= -1.7e+83) tmp = (b * (c * (c * i))) * -2.0; elseif (c <= -6e+14) tmp = 2.0 * ((z * t) - (i * (a * c))); elseif (c <= -6.2e-37) tmp = t_2; elseif (c <= 7.2e-7) tmp = 2.0 * ((x * y) + (z * t)); elseif (c <= 3.5e+48) tmp = t_2; elseif (c <= 9e+75) tmp = 2.0 * ((z * t) - t_1); else tmp = -2.0 * ((c * i) * (b * c)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(c * N[(a * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(N[(x * y), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.7e+83], N[(N[(b * N[(c * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision], If[LessEqual[c, -6e+14], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(i * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -6.2e-37], t$95$2, If[LessEqual[c, 7.2e-7], N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 3.5e+48], t$95$2, If[LessEqual[c, 9e+75], N[(2.0 * N[(N[(z * t), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], N[(-2.0 * N[(N[(c * i), $MachinePrecision] * N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot \left(a \cdot i\right)\\
t_2 := 2 \cdot \left(x \cdot y - t_1\right)\\
\mathbf{if}\;c \leq -1.7 \cdot 10^{+83}:\\
\;\;\;\;\left(b \cdot \left(c \cdot \left(c \cdot i\right)\right)\right) \cdot -2\\
\mathbf{elif}\;c \leq -6 \cdot 10^{+14}:\\
\;\;\;\;2 \cdot \left(z \cdot t - i \cdot \left(a \cdot c\right)\right)\\
\mathbf{elif}\;c \leq -6.2 \cdot 10^{-37}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq 7.2 \cdot 10^{-7}:\\
\;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\
\mathbf{elif}\;c \leq 3.5 \cdot 10^{+48}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq 9 \cdot 10^{+75}:\\
\;\;\;\;2 \cdot \left(z \cdot t - t_1\right)\\
\mathbf{else}:\\
\;\;\;\;-2 \cdot \left(\left(c \cdot i\right) \cdot \left(b \cdot c\right)\right)\\
\end{array}
\end{array}
if c < -1.6999999999999999e83Initial program 81.1%
associate-*l*87.2%
fma-def87.2%
Simplified87.2%
fma-def87.2%
+-commutative87.2%
Applied egg-rr87.2%
Taylor expanded in b around inf 74.2%
mul-1-neg74.2%
unpow274.2%
*-commutative74.2%
associate-*r*74.8%
*-commutative74.8%
distribute-lft-neg-out74.8%
*-commutative74.8%
distribute-rgt-neg-in74.8%
Simplified74.8%
Taylor expanded in i around 0 74.2%
*-commutative74.2%
associate-*r*76.7%
unpow276.7%
Simplified76.7%
Taylor expanded in c around 0 76.7%
unpow276.7%
associate-*r*78.7%
Simplified78.7%
if -1.6999999999999999e83 < c < -6e14Initial program 88.9%
associate-*l*88.9%
fma-def88.9%
Simplified88.9%
fma-def88.9%
+-commutative88.9%
Applied egg-rr88.9%
Taylor expanded in a around inf 100.0%
Taylor expanded in x around 0 81.7%
*-commutative81.7%
*-commutative81.7%
associate-*r*81.7%
*-commutative81.7%
Simplified81.7%
if -6e14 < c < -6.19999999999999987e-37 or 7.19999999999999989e-7 < c < 3.4999999999999997e48Initial program 99.7%
Taylor expanded in z around 0 97.8%
Taylor expanded in c around 0 80.6%
*-commutative80.6%
Simplified80.6%
if -6.19999999999999987e-37 < c < 7.19999999999999989e-7Initial program 98.7%
Taylor expanded in c around 0 76.3%
if 3.4999999999999997e48 < c < 9.0000000000000007e75Initial program 100.0%
associate-*l*100.0%
fma-def100.0%
Simplified100.0%
fma-def100.0%
+-commutative100.0%
Applied egg-rr100.0%
Taylor expanded in a around inf 100.0%
Taylor expanded in x around 0 100.0%
if 9.0000000000000007e75 < c Initial program 70.1%
associate-*l*88.8%
fma-def88.8%
Simplified88.8%
fma-def88.8%
+-commutative88.8%
Applied egg-rr88.8%
Taylor expanded in b around inf 63.2%
mul-1-neg63.2%
unpow263.2%
*-commutative63.2%
associate-*r*66.1%
*-commutative66.1%
distribute-lft-neg-out66.1%
*-commutative66.1%
distribute-rgt-neg-in66.1%
Simplified66.1%
Taylor expanded in i around 0 63.2%
*-commutative63.2%
associate-*r*68.1%
unpow268.1%
Simplified68.1%
expm1-log1p-u33.5%
expm1-udef33.6%
*-commutative33.6%
associate-*l*33.6%
associate-*r*35.3%
Applied egg-rr35.3%
expm1-def35.3%
expm1-log1p71.8%
*-commutative71.8%
*-commutative71.8%
Simplified71.8%
Final simplification77.5%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= t -1050000.0)
(and (not (<= t 2.45e+126))
(or (<= t 2.85e+169) (not (<= t 2.45e+245)))))
(* 2.0 (+ (* x y) (* z t)))
(* 2.0 (- (* x y) (* c (* (+ a (* b c)) i))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((t <= -1050000.0) || (!(t <= 2.45e+126) && ((t <= 2.85e+169) || !(t <= 2.45e+245)))) {
tmp = 2.0 * ((x * y) + (z * t));
} else {
tmp = 2.0 * ((x * y) - (c * ((a + (b * c)) * i)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((t <= (-1050000.0d0)) .or. (.not. (t <= 2.45d+126)) .and. (t <= 2.85d+169) .or. (.not. (t <= 2.45d+245))) then
tmp = 2.0d0 * ((x * y) + (z * t))
else
tmp = 2.0d0 * ((x * y) - (c * ((a + (b * c)) * i)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((t <= -1050000.0) || (!(t <= 2.45e+126) && ((t <= 2.85e+169) || !(t <= 2.45e+245)))) {
tmp = 2.0 * ((x * y) + (z * t));
} else {
tmp = 2.0 * ((x * y) - (c * ((a + (b * c)) * i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (t <= -1050000.0) or (not (t <= 2.45e+126) and ((t <= 2.85e+169) or not (t <= 2.45e+245))): tmp = 2.0 * ((x * y) + (z * t)) else: tmp = 2.0 * ((x * y) - (c * ((a + (b * c)) * i))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((t <= -1050000.0) || (!(t <= 2.45e+126) && ((t <= 2.85e+169) || !(t <= 2.45e+245)))) tmp = Float64(2.0 * Float64(Float64(x * y) + Float64(z * t))); else tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(c * Float64(Float64(a + Float64(b * c)) * i)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((t <= -1050000.0) || (~((t <= 2.45e+126)) && ((t <= 2.85e+169) || ~((t <= 2.45e+245))))) tmp = 2.0 * ((x * y) + (z * t)); else tmp = 2.0 * ((x * y) - (c * ((a + (b * c)) * i))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[t, -1050000.0], And[N[Not[LessEqual[t, 2.45e+126]], $MachinePrecision], Or[LessEqual[t, 2.85e+169], N[Not[LessEqual[t, 2.45e+245]], $MachinePrecision]]]], N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1050000 \lor \neg \left(t \leq 2.45 \cdot 10^{+126}\right) \land \left(t \leq 2.85 \cdot 10^{+169} \lor \neg \left(t \leq 2.45 \cdot 10^{+245}\right)\right):\\
\;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\
\end{array}
\end{array}
if t < -1.05e6 or 2.45e126 < t < 2.8500000000000001e169 or 2.45000000000000024e245 < t Initial program 88.6%
Taylor expanded in c around 0 72.3%
if -1.05e6 < t < 2.45e126 or 2.8500000000000001e169 < t < 2.45000000000000024e245Initial program 90.6%
Taylor expanded in z around 0 83.2%
Final simplification79.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (* b c))))
(if (<= c -9e+82)
(* 2.0 (- (* x y) (* c (* t_1 i))))
(if (<= c 1.28e+76)
(* 2.0 (- (+ (* x y) (* z t)) (* i (* a c))))
(* 2.0 (* c (* t_1 (- i))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double tmp;
if (c <= -9e+82) {
tmp = 2.0 * ((x * y) - (c * (t_1 * i)));
} else if (c <= 1.28e+76) {
tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c)));
} else {
tmp = 2.0 * (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) :: tmp
t_1 = a + (b * c)
if (c <= (-9d+82)) then
tmp = 2.0d0 * ((x * y) - (c * (t_1 * i)))
else if (c <= 1.28d+76) then
tmp = 2.0d0 * (((x * y) + (z * t)) - (i * (a * c)))
else
tmp = 2.0d0 * (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 tmp;
if (c <= -9e+82) {
tmp = 2.0 * ((x * y) - (c * (t_1 * i)));
} else if (c <= 1.28e+76) {
tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c)));
} else {
tmp = 2.0 * (c * (t_1 * -i));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a + (b * c) tmp = 0 if c <= -9e+82: tmp = 2.0 * ((x * y) - (c * (t_1 * i))) elif c <= 1.28e+76: tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c))) else: tmp = 2.0 * (c * (t_1 * -i)) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(b * c)) tmp = 0.0 if (c <= -9e+82) tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(c * Float64(t_1 * i)))); elseif (c <= 1.28e+76) tmp = Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(i * Float64(a * c)))); else tmp = Float64(2.0 * Float64(c * Float64(t_1 * Float64(-i)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = a + (b * c); tmp = 0.0; if (c <= -9e+82) tmp = 2.0 * ((x * y) - (c * (t_1 * i))); elseif (c <= 1.28e+76) tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c))); else tmp = 2.0 * (c * (t_1 * -i)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -9e+82], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(c * N[(t$95$1 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.28e+76], N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(i * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(c * N[(t$95$1 * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + b \cdot c\\
\mathbf{if}\;c \leq -9 \cdot 10^{+82}:\\
\;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(t_1 \cdot i\right)\right)\\
\mathbf{elif}\;c \leq 1.28 \cdot 10^{+76}:\\
\;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - i \cdot \left(a \cdot c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(c \cdot \left(t_1 \cdot \left(-i\right)\right)\right)\\
\end{array}
\end{array}
if c < -8.9999999999999993e82Initial program 81.1%
Taylor expanded in z around 0 87.5%
if -8.9999999999999993e82 < c < 1.27999999999999994e76Initial program 97.8%
Taylor expanded in a around inf 93.1%
if 1.27999999999999994e76 < c Initial program 70.1%
Taylor expanded in i around inf 86.8%
Final simplification91.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (* b c))))
(if (<= c -2.1e+83)
(* 2.0 (- (* x y) (* c (* t_1 i))))
(if (<= c 2.2e+75)
(* 2.0 (- (+ (* x y) (* z t)) (* a (* c i))))
(* 2.0 (* c (* t_1 (- i))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double tmp;
if (c <= -2.1e+83) {
tmp = 2.0 * ((x * y) - (c * (t_1 * i)));
} else if (c <= 2.2e+75) {
tmp = 2.0 * (((x * y) + (z * t)) - (a * (c * i)));
} else {
tmp = 2.0 * (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) :: tmp
t_1 = a + (b * c)
if (c <= (-2.1d+83)) then
tmp = 2.0d0 * ((x * y) - (c * (t_1 * i)))
else if (c <= 2.2d+75) then
tmp = 2.0d0 * (((x * y) + (z * t)) - (a * (c * i)))
else
tmp = 2.0d0 * (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 tmp;
if (c <= -2.1e+83) {
tmp = 2.0 * ((x * y) - (c * (t_1 * i)));
} else if (c <= 2.2e+75) {
tmp = 2.0 * (((x * y) + (z * t)) - (a * (c * i)));
} else {
tmp = 2.0 * (c * (t_1 * -i));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a + (b * c) tmp = 0 if c <= -2.1e+83: tmp = 2.0 * ((x * y) - (c * (t_1 * i))) elif c <= 2.2e+75: tmp = 2.0 * (((x * y) + (z * t)) - (a * (c * i))) else: tmp = 2.0 * (c * (t_1 * -i)) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(b * c)) tmp = 0.0 if (c <= -2.1e+83) tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(c * Float64(t_1 * i)))); elseif (c <= 2.2e+75) tmp = Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(a * Float64(c * i)))); else tmp = Float64(2.0 * Float64(c * Float64(t_1 * Float64(-i)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = a + (b * c); tmp = 0.0; if (c <= -2.1e+83) tmp = 2.0 * ((x * y) - (c * (t_1 * i))); elseif (c <= 2.2e+75) tmp = 2.0 * (((x * y) + (z * t)) - (a * (c * i))); else tmp = 2.0 * (c * (t_1 * -i)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -2.1e+83], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(c * N[(t$95$1 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.2e+75], N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(c * N[(t$95$1 * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + b \cdot c\\
\mathbf{if}\;c \leq -2.1 \cdot 10^{+83}:\\
\;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(t_1 \cdot i\right)\right)\\
\mathbf{elif}\;c \leq 2.2 \cdot 10^{+75}:\\
\;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - a \cdot \left(c \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(c \cdot \left(t_1 \cdot \left(-i\right)\right)\right)\\
\end{array}
\end{array}
if c < -2.10000000000000002e83Initial program 81.1%
Taylor expanded in z around 0 87.5%
if -2.10000000000000002e83 < c < 2.20000000000000012e75Initial program 97.8%
associate-*l*98.1%
fma-def98.1%
Simplified98.1%
fma-def98.1%
+-commutative98.1%
Applied egg-rr98.1%
Taylor expanded in a around inf 93.4%
if 2.20000000000000012e75 < c Initial program 70.1%
Taylor expanded in i around inf 86.8%
Final simplification91.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (* (* c i) (- a))))
(t_2 (* 2.0 (* x y)))
(t_3 (* 2.0 (* z t))))
(if (<= y -1.06e-86)
t_2
(if (<= y -3.85e-274)
t_1
(if (<= y 1.7e-247)
t_3
(if (<= y 7.8e+44) t_1 (if (<= y 6.2e+221) t_3 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 * ((c * i) * -a);
double t_2 = 2.0 * (x * y);
double t_3 = 2.0 * (z * t);
double tmp;
if (y <= -1.06e-86) {
tmp = t_2;
} else if (y <= -3.85e-274) {
tmp = t_1;
} else if (y <= 1.7e-247) {
tmp = t_3;
} else if (y <= 7.8e+44) {
tmp = t_1;
} else if (y <= 6.2e+221) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = 2.0d0 * ((c * i) * -a)
t_2 = 2.0d0 * (x * y)
t_3 = 2.0d0 * (z * t)
if (y <= (-1.06d-86)) then
tmp = t_2
else if (y <= (-3.85d-274)) then
tmp = t_1
else if (y <= 1.7d-247) then
tmp = t_3
else if (y <= 7.8d+44) then
tmp = t_1
else if (y <= 6.2d+221) then
tmp = t_3
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 * ((c * i) * -a);
double t_2 = 2.0 * (x * y);
double t_3 = 2.0 * (z * t);
double tmp;
if (y <= -1.06e-86) {
tmp = t_2;
} else if (y <= -3.85e-274) {
tmp = t_1;
} else if (y <= 1.7e-247) {
tmp = t_3;
} else if (y <= 7.8e+44) {
tmp = t_1;
} else if (y <= 6.2e+221) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * ((c * i) * -a) t_2 = 2.0 * (x * y) t_3 = 2.0 * (z * t) tmp = 0 if y <= -1.06e-86: tmp = t_2 elif y <= -3.85e-274: tmp = t_1 elif y <= 1.7e-247: tmp = t_3 elif y <= 7.8e+44: tmp = t_1 elif y <= 6.2e+221: tmp = t_3 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(Float64(c * i) * Float64(-a))) t_2 = Float64(2.0 * Float64(x * y)) t_3 = Float64(2.0 * Float64(z * t)) tmp = 0.0 if (y <= -1.06e-86) tmp = t_2; elseif (y <= -3.85e-274) tmp = t_1; elseif (y <= 1.7e-247) tmp = t_3; elseif (y <= 7.8e+44) tmp = t_1; elseif (y <= 6.2e+221) tmp = t_3; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 2.0 * ((c * i) * -a); t_2 = 2.0 * (x * y); t_3 = 2.0 * (z * t); tmp = 0.0; if (y <= -1.06e-86) tmp = t_2; elseif (y <= -3.85e-274) tmp = t_1; elseif (y <= 1.7e-247) tmp = t_3; elseif (y <= 7.8e+44) tmp = t_1; elseif (y <= 6.2e+221) tmp = t_3; 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[(c * i), $MachinePrecision] * (-a)), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.06e-86], t$95$2, If[LessEqual[y, -3.85e-274], t$95$1, If[LessEqual[y, 1.7e-247], t$95$3, If[LessEqual[y, 7.8e+44], t$95$1, If[LessEqual[y, 6.2e+221], t$95$3, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(\left(c \cdot i\right) \cdot \left(-a\right)\right)\\
t_2 := 2 \cdot \left(x \cdot y\right)\\
t_3 := 2 \cdot \left(z \cdot t\right)\\
\mathbf{if}\;y \leq -1.06 \cdot 10^{-86}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -3.85 \cdot 10^{-274}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{-247}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y \leq 7.8 \cdot 10^{+44}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{+221}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -1.05999999999999997e-86 or 6.20000000000000013e221 < y Initial program 89.7%
Taylor expanded in x around inf 55.8%
if -1.05999999999999997e-86 < y < -3.84999999999999985e-274 or 1.7000000000000001e-247 < y < 7.8000000000000005e44Initial program 88.9%
associate-*l*94.8%
fma-def94.8%
Simplified94.8%
fma-def94.8%
+-commutative94.8%
Applied egg-rr94.8%
Taylor expanded in a around inf 41.4%
mul-1-neg41.4%
associate-*r*48.2%
distribute-lft-neg-in48.2%
distribute-rgt-neg-in48.2%
Simplified48.2%
if -3.84999999999999985e-274 < y < 1.7000000000000001e-247 or 7.8000000000000005e44 < y < 6.20000000000000013e221Initial program 92.6%
Taylor expanded in z around inf 37.4%
Final simplification49.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (* z t))) (t_2 (* 2.0 (* x y))))
(if (<= y -4.5e-112)
t_2
(if (<= y 4.4e-247)
t_1
(if (<= y 4.5e+45)
(* 2.0 (* c (* a (- i))))
(if (<= y 6.2e+221) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * (z * t);
double t_2 = 2.0 * (x * y);
double tmp;
if (y <= -4.5e-112) {
tmp = t_2;
} else if (y <= 4.4e-247) {
tmp = t_1;
} else if (y <= 4.5e+45) {
tmp = 2.0 * (c * (a * -i));
} else if (y <= 6.2e+221) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 2.0d0 * (z * t)
t_2 = 2.0d0 * (x * y)
if (y <= (-4.5d-112)) then
tmp = t_2
else if (y <= 4.4d-247) then
tmp = t_1
else if (y <= 4.5d+45) then
tmp = 2.0d0 * (c * (a * -i))
else if (y <= 6.2d+221) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * (z * t);
double t_2 = 2.0 * (x * y);
double tmp;
if (y <= -4.5e-112) {
tmp = t_2;
} else if (y <= 4.4e-247) {
tmp = t_1;
} else if (y <= 4.5e+45) {
tmp = 2.0 * (c * (a * -i));
} else if (y <= 6.2e+221) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * (z * t) t_2 = 2.0 * (x * y) tmp = 0 if y <= -4.5e-112: tmp = t_2 elif y <= 4.4e-247: tmp = t_1 elif y <= 4.5e+45: tmp = 2.0 * (c * (a * -i)) elif y <= 6.2e+221: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(z * t)) t_2 = Float64(2.0 * Float64(x * y)) tmp = 0.0 if (y <= -4.5e-112) tmp = t_2; elseif (y <= 4.4e-247) tmp = t_1; elseif (y <= 4.5e+45) tmp = Float64(2.0 * Float64(c * Float64(a * Float64(-i)))); elseif (y <= 6.2e+221) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 2.0 * (z * t); t_2 = 2.0 * (x * y); tmp = 0.0; if (y <= -4.5e-112) tmp = t_2; elseif (y <= 4.4e-247) tmp = t_1; elseif (y <= 4.5e+45) tmp = 2.0 * (c * (a * -i)); elseif (y <= 6.2e+221) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.5e-112], t$95$2, If[LessEqual[y, 4.4e-247], t$95$1, If[LessEqual[y, 4.5e+45], N[(2.0 * N[(c * N[(a * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.2e+221], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(z \cdot t\right)\\
t_2 := 2 \cdot \left(x \cdot y\right)\\
\mathbf{if}\;y \leq -4.5 \cdot 10^{-112}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 4.4 \cdot 10^{-247}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{+45}:\\
\;\;\;\;2 \cdot \left(c \cdot \left(a \cdot \left(-i\right)\right)\right)\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{+221}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -4.50000000000000012e-112 or 6.20000000000000013e221 < y Initial program 88.8%
Taylor expanded in x around inf 53.8%
if -4.50000000000000012e-112 < y < 4.39999999999999983e-247 or 4.4999999999999998e45 < y < 6.20000000000000013e221Initial program 89.9%
Taylor expanded in z around inf 33.7%
if 4.39999999999999983e-247 < y < 4.4999999999999998e45Initial program 92.2%
Taylor expanded in a around inf 42.9%
associate-*r*42.9%
neg-mul-142.9%
Simplified42.9%
Final simplification45.1%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= z -4.4e+143)
(and (not (<= z -5.5e+97)) (or (<= z -3.1e+60) (not (<= z 3.1e+56)))))
(* 2.0 (* z t))
(* 2.0 (* x y))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((z <= -4.4e+143) || (!(z <= -5.5e+97) && ((z <= -3.1e+60) || !(z <= 3.1e+56)))) {
tmp = 2.0 * (z * t);
} else {
tmp = 2.0 * (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 ((z <= (-4.4d+143)) .or. (.not. (z <= (-5.5d+97))) .and. (z <= (-3.1d+60)) .or. (.not. (z <= 3.1d+56))) then
tmp = 2.0d0 * (z * t)
else
tmp = 2.0d0 * (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 ((z <= -4.4e+143) || (!(z <= -5.5e+97) && ((z <= -3.1e+60) || !(z <= 3.1e+56)))) {
tmp = 2.0 * (z * t);
} else {
tmp = 2.0 * (x * y);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (z <= -4.4e+143) or (not (z <= -5.5e+97) and ((z <= -3.1e+60) or not (z <= 3.1e+56))): tmp = 2.0 * (z * t) else: tmp = 2.0 * (x * y) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((z <= -4.4e+143) || (!(z <= -5.5e+97) && ((z <= -3.1e+60) || !(z <= 3.1e+56)))) tmp = Float64(2.0 * Float64(z * t)); else tmp = Float64(2.0 * Float64(x * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((z <= -4.4e+143) || (~((z <= -5.5e+97)) && ((z <= -3.1e+60) || ~((z <= 3.1e+56))))) tmp = 2.0 * (z * t); else tmp = 2.0 * (x * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[z, -4.4e+143], And[N[Not[LessEqual[z, -5.5e+97]], $MachinePrecision], Or[LessEqual[z, -3.1e+60], N[Not[LessEqual[z, 3.1e+56]], $MachinePrecision]]]], N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.4 \cdot 10^{+143} \lor \neg \left(z \leq -5.5 \cdot 10^{+97}\right) \land \left(z \leq -3.1 \cdot 10^{+60} \lor \neg \left(z \leq 3.1 \cdot 10^{+56}\right)\right):\\
\;\;\;\;2 \cdot \left(z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y\right)\\
\end{array}
\end{array}
if z < -4.40000000000000028e143 or -5.50000000000000021e97 < z < -3.1000000000000001e60 or 3.10000000000000005e56 < z Initial program 89.0%
Taylor expanded in z around inf 43.8%
if -4.40000000000000028e143 < z < -5.50000000000000021e97 or -3.1000000000000001e60 < z < 3.10000000000000005e56Initial program 90.5%
Taylor expanded in x around inf 35.2%
Final simplification38.5%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= i -8e+37) (not (<= i 1.55e+122))) (* 2.0 (* (* c i) (- a))) (* 2.0 (+ (* x y) (* z t)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((i <= -8e+37) || !(i <= 1.55e+122)) {
tmp = 2.0 * ((c * i) * -a);
} else {
tmp = 2.0 * ((x * y) + (z * t));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((i <= (-8d+37)) .or. (.not. (i <= 1.55d+122))) then
tmp = 2.0d0 * ((c * i) * -a)
else
tmp = 2.0d0 * ((x * y) + (z * t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((i <= -8e+37) || !(i <= 1.55e+122)) {
tmp = 2.0 * ((c * i) * -a);
} else {
tmp = 2.0 * ((x * y) + (z * t));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (i <= -8e+37) or not (i <= 1.55e+122): tmp = 2.0 * ((c * i) * -a) else: tmp = 2.0 * ((x * y) + (z * t)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((i <= -8e+37) || !(i <= 1.55e+122)) tmp = Float64(2.0 * Float64(Float64(c * i) * Float64(-a))); else tmp = Float64(2.0 * Float64(Float64(x * y) + Float64(z * t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((i <= -8e+37) || ~((i <= 1.55e+122))) tmp = 2.0 * ((c * i) * -a); else tmp = 2.0 * ((x * y) + (z * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[i, -8e+37], N[Not[LessEqual[i, 1.55e+122]], $MachinePrecision]], N[(2.0 * N[(N[(c * i), $MachinePrecision] * (-a)), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;i \leq -8 \cdot 10^{+37} \lor \neg \left(i \leq 1.55 \cdot 10^{+122}\right):\\
\;\;\;\;2 \cdot \left(\left(c \cdot i\right) \cdot \left(-a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\
\end{array}
\end{array}
if i < -7.99999999999999963e37 or 1.54999999999999999e122 < i Initial program 92.7%
associate-*l*94.3%
fma-def94.3%
Simplified94.3%
fma-def94.3%
+-commutative94.3%
Applied egg-rr94.3%
Taylor expanded in a around inf 46.7%
mul-1-neg46.7%
associate-*r*56.4%
distribute-lft-neg-in56.4%
distribute-rgt-neg-in56.4%
Simplified56.4%
if -7.99999999999999963e37 < i < 1.54999999999999999e122Initial program 88.5%
Taylor expanded in c around 0 67.6%
Final simplification63.7%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= c -2.4e+82) (not (<= c 1.05e+76))) (* i (* -2.0 (* c (* b c)))) (* 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.4e+82) || !(c <= 1.05e+76)) {
tmp = i * (-2.0 * (c * (b * c)));
} 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.4d+82)) .or. (.not. (c <= 1.05d+76))) then
tmp = i * ((-2.0d0) * (c * (b * c)))
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.4e+82) || !(c <= 1.05e+76)) {
tmp = i * (-2.0 * (c * (b * c)));
} 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.4e+82) or not (c <= 1.05e+76): tmp = i * (-2.0 * (c * (b * c))) 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.4e+82) || !(c <= 1.05e+76)) tmp = Float64(i * Float64(-2.0 * Float64(c * Float64(b * c)))); 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.4e+82) || ~((c <= 1.05e+76))) tmp = i * (-2.0 * (c * (b * c))); 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.4e+82], N[Not[LessEqual[c, 1.05e+76]], $MachinePrecision]], N[(i * N[(-2.0 * N[(c * N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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.4 \cdot 10^{+82} \lor \neg \left(c \leq 1.05 \cdot 10^{+76}\right):\\
\;\;\;\;i \cdot \left(-2 \cdot \left(c \cdot \left(b \cdot c\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\
\end{array}
\end{array}
if c < -2.39999999999999998e82 or 1.05000000000000003e76 < c Initial program 75.7%
associate-*l*88.0%
fma-def88.0%
Simplified88.0%
fma-def88.0%
+-commutative88.0%
Applied egg-rr88.0%
Taylor expanded in b around inf 68.8%
mul-1-neg68.8%
unpow268.8%
*-commutative68.8%
associate-*r*70.5%
*-commutative70.5%
distribute-lft-neg-out70.5%
*-commutative70.5%
distribute-rgt-neg-in70.5%
Simplified70.5%
expm1-log1p-u36.8%
expm1-udef36.8%
*-commutative36.8%
distribute-rgt-neg-in36.8%
Applied egg-rr36.8%
expm1-def36.8%
expm1-log1p70.5%
associate-*l*70.5%
distribute-rgt-neg-out70.5%
unpow270.5%
distribute-rgt-neg-in70.5%
*-commutative70.5%
mul-1-neg70.5%
*-commutative70.5%
associate-*l*70.5%
unpow270.5%
associate-*l*71.5%
metadata-eval71.5%
Simplified71.5%
if -2.39999999999999998e82 < c < 1.05000000000000003e76Initial program 97.8%
Taylor expanded in c around 0 71.9%
Final simplification71.7%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= c -2e+82)
(* i (* -2.0 (* c (* b c))))
(if (<= c 2.9e+74)
(* 2.0 (+ (* x y) (* z t)))
(* -2.0 (* (* c i) (* b c))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (c <= -2e+82) {
tmp = i * (-2.0 * (c * (b * c)));
} else if (c <= 2.9e+74) {
tmp = 2.0 * ((x * y) + (z * t));
} else {
tmp = -2.0 * ((c * i) * (b * c));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (c <= (-2d+82)) then
tmp = i * ((-2.0d0) * (c * (b * c)))
else if (c <= 2.9d+74) then
tmp = 2.0d0 * ((x * y) + (z * t))
else
tmp = (-2.0d0) * ((c * i) * (b * c))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (c <= -2e+82) {
tmp = i * (-2.0 * (c * (b * c)));
} else if (c <= 2.9e+74) {
tmp = 2.0 * ((x * y) + (z * t));
} else {
tmp = -2.0 * ((c * i) * (b * c));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if c <= -2e+82: tmp = i * (-2.0 * (c * (b * c))) elif c <= 2.9e+74: tmp = 2.0 * ((x * y) + (z * t)) else: tmp = -2.0 * ((c * i) * (b * c)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (c <= -2e+82) tmp = Float64(i * Float64(-2.0 * Float64(c * Float64(b * c)))); elseif (c <= 2.9e+74) tmp = Float64(2.0 * Float64(Float64(x * y) + Float64(z * t))); else tmp = Float64(-2.0 * Float64(Float64(c * i) * Float64(b * c))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (c <= -2e+82) tmp = i * (-2.0 * (c * (b * c))); elseif (c <= 2.9e+74) tmp = 2.0 * ((x * y) + (z * t)); else tmp = -2.0 * ((c * i) * (b * c)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[c, -2e+82], N[(i * N[(-2.0 * N[(c * N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.9e+74], N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-2.0 * N[(N[(c * i), $MachinePrecision] * N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -2 \cdot 10^{+82}:\\
\;\;\;\;i \cdot \left(-2 \cdot \left(c \cdot \left(b \cdot c\right)\right)\right)\\
\mathbf{elif}\;c \leq 2.9 \cdot 10^{+74}:\\
\;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;-2 \cdot \left(\left(c \cdot i\right) \cdot \left(b \cdot c\right)\right)\\
\end{array}
\end{array}
if c < -1.9999999999999999e82Initial program 81.1%
associate-*l*87.2%
fma-def87.2%
Simplified87.2%
fma-def87.2%
+-commutative87.2%
Applied egg-rr87.2%
Taylor expanded in b around inf 74.2%
mul-1-neg74.2%
unpow274.2%
*-commutative74.2%
associate-*r*74.8%
*-commutative74.8%
distribute-lft-neg-out74.8%
*-commutative74.8%
distribute-rgt-neg-in74.8%
Simplified74.8%
expm1-log1p-u41.2%
expm1-udef41.2%
*-commutative41.2%
distribute-rgt-neg-in41.2%
Applied egg-rr41.2%
expm1-def41.2%
expm1-log1p74.8%
associate-*l*74.8%
distribute-rgt-neg-out74.8%
unpow274.8%
distribute-rgt-neg-in74.8%
*-commutative74.8%
mul-1-neg74.8%
*-commutative74.8%
associate-*l*74.8%
unpow274.8%
associate-*l*74.8%
metadata-eval74.8%
Simplified74.8%
if -1.9999999999999999e82 < c < 2.9000000000000002e74Initial program 97.8%
Taylor expanded in c around 0 71.9%
if 2.9000000000000002e74 < c Initial program 70.1%
associate-*l*88.8%
fma-def88.8%
Simplified88.8%
fma-def88.8%
+-commutative88.8%
Applied egg-rr88.8%
Taylor expanded in b around inf 63.2%
mul-1-neg63.2%
unpow263.2%
*-commutative63.2%
associate-*r*66.1%
*-commutative66.1%
distribute-lft-neg-out66.1%
*-commutative66.1%
distribute-rgt-neg-in66.1%
Simplified66.1%
Taylor expanded in i around 0 63.2%
*-commutative63.2%
associate-*r*68.1%
unpow268.1%
Simplified68.1%
expm1-log1p-u33.5%
expm1-udef33.6%
*-commutative33.6%
associate-*l*33.6%
associate-*r*35.3%
Applied egg-rr35.3%
expm1-def35.3%
expm1-log1p71.8%
*-commutative71.8%
*-commutative71.8%
Simplified71.8%
Final simplification72.4%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= c -2.55e+82)
(* (* b (* c (* c i))) -2.0)
(if (<= c 1.22e+75)
(* 2.0 (+ (* x y) (* z t)))
(* -2.0 (* (* c i) (* b c))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (c <= -2.55e+82) {
tmp = (b * (c * (c * i))) * -2.0;
} else if (c <= 1.22e+75) {
tmp = 2.0 * ((x * y) + (z * t));
} else {
tmp = -2.0 * ((c * i) * (b * c));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (c <= (-2.55d+82)) then
tmp = (b * (c * (c * i))) * (-2.0d0)
else if (c <= 1.22d+75) then
tmp = 2.0d0 * ((x * y) + (z * t))
else
tmp = (-2.0d0) * ((c * i) * (b * c))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (c <= -2.55e+82) {
tmp = (b * (c * (c * i))) * -2.0;
} else if (c <= 1.22e+75) {
tmp = 2.0 * ((x * y) + (z * t));
} else {
tmp = -2.0 * ((c * i) * (b * c));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if c <= -2.55e+82: tmp = (b * (c * (c * i))) * -2.0 elif c <= 1.22e+75: tmp = 2.0 * ((x * y) + (z * t)) else: tmp = -2.0 * ((c * i) * (b * c)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (c <= -2.55e+82) tmp = Float64(Float64(b * Float64(c * Float64(c * i))) * -2.0); elseif (c <= 1.22e+75) tmp = Float64(2.0 * Float64(Float64(x * y) + Float64(z * t))); else tmp = Float64(-2.0 * Float64(Float64(c * i) * Float64(b * c))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (c <= -2.55e+82) tmp = (b * (c * (c * i))) * -2.0; elseif (c <= 1.22e+75) tmp = 2.0 * ((x * y) + (z * t)); else tmp = -2.0 * ((c * i) * (b * c)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[c, -2.55e+82], N[(N[(b * N[(c * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision], If[LessEqual[c, 1.22e+75], N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-2.0 * N[(N[(c * i), $MachinePrecision] * N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -2.55 \cdot 10^{+82}:\\
\;\;\;\;\left(b \cdot \left(c \cdot \left(c \cdot i\right)\right)\right) \cdot -2\\
\mathbf{elif}\;c \leq 1.22 \cdot 10^{+75}:\\
\;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;-2 \cdot \left(\left(c \cdot i\right) \cdot \left(b \cdot c\right)\right)\\
\end{array}
\end{array}
if c < -2.5500000000000001e82Initial program 81.1%
associate-*l*87.2%
fma-def87.2%
Simplified87.2%
fma-def87.2%
+-commutative87.2%
Applied egg-rr87.2%
Taylor expanded in b around inf 74.2%
mul-1-neg74.2%
unpow274.2%
*-commutative74.2%
associate-*r*74.8%
*-commutative74.8%
distribute-lft-neg-out74.8%
*-commutative74.8%
distribute-rgt-neg-in74.8%
Simplified74.8%
Taylor expanded in i around 0 74.2%
*-commutative74.2%
associate-*r*76.7%
unpow276.7%
Simplified76.7%
Taylor expanded in c around 0 76.7%
unpow276.7%
associate-*r*78.7%
Simplified78.7%
if -2.5500000000000001e82 < c < 1.2199999999999999e75Initial program 97.8%
Taylor expanded in c around 0 71.9%
if 1.2199999999999999e75 < c Initial program 70.1%
associate-*l*88.8%
fma-def88.8%
Simplified88.8%
fma-def88.8%
+-commutative88.8%
Applied egg-rr88.8%
Taylor expanded in b around inf 63.2%
mul-1-neg63.2%
unpow263.2%
*-commutative63.2%
associate-*r*66.1%
*-commutative66.1%
distribute-lft-neg-out66.1%
*-commutative66.1%
distribute-rgt-neg-in66.1%
Simplified66.1%
Taylor expanded in i around 0 63.2%
*-commutative63.2%
associate-*r*68.1%
unpow268.1%
Simplified68.1%
expm1-log1p-u33.5%
expm1-udef33.6%
*-commutative33.6%
associate-*l*33.6%
associate-*r*35.3%
Applied egg-rr35.3%
expm1-def35.3%
expm1-log1p71.8%
*-commutative71.8%
*-commutative71.8%
Simplified71.8%
Final simplification73.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 90.0%
Taylor expanded in z around inf 25.0%
Final simplification25.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 2023207
(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))))