
(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 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i) :precision binary64 (* 2.0 (- (+ (* x y) (* z t)) (* (* (+ a (* b c)) c) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i));
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = 2.0d0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i));
}
def code(x, y, z, t, a, b, c, i): return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i))
function code(x, y, z, t, a, b, c, i) return Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(Float64(Float64(a + Float64(b * c)) * c) * i))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i)); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right)
\end{array}
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (* b c))) (t_2 (+ (* x y) (* z t))))
(if (<= (- t_2 (* (* c t_1) i)) INFINITY)
(* 2.0 (- t_2 (* t_1 (* c i))))
(* 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 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 = x * (2.0 * (y + (t * (z / x))));
}
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 = x * (2.0 * (y + (t * (z / x))));
}
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 = x * (2.0 * (y + (t * (z / x)))) 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(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) 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 = x * (2.0 * (y + (t * (z / x)))); 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[(x * N[(2.0 * N[(y + N[(t * N[(z / x), $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}:\\
\;\;\;\;x \cdot \left(2 \cdot \left(y + t \cdot \frac{z}{x}\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.6%
fma-define93.6%
associate-*l*98.3%
Simplified98.3%
fma-define98.3%
+-commutative98.3%
Applied egg-rr98.3%
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 40.0%
Taylor expanded in x around inf 40.0%
distribute-lft-out40.0%
associate-/l*53.3%
Simplified53.3%
Final simplification95.7%
(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 (- (* x y) (* c (* t_1 i))))
(if (<= t_2 1e+256)
(* (- (+ (* x y) (* z t)) (* t_2 i)) 2.0)
(* 2.0 (- (* z t) (* c (* b (* c i)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double t_2 = c * t_1;
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = 2.0 * ((x * y) - (c * (t_1 * i)));
} else if (t_2 <= 1e+256) {
tmp = (((x * y) + (z * t)) - (t_2 * i)) * 2.0;
} else {
tmp = 2.0 * ((z * t) - (c * (b * (c * i))));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double t_2 = c * t_1;
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = 2.0 * ((x * y) - (c * (t_1 * i)));
} else if (t_2 <= 1e+256) {
tmp = (((x * y) + (z * t)) - (t_2 * i)) * 2.0;
} else {
tmp = 2.0 * ((z * t) - (c * (b * (c * 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 * ((x * y) - (c * (t_1 * i))) elif t_2 <= 1e+256: tmp = (((x * y) + (z * t)) - (t_2 * i)) * 2.0 else: tmp = 2.0 * ((z * t) - (c * (b * (c * 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(x * y) - Float64(c * Float64(t_1 * i)))); elseif (t_2 <= 1e+256) tmp = Float64(Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(t_2 * i)) * 2.0); else tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(b * Float64(c * i))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = a + (b * c); t_2 = c * t_1; tmp = 0.0; if (t_2 <= -Inf) tmp = 2.0 * ((x * y) - (c * (t_1 * i))); elseif (t_2 <= 1e+256) tmp = (((x * y) + (z * t)) - (t_2 * i)) * 2.0; else tmp = 2.0 * ((z * t) - (c * (b * (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[(c * t$95$1), $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, 1e+256], 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[(z * t), $MachinePrecision] - N[(c * N[(b * N[(c * i), $MachinePrecision]), $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(x \cdot y - c \cdot \left(t\_1 \cdot i\right)\right)\\
\mathbf{elif}\;t\_2 \leq 10^{+256}:\\
\;\;\;\;\left(\left(x \cdot y + z \cdot t\right) - t\_2 \cdot i\right) \cdot 2\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\
\end{array}
\end{array}
if (*.f64 (+.f64 a (*.f64 b c)) c) < -inf.0Initial program 68.2%
Taylor expanded in z around 0 88.4%
if -inf.0 < (*.f64 (+.f64 a (*.f64 b c)) c) < 1e256Initial program 97.4%
if 1e256 < (*.f64 (+.f64 a (*.f64 b c)) c) Initial program 73.4%
Taylor expanded in x around 0 85.4%
Taylor expanded in a around 0 89.5%
Final simplification94.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (* c (* (+ a (* b c)) i)) -2.0)))
(if (<= c -6.4e+198)
t_1
(if (<= c -1.32e+23)
(* 2.0 (- (* z t) (* c (* b (* c i)))))
(if (or (<= c -7.2e-52) (not (<= c 9.2e+77)))
t_1
(* (+ (* 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 t_1 = (c * ((a + (b * c)) * i)) * -2.0;
double tmp;
if (c <= -6.4e+198) {
tmp = t_1;
} else if (c <= -1.32e+23) {
tmp = 2.0 * ((z * t) - (c * (b * (c * i))));
} else if ((c <= -7.2e-52) || !(c <= 9.2e+77)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (c * ((a + (b * c)) * i)) * (-2.0d0)
if (c <= (-6.4d+198)) then
tmp = t_1
else if (c <= (-1.32d+23)) then
tmp = 2.0d0 * ((z * t) - (c * (b * (c * i))))
else if ((c <= (-7.2d-52)) .or. (.not. (c <= 9.2d+77))) then
tmp = t_1
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 t_1 = (c * ((a + (b * c)) * i)) * -2.0;
double tmp;
if (c <= -6.4e+198) {
tmp = t_1;
} else if (c <= -1.32e+23) {
tmp = 2.0 * ((z * t) - (c * (b * (c * i))));
} else if ((c <= -7.2e-52) || !(c <= 9.2e+77)) {
tmp = t_1;
} else {
tmp = ((x * y) + (z * t)) * 2.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (c * ((a + (b * c)) * i)) * -2.0 tmp = 0 if c <= -6.4e+198: tmp = t_1 elif c <= -1.32e+23: tmp = 2.0 * ((z * t) - (c * (b * (c * i)))) elif (c <= -7.2e-52) or not (c <= 9.2e+77): tmp = t_1 else: tmp = ((x * y) + (z * t)) * 2.0 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(c * Float64(Float64(a + Float64(b * c)) * i)) * -2.0) tmp = 0.0 if (c <= -6.4e+198) tmp = t_1; elseif (c <= -1.32e+23) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(b * Float64(c * i))))); elseif ((c <= -7.2e-52) || !(c <= 9.2e+77)) tmp = t_1; 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) t_1 = (c * ((a + (b * c)) * i)) * -2.0; tmp = 0.0; if (c <= -6.4e+198) tmp = t_1; elseif (c <= -1.32e+23) tmp = 2.0 * ((z * t) - (c * (b * (c * i)))); elseif ((c <= -7.2e-52) || ~((c <= 9.2e+77))) tmp = t_1; else tmp = ((x * y) + (z * t)) * 2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]}, If[LessEqual[c, -6.4e+198], t$95$1, If[LessEqual[c, -1.32e+23], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(b * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[c, -7.2e-52], N[Not[LessEqual[c, 9.2e+77]], $MachinePrecision]], t$95$1, N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right) \cdot -2\\
\mathbf{if}\;c \leq -6.4 \cdot 10^{+198}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq -1.32 \cdot 10^{+23}:\\
\;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\
\mathbf{elif}\;c \leq -7.2 \cdot 10^{-52} \lor \neg \left(c \leq 9.2 \cdot 10^{+77}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\
\end{array}
\end{array}
if c < -6.3999999999999997e198 or -1.3199999999999999e23 < c < -7.19999999999999976e-52 or 9.19999999999999979e77 < c Initial program 82.8%
fma-define82.8%
*-commutative82.8%
associate-*l*88.7%
+-commutative88.7%
fma-define88.7%
Simplified88.7%
Taylor expanded in i around inf 81.5%
if -6.3999999999999997e198 < c < -1.3199999999999999e23Initial program 72.4%
Taylor expanded in x around 0 75.4%
Taylor expanded in a around 0 80.7%
if -7.19999999999999976e-52 < c < 9.19999999999999979e77Initial program 96.7%
Taylor expanded in c around 0 79.6%
Final simplification80.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* x y) (* z t))) (t_2 (* c (* (+ a (* b c)) i))))
(if (<= c -6.4e+198)
(* t_2 -2.0)
(if (<= c -1.45e+33)
(* 2.0 (- t_1 (* (* b c) (* c i))))
(if (<= c 5.8e+77)
(* 2.0 (- t_1 (* i (* a c))))
(* 2.0 (- (* x y) t_2)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (x * y) + (z * t);
double t_2 = c * ((a + (b * c)) * i);
double tmp;
if (c <= -6.4e+198) {
tmp = t_2 * -2.0;
} else if (c <= -1.45e+33) {
tmp = 2.0 * (t_1 - ((b * c) * (c * i)));
} else if (c <= 5.8e+77) {
tmp = 2.0 * (t_1 - (i * (a * c)));
} else {
tmp = 2.0 * ((x * y) - 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 = (x * y) + (z * t)
t_2 = c * ((a + (b * c)) * i)
if (c <= (-6.4d+198)) then
tmp = t_2 * (-2.0d0)
else if (c <= (-1.45d+33)) then
tmp = 2.0d0 * (t_1 - ((b * c) * (c * i)))
else if (c <= 5.8d+77) then
tmp = 2.0d0 * (t_1 - (i * (a * c)))
else
tmp = 2.0d0 * ((x * y) - 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 = (x * y) + (z * t);
double t_2 = c * ((a + (b * c)) * i);
double tmp;
if (c <= -6.4e+198) {
tmp = t_2 * -2.0;
} else if (c <= -1.45e+33) {
tmp = 2.0 * (t_1 - ((b * c) * (c * i)));
} else if (c <= 5.8e+77) {
tmp = 2.0 * (t_1 - (i * (a * c)));
} else {
tmp = 2.0 * ((x * y) - t_2);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (x * y) + (z * t) t_2 = c * ((a + (b * c)) * i) tmp = 0 if c <= -6.4e+198: tmp = t_2 * -2.0 elif c <= -1.45e+33: tmp = 2.0 * (t_1 - ((b * c) * (c * i))) elif c <= 5.8e+77: tmp = 2.0 * (t_1 - (i * (a * c))) else: tmp = 2.0 * ((x * y) - t_2) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(x * y) + Float64(z * t)) t_2 = Float64(c * Float64(Float64(a + Float64(b * c)) * i)) tmp = 0.0 if (c <= -6.4e+198) tmp = Float64(t_2 * -2.0); elseif (c <= -1.45e+33) tmp = Float64(2.0 * Float64(t_1 - Float64(Float64(b * c) * Float64(c * i)))); elseif (c <= 5.8e+77) tmp = Float64(2.0 * Float64(t_1 - Float64(i * Float64(a * c)))); else tmp = Float64(2.0 * Float64(Float64(x * y) - t_2)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (x * y) + (z * t); t_2 = c * ((a + (b * c)) * i); tmp = 0.0; if (c <= -6.4e+198) tmp = t_2 * -2.0; elseif (c <= -1.45e+33) tmp = 2.0 * (t_1 - ((b * c) * (c * i))); elseif (c <= 5.8e+77) tmp = 2.0 * (t_1 - (i * (a * c))); else tmp = 2.0 * ((x * y) - t_2); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -6.4e+198], N[(t$95$2 * -2.0), $MachinePrecision], If[LessEqual[c, -1.45e+33], N[(2.0 * N[(t$95$1 - N[(N[(b * c), $MachinePrecision] * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 5.8e+77], N[(2.0 * N[(t$95$1 - N[(i * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(x * y), $MachinePrecision] - t$95$2), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot y + z \cdot t\\
t_2 := c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\\
\mathbf{if}\;c \leq -6.4 \cdot 10^{+198}:\\
\;\;\;\;t\_2 \cdot -2\\
\mathbf{elif}\;c \leq -1.45 \cdot 10^{+33}:\\
\;\;\;\;2 \cdot \left(t\_1 - \left(b \cdot c\right) \cdot \left(c \cdot i\right)\right)\\
\mathbf{elif}\;c \leq 5.8 \cdot 10^{+77}:\\
\;\;\;\;2 \cdot \left(t\_1 - i \cdot \left(a \cdot c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y - t\_2\right)\\
\end{array}
\end{array}
if c < -6.3999999999999997e198Initial program 75.3%
fma-define75.3%
*-commutative75.3%
associate-*l*79.9%
+-commutative79.9%
fma-define79.9%
Simplified79.9%
Taylor expanded in i around inf 94.9%
if -6.3999999999999997e198 < c < -1.45000000000000012e33Initial program 71.6%
fma-define71.6%
associate-*l*91.4%
Simplified91.4%
fma-define91.4%
+-commutative91.4%
Applied egg-rr91.4%
Taylor expanded in a around 0 91.4%
if -1.45000000000000012e33 < c < 5.8000000000000003e77Initial program 97.1%
Taylor expanded in a around inf 89.9%
*-commutative89.9%
Simplified89.9%
if 5.8000000000000003e77 < c Initial program 81.3%
Taylor expanded in z around 0 90.0%
Final simplification90.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* c (* (+ a (* b c)) i))))
(if (or (<= (* x y) -2e+87) (not (<= (* x y) 5e+87)))
(* 2.0 (- (* x y) t_1))
(* 2.0 (- (* z t) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = c * ((a + (b * c)) * i);
double tmp;
if (((x * y) <= -2e+87) || !((x * y) <= 5e+87)) {
tmp = 2.0 * ((x * y) - t_1);
} else {
tmp = 2.0 * ((z * t) - t_1);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = c * ((a + (b * c)) * i)
if (((x * y) <= (-2d+87)) .or. (.not. ((x * y) <= 5d+87))) then
tmp = 2.0d0 * ((x * y) - t_1)
else
tmp = 2.0d0 * ((z * t) - t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = c * ((a + (b * c)) * i);
double tmp;
if (((x * y) <= -2e+87) || !((x * y) <= 5e+87)) {
tmp = 2.0 * ((x * y) - t_1);
} else {
tmp = 2.0 * ((z * t) - t_1);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = c * ((a + (b * c)) * i) tmp = 0 if ((x * y) <= -2e+87) or not ((x * y) <= 5e+87): tmp = 2.0 * ((x * y) - t_1) else: tmp = 2.0 * ((z * t) - t_1) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(c * Float64(Float64(a + Float64(b * c)) * i)) tmp = 0.0 if ((Float64(x * y) <= -2e+87) || !(Float64(x * y) <= 5e+87)) tmp = Float64(2.0 * Float64(Float64(x * y) - t_1)); else tmp = Float64(2.0 * Float64(Float64(z * t) - t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = c * ((a + (b * c)) * i); tmp = 0.0; if (((x * y) <= -2e+87) || ~(((x * y) <= 5e+87))) tmp = 2.0 * ((x * y) - t_1); else tmp = 2.0 * ((z * t) - t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[N[(x * y), $MachinePrecision], -2e+87], N[Not[LessEqual[N[(x * y), $MachinePrecision], 5e+87]], $MachinePrecision]], N[(2.0 * N[(N[(x * y), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(z * t), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\\
\mathbf{if}\;x \cdot y \leq -2 \cdot 10^{+87} \lor \neg \left(x \cdot y \leq 5 \cdot 10^{+87}\right):\\
\;\;\;\;2 \cdot \left(x \cdot y - t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(z \cdot t - t\_1\right)\\
\end{array}
\end{array}
if (*.f64 x y) < -1.9999999999999999e87 or 4.9999999999999998e87 < (*.f64 x y) Initial program 87.4%
Taylor expanded in z around 0 86.0%
if -1.9999999999999999e87 < (*.f64 x y) < 4.9999999999999998e87Initial program 88.6%
Taylor expanded in x around 0 82.0%
Final simplification83.6%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= (* x y) -1e+160)
(* x (* 2.0 (+ y (* t (/ z x)))))
(if (<= (* x y) 5e+87)
(* 2.0 (- (* z t) (* c (* (+ a (* b 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 ((x * y) <= -1e+160) {
tmp = x * (2.0 * (y + (t * (z / x))));
} else if ((x * y) <= 5e+87) {
tmp = 2.0 * ((z * t) - (c * ((a + (b * 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 ((x * y) <= (-1d+160)) then
tmp = x * (2.0d0 * (y + (t * (z / x))))
else if ((x * y) <= 5d+87) then
tmp = 2.0d0 * ((z * t) - (c * ((a + (b * 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 ((x * y) <= -1e+160) {
tmp = x * (2.0 * (y + (t * (z / x))));
} else if ((x * y) <= 5e+87) {
tmp = 2.0 * ((z * t) - (c * ((a + (b * 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 (x * y) <= -1e+160: tmp = x * (2.0 * (y + (t * (z / x)))) elif (x * y) <= 5e+87: tmp = 2.0 * ((z * t) - (c * ((a + (b * 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 (Float64(x * y) <= -1e+160) tmp = Float64(x * Float64(2.0 * Float64(y + Float64(t * Float64(z / x))))); elseif (Float64(x * y) <= 5e+87) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(Float64(a + Float64(b * c)) * i)))); else tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(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 ((x * y) <= -1e+160) tmp = x * (2.0 * (y + (t * (z / x)))); elseif ((x * y) <= 5e+87) tmp = 2.0 * ((z * t) - (c * ((a + (b * 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[N[(x * y), $MachinePrecision], -1e+160], N[(x * N[(2.0 * N[(y + N[(t * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 5e+87], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(c * N[(N[(b * c), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -1 \cdot 10^{+160}:\\
\;\;\;\;x \cdot \left(2 \cdot \left(y + t \cdot \frac{z}{x}\right)\right)\\
\mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{+87}:\\
\;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(\left(b \cdot c\right) \cdot i\right)\right)\\
\end{array}
\end{array}
if (*.f64 x y) < -1.00000000000000001e160Initial program 84.2%
Taylor expanded in c around 0 84.7%
Taylor expanded in x around inf 84.7%
distribute-lft-out84.7%
associate-/l*89.9%
Simplified89.9%
if -1.00000000000000001e160 < (*.f64 x y) < 4.9999999999999998e87Initial program 88.4%
Taylor expanded in x around 0 80.7%
if 4.9999999999999998e87 < (*.f64 x y) Initial program 90.2%
Taylor expanded in z around 0 84.6%
Taylor expanded in a around 0 78.7%
Final simplification81.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* c (* (+ a (* b c)) i))))
(if (<= c -7e-32)
(* 2.0 (- (* z t) t_1))
(if (<= c 5.8e+77)
(* 2.0 (- (+ (* x y) (* z t)) (* i (* a c))))
(* 2.0 (- (* x y) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = c * ((a + (b * c)) * i);
double tmp;
if (c <= -7e-32) {
tmp = 2.0 * ((z * t) - t_1);
} else if (c <= 5.8e+77) {
tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c)));
} else {
tmp = 2.0 * ((x * y) - t_1);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = c * ((a + (b * c)) * i)
if (c <= (-7d-32)) then
tmp = 2.0d0 * ((z * t) - t_1)
else if (c <= 5.8d+77) then
tmp = 2.0d0 * (((x * y) + (z * t)) - (i * (a * c)))
else
tmp = 2.0d0 * ((x * y) - t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = c * ((a + (b * c)) * i);
double tmp;
if (c <= -7e-32) {
tmp = 2.0 * ((z * t) - t_1);
} else if (c <= 5.8e+77) {
tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c)));
} else {
tmp = 2.0 * ((x * y) - t_1);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = c * ((a + (b * c)) * i) tmp = 0 if c <= -7e-32: tmp = 2.0 * ((z * t) - t_1) elif c <= 5.8e+77: tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c))) else: tmp = 2.0 * ((x * y) - t_1) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(c * Float64(Float64(a + Float64(b * c)) * i)) tmp = 0.0 if (c <= -7e-32) tmp = Float64(2.0 * Float64(Float64(z * t) - t_1)); elseif (c <= 5.8e+77) tmp = Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(i * Float64(a * c)))); else tmp = Float64(2.0 * Float64(Float64(x * y) - t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = c * ((a + (b * c)) * i); tmp = 0.0; if (c <= -7e-32) tmp = 2.0 * ((z * t) - t_1); elseif (c <= 5.8e+77) tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c))); else tmp = 2.0 * ((x * y) - t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -7e-32], N[(2.0 * N[(N[(z * t), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 5.8e+77], 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[(N[(x * y), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\\
\mathbf{if}\;c \leq -7 \cdot 10^{-32}:\\
\;\;\;\;2 \cdot \left(z \cdot t - t\_1\right)\\
\mathbf{elif}\;c \leq 5.8 \cdot 10^{+77}:\\
\;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - i \cdot \left(a \cdot c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y - t\_1\right)\\
\end{array}
\end{array}
if c < -6.9999999999999997e-32Initial program 77.9%
Taylor expanded in x around 0 81.0%
if -6.9999999999999997e-32 < c < 5.8000000000000003e77Initial program 96.8%
Taylor expanded in a around inf 91.7%
*-commutative91.7%
Simplified91.7%
if 5.8000000000000003e77 < c Initial program 81.3%
Taylor expanded in z around 0 90.0%
Final simplification88.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* c (* (+ a (* b c)) i))))
(if (<= c -5.2e-35)
(* 2.0 (- (* z t) t_1))
(if (<= c 5.8e+77)
(* 2.0 (- (+ (* x y) (* z t)) (* a (* c i))))
(* 2.0 (- (* x y) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = c * ((a + (b * c)) * i);
double tmp;
if (c <= -5.2e-35) {
tmp = 2.0 * ((z * t) - t_1);
} else if (c <= 5.8e+77) {
tmp = 2.0 * (((x * y) + (z * t)) - (a * (c * i)));
} else {
tmp = 2.0 * ((x * y) - t_1);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = c * ((a + (b * c)) * i)
if (c <= (-5.2d-35)) then
tmp = 2.0d0 * ((z * t) - t_1)
else if (c <= 5.8d+77) then
tmp = 2.0d0 * (((x * y) + (z * t)) - (a * (c * i)))
else
tmp = 2.0d0 * ((x * y) - t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = c * ((a + (b * c)) * i);
double tmp;
if (c <= -5.2e-35) {
tmp = 2.0 * ((z * t) - t_1);
} else if (c <= 5.8e+77) {
tmp = 2.0 * (((x * y) + (z * t)) - (a * (c * i)));
} else {
tmp = 2.0 * ((x * y) - t_1);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = c * ((a + (b * c)) * i) tmp = 0 if c <= -5.2e-35: tmp = 2.0 * ((z * t) - t_1) elif c <= 5.8e+77: tmp = 2.0 * (((x * y) + (z * t)) - (a * (c * i))) else: tmp = 2.0 * ((x * y) - t_1) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(c * Float64(Float64(a + Float64(b * c)) * i)) tmp = 0.0 if (c <= -5.2e-35) tmp = Float64(2.0 * Float64(Float64(z * t) - t_1)); elseif (c <= 5.8e+77) tmp = Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(a * Float64(c * i)))); else tmp = Float64(2.0 * Float64(Float64(x * y) - t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = c * ((a + (b * c)) * i); tmp = 0.0; if (c <= -5.2e-35) tmp = 2.0 * ((z * t) - t_1); elseif (c <= 5.8e+77) tmp = 2.0 * (((x * y) + (z * t)) - (a * (c * i))); else tmp = 2.0 * ((x * y) - t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -5.2e-35], N[(2.0 * N[(N[(z * t), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 5.8e+77], 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[(N[(x * y), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\\
\mathbf{if}\;c \leq -5.2 \cdot 10^{-35}:\\
\;\;\;\;2 \cdot \left(z \cdot t - t\_1\right)\\
\mathbf{elif}\;c \leq 5.8 \cdot 10^{+77}:\\
\;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - a \cdot \left(c \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y - t\_1\right)\\
\end{array}
\end{array}
if c < -5.20000000000000009e-35Initial program 77.9%
Taylor expanded in x around 0 81.0%
if -5.20000000000000009e-35 < c < 5.8000000000000003e77Initial program 96.8%
Taylor expanded in a around inf 90.9%
if 5.8000000000000003e77 < c Initial program 81.3%
Taylor expanded in z around 0 90.0%
Final simplification88.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (* c (* b (* c i))) -2.0)))
(if (<= c -9.5e-69)
t_1
(if (<= c -2.3e-264)
(* 2.0 (* z t))
(if (<= c 1.85e+93) (* x (* y 2.0)) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (c * (b * (c * i))) * -2.0;
double tmp;
if (c <= -9.5e-69) {
tmp = t_1;
} else if (c <= -2.3e-264) {
tmp = 2.0 * (z * t);
} else if (c <= 1.85e+93) {
tmp = x * (y * 2.0);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = (c * (b * (c * i))) * (-2.0d0)
if (c <= (-9.5d-69)) then
tmp = t_1
else if (c <= (-2.3d-264)) then
tmp = 2.0d0 * (z * t)
else if (c <= 1.85d+93) then
tmp = x * (y * 2.0d0)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (c * (b * (c * i))) * -2.0;
double tmp;
if (c <= -9.5e-69) {
tmp = t_1;
} else if (c <= -2.3e-264) {
tmp = 2.0 * (z * t);
} else if (c <= 1.85e+93) {
tmp = x * (y * 2.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (c * (b * (c * i))) * -2.0 tmp = 0 if c <= -9.5e-69: tmp = t_1 elif c <= -2.3e-264: tmp = 2.0 * (z * t) elif c <= 1.85e+93: tmp = x * (y * 2.0) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(c * Float64(b * Float64(c * i))) * -2.0) tmp = 0.0 if (c <= -9.5e-69) tmp = t_1; elseif (c <= -2.3e-264) tmp = Float64(2.0 * Float64(z * t)); elseif (c <= 1.85e+93) tmp = Float64(x * Float64(y * 2.0)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (c * (b * (c * i))) * -2.0; tmp = 0.0; if (c <= -9.5e-69) tmp = t_1; elseif (c <= -2.3e-264) tmp = 2.0 * (z * t); elseif (c <= 1.85e+93) tmp = x * (y * 2.0); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(c * N[(b * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]}, If[LessEqual[c, -9.5e-69], t$95$1, If[LessEqual[c, -2.3e-264], N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.85e+93], N[(x * N[(y * 2.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right) \cdot -2\\
\mathbf{if}\;c \leq -9.5 \cdot 10^{-69}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq -2.3 \cdot 10^{-264}:\\
\;\;\;\;2 \cdot \left(z \cdot t\right)\\
\mathbf{elif}\;c \leq 1.85 \cdot 10^{+93}:\\
\;\;\;\;x \cdot \left(y \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -9.50000000000000094e-69 or 1.84999999999999994e93 < c Initial program 80.3%
fma-define80.3%
*-commutative80.3%
associate-*l*89.2%
+-commutative89.2%
fma-define89.2%
Simplified89.2%
Taylor expanded in i around inf 74.2%
Taylor expanded in a around 0 60.5%
if -9.50000000000000094e-69 < c < -2.30000000000000012e-264Initial program 99.9%
Taylor expanded in z around inf 55.5%
if -2.30000000000000012e-264 < c < 1.84999999999999994e93Initial program 93.9%
fma-define93.9%
*-commutative93.9%
associate-*l*89.3%
+-commutative89.3%
fma-define89.3%
Simplified89.3%
Taylor expanded in x around inf 45.8%
*-commutative45.8%
associate-*l*45.8%
*-commutative45.8%
Simplified45.8%
Final simplification54.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (* y 2.0))))
(if (<= y -2.4e-64)
t_1
(if (<= y 3.5e-196)
(* 2.0 (* z t))
(if (<= y 1500000000000.0) (* -2.0 (* a (* c i))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * (y * 2.0);
double tmp;
if (y <= -2.4e-64) {
tmp = t_1;
} else if (y <= 3.5e-196) {
tmp = 2.0 * (z * t);
} else if (y <= 1500000000000.0) {
tmp = -2.0 * (a * (c * i));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = x * (y * 2.0d0)
if (y <= (-2.4d-64)) then
tmp = t_1
else if (y <= 3.5d-196) then
tmp = 2.0d0 * (z * t)
else if (y <= 1500000000000.0d0) then
tmp = (-2.0d0) * (a * (c * i))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * (y * 2.0);
double tmp;
if (y <= -2.4e-64) {
tmp = t_1;
} else if (y <= 3.5e-196) {
tmp = 2.0 * (z * t);
} else if (y <= 1500000000000.0) {
tmp = -2.0 * (a * (c * i));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x * (y * 2.0) tmp = 0 if y <= -2.4e-64: tmp = t_1 elif y <= 3.5e-196: tmp = 2.0 * (z * t) elif y <= 1500000000000.0: tmp = -2.0 * (a * (c * i)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * Float64(y * 2.0)) tmp = 0.0 if (y <= -2.4e-64) tmp = t_1; elseif (y <= 3.5e-196) tmp = Float64(2.0 * Float64(z * t)); elseif (y <= 1500000000000.0) tmp = Float64(-2.0 * 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 = x * (y * 2.0); tmp = 0.0; if (y <= -2.4e-64) tmp = t_1; elseif (y <= 3.5e-196) tmp = 2.0 * (z * t); elseif (y <= 1500000000000.0) tmp = -2.0 * (a * (c * i)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[(y * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.4e-64], t$95$1, If[LessEqual[y, 3.5e-196], N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1500000000000.0], N[(-2.0 * N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(y \cdot 2\right)\\
\mathbf{if}\;y \leq -2.4 \cdot 10^{-64}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 3.5 \cdot 10^{-196}:\\
\;\;\;\;2 \cdot \left(z \cdot t\right)\\
\mathbf{elif}\;y \leq 1500000000000:\\
\;\;\;\;-2 \cdot \left(a \cdot \left(c \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.39999999999999998e-64 or 1.5e12 < y Initial program 87.7%
fma-define87.7%
*-commutative87.7%
associate-*l*86.7%
+-commutative86.7%
fma-define86.7%
Simplified86.7%
Taylor expanded in x around inf 45.9%
*-commutative45.9%
associate-*l*45.9%
*-commutative45.9%
Simplified45.9%
if -2.39999999999999998e-64 < y < 3.50000000000000004e-196Initial program 86.0%
Taylor expanded in z around inf 39.9%
if 3.50000000000000004e-196 < y < 1.5e12Initial program 94.5%
fma-define94.5%
*-commutative94.5%
associate-*l*97.3%
+-commutative97.3%
fma-define97.3%
Simplified97.3%
Taylor expanded in a around inf 17.5%
*-commutative17.5%
Simplified17.5%
Final simplification40.3%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= c -7.2e-52) (not (<= c 8.5e+77))) (* (* c (* (+ a (* b c)) i)) -2.0) (* (+ (* 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 <= -7.2e-52) || !(c <= 8.5e+77)) {
tmp = (c * ((a + (b * c)) * i)) * -2.0;
} 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 <= (-7.2d-52)) .or. (.not. (c <= 8.5d+77))) then
tmp = (c * ((a + (b * c)) * i)) * (-2.0d0)
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 <= -7.2e-52) || !(c <= 8.5e+77)) {
tmp = (c * ((a + (b * c)) * i)) * -2.0;
} else {
tmp = ((x * y) + (z * t)) * 2.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c <= -7.2e-52) or not (c <= 8.5e+77): tmp = (c * ((a + (b * c)) * i)) * -2.0 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 <= -7.2e-52) || !(c <= 8.5e+77)) tmp = Float64(Float64(c * Float64(Float64(a + Float64(b * c)) * i)) * -2.0); 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 <= -7.2e-52) || ~((c <= 8.5e+77))) tmp = (c * ((a + (b * c)) * i)) * -2.0; 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, -7.2e-52], N[Not[LessEqual[c, 8.5e+77]], $MachinePrecision]], N[(N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] * -2.0), $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 -7.2 \cdot 10^{-52} \lor \neg \left(c \leq 8.5 \cdot 10^{+77}\right):\\
\;\;\;\;\left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right) \cdot -2\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\
\end{array}
\end{array}
if c < -7.19999999999999976e-52 or 8.50000000000000018e77 < c Initial program 80.0%
fma-define80.0%
*-commutative80.0%
associate-*l*89.5%
+-commutative89.5%
fma-define89.5%
Simplified89.5%
Taylor expanded in i around inf 74.9%
if -7.19999999999999976e-52 < c < 8.50000000000000018e77Initial program 96.7%
Taylor expanded in c around 0 79.6%
Final simplification77.2%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= c -9.2e+60) (not (<= c 2.15e+92))) (* (* c (* b (* c i))) -2.0) (* (+ (* 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 <= -9.2e+60) || !(c <= 2.15e+92)) {
tmp = (c * (b * (c * i))) * -2.0;
} 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 <= (-9.2d+60)) .or. (.not. (c <= 2.15d+92))) then
tmp = (c * (b * (c * i))) * (-2.0d0)
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 <= -9.2e+60) || !(c <= 2.15e+92)) {
tmp = (c * (b * (c * i))) * -2.0;
} else {
tmp = ((x * y) + (z * t)) * 2.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c <= -9.2e+60) or not (c <= 2.15e+92): tmp = (c * (b * (c * i))) * -2.0 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 <= -9.2e+60) || !(c <= 2.15e+92)) tmp = Float64(Float64(c * Float64(b * Float64(c * i))) * -2.0); 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 <= -9.2e+60) || ~((c <= 2.15e+92))) tmp = (c * (b * (c * i))) * -2.0; 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, -9.2e+60], N[Not[LessEqual[c, 2.15e+92]], $MachinePrecision]], N[(N[(c * N[(b * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -2.0), $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 -9.2 \cdot 10^{+60} \lor \neg \left(c \leq 2.15 \cdot 10^{+92}\right):\\
\;\;\;\;\left(c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right) \cdot -2\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\
\end{array}
\end{array}
if c < -9.20000000000000068e60 or 2.1499999999999999e92 < c Initial program 77.0%
fma-define77.0%
*-commutative77.0%
associate-*l*87.8%
+-commutative87.8%
fma-define87.8%
Simplified87.8%
Taylor expanded in i around inf 77.8%
Taylor expanded in a around 0 67.6%
if -9.20000000000000068e60 < c < 2.1499999999999999e92Initial program 96.0%
Taylor expanded in c around 0 72.3%
Final simplification70.3%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= c -1.1e+58)
(* (* c (* b (* c i))) -2.0)
(if (<= c 3.2e+93)
(* (+ (* x y) (* z t)) 2.0)
(* (* c i) (* (* b c) -2.0)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (c <= -1.1e+58) {
tmp = (c * (b * (c * i))) * -2.0;
} else if (c <= 3.2e+93) {
tmp = ((x * y) + (z * t)) * 2.0;
} else {
tmp = (c * i) * ((b * c) * -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 <= (-1.1d+58)) then
tmp = (c * (b * (c * i))) * (-2.0d0)
else if (c <= 3.2d+93) then
tmp = ((x * y) + (z * t)) * 2.0d0
else
tmp = (c * i) * ((b * c) * (-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 <= -1.1e+58) {
tmp = (c * (b * (c * i))) * -2.0;
} else if (c <= 3.2e+93) {
tmp = ((x * y) + (z * t)) * 2.0;
} else {
tmp = (c * i) * ((b * c) * -2.0);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if c <= -1.1e+58: tmp = (c * (b * (c * i))) * -2.0 elif c <= 3.2e+93: tmp = ((x * y) + (z * t)) * 2.0 else: tmp = (c * i) * ((b * c) * -2.0) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (c <= -1.1e+58) tmp = Float64(Float64(c * Float64(b * Float64(c * i))) * -2.0); elseif (c <= 3.2e+93) tmp = Float64(Float64(Float64(x * y) + Float64(z * t)) * 2.0); else tmp = Float64(Float64(c * i) * Float64(Float64(b * c) * -2.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (c <= -1.1e+58) tmp = (c * (b * (c * i))) * -2.0; elseif (c <= 3.2e+93) tmp = ((x * y) + (z * t)) * 2.0; else tmp = (c * i) * ((b * c) * -2.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[c, -1.1e+58], N[(N[(c * N[(b * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision], If[LessEqual[c, 3.2e+93], N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision], N[(N[(c * i), $MachinePrecision] * N[(N[(b * c), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -1.1 \cdot 10^{+58}:\\
\;\;\;\;\left(c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right) \cdot -2\\
\mathbf{elif}\;c \leq 3.2 \cdot 10^{+93}:\\
\;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\
\mathbf{else}:\\
\;\;\;\;\left(c \cdot i\right) \cdot \left(\left(b \cdot c\right) \cdot -2\right)\\
\end{array}
\end{array}
if c < -1.1e58Initial program 72.3%
fma-define72.3%
*-commutative72.3%
associate-*l*85.9%
+-commutative85.9%
fma-define85.9%
Simplified85.9%
Taylor expanded in i around inf 74.8%
Taylor expanded in a around 0 70.5%
if -1.1e58 < c < 3.2000000000000001e93Initial program 96.0%
Taylor expanded in c around 0 72.3%
if 3.2000000000000001e93 < c Initial program 81.1%
fma-define81.1%
*-commutative81.1%
associate-*l*89.4%
+-commutative89.4%
fma-define89.4%
Simplified89.4%
Taylor expanded in i around inf 80.4%
Taylor expanded in a around 0 65.2%
pow165.2%
associate-*r*65.2%
Applied egg-rr65.2%
unpow165.2%
associate-*r*65.2%
*-commutative65.2%
Simplified65.2%
Final simplification70.3%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -1.45e-66) (not (<= y 3.8e+28))) (* 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 ((y <= -1.45e-66) || !(y <= 3.8e+28)) {
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 ((y <= (-1.45d-66)) .or. (.not. (y <= 3.8d+28))) 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 ((y <= -1.45e-66) || !(y <= 3.8e+28)) {
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 (y <= -1.45e-66) or not (y <= 3.8e+28): 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 ((y <= -1.45e-66) || !(y <= 3.8e+28)) tmp = Float64(x * Float64(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 ((y <= -1.45e-66) || ~((y <= 3.8e+28))) 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[y, -1.45e-66], N[Not[LessEqual[y, 3.8e+28]], $MachinePrecision]], N[(x * N[(y * 2.0), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.45 \cdot 10^{-66} \lor \neg \left(y \leq 3.8 \cdot 10^{+28}\right):\\
\;\;\;\;x \cdot \left(y \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(z \cdot t\right)\\
\end{array}
\end{array}
if y < -1.45000000000000006e-66 or 3.7999999999999999e28 < y Initial program 88.1%
fma-define88.1%
*-commutative88.1%
associate-*l*86.4%
+-commutative86.4%
fma-define86.4%
Simplified86.4%
Taylor expanded in x around inf 46.2%
*-commutative46.2%
associate-*l*46.2%
*-commutative46.2%
Simplified46.2%
if -1.45000000000000006e-66 < y < 3.7999999999999999e28Initial program 88.1%
Taylor expanded in z around inf 37.8%
Final simplification42.4%
(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 88.1%
Taylor expanded in z around inf 27.3%
Final simplification27.3%
(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 2024131
(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
(! :herbie-platform default (* 2 (- (+ (* x y) (* z t)) (* (+ a (* b c)) (* c i)))))
(* 2.0 (- (+ (* x y) (* z t)) (* (* (+ a (* b c)) c) i))))