
(FPCore (x y z t a b c i) :precision binary64 (* 2.0 (- (+ (* x y) (* z t)) (* (* (+ a (* b c)) c) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i));
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = 2.0d0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i));
}
def code(x, y, z, t, a, b, c, i): return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i))
function code(x, y, z, t, a, b, c, i) return Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(Float64(Float64(a + Float64(b * c)) * c) * i))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i)); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i) :precision binary64 (* 2.0 (- (+ (* x y) (* z t)) (* (* (+ a (* b c)) c) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i));
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = 2.0d0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i));
}
def code(x, y, z, t, a, b, c, i): return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i))
function code(x, y, z, t, a, b, c, i) return Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(Float64(Float64(a + Float64(b * c)) * c) * i))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i)); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right)
\end{array}
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (* b c))))
(if (<= (- (+ (* x y) (* z t)) (* (* c t_1) i)) INFINITY)
(* 2.0 (- (fma x y (* z t)) (* t_1 (* c i))))
(* t (* 2.0 (+ z (* x (/ y t))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double 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 = t * (2.0 * (z + (x * (y / t))));
}
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(t * Float64(2.0 * Float64(z + Float64(x * Float64(y / t))))); 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[(t * N[(2.0 * N[(z + N[(x * N[(y / t), $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}:\\
\;\;\;\;t \cdot \left(2 \cdot \left(z + x \cdot \frac{y}{t}\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 93.4%
fma-define93.4%
associate-*l*98.0%
Simplified98.0%
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 c around 0 41.7%
Taylor expanded in t around inf 58.3%
distribute-lft-out66.7%
associate-/l*75.0%
Simplified75.0%
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)))
(if (<= t_2 (- INFINITY))
(* 2.0 (- (* z t) (* t_1 (* c i))))
(if (<= t_2 4e+258)
(* (- (+ (* x y) (* z t)) (* t_2 i)) 2.0)
(* 2.0 (- (* x y) (* c (* t_1 i))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double t_2 = c * t_1;
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = 2.0 * ((z * t) - (t_1 * (c * i)));
} else if (t_2 <= 4e+258) {
tmp = (((x * y) + (z * t)) - (t_2 * i)) * 2.0;
} else {
tmp = 2.0 * ((x * y) - (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;
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = 2.0 * ((z * t) - (t_1 * (c * i)));
} else if (t_2 <= 4e+258) {
tmp = (((x * y) + (z * t)) - (t_2 * i)) * 2.0;
} else {
tmp = 2.0 * ((x * y) - (c * (t_1 * i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a + (b * c) t_2 = c * t_1 tmp = 0 if t_2 <= -math.inf: tmp = 2.0 * ((z * t) - (t_1 * (c * i))) elif t_2 <= 4e+258: tmp = (((x * y) + (z * t)) - (t_2 * i)) * 2.0 else: tmp = 2.0 * ((x * y) - (c * (t_1 * i))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(b * c)) t_2 = Float64(c * t_1) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(t_1 * Float64(c * i)))); elseif (t_2 <= 4e+258) tmp = Float64(Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(t_2 * i)) * 2.0); else tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(c * Float64(t_1 * i)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = a + (b * c); t_2 = c * t_1; tmp = 0.0; if (t_2 <= -Inf) tmp = 2.0 * ((z * t) - (t_1 * (c * i))); elseif (t_2 <= 4e+258) tmp = (((x * y) + (z * t)) - (t_2 * i)) * 2.0; else tmp = 2.0 * ((x * y) - (c * (t_1 * i))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(c * t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(t$95$1 * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 4e+258], N[(N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(t$95$2 * i), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(c * N[(t$95$1 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + b \cdot c\\
t_2 := c \cdot t\_1\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;2 \cdot \left(z \cdot t - t\_1 \cdot \left(c \cdot i\right)\right)\\
\mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+258}:\\
\;\;\;\;\left(\left(x \cdot y + z \cdot t\right) - t\_2 \cdot i\right) \cdot 2\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(t\_1 \cdot i\right)\right)\\
\end{array}
\end{array}
if (*.f64 (+.f64 a (*.f64 b c)) c) < -inf.0Initial program 78.3%
fma-define80.8%
associate-*l*95.1%
Simplified95.1%
fma-define92.6%
+-commutative92.6%
Applied egg-rr92.6%
Taylor expanded in t around inf 90.1%
associate-/l*92.6%
Simplified92.6%
Taylor expanded in z around inf 90.4%
if -inf.0 < (*.f64 (+.f64 a (*.f64 b c)) c) < 4.00000000000000023e258Initial program 98.7%
if 4.00000000000000023e258 < (*.f64 (+.f64 a (*.f64 b c)) c) Initial program 60.9%
Taylor expanded in z around 0 90.8%
Final simplification96.0%
(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))))
(* t (* 2.0 (+ z (* x (/ y t))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double t_2 = (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 = t * (2.0 * (z + (x * (y / t))));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double t_2 = (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 = t * (2.0 * (z + (x * (y / t))));
}
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 = t * (2.0 * (z + (x * (y / t)))) 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(t * Float64(2.0 * Float64(z + Float64(x * Float64(y / t))))); 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 = t * (2.0 * (z + (x * (y / t)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(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[(t * N[(2.0 * N[(z + N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + b \cdot c\\
t_2 := x \cdot y + z \cdot t\\
\mathbf{if}\;t\_2 - \left(c \cdot t\_1\right) \cdot i \leq \infty:\\
\;\;\;\;2 \cdot \left(t\_2 - t\_1 \cdot \left(c \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(2 \cdot \left(z + x \cdot \frac{y}{t}\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 93.4%
fma-define93.4%
associate-*l*98.0%
Simplified98.0%
fma-define98.0%
+-commutative98.0%
Applied egg-rr98.0%
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 c around 0 41.7%
Taylor expanded in t around inf 58.3%
distribute-lft-out66.7%
associate-/l*75.0%
Simplified75.0%
Final simplification96.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (* b c))))
(if (<= (* z t) -2e+120)
(* 2.0 (- (* z (+ t (* x (/ y z)))) (* i (* a c))))
(if (<= (* z t) -4e-152)
(* 2.0 (- (* z t) (* t_1 (* c i))))
(if (<= (* z t) 40000000000000.0)
(* 2.0 (- (* x y) (* c (* t_1 i))))
(* 2.0 (- (+ (* x y) (* z t)) (* (* b c) (* c i)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double tmp;
if ((z * t) <= -2e+120) {
tmp = 2.0 * ((z * (t + (x * (y / z)))) - (i * (a * c)));
} else if ((z * t) <= -4e-152) {
tmp = 2.0 * ((z * t) - (t_1 * (c * i)));
} else if ((z * t) <= 40000000000000.0) {
tmp = 2.0 * ((x * y) - (c * (t_1 * i)));
} else {
tmp = 2.0 * (((x * y) + (z * t)) - ((b * c) * (c * i)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = a + (b * c)
if ((z * t) <= (-2d+120)) then
tmp = 2.0d0 * ((z * (t + (x * (y / z)))) - (i * (a * c)))
else if ((z * t) <= (-4d-152)) then
tmp = 2.0d0 * ((z * t) - (t_1 * (c * i)))
else if ((z * t) <= 40000000000000.0d0) then
tmp = 2.0d0 * ((x * y) - (c * (t_1 * i)))
else
tmp = 2.0d0 * (((x * y) + (z * t)) - ((b * c) * (c * i)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double tmp;
if ((z * t) <= -2e+120) {
tmp = 2.0 * ((z * (t + (x * (y / z)))) - (i * (a * c)));
} else if ((z * t) <= -4e-152) {
tmp = 2.0 * ((z * t) - (t_1 * (c * i)));
} else if ((z * t) <= 40000000000000.0) {
tmp = 2.0 * ((x * y) - (c * (t_1 * i)));
} else {
tmp = 2.0 * (((x * y) + (z * t)) - ((b * c) * (c * i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a + (b * c) tmp = 0 if (z * t) <= -2e+120: tmp = 2.0 * ((z * (t + (x * (y / z)))) - (i * (a * c))) elif (z * t) <= -4e-152: tmp = 2.0 * ((z * t) - (t_1 * (c * i))) elif (z * t) <= 40000000000000.0: tmp = 2.0 * ((x * y) - (c * (t_1 * i))) else: tmp = 2.0 * (((x * y) + (z * t)) - ((b * c) * (c * i))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(b * c)) tmp = 0.0 if (Float64(z * t) <= -2e+120) tmp = Float64(2.0 * Float64(Float64(z * Float64(t + Float64(x * Float64(y / z)))) - Float64(i * Float64(a * c)))); elseif (Float64(z * t) <= -4e-152) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(t_1 * Float64(c * i)))); elseif (Float64(z * t) <= 40000000000000.0) tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(c * Float64(t_1 * i)))); else tmp = Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(Float64(b * c) * Float64(c * i)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = a + (b * c); tmp = 0.0; if ((z * t) <= -2e+120) tmp = 2.0 * ((z * (t + (x * (y / z)))) - (i * (a * c))); elseif ((z * t) <= -4e-152) tmp = 2.0 * ((z * t) - (t_1 * (c * i))); elseif ((z * t) <= 40000000000000.0) tmp = 2.0 * ((x * y) - (c * (t_1 * i))); else tmp = 2.0 * (((x * y) + (z * t)) - ((b * c) * (c * i))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(z * t), $MachinePrecision], -2e+120], N[(2.0 * N[(N[(z * N[(t + N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z * t), $MachinePrecision], -4e-152], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(t$95$1 * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z * t), $MachinePrecision], 40000000000000.0], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(c * N[(t$95$1 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(b * c), $MachinePrecision] * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + b \cdot c\\
\mathbf{if}\;z \cdot t \leq -2 \cdot 10^{+120}:\\
\;\;\;\;2 \cdot \left(z \cdot \left(t + x \cdot \frac{y}{z}\right) - i \cdot \left(a \cdot c\right)\right)\\
\mathbf{elif}\;z \cdot t \leq -4 \cdot 10^{-152}:\\
\;\;\;\;2 \cdot \left(z \cdot t - t\_1 \cdot \left(c \cdot i\right)\right)\\
\mathbf{elif}\;z \cdot t \leq 40000000000000:\\
\;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(t\_1 \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(b \cdot c\right) \cdot \left(c \cdot i\right)\right)\\
\end{array}
\end{array}
if (*.f64 z t) < -2e120Initial program 86.6%
Taylor expanded in z around inf 91.1%
associate-/l*91.2%
Simplified91.2%
Taylor expanded in a around inf 87.2%
if -2e120 < (*.f64 z t) < -4.00000000000000026e-152Initial program 83.5%
fma-define83.5%
associate-*l*90.5%
Simplified90.5%
fma-define90.5%
+-commutative90.5%
Applied egg-rr90.5%
Taylor expanded in t around inf 88.0%
associate-/l*85.7%
Simplified85.7%
Taylor expanded in z around inf 83.1%
if -4.00000000000000026e-152 < (*.f64 z t) < 4e13Initial program 93.1%
Taylor expanded in z around 0 94.4%
if 4e13 < (*.f64 z t) Initial program 87.0%
fma-define87.0%
associate-*l*95.0%
Simplified95.0%
fma-define95.0%
+-commutative95.0%
Applied egg-rr95.0%
Taylor expanded in a around 0 88.6%
Final simplification90.0%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= c -2.35e+73)
(* 2.0 (* c (* (+ a (* b c)) (- i))))
(if (or (<= c 2.6e+20) (and (not (<= c 5.8e+52)) (<= c 5.2e+123)))
(* 2.0 (+ (* x y) (- (* z t) (* a (* c i)))))
(* 2.0 (- (* x y) (* c (* (* b c) i)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (c <= -2.35e+73) {
tmp = 2.0 * (c * ((a + (b * c)) * -i));
} else if ((c <= 2.6e+20) || (!(c <= 5.8e+52) && (c <= 5.2e+123))) {
tmp = 2.0 * ((x * y) + ((z * t) - (a * (c * i))));
} else {
tmp = 2.0 * ((x * y) - (c * ((b * c) * i)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (c <= (-2.35d+73)) then
tmp = 2.0d0 * (c * ((a + (b * c)) * -i))
else if ((c <= 2.6d+20) .or. (.not. (c <= 5.8d+52)) .and. (c <= 5.2d+123)) then
tmp = 2.0d0 * ((x * y) + ((z * t) - (a * (c * i))))
else
tmp = 2.0d0 * ((x * y) - (c * ((b * c) * i)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (c <= -2.35e+73) {
tmp = 2.0 * (c * ((a + (b * c)) * -i));
} else if ((c <= 2.6e+20) || (!(c <= 5.8e+52) && (c <= 5.2e+123))) {
tmp = 2.0 * ((x * y) + ((z * t) - (a * (c * i))));
} else {
tmp = 2.0 * ((x * y) - (c * ((b * c) * i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if c <= -2.35e+73: tmp = 2.0 * (c * ((a + (b * c)) * -i)) elif (c <= 2.6e+20) or (not (c <= 5.8e+52) and (c <= 5.2e+123)): tmp = 2.0 * ((x * y) + ((z * t) - (a * (c * i)))) else: tmp = 2.0 * ((x * y) - (c * ((b * c) * i))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (c <= -2.35e+73) tmp = Float64(2.0 * Float64(c * Float64(Float64(a + Float64(b * c)) * Float64(-i)))); elseif ((c <= 2.6e+20) || (!(c <= 5.8e+52) && (c <= 5.2e+123))) tmp = Float64(2.0 * Float64(Float64(x * y) + Float64(Float64(z * t) - Float64(a * Float64(c * i))))); else tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(c * Float64(Float64(b * c) * i)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (c <= -2.35e+73) tmp = 2.0 * (c * ((a + (b * c)) * -i)); elseif ((c <= 2.6e+20) || (~((c <= 5.8e+52)) && (c <= 5.2e+123))) tmp = 2.0 * ((x * y) + ((z * t) - (a * (c * i)))); else tmp = 2.0 * ((x * y) - (c * ((b * c) * i))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[c, -2.35e+73], N[(2.0 * N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[c, 2.6e+20], And[N[Not[LessEqual[c, 5.8e+52]], $MachinePrecision], LessEqual[c, 5.2e+123]]], N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(c * N[(N[(b * c), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -2.35 \cdot 10^{+73}:\\
\;\;\;\;2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot \left(-i\right)\right)\right)\\
\mathbf{elif}\;c \leq 2.6 \cdot 10^{+20} \lor \neg \left(c \leq 5.8 \cdot 10^{+52}\right) \land c \leq 5.2 \cdot 10^{+123}:\\
\;\;\;\;2 \cdot \left(x \cdot y + \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(\left(b \cdot c\right) \cdot i\right)\right)\\
\end{array}
\end{array}
if c < -2.3500000000000001e73Initial program 80.5%
Taylor expanded in i around inf 85.5%
if -2.3500000000000001e73 < c < 2.6e20 or 5.8e52 < c < 5.19999999999999971e123Initial program 95.2%
Taylor expanded in a around inf 87.5%
associate--l+87.6%
Applied egg-rr87.6%
if 2.6e20 < c < 5.8e52 or 5.19999999999999971e123 < c Initial program 76.1%
Taylor expanded in z around 0 92.8%
Taylor expanded in a around 0 83.7%
Final simplification86.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (* b c))) (t_2 (* 2.0 (- (* x y) (* c (* t_1 i))))))
(if (<= c -1.32e-74)
t_2
(if (<= c 4.2e+14)
(* 2.0 (- (+ (* x y) (* z t)) (* i (* a c))))
(if (<= c 5.5e+52)
(* 2.0 (* i (- (/ (* x y) i) (* c t_1))))
(if (<= c 2.7e+69)
(* 2.0 (+ (* x y) (- (* z t) (* a (* c i)))))
t_2))))))
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 = 2.0 * ((x * y) - (c * (t_1 * i)));
double tmp;
if (c <= -1.32e-74) {
tmp = t_2;
} else if (c <= 4.2e+14) {
tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c)));
} else if (c <= 5.5e+52) {
tmp = 2.0 * (i * (((x * y) / i) - (c * t_1)));
} else if (c <= 2.7e+69) {
tmp = 2.0 * ((x * y) + ((z * t) - (a * (c * i))));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = a + (b * c)
t_2 = 2.0d0 * ((x * y) - (c * (t_1 * i)))
if (c <= (-1.32d-74)) then
tmp = t_2
else if (c <= 4.2d+14) then
tmp = 2.0d0 * (((x * y) + (z * t)) - (i * (a * c)))
else if (c <= 5.5d+52) then
tmp = 2.0d0 * (i * (((x * y) / i) - (c * t_1)))
else if (c <= 2.7d+69) then
tmp = 2.0d0 * ((x * y) + ((z * t) - (a * (c * i))))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double t_2 = 2.0 * ((x * y) - (c * (t_1 * i)));
double tmp;
if (c <= -1.32e-74) {
tmp = t_2;
} else if (c <= 4.2e+14) {
tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c)));
} else if (c <= 5.5e+52) {
tmp = 2.0 * (i * (((x * y) / i) - (c * t_1)));
} else if (c <= 2.7e+69) {
tmp = 2.0 * ((x * y) + ((z * t) - (a * (c * i))));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a + (b * c) t_2 = 2.0 * ((x * y) - (c * (t_1 * i))) tmp = 0 if c <= -1.32e-74: tmp = t_2 elif c <= 4.2e+14: tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c))) elif c <= 5.5e+52: tmp = 2.0 * (i * (((x * y) / i) - (c * t_1))) elif c <= 2.7e+69: tmp = 2.0 * ((x * y) + ((z * t) - (a * (c * i)))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(b * c)) t_2 = Float64(2.0 * Float64(Float64(x * y) - Float64(c * Float64(t_1 * i)))) tmp = 0.0 if (c <= -1.32e-74) tmp = t_2; elseif (c <= 4.2e+14) tmp = Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(i * Float64(a * c)))); elseif (c <= 5.5e+52) tmp = Float64(2.0 * Float64(i * Float64(Float64(Float64(x * y) / i) - Float64(c * t_1)))); elseif (c <= 2.7e+69) tmp = Float64(2.0 * Float64(Float64(x * y) + Float64(Float64(z * t) - Float64(a * Float64(c * i))))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = a + (b * c); t_2 = 2.0 * ((x * y) - (c * (t_1 * i))); tmp = 0.0; if (c <= -1.32e-74) tmp = t_2; elseif (c <= 4.2e+14) tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c))); elseif (c <= 5.5e+52) tmp = 2.0 * (i * (((x * y) / i) - (c * t_1))); elseif (c <= 2.7e+69) tmp = 2.0 * ((x * y) + ((z * t) - (a * (c * i)))); 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[(b * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(c * N[(t$95$1 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.32e-74], t$95$2, If[LessEqual[c, 4.2e+14], N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(i * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 5.5e+52], N[(2.0 * N[(i * N[(N[(N[(x * y), $MachinePrecision] / i), $MachinePrecision] - N[(c * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.7e+69], N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + b \cdot c\\
t_2 := 2 \cdot \left(x \cdot y - c \cdot \left(t\_1 \cdot i\right)\right)\\
\mathbf{if}\;c \leq -1.32 \cdot 10^{-74}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;c \leq 4.2 \cdot 10^{+14}:\\
\;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - i \cdot \left(a \cdot c\right)\right)\\
\mathbf{elif}\;c \leq 5.5 \cdot 10^{+52}:\\
\;\;\;\;2 \cdot \left(i \cdot \left(\frac{x \cdot y}{i} - c \cdot t\_1\right)\right)\\
\mathbf{elif}\;c \leq 2.7 \cdot 10^{+69}:\\
\;\;\;\;2 \cdot \left(x \cdot y + \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if c < -1.32e-74 or 2.6999999999999998e69 < c Initial program 79.9%
Taylor expanded in z around 0 86.7%
if -1.32e-74 < c < 4.2e14Initial program 99.0%
Taylor expanded in a around inf 95.6%
*-commutative95.6%
Simplified95.6%
if 4.2e14 < c < 5.49999999999999996e52Initial program 87.5%
Taylor expanded in z around 0 99.8%
Taylor expanded in i around inf 100.0%
if 5.49999999999999996e52 < c < 2.6999999999999998e69Initial program 87.5%
Taylor expanded in a around inf 100.0%
associate--l+100.0%
Applied egg-rr100.0%
Final simplification91.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (- (* x y) (* c (* (+ a (* b c)) i))))))
(if (<= c -2.2e-73)
t_1
(if (<= c 2.6e+20)
(* 2.0 (- (+ (* x y) (* z t)) (* i (* a c))))
(if (<= c 6.2e+52)
(* 2.0 (- (* x y) (* c (* (* b c) i))))
(if (<= c 6.8e+69)
(* 2.0 (+ (* x y) (- (* 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 * ((a + (b * c)) * i)));
double tmp;
if (c <= -2.2e-73) {
tmp = t_1;
} else if (c <= 2.6e+20) {
tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c)));
} else if (c <= 6.2e+52) {
tmp = 2.0 * ((x * y) - (c * ((b * c) * i)));
} else if (c <= 6.8e+69) {
tmp = 2.0 * ((x * y) + ((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) :: tmp
t_1 = 2.0d0 * ((x * y) - (c * ((a + (b * c)) * i)))
if (c <= (-2.2d-73)) then
tmp = t_1
else if (c <= 2.6d+20) then
tmp = 2.0d0 * (((x * y) + (z * t)) - (i * (a * c)))
else if (c <= 6.2d+52) then
tmp = 2.0d0 * ((x * y) - (c * ((b * c) * i)))
else if (c <= 6.8d+69) then
tmp = 2.0d0 * ((x * y) + ((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 * ((a + (b * c)) * i)));
double tmp;
if (c <= -2.2e-73) {
tmp = t_1;
} else if (c <= 2.6e+20) {
tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c)));
} else if (c <= 6.2e+52) {
tmp = 2.0 * ((x * y) - (c * ((b * c) * i)));
} else if (c <= 6.8e+69) {
tmp = 2.0 * ((x * y) + ((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 * ((a + (b * c)) * i))) tmp = 0 if c <= -2.2e-73: tmp = t_1 elif c <= 2.6e+20: tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c))) elif c <= 6.2e+52: tmp = 2.0 * ((x * y) - (c * ((b * c) * i))) elif c <= 6.8e+69: tmp = 2.0 * ((x * y) + ((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(c * Float64(Float64(a + Float64(b * c)) * i)))) tmp = 0.0 if (c <= -2.2e-73) tmp = t_1; elseif (c <= 2.6e+20) tmp = Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(i * Float64(a * c)))); elseif (c <= 6.2e+52) tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(c * Float64(Float64(b * c) * i)))); elseif (c <= 6.8e+69) tmp = Float64(2.0 * Float64(Float64(x * y) + 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 * ((a + (b * c)) * i))); tmp = 0.0; if (c <= -2.2e-73) tmp = t_1; elseif (c <= 2.6e+20) tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c))); elseif (c <= 6.2e+52) tmp = 2.0 * ((x * y) - (c * ((b * c) * i))); elseif (c <= 6.8e+69) tmp = 2.0 * ((x * y) + ((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[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -2.2e-73], t$95$1, If[LessEqual[c, 2.6e+20], N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(i * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 6.2e+52], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(c * N[(N[(b * c), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 6.8e+69], N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(x \cdot y - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\
\mathbf{if}\;c \leq -2.2 \cdot 10^{-73}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 2.6 \cdot 10^{+20}:\\
\;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - i \cdot \left(a \cdot c\right)\right)\\
\mathbf{elif}\;c \leq 6.2 \cdot 10^{+52}:\\
\;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(\left(b \cdot c\right) \cdot i\right)\right)\\
\mathbf{elif}\;c \leq 6.8 \cdot 10^{+69}:\\
\;\;\;\;2 \cdot \left(x \cdot y + \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -2.2e-73 or 6.79999999999999973e69 < c Initial program 79.9%
Taylor expanded in z around 0 86.7%
if -2.2e-73 < c < 2.6e20Initial program 99.0%
Taylor expanded in a around inf 95.6%
*-commutative95.6%
Simplified95.6%
if 2.6e20 < c < 6.2e52Initial program 87.5%
Taylor expanded in z around 0 99.8%
Taylor expanded in a around 0 99.8%
if 6.2e52 < c < 6.79999999999999973e69Initial program 87.5%
Taylor expanded in a around inf 100.0%
associate--l+100.0%
Applied egg-rr100.0%
Final simplification91.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (* b c)))
(t_2 (* 2.0 (+ (* x y) (- (* z t) (* a (* c i)))))))
(if (<= c -3.5e-73)
(* 2.0 (- (* z t) (* c (* t_1 i))))
(if (<= c 2.6e+20)
t_2
(if (<= c 8.4e+52)
(* 2.0 (- (* x y) (* c (* (* b c) i))))
(if (<= c 1.3e+71) t_2 (* 2.0 (- (* z t) (* t_1 (* c i))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double t_2 = 2.0 * ((x * y) + ((z * t) - (a * (c * i))));
double tmp;
if (c <= -3.5e-73) {
tmp = 2.0 * ((z * t) - (c * (t_1 * i)));
} else if (c <= 2.6e+20) {
tmp = t_2;
} else if (c <= 8.4e+52) {
tmp = 2.0 * ((x * y) - (c * ((b * c) * i)));
} else if (c <= 1.3e+71) {
tmp = t_2;
} else {
tmp = 2.0 * ((z * t) - (t_1 * (c * i)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = a + (b * c)
t_2 = 2.0d0 * ((x * y) + ((z * t) - (a * (c * i))))
if (c <= (-3.5d-73)) then
tmp = 2.0d0 * ((z * t) - (c * (t_1 * i)))
else if (c <= 2.6d+20) then
tmp = t_2
else if (c <= 8.4d+52) then
tmp = 2.0d0 * ((x * y) - (c * ((b * c) * i)))
else if (c <= 1.3d+71) then
tmp = t_2
else
tmp = 2.0d0 * ((z * t) - (t_1 * (c * i)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double t_2 = 2.0 * ((x * y) + ((z * t) - (a * (c * i))));
double tmp;
if (c <= -3.5e-73) {
tmp = 2.0 * ((z * t) - (c * (t_1 * i)));
} else if (c <= 2.6e+20) {
tmp = t_2;
} else if (c <= 8.4e+52) {
tmp = 2.0 * ((x * y) - (c * ((b * c) * i)));
} else if (c <= 1.3e+71) {
tmp = t_2;
} else {
tmp = 2.0 * ((z * t) - (t_1 * (c * i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a + (b * c) t_2 = 2.0 * ((x * y) + ((z * t) - (a * (c * i)))) tmp = 0 if c <= -3.5e-73: tmp = 2.0 * ((z * t) - (c * (t_1 * i))) elif c <= 2.6e+20: tmp = t_2 elif c <= 8.4e+52: tmp = 2.0 * ((x * y) - (c * ((b * c) * i))) elif c <= 1.3e+71: tmp = t_2 else: tmp = 2.0 * ((z * t) - (t_1 * (c * i))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(b * c)) t_2 = Float64(2.0 * Float64(Float64(x * y) + Float64(Float64(z * t) - Float64(a * Float64(c * i))))) tmp = 0.0 if (c <= -3.5e-73) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(t_1 * i)))); elseif (c <= 2.6e+20) tmp = t_2; elseif (c <= 8.4e+52) tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(c * Float64(Float64(b * c) * i)))); elseif (c <= 1.3e+71) tmp = t_2; else tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(t_1 * Float64(c * i)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = a + (b * c); t_2 = 2.0 * ((x * y) + ((z * t) - (a * (c * i)))); tmp = 0.0; if (c <= -3.5e-73) tmp = 2.0 * ((z * t) - (c * (t_1 * i))); elseif (c <= 2.6e+20) tmp = t_2; elseif (c <= 8.4e+52) tmp = 2.0 * ((x * y) - (c * ((b * c) * i))); elseif (c <= 1.3e+71) tmp = t_2; else tmp = 2.0 * ((z * t) - (t_1 * (c * i))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -3.5e-73], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(t$95$1 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.6e+20], t$95$2, If[LessEqual[c, 8.4e+52], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(c * N[(N[(b * c), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.3e+71], t$95$2, N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(t$95$1 * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + b \cdot c\\
t_2 := 2 \cdot \left(x \cdot y + \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\right)\\
\mathbf{if}\;c \leq -3.5 \cdot 10^{-73}:\\
\;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(t\_1 \cdot i\right)\right)\\
\mathbf{elif}\;c \leq 2.6 \cdot 10^{+20}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;c \leq 8.4 \cdot 10^{+52}:\\
\;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(\left(b \cdot c\right) \cdot i\right)\right)\\
\mathbf{elif}\;c \leq 1.3 \cdot 10^{+71}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(z \cdot t - t\_1 \cdot \left(c \cdot i\right)\right)\\
\end{array}
\end{array}
if c < -3.4999999999999998e-73Initial program 86.1%
Taylor expanded in x around 0 84.8%
if -3.4999999999999998e-73 < c < 2.6e20 or 8.3999999999999999e52 < c < 1.29999999999999996e71Initial program 97.6%
Taylor expanded in a around inf 94.9%
associate--l+94.9%
Applied egg-rr94.9%
if 2.6e20 < c < 8.3999999999999999e52Initial program 87.5%
Taylor expanded in z around 0 99.8%
Taylor expanded in a around 0 99.8%
if 1.29999999999999996e71 < c Initial program 74.5%
fma-define74.5%
associate-*l*91.8%
Simplified91.8%
fma-define91.8%
+-commutative91.8%
Applied egg-rr91.8%
Taylor expanded in t around inf 88.6%
associate-/l*88.6%
Simplified88.6%
Taylor expanded in z around inf 82.1%
Final simplification89.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (- (* z t) (* c (* (+ a (* b c)) i)))))
(t_2 (* 2.0 (+ (* x y) (- (* z t) (* a (* c i)))))))
(if (<= c -3.5e-73)
t_1
(if (<= c 6.4e+18)
t_2
(if (<= c 8.2e+52)
(* 2.0 (- (* x y) (* c (* (* b c) i))))
(if (<= c 1.3e+71) t_2 t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * ((z * t) - (c * ((a + (b * c)) * i)));
double t_2 = 2.0 * ((x * y) + ((z * t) - (a * (c * i))));
double tmp;
if (c <= -3.5e-73) {
tmp = t_1;
} else if (c <= 6.4e+18) {
tmp = t_2;
} else if (c <= 8.2e+52) {
tmp = 2.0 * ((x * y) - (c * ((b * c) * i)));
} else if (c <= 1.3e+71) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 2.0d0 * ((z * t) - (c * ((a + (b * c)) * i)))
t_2 = 2.0d0 * ((x * y) + ((z * t) - (a * (c * i))))
if (c <= (-3.5d-73)) then
tmp = t_1
else if (c <= 6.4d+18) then
tmp = t_2
else if (c <= 8.2d+52) then
tmp = 2.0d0 * ((x * y) - (c * ((b * c) * i)))
else if (c <= 1.3d+71) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * ((z * t) - (c * ((a + (b * c)) * i)));
double t_2 = 2.0 * ((x * y) + ((z * t) - (a * (c * i))));
double tmp;
if (c <= -3.5e-73) {
tmp = t_1;
} else if (c <= 6.4e+18) {
tmp = t_2;
} else if (c <= 8.2e+52) {
tmp = 2.0 * ((x * y) - (c * ((b * c) * i)));
} else if (c <= 1.3e+71) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * ((z * t) - (c * ((a + (b * c)) * i))) t_2 = 2.0 * ((x * y) + ((z * t) - (a * (c * i)))) tmp = 0 if c <= -3.5e-73: tmp = t_1 elif c <= 6.4e+18: tmp = t_2 elif c <= 8.2e+52: tmp = 2.0 * ((x * y) - (c * ((b * c) * i))) elif c <= 1.3e+71: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(Float64(a + Float64(b * c)) * i)))) t_2 = Float64(2.0 * Float64(Float64(x * y) + Float64(Float64(z * t) - Float64(a * Float64(c * i))))) tmp = 0.0 if (c <= -3.5e-73) tmp = t_1; elseif (c <= 6.4e+18) tmp = t_2; elseif (c <= 8.2e+52) tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(c * Float64(Float64(b * c) * i)))); elseif (c <= 1.3e+71) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 2.0 * ((z * t) - (c * ((a + (b * c)) * i))); t_2 = 2.0 * ((x * y) + ((z * t) - (a * (c * i)))); tmp = 0.0; if (c <= -3.5e-73) tmp = t_1; elseif (c <= 6.4e+18) tmp = t_2; elseif (c <= 8.2e+52) tmp = 2.0 * ((x * y) - (c * ((b * c) * i))); elseif (c <= 1.3e+71) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -3.5e-73], t$95$1, If[LessEqual[c, 6.4e+18], t$95$2, If[LessEqual[c, 8.2e+52], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(c * N[(N[(b * c), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.3e+71], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(z \cdot t - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\
t_2 := 2 \cdot \left(x \cdot y + \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\right)\\
\mathbf{if}\;c \leq -3.5 \cdot 10^{-73}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 6.4 \cdot 10^{+18}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;c \leq 8.2 \cdot 10^{+52}:\\
\;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(\left(b \cdot c\right) \cdot i\right)\right)\\
\mathbf{elif}\;c \leq 1.3 \cdot 10^{+71}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -3.4999999999999998e-73 or 1.29999999999999996e71 < c Initial program 80.5%
Taylor expanded in x around 0 83.5%
if -3.4999999999999998e-73 < c < 6.4e18 or 8.1999999999999999e52 < c < 1.29999999999999996e71Initial program 97.6%
Taylor expanded in a around inf 94.9%
associate--l+94.9%
Applied egg-rr94.9%
if 6.4e18 < c < 8.1999999999999999e52Initial program 87.5%
Taylor expanded in z around 0 99.8%
Taylor expanded in a around 0 99.8%
Final simplification89.5%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= (* x y) -2e+214)
(* 2.0 (- (* x y) (* a (* c i))))
(if (<= (* x y) 10.0)
(* 2.0 (- (* z t) (* c (* b (* c i)))))
(if (<= (* x y) 5e+216)
(* 2.0 (- (* x y) (* c (* (* b c) i))))
(* x (* 2.0 (+ y (* t (/ z x)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x * y) <= -2e+214) {
tmp = 2.0 * ((x * y) - (a * (c * i)));
} else if ((x * y) <= 10.0) {
tmp = 2.0 * ((z * t) - (c * (b * (c * i))));
} else if ((x * y) <= 5e+216) {
tmp = 2.0 * ((x * y) - (c * ((b * c) * i)));
} else {
tmp = x * (2.0 * (y + (t * (z / x))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x * y) <= (-2d+214)) then
tmp = 2.0d0 * ((x * y) - (a * (c * i)))
else if ((x * y) <= 10.0d0) then
tmp = 2.0d0 * ((z * t) - (c * (b * (c * i))))
else if ((x * y) <= 5d+216) then
tmp = 2.0d0 * ((x * y) - (c * ((b * c) * i)))
else
tmp = x * (2.0d0 * (y + (t * (z / x))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x * y) <= -2e+214) {
tmp = 2.0 * ((x * y) - (a * (c * i)));
} else if ((x * y) <= 10.0) {
tmp = 2.0 * ((z * t) - (c * (b * (c * i))));
} else if ((x * y) <= 5e+216) {
tmp = 2.0 * ((x * y) - (c * ((b * c) * i)));
} else {
tmp = x * (2.0 * (y + (t * (z / x))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x * y) <= -2e+214: tmp = 2.0 * ((x * y) - (a * (c * i))) elif (x * y) <= 10.0: tmp = 2.0 * ((z * t) - (c * (b * (c * i)))) elif (x * y) <= 5e+216: tmp = 2.0 * ((x * y) - (c * ((b * c) * i))) else: tmp = x * (2.0 * (y + (t * (z / x)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(x * y) <= -2e+214) tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(a * Float64(c * i)))); elseif (Float64(x * y) <= 10.0) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(b * Float64(c * i))))); elseif (Float64(x * y) <= 5e+216) tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(c * Float64(Float64(b * c) * i)))); else tmp = Float64(x * Float64(2.0 * Float64(y + Float64(t * Float64(z / x))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x * y) <= -2e+214) tmp = 2.0 * ((x * y) - (a * (c * i))); elseif ((x * y) <= 10.0) tmp = 2.0 * ((z * t) - (c * (b * (c * i)))); elseif ((x * y) <= 5e+216) tmp = 2.0 * ((x * y) - (c * ((b * c) * i))); else tmp = x * (2.0 * (y + (t * (z / x)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(x * y), $MachinePrecision], -2e+214], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 10.0], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(b * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 5e+216], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(c * N[(N[(b * c), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(2.0 * N[(y + N[(t * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -2 \cdot 10^{+214}:\\
\;\;\;\;2 \cdot \left(x \cdot y - a \cdot \left(c \cdot i\right)\right)\\
\mathbf{elif}\;x \cdot y \leq 10:\\
\;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\
\mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{+216}:\\
\;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(\left(b \cdot c\right) \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(2 \cdot \left(y + t \cdot \frac{z}{x}\right)\right)\\
\end{array}
\end{array}
if (*.f64 x y) < -1.9999999999999999e214Initial program 86.4%
Taylor expanded in a around inf 86.2%
Taylor expanded in z around 0 79.9%
if -1.9999999999999999e214 < (*.f64 x y) < 10Initial program 90.0%
Taylor expanded in x around 0 85.5%
Taylor expanded in a around 0 68.7%
if 10 < (*.f64 x y) < 4.9999999999999998e216Initial program 94.8%
Taylor expanded in z around 0 82.7%
Taylor expanded in a around 0 72.9%
if 4.9999999999999998e216 < (*.f64 x y) Initial program 76.4%
Taylor expanded in c around 0 84.3%
Taylor expanded in x around inf 88.3%
distribute-lft-out88.3%
associate-/l*96.3%
Simplified96.3%
Final simplification73.3%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (* z t) -1e+22) (not (<= (* z t) 40000000000000.0))) (* 2.0 (- (* t (+ z (* x (/ y t)))) (* (* b c) (* c i)))) (* 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 (((z * t) <= -1e+22) || !((z * t) <= 40000000000000.0)) {
tmp = 2.0 * ((t * (z + (x * (y / t)))) - ((b * c) * (c * i)));
} 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 (((z * t) <= (-1d+22)) .or. (.not. ((z * t) <= 40000000000000.0d0))) then
tmp = 2.0d0 * ((t * (z + (x * (y / t)))) - ((b * c) * (c * i)))
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 (((z * t) <= -1e+22) || !((z * t) <= 40000000000000.0)) {
tmp = 2.0 * ((t * (z + (x * (y / t)))) - ((b * c) * (c * i)));
} 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 ((z * t) <= -1e+22) or not ((z * t) <= 40000000000000.0): tmp = 2.0 * ((t * (z + (x * (y / t)))) - ((b * c) * (c * i))) 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 ((Float64(z * t) <= -1e+22) || !(Float64(z * t) <= 40000000000000.0)) tmp = Float64(2.0 * Float64(Float64(t * Float64(z + Float64(x * Float64(y / t)))) - Float64(Float64(b * c) * Float64(c * i)))); 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 (((z * t) <= -1e+22) || ~(((z * t) <= 40000000000000.0))) tmp = 2.0 * ((t * (z + (x * (y / t)))) - ((b * c) * (c * i))); 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[N[(z * t), $MachinePrecision], -1e+22], N[Not[LessEqual[N[(z * t), $MachinePrecision], 40000000000000.0]], $MachinePrecision]], N[(2.0 * N[(N[(t * N[(z + N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(b * c), $MachinePrecision] * N[(c * i), $MachinePrecision]), $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}\;z \cdot t \leq -1 \cdot 10^{+22} \lor \neg \left(z \cdot t \leq 40000000000000\right):\\
\;\;\;\;2 \cdot \left(t \cdot \left(z + x \cdot \frac{y}{t}\right) - \left(b \cdot c\right) \cdot \left(c \cdot i\right)\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 (*.f64 z t) < -1e22 or 4e13 < (*.f64 z t) Initial program 85.5%
fma-define86.3%
associate-*l*92.7%
Simplified92.7%
fma-define91.9%
+-commutative91.9%
Applied egg-rr91.9%
Taylor expanded in t around inf 94.4%
associate-/l*94.4%
Simplified94.4%
Taylor expanded in a around 0 86.4%
if -1e22 < (*.f64 z t) < 4e13Initial program 92.1%
Taylor expanded in z around 0 92.0%
Final simplification89.3%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= c -2.2e-73) (not (<= c 3.3e+18))) (* 2.0 (- (* x y) (* c (* (+ a (* b c)) i)))) (* 2.0 (+ (* x y) (- (* z t) (* a (* c i)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c <= -2.2e-73) || !(c <= 3.3e+18)) {
tmp = 2.0 * ((x * y) - (c * ((a + (b * c)) * i)));
} else {
tmp = 2.0 * ((x * y) + ((z * t) - (a * (c * i))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((c <= (-2.2d-73)) .or. (.not. (c <= 3.3d+18))) then
tmp = 2.0d0 * ((x * y) - (c * ((a + (b * c)) * i)))
else
tmp = 2.0d0 * ((x * y) + ((z * t) - (a * (c * i))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c <= -2.2e-73) || !(c <= 3.3e+18)) {
tmp = 2.0 * ((x * y) - (c * ((a + (b * c)) * i)));
} else {
tmp = 2.0 * ((x * y) + ((z * t) - (a * (c * i))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c <= -2.2e-73) or not (c <= 3.3e+18): tmp = 2.0 * ((x * y) - (c * ((a + (b * c)) * i))) else: tmp = 2.0 * ((x * y) + ((z * t) - (a * (c * i)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((c <= -2.2e-73) || !(c <= 3.3e+18)) tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(c * Float64(Float64(a + Float64(b * c)) * i)))); else tmp = Float64(2.0 * Float64(Float64(x * y) + Float64(Float64(z * t) - Float64(a * Float64(c * i))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((c <= -2.2e-73) || ~((c <= 3.3e+18))) tmp = 2.0 * ((x * y) - (c * ((a + (b * c)) * i))); else tmp = 2.0 * ((x * y) + ((z * t) - (a * (c * i)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[c, -2.2e-73], N[Not[LessEqual[c, 3.3e+18]], $MachinePrecision]], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -2.2 \cdot 10^{-73} \lor \neg \left(c \leq 3.3 \cdot 10^{+18}\right):\\
\;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y + \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\right)\\
\end{array}
\end{array}
if c < -2.2e-73 or 3.3e18 < c Initial program 80.8%
Taylor expanded in z around 0 84.3%
if -2.2e-73 < c < 3.3e18Initial program 99.0%
Taylor expanded in a around inf 94.5%
associate--l+94.5%
Applied egg-rr94.5%
Final simplification88.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= c -3.2e-87) (not (<= c 4.05e+71))) (* 2.0 (* c (* (+ a (* b c)) (- i)))) (* (+ (* x y) (* z t)) 2.0)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c <= -3.2e-87) || !(c <= 4.05e+71)) {
tmp = 2.0 * (c * ((a + (b * c)) * -i));
} else {
tmp = ((x * y) + (z * t)) * 2.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((c <= (-3.2d-87)) .or. (.not. (c <= 4.05d+71))) then
tmp = 2.0d0 * (c * ((a + (b * c)) * -i))
else
tmp = ((x * y) + (z * t)) * 2.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c <= -3.2e-87) || !(c <= 4.05e+71)) {
tmp = 2.0 * (c * ((a + (b * c)) * -i));
} else {
tmp = ((x * y) + (z * t)) * 2.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c <= -3.2e-87) or not (c <= 4.05e+71): tmp = 2.0 * (c * ((a + (b * c)) * -i)) else: tmp = ((x * y) + (z * t)) * 2.0 return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((c <= -3.2e-87) || !(c <= 4.05e+71)) tmp = Float64(2.0 * Float64(c * Float64(Float64(a + Float64(b * c)) * Float64(-i)))); else tmp = Float64(Float64(Float64(x * y) + Float64(z * t)) * 2.0); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((c <= -3.2e-87) || ~((c <= 4.05e+71))) tmp = 2.0 * (c * ((a + (b * c)) * -i)); else tmp = ((x * y) + (z * t)) * 2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[c, -3.2e-87], N[Not[LessEqual[c, 4.05e+71]], $MachinePrecision]], N[(2.0 * N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -3.2 \cdot 10^{-87} \lor \neg \left(c \leq 4.05 \cdot 10^{+71}\right):\\
\;\;\;\;2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot \left(-i\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\
\end{array}
\end{array}
if c < -3.19999999999999979e-87 or 4.05000000000000019e71 < c Initial program 80.8%
Taylor expanded in i around inf 75.6%
if -3.19999999999999979e-87 < c < 4.05000000000000019e71Initial program 96.9%
Taylor expanded in c around 0 73.7%
Final simplification74.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (* z t))))
(if (<= z -9e+63)
t_1
(if (<= z -6e-182)
(* (* x y) 2.0)
(if (<= z 4.4e-61) (* (* c i) (* a -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 (z <= -9e+63) {
tmp = t_1;
} else if (z <= -6e-182) {
tmp = (x * y) * 2.0;
} else if (z <= 4.4e-61) {
tmp = (c * i) * (a * -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 (z <= (-9d+63)) then
tmp = t_1
else if (z <= (-6d-182)) then
tmp = (x * y) * 2.0d0
else if (z <= 4.4d-61) then
tmp = (c * i) * (a * (-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 (z <= -9e+63) {
tmp = t_1;
} else if (z <= -6e-182) {
tmp = (x * y) * 2.0;
} else if (z <= 4.4e-61) {
tmp = (c * i) * (a * -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 z <= -9e+63: tmp = t_1 elif z <= -6e-182: tmp = (x * y) * 2.0 elif z <= 4.4e-61: tmp = (c * i) * (a * -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 (z <= -9e+63) tmp = t_1; elseif (z <= -6e-182) tmp = Float64(Float64(x * y) * 2.0); elseif (z <= 4.4e-61) tmp = Float64(Float64(c * i) * Float64(a * -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 (z <= -9e+63) tmp = t_1; elseif (z <= -6e-182) tmp = (x * y) * 2.0; elseif (z <= 4.4e-61) tmp = (c * i) * (a * -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[z, -9e+63], t$95$1, If[LessEqual[z, -6e-182], N[(N[(x * y), $MachinePrecision] * 2.0), $MachinePrecision], If[LessEqual[z, 4.4e-61], N[(N[(c * i), $MachinePrecision] * N[(a * -2.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(z \cdot t\right)\\
\mathbf{if}\;z \leq -9 \cdot 10^{+63}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -6 \cdot 10^{-182}:\\
\;\;\;\;\left(x \cdot y\right) \cdot 2\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{-61}:\\
\;\;\;\;\left(c \cdot i\right) \cdot \left(a \cdot -2\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -9.00000000000000034e63 or 4.40000000000000017e-61 < z Initial program 87.3%
Taylor expanded in z around inf 40.2%
if -9.00000000000000034e63 < z < -6.0000000000000003e-182Initial program 89.3%
Taylor expanded in x around inf 30.8%
if -6.0000000000000003e-182 < z < 4.40000000000000017e-61Initial program 91.1%
fma-define91.1%
associate-*l*98.3%
Simplified98.3%
fma-define98.3%
+-commutative98.3%
Applied egg-rr98.3%
Taylor expanded in a around inf 39.8%
neg-mul-139.8%
distribute-rgt-neg-in39.8%
distribute-lft-neg-in39.8%
Simplified39.8%
Taylor expanded in a around 0 39.8%
*-commutative39.8%
*-commutative39.8%
associate-*l*39.8%
Simplified39.8%
Final simplification38.1%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= z -3.9e+15) (not (<= z 3.9e-66))) (* (+ (* x y) (* z t)) 2.0) (* 2.0 (- (* x y) (* a (* c i))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((z <= -3.9e+15) || !(z <= 3.9e-66)) {
tmp = ((x * y) + (z * t)) * 2.0;
} else {
tmp = 2.0 * ((x * y) - (a * (c * i)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((z <= (-3.9d+15)) .or. (.not. (z <= 3.9d-66))) then
tmp = ((x * y) + (z * t)) * 2.0d0
else
tmp = 2.0d0 * ((x * y) - (a * (c * i)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((z <= -3.9e+15) || !(z <= 3.9e-66)) {
tmp = ((x * y) + (z * t)) * 2.0;
} else {
tmp = 2.0 * ((x * y) - (a * (c * i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (z <= -3.9e+15) or not (z <= 3.9e-66): tmp = ((x * y) + (z * t)) * 2.0 else: tmp = 2.0 * ((x * y) - (a * (c * i))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((z <= -3.9e+15) || !(z <= 3.9e-66)) tmp = Float64(Float64(Float64(x * y) + Float64(z * t)) * 2.0); else tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(a * Float64(c * i)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((z <= -3.9e+15) || ~((z <= 3.9e-66))) tmp = ((x * y) + (z * t)) * 2.0; else tmp = 2.0 * ((x * y) - (a * (c * i))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[z, -3.9e+15], N[Not[LessEqual[z, 3.9e-66]], $MachinePrecision]], N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.9 \cdot 10^{+15} \lor \neg \left(z \leq 3.9 \cdot 10^{-66}\right):\\
\;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y - a \cdot \left(c \cdot i\right)\right)\\
\end{array}
\end{array}
if z < -3.9e15 or 3.89999999999999983e-66 < z Initial program 87.7%
Taylor expanded in c around 0 58.2%
if -3.9e15 < z < 3.89999999999999983e-66Initial program 90.3%
Taylor expanded in a around inf 71.8%
Taylor expanded in z around 0 57.9%
Final simplification58.1%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= z -210000000000.0)
(* z (* 2.0 (+ t (* x (/ y z)))))
(if (<= z 4.8e-62)
(* 2.0 (- (* x y) (* a (* c i))))
(* (+ (* x y) (* z t)) 2.0))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -210000000000.0) {
tmp = z * (2.0 * (t + (x * (y / z))));
} else if (z <= 4.8e-62) {
tmp = 2.0 * ((x * y) - (a * (c * i)));
} else {
tmp = ((x * y) + (z * t)) * 2.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (z <= (-210000000000.0d0)) then
tmp = z * (2.0d0 * (t + (x * (y / z))))
else if (z <= 4.8d-62) then
tmp = 2.0d0 * ((x * y) - (a * (c * i)))
else
tmp = ((x * y) + (z * t)) * 2.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -210000000000.0) {
tmp = z * (2.0 * (t + (x * (y / z))));
} else if (z <= 4.8e-62) {
tmp = 2.0 * ((x * y) - (a * (c * i)));
} else {
tmp = ((x * y) + (z * t)) * 2.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -210000000000.0: tmp = z * (2.0 * (t + (x * (y / z)))) elif z <= 4.8e-62: tmp = 2.0 * ((x * y) - (a * (c * i))) else: tmp = ((x * y) + (z * t)) * 2.0 return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -210000000000.0) tmp = Float64(z * Float64(2.0 * Float64(t + Float64(x * Float64(y / z))))); elseif (z <= 4.8e-62) tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(a * Float64(c * i)))); else tmp = Float64(Float64(Float64(x * y) + Float64(z * t)) * 2.0); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (z <= -210000000000.0) tmp = z * (2.0 * (t + (x * (y / z)))); elseif (z <= 4.8e-62) tmp = 2.0 * ((x * y) - (a * (c * i))); else tmp = ((x * y) + (z * t)) * 2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -210000000000.0], N[(z * N[(2.0 * N[(t + N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.8e-62], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -210000000000:\\
\;\;\;\;z \cdot \left(2 \cdot \left(t + x \cdot \frac{y}{z}\right)\right)\\
\mathbf{elif}\;z \leq 4.8 \cdot 10^{-62}:\\
\;\;\;\;2 \cdot \left(x \cdot y - a \cdot \left(c \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\
\end{array}
\end{array}
if z < -2.1e11Initial program 85.5%
Taylor expanded in c around 0 61.0%
Taylor expanded in t around inf 59.7%
distribute-lft-out61.1%
associate-/l*59.8%
Simplified59.8%
Taylor expanded in z around inf 62.5%
distribute-lft-out62.5%
associate-/l*63.9%
Simplified63.9%
if -2.1e11 < z < 4.79999999999999967e-62Initial program 90.5%
Taylor expanded in a around inf 71.8%
Taylor expanded in z around 0 57.4%
if 4.79999999999999967e-62 < z Initial program 89.7%
Taylor expanded in c around 0 56.1%
Final simplification58.8%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= z -1.35e+73)
(* t (* 2.0 (+ z (* x (/ y t)))))
(if (<= z 3.7e-65)
(* 2.0 (- (* x y) (* a (* c i))))
(* (+ (* x y) (* z t)) 2.0))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.35e+73) {
tmp = t * (2.0 * (z + (x * (y / t))));
} else if (z <= 3.7e-65) {
tmp = 2.0 * ((x * y) - (a * (c * i)));
} else {
tmp = ((x * y) + (z * t)) * 2.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (z <= (-1.35d+73)) then
tmp = t * (2.0d0 * (z + (x * (y / t))))
else if (z <= 3.7d-65) then
tmp = 2.0d0 * ((x * y) - (a * (c * i)))
else
tmp = ((x * y) + (z * t)) * 2.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.35e+73) {
tmp = t * (2.0 * (z + (x * (y / t))));
} else if (z <= 3.7e-65) {
tmp = 2.0 * ((x * y) - (a * (c * i)));
} else {
tmp = ((x * y) + (z * t)) * 2.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -1.35e+73: tmp = t * (2.0 * (z + (x * (y / t)))) elif z <= 3.7e-65: tmp = 2.0 * ((x * y) - (a * (c * i))) else: tmp = ((x * y) + (z * t)) * 2.0 return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -1.35e+73) tmp = Float64(t * Float64(2.0 * Float64(z + Float64(x * Float64(y / t))))); elseif (z <= 3.7e-65) tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(a * Float64(c * i)))); else tmp = Float64(Float64(Float64(x * y) + Float64(z * t)) * 2.0); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (z <= -1.35e+73) tmp = t * (2.0 * (z + (x * (y / t)))); elseif (z <= 3.7e-65) tmp = 2.0 * ((x * y) - (a * (c * i))); else tmp = ((x * y) + (z * t)) * 2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -1.35e+73], N[(t * N[(2.0 * N[(z + N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.7e-65], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.35 \cdot 10^{+73}:\\
\;\;\;\;t \cdot \left(2 \cdot \left(z + x \cdot \frac{y}{t}\right)\right)\\
\mathbf{elif}\;z \leq 3.7 \cdot 10^{-65}:\\
\;\;\;\;2 \cdot \left(x \cdot y - a \cdot \left(c \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\
\end{array}
\end{array}
if z < -1.35e73Initial program 84.8%
Taylor expanded in c around 0 61.1%
Taylor expanded in t around inf 59.5%
distribute-lft-out61.3%
associate-/l*59.7%
Simplified59.7%
if -1.35e73 < z < 3.7e-65Initial program 90.4%
Taylor expanded in a around inf 71.5%
Taylor expanded in z around 0 55.2%
if 3.7e-65 < z Initial program 89.8%
Taylor expanded in c around 0 55.3%
Final simplification56.2%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (* x y) -2e+165) (not (<= (* x y) 10000000000.0))) (* (* x y) 2.0) (* 2.0 (* z t))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((x * y) <= -2e+165) || !((x * y) <= 10000000000.0)) {
tmp = (x * y) * 2.0;
} else {
tmp = 2.0 * (z * t);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (((x * y) <= (-2d+165)) .or. (.not. ((x * y) <= 10000000000.0d0))) then
tmp = (x * y) * 2.0d0
else
tmp = 2.0d0 * (z * t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((x * y) <= -2e+165) || !((x * y) <= 10000000000.0)) {
tmp = (x * y) * 2.0;
} else {
tmp = 2.0 * (z * t);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((x * y) <= -2e+165) or not ((x * y) <= 10000000000.0): tmp = (x * y) * 2.0 else: tmp = 2.0 * (z * t) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(x * y) <= -2e+165) || !(Float64(x * y) <= 10000000000.0)) tmp = Float64(Float64(x * y) * 2.0); else tmp = Float64(2.0 * Float64(z * t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (((x * y) <= -2e+165) || ~(((x * y) <= 10000000000.0))) tmp = (x * y) * 2.0; else tmp = 2.0 * (z * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(x * y), $MachinePrecision], -2e+165], N[Not[LessEqual[N[(x * y), $MachinePrecision], 10000000000.0]], $MachinePrecision]], N[(N[(x * y), $MachinePrecision] * 2.0), $MachinePrecision], N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -2 \cdot 10^{+165} \lor \neg \left(x \cdot y \leq 10000000000\right):\\
\;\;\;\;\left(x \cdot y\right) \cdot 2\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(z \cdot t\right)\\
\end{array}
\end{array}
if (*.f64 x y) < -1.9999999999999998e165 or 1e10 < (*.f64 x y) Initial program 87.8%
Taylor expanded in x around inf 50.9%
if -1.9999999999999998e165 < (*.f64 x y) < 1e10Initial program 89.7%
Taylor expanded in z around inf 36.1%
Final simplification41.7%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a -5.4e+162) (* 2.0 (* i (* a (- c)))) (if (<= a 3.6e+180) (* (+ (* x y) (* z t)) 2.0) (* (* c i) (* a -2.0)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= -5.4e+162) {
tmp = 2.0 * (i * (a * -c));
} else if (a <= 3.6e+180) {
tmp = ((x * y) + (z * t)) * 2.0;
} else {
tmp = (c * i) * (a * -2.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (a <= (-5.4d+162)) then
tmp = 2.0d0 * (i * (a * -c))
else if (a <= 3.6d+180) then
tmp = ((x * y) + (z * t)) * 2.0d0
else
tmp = (c * i) * (a * (-2.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= -5.4e+162) {
tmp = 2.0 * (i * (a * -c));
} else if (a <= 3.6e+180) {
tmp = ((x * y) + (z * t)) * 2.0;
} else {
tmp = (c * i) * (a * -2.0);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= -5.4e+162: tmp = 2.0 * (i * (a * -c)) elif a <= 3.6e+180: tmp = ((x * y) + (z * t)) * 2.0 else: tmp = (c * i) * (a * -2.0) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= -5.4e+162) tmp = Float64(2.0 * Float64(i * Float64(a * Float64(-c)))); elseif (a <= 3.6e+180) tmp = Float64(Float64(Float64(x * y) + Float64(z * t)) * 2.0); else tmp = Float64(Float64(c * i) * Float64(a * -2.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (a <= -5.4e+162) tmp = 2.0 * (i * (a * -c)); elseif (a <= 3.6e+180) tmp = ((x * y) + (z * t)) * 2.0; else tmp = (c * i) * (a * -2.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, -5.4e+162], N[(2.0 * N[(i * N[(a * (-c)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.6e+180], N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision], N[(N[(c * i), $MachinePrecision] * N[(a * -2.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.4 \cdot 10^{+162}:\\
\;\;\;\;2 \cdot \left(i \cdot \left(a \cdot \left(-c\right)\right)\right)\\
\mathbf{elif}\;a \leq 3.6 \cdot 10^{+180}:\\
\;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\
\mathbf{else}:\\
\;\;\;\;\left(c \cdot i\right) \cdot \left(a \cdot -2\right)\\
\end{array}
\end{array}
if a < -5.4000000000000003e162Initial program 91.1%
fma-define91.1%
associate-*l*92.7%
Simplified92.7%
fma-define92.7%
+-commutative92.7%
Applied egg-rr92.7%
Taylor expanded in a around inf 58.9%
associate-*r*66.0%
*-commutative66.0%
neg-mul-166.0%
distribute-rgt-neg-in66.0%
*-commutative66.0%
distribute-rgt-neg-in66.0%
Simplified66.0%
if -5.4000000000000003e162 < a < 3.6000000000000002e180Initial program 90.2%
Taylor expanded in c around 0 57.6%
if 3.6000000000000002e180 < a Initial program 76.1%
fma-define76.1%
associate-*l*95.8%
Simplified95.8%
fma-define95.8%
+-commutative95.8%
Applied egg-rr95.8%
Taylor expanded in a around inf 59.7%
neg-mul-159.7%
distribute-rgt-neg-in59.7%
distribute-lft-neg-in59.7%
Simplified59.7%
Taylor expanded in a around 0 59.7%
*-commutative59.7%
*-commutative59.7%
associate-*l*59.7%
Simplified59.7%
Final simplification58.9%
(FPCore (x y z t a b c i) :precision binary64 (* 2.0 (* z t)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (z * t);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = 2.0d0 * (z * t)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (z * t);
}
def code(x, y, z, t, a, b, c, i): return 2.0 * (z * t)
function code(x, y, z, t, a, b, c, i) return Float64(2.0 * Float64(z * t)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = 2.0 * (z * t); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(z \cdot t\right)
\end{array}
Initial program 89.0%
Taylor expanded in z around inf 28.9%
Final simplification28.9%
(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 2024085
(FPCore (x y z t a b c i)
:name "Diagrams.ThreeD.Shapes:frustum from diagrams-lib-1.3.0.3, A"
:precision binary64
:alt
(* 2.0 (- (+ (* x y) (* z t)) (* (+ a (* b c)) (* c i))))
(* 2.0 (- (+ (* x y) (* z t)) (* (* (+ a (* b c)) c) i))))