
(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))))
(if (<= (- (+ (* x y) (* z t)) (* (* c t_1) i)) INFINITY)
(* 2.0 (- (fma x y (* z t)) (* t_1 (* c i))))
(* (* i (* b (* c c))) -2.0))))
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 = (i * (b * (c * c))) * -2.0;
}
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(Float64(i * Float64(b * Float64(c * c))) * -2.0); 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[(N[(i * N[(b * N[(c * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -2.0), $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}:\\
\;\;\;\;\left(i \cdot \left(b \cdot \left(c \cdot c\right)\right)\right) \cdot -2\\
\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.8%
associate-*l*99.5%
fma-def99.5%
Simplified99.5%
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 i around inf 63.6%
Taylor expanded in c around inf 72.8%
*-commutative72.8%
associate-*r*72.8%
unpow272.8%
Simplified72.8%
Final simplification98.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (* b c))) (t_2 (* (* c t_1) i)))
(if (or (<= t_2 (- INFINITY)) (not (<= t_2 2e+307)))
(* -2.0 (* c (* t_1 i)))
(* (- (+ (* x y) (* z t)) t_2) 2.0))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double t_2 = (c * t_1) * i;
double tmp;
if ((t_2 <= -((double) INFINITY)) || !(t_2 <= 2e+307)) {
tmp = -2.0 * (c * (t_1 * i));
} else {
tmp = (((x * y) + (z * t)) - t_2) * 2.0;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double t_2 = (c * t_1) * i;
double tmp;
if ((t_2 <= -Double.POSITIVE_INFINITY) || !(t_2 <= 2e+307)) {
tmp = -2.0 * (c * (t_1 * i));
} else {
tmp = (((x * y) + (z * t)) - t_2) * 2.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a + (b * c) t_2 = (c * t_1) * i tmp = 0 if (t_2 <= -math.inf) or not (t_2 <= 2e+307): tmp = -2.0 * (c * (t_1 * i)) else: tmp = (((x * y) + (z * t)) - t_2) * 2.0 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(b * c)) t_2 = Float64(Float64(c * t_1) * i) tmp = 0.0 if ((t_2 <= Float64(-Inf)) || !(t_2 <= 2e+307)) tmp = Float64(-2.0 * Float64(c * Float64(t_1 * i))); else tmp = Float64(Float64(Float64(Float64(x * y) + Float64(z * t)) - t_2) * 2.0); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = a + (b * c); t_2 = (c * t_1) * i; tmp = 0.0; if ((t_2 <= -Inf) || ~((t_2 <= 2e+307))) tmp = -2.0 * (c * (t_1 * i)); else tmp = (((x * y) + (z * t)) - t_2) * 2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(c * t$95$1), $MachinePrecision] * i), $MachinePrecision]}, If[Or[LessEqual[t$95$2, (-Infinity)], N[Not[LessEqual[t$95$2, 2e+307]], $MachinePrecision]], N[(-2.0 * N[(c * N[(t$95$1 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision] * 2.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + b \cdot c\\
t_2 := \left(c \cdot t_1\right) \cdot i\\
\mathbf{if}\;t_2 \leq -\infty \lor \neg \left(t_2 \leq 2 \cdot 10^{+307}\right):\\
\;\;\;\;-2 \cdot \left(c \cdot \left(t_1 \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(x \cdot y + z \cdot t\right) - t_2\right) \cdot 2\\
\end{array}
\end{array}
if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -inf.0 or 1.99999999999999997e307 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) Initial program 75.2%
Taylor expanded in i around inf 93.8%
Taylor expanded in i around 0 93.8%
if -inf.0 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 1.99999999999999997e307Initial program 99.9%
Final simplification97.4%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (+ (* x y) (* z t)) 2.0))
(t_2 (* -2.0 (* c (* (+ a (* b c)) i)))))
(if (<= c -3.1e+59)
t_2
(if (<= c 1.25e-102)
t_1
(if (<= c 1.55e-90)
(* (* c i) (* a -2.0))
(if (<= c 2.4e-7) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((x * y) + (z * t)) * 2.0;
double t_2 = -2.0 * (c * ((a + (b * c)) * i));
double tmp;
if (c <= -3.1e+59) {
tmp = t_2;
} else if (c <= 1.25e-102) {
tmp = t_1;
} else if (c <= 1.55e-90) {
tmp = (c * i) * (a * -2.0);
} else if (c <= 2.4e-7) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((x * y) + (z * t)) * 2.0d0
t_2 = (-2.0d0) * (c * ((a + (b * c)) * i))
if (c <= (-3.1d+59)) then
tmp = t_2
else if (c <= 1.25d-102) then
tmp = t_1
else if (c <= 1.55d-90) then
tmp = (c * i) * (a * (-2.0d0))
else if (c <= 2.4d-7) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((x * y) + (z * t)) * 2.0;
double t_2 = -2.0 * (c * ((a + (b * c)) * i));
double tmp;
if (c <= -3.1e+59) {
tmp = t_2;
} else if (c <= 1.25e-102) {
tmp = t_1;
} else if (c <= 1.55e-90) {
tmp = (c * i) * (a * -2.0);
} else if (c <= 2.4e-7) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = ((x * y) + (z * t)) * 2.0 t_2 = -2.0 * (c * ((a + (b * c)) * i)) tmp = 0 if c <= -3.1e+59: tmp = t_2 elif c <= 1.25e-102: tmp = t_1 elif c <= 1.55e-90: tmp = (c * i) * (a * -2.0) elif c <= 2.4e-7: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(x * y) + Float64(z * t)) * 2.0) t_2 = Float64(-2.0 * Float64(c * Float64(Float64(a + Float64(b * c)) * i))) tmp = 0.0 if (c <= -3.1e+59) tmp = t_2; elseif (c <= 1.25e-102) tmp = t_1; elseif (c <= 1.55e-90) tmp = Float64(Float64(c * i) * Float64(a * -2.0)); elseif (c <= 2.4e-7) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = ((x * y) + (z * t)) * 2.0; t_2 = -2.0 * (c * ((a + (b * c)) * i)); tmp = 0.0; if (c <= -3.1e+59) tmp = t_2; elseif (c <= 1.25e-102) tmp = t_1; elseif (c <= 1.55e-90) tmp = (c * i) * (a * -2.0); elseif (c <= 2.4e-7) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]}, Block[{t$95$2 = N[(-2.0 * N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -3.1e+59], t$95$2, If[LessEqual[c, 1.25e-102], t$95$1, If[LessEqual[c, 1.55e-90], N[(N[(c * i), $MachinePrecision] * N[(a * -2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.4e-7], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot y + z \cdot t\right) \cdot 2\\
t_2 := -2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\
\mathbf{if}\;c \leq -3.1 \cdot 10^{+59}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq 1.25 \cdot 10^{-102}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq 1.55 \cdot 10^{-90}:\\
\;\;\;\;\left(c \cdot i\right) \cdot \left(a \cdot -2\right)\\
\mathbf{elif}\;c \leq 2.4 \cdot 10^{-7}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if c < -3.10000000000000015e59 or 2.39999999999999979e-7 < c Initial program 80.9%
Taylor expanded in i around inf 83.3%
Taylor expanded in i around 0 83.3%
if -3.10000000000000015e59 < c < 1.25000000000000006e-102 or 1.5500000000000001e-90 < c < 2.39999999999999979e-7Initial program 96.9%
Taylor expanded in c around 0 80.1%
if 1.25000000000000006e-102 < c < 1.5500000000000001e-90Initial program 99.8%
Taylor expanded in a around inf 78.1%
associate-*r*78.1%
*-commutative78.1%
associate-*r*67.5%
neg-mul-167.5%
Simplified67.5%
Taylor expanded in a around 0 78.1%
associate-*r*78.1%
Simplified78.1%
Final simplification81.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (+ (* x y) (* z t)) 2.0))
(t_2 (* -2.0 (* c (* (+ a (* b c)) i)))))
(if (<= c -1.6e+57)
t_2
(if (<= c 6.8e-104)
t_1
(if (<= c 1.85e-90)
(* 2.0 (- (* z t) (* a (* c i))))
(if (<= c 5.4e-16) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((x * y) + (z * t)) * 2.0;
double t_2 = -2.0 * (c * ((a + (b * c)) * i));
double tmp;
if (c <= -1.6e+57) {
tmp = t_2;
} else if (c <= 6.8e-104) {
tmp = t_1;
} else if (c <= 1.85e-90) {
tmp = 2.0 * ((z * t) - (a * (c * i)));
} else if (c <= 5.4e-16) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((x * y) + (z * t)) * 2.0d0
t_2 = (-2.0d0) * (c * ((a + (b * c)) * i))
if (c <= (-1.6d+57)) then
tmp = t_2
else if (c <= 6.8d-104) then
tmp = t_1
else if (c <= 1.85d-90) then
tmp = 2.0d0 * ((z * t) - (a * (c * i)))
else if (c <= 5.4d-16) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((x * y) + (z * t)) * 2.0;
double t_2 = -2.0 * (c * ((a + (b * c)) * i));
double tmp;
if (c <= -1.6e+57) {
tmp = t_2;
} else if (c <= 6.8e-104) {
tmp = t_1;
} else if (c <= 1.85e-90) {
tmp = 2.0 * ((z * t) - (a * (c * i)));
} else if (c <= 5.4e-16) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = ((x * y) + (z * t)) * 2.0 t_2 = -2.0 * (c * ((a + (b * c)) * i)) tmp = 0 if c <= -1.6e+57: tmp = t_2 elif c <= 6.8e-104: tmp = t_1 elif c <= 1.85e-90: tmp = 2.0 * ((z * t) - (a * (c * i))) elif c <= 5.4e-16: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(x * y) + Float64(z * t)) * 2.0) t_2 = Float64(-2.0 * Float64(c * Float64(Float64(a + Float64(b * c)) * i))) tmp = 0.0 if (c <= -1.6e+57) tmp = t_2; elseif (c <= 6.8e-104) tmp = t_1; elseif (c <= 1.85e-90) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(a * Float64(c * i)))); elseif (c <= 5.4e-16) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = ((x * y) + (z * t)) * 2.0; t_2 = -2.0 * (c * ((a + (b * c)) * i)); tmp = 0.0; if (c <= -1.6e+57) tmp = t_2; elseif (c <= 6.8e-104) tmp = t_1; elseif (c <= 1.85e-90) tmp = 2.0 * ((z * t) - (a * (c * i))); elseif (c <= 5.4e-16) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]}, Block[{t$95$2 = N[(-2.0 * N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.6e+57], t$95$2, If[LessEqual[c, 6.8e-104], t$95$1, If[LessEqual[c, 1.85e-90], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 5.4e-16], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot y + z \cdot t\right) \cdot 2\\
t_2 := -2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\
\mathbf{if}\;c \leq -1.6 \cdot 10^{+57}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq 6.8 \cdot 10^{-104}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq 1.85 \cdot 10^{-90}:\\
\;\;\;\;2 \cdot \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\\
\mathbf{elif}\;c \leq 5.4 \cdot 10^{-16}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if c < -1.60000000000000015e57 or 5.39999999999999999e-16 < c Initial program 80.9%
Taylor expanded in i around inf 83.3%
Taylor expanded in i around 0 83.3%
if -1.60000000000000015e57 < c < 6.80000000000000031e-104 or 1.85000000000000009e-90 < c < 5.39999999999999999e-16Initial program 96.9%
Taylor expanded in c around 0 80.1%
if 6.80000000000000031e-104 < c < 1.85000000000000009e-90Initial program 99.8%
Taylor expanded in a around inf 89.0%
*-commutative89.0%
associate-*l*78.4%
Simplified78.4%
Taylor expanded in x around 0 78.3%
Final simplification81.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (+ (* x y) (* z t)) 2.0))
(t_2 (* -2.0 (* c (* (+ a (* b c)) i)))))
(if (<= c -1.7e+57)
t_2
(if (<= c 1.35e-110)
t_1
(if (<= c 3.1e-62)
(* 2.0 (- (* x y) (* a (* c i))))
(if (<= c 2.2e-13) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((x * y) + (z * t)) * 2.0;
double t_2 = -2.0 * (c * ((a + (b * c)) * i));
double tmp;
if (c <= -1.7e+57) {
tmp = t_2;
} else if (c <= 1.35e-110) {
tmp = t_1;
} else if (c <= 3.1e-62) {
tmp = 2.0 * ((x * y) - (a * (c * i)));
} else if (c <= 2.2e-13) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((x * y) + (z * t)) * 2.0d0
t_2 = (-2.0d0) * (c * ((a + (b * c)) * i))
if (c <= (-1.7d+57)) then
tmp = t_2
else if (c <= 1.35d-110) then
tmp = t_1
else if (c <= 3.1d-62) then
tmp = 2.0d0 * ((x * y) - (a * (c * i)))
else if (c <= 2.2d-13) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((x * y) + (z * t)) * 2.0;
double t_2 = -2.0 * (c * ((a + (b * c)) * i));
double tmp;
if (c <= -1.7e+57) {
tmp = t_2;
} else if (c <= 1.35e-110) {
tmp = t_1;
} else if (c <= 3.1e-62) {
tmp = 2.0 * ((x * y) - (a * (c * i)));
} else if (c <= 2.2e-13) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = ((x * y) + (z * t)) * 2.0 t_2 = -2.0 * (c * ((a + (b * c)) * i)) tmp = 0 if c <= -1.7e+57: tmp = t_2 elif c <= 1.35e-110: tmp = t_1 elif c <= 3.1e-62: tmp = 2.0 * ((x * y) - (a * (c * i))) elif c <= 2.2e-13: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(x * y) + Float64(z * t)) * 2.0) t_2 = Float64(-2.0 * Float64(c * Float64(Float64(a + Float64(b * c)) * i))) tmp = 0.0 if (c <= -1.7e+57) tmp = t_2; elseif (c <= 1.35e-110) tmp = t_1; elseif (c <= 3.1e-62) tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(a * Float64(c * i)))); elseif (c <= 2.2e-13) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = ((x * y) + (z * t)) * 2.0; t_2 = -2.0 * (c * ((a + (b * c)) * i)); tmp = 0.0; if (c <= -1.7e+57) tmp = t_2; elseif (c <= 1.35e-110) tmp = t_1; elseif (c <= 3.1e-62) tmp = 2.0 * ((x * y) - (a * (c * i))); elseif (c <= 2.2e-13) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]}, Block[{t$95$2 = N[(-2.0 * N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.7e+57], t$95$2, If[LessEqual[c, 1.35e-110], t$95$1, If[LessEqual[c, 3.1e-62], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.2e-13], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot y + z \cdot t\right) \cdot 2\\
t_2 := -2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\
\mathbf{if}\;c \leq -1.7 \cdot 10^{+57}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq 1.35 \cdot 10^{-110}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq 3.1 \cdot 10^{-62}:\\
\;\;\;\;2 \cdot \left(x \cdot y - a \cdot \left(c \cdot i\right)\right)\\
\mathbf{elif}\;c \leq 2.2 \cdot 10^{-13}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if c < -1.69999999999999996e57 or 2.19999999999999997e-13 < c Initial program 80.9%
Taylor expanded in i around inf 83.3%
Taylor expanded in i around 0 83.3%
if -1.69999999999999996e57 < c < 1.3499999999999999e-110 or 3.0999999999999999e-62 < c < 2.19999999999999997e-13Initial program 96.7%
Taylor expanded in c around 0 80.4%
if 1.3499999999999999e-110 < c < 3.0999999999999999e-62Initial program 99.7%
Taylor expanded in a around inf 88.8%
*-commutative88.8%
associate-*l*83.2%
Simplified83.2%
Taylor expanded in z around 0 88.8%
Final simplification82.3%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= c -3.6e+63) (not (<= c 670000000000.0))) (* -2.0 (* c (* (+ a (* b c)) i))) (* 2.0 (- (+ (* x y) (* z t)) (* c (* a i))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c <= -3.6e+63) || !(c <= 670000000000.0)) {
tmp = -2.0 * (c * ((a + (b * c)) * i));
} else {
tmp = 2.0 * (((x * y) + (z * t)) - (c * (a * 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 <= (-3.6d+63)) .or. (.not. (c <= 670000000000.0d0))) then
tmp = (-2.0d0) * (c * ((a + (b * c)) * i))
else
tmp = 2.0d0 * (((x * y) + (z * t)) - (c * (a * 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 <= -3.6e+63) || !(c <= 670000000000.0)) {
tmp = -2.0 * (c * ((a + (b * c)) * i));
} else {
tmp = 2.0 * (((x * y) + (z * t)) - (c * (a * i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c <= -3.6e+63) or not (c <= 670000000000.0): tmp = -2.0 * (c * ((a + (b * c)) * i)) else: tmp = 2.0 * (((x * y) + (z * t)) - (c * (a * i))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((c <= -3.6e+63) || !(c <= 670000000000.0)) tmp = Float64(-2.0 * Float64(c * Float64(Float64(a + Float64(b * c)) * i))); else tmp = Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(c * Float64(a * i)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((c <= -3.6e+63) || ~((c <= 670000000000.0))) tmp = -2.0 * (c * ((a + (b * c)) * i)); else tmp = 2.0 * (((x * y) + (z * t)) - (c * (a * i))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[c, -3.6e+63], N[Not[LessEqual[c, 670000000000.0]], $MachinePrecision]], N[(-2.0 * N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(c * N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -3.6 \cdot 10^{+63} \lor \neg \left(c \leq 670000000000\right):\\
\;\;\;\;-2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - c \cdot \left(a \cdot i\right)\right)\\
\end{array}
\end{array}
if c < -3.59999999999999999e63 or 6.7e11 < c Initial program 79.7%
Taylor expanded in i around inf 84.9%
Taylor expanded in i around 0 84.9%
if -3.59999999999999999e63 < c < 6.7e11Initial program 97.2%
Taylor expanded in a around inf 88.8%
*-commutative88.8%
associate-*l*86.4%
Simplified86.4%
Final simplification85.7%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= c -4.5e+62) (not (<= c 720000000000.0))) (* -2.0 (* c (* (+ a (* b c)) i))) (* 2.0 (- (+ (* x y) (* z t)) (* i (* a c))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c <= -4.5e+62) || !(c <= 720000000000.0)) {
tmp = -2.0 * (c * ((a + (b * c)) * i));
} else {
tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((c <= (-4.5d+62)) .or. (.not. (c <= 720000000000.0d0))) then
tmp = (-2.0d0) * (c * ((a + (b * c)) * i))
else
tmp = 2.0d0 * (((x * y) + (z * t)) - (i * (a * c)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c <= -4.5e+62) || !(c <= 720000000000.0)) {
tmp = -2.0 * (c * ((a + (b * c)) * i));
} else {
tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c <= -4.5e+62) or not (c <= 720000000000.0): tmp = -2.0 * (c * ((a + (b * c)) * i)) else: tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((c <= -4.5e+62) || !(c <= 720000000000.0)) tmp = Float64(-2.0 * Float64(c * Float64(Float64(a + Float64(b * c)) * i))); else tmp = Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(i * Float64(a * c)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((c <= -4.5e+62) || ~((c <= 720000000000.0))) tmp = -2.0 * (c * ((a + (b * c)) * i)); else tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[c, -4.5e+62], N[Not[LessEqual[c, 720000000000.0]], $MachinePrecision]], N[(-2.0 * N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(i * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -4.5 \cdot 10^{+62} \lor \neg \left(c \leq 720000000000\right):\\
\;\;\;\;-2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - i \cdot \left(a \cdot c\right)\right)\\
\end{array}
\end{array}
if c < -4.49999999999999999e62 or 7.2e11 < c Initial program 79.7%
Taylor expanded in i around inf 84.9%
Taylor expanded in i around 0 84.9%
if -4.49999999999999999e62 < c < 7.2e11Initial program 97.2%
Taylor expanded in a around inf 88.1%
*-commutative88.1%
Simplified88.1%
Final simplification86.7%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= c -2.5e+104)
(and (not (<= c 1.25e-102))
(or (<= c 1.55e-90) (not (<= c 4.9e+163)))))
(* (* c i) (* a -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 <= -2.5e+104) || (!(c <= 1.25e-102) && ((c <= 1.55e-90) || !(c <= 4.9e+163)))) {
tmp = (c * i) * (a * -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 <= (-2.5d+104)) .or. (.not. (c <= 1.25d-102)) .and. (c <= 1.55d-90) .or. (.not. (c <= 4.9d+163))) then
tmp = (c * i) * (a * (-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 <= -2.5e+104) || (!(c <= 1.25e-102) && ((c <= 1.55e-90) || !(c <= 4.9e+163)))) {
tmp = (c * i) * (a * -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 <= -2.5e+104) or (not (c <= 1.25e-102) and ((c <= 1.55e-90) or not (c <= 4.9e+163))): tmp = (c * i) * (a * -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 <= -2.5e+104) || (!(c <= 1.25e-102) && ((c <= 1.55e-90) || !(c <= 4.9e+163)))) tmp = Float64(Float64(c * i) * Float64(a * -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 <= -2.5e+104) || (~((c <= 1.25e-102)) && ((c <= 1.55e-90) || ~((c <= 4.9e+163))))) tmp = (c * i) * (a * -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, -2.5e+104], And[N[Not[LessEqual[c, 1.25e-102]], $MachinePrecision], Or[LessEqual[c, 1.55e-90], N[Not[LessEqual[c, 4.9e+163]], $MachinePrecision]]]], N[(N[(c * i), $MachinePrecision] * N[(a * -2.0), $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 -2.5 \cdot 10^{+104} \lor \neg \left(c \leq 1.25 \cdot 10^{-102}\right) \land \left(c \leq 1.55 \cdot 10^{-90} \lor \neg \left(c \leq 4.9 \cdot 10^{+163}\right)\right):\\
\;\;\;\;\left(c \cdot i\right) \cdot \left(a \cdot -2\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\
\end{array}
\end{array}
if c < -2.4999999999999998e104 or 1.25000000000000006e-102 < c < 1.5500000000000001e-90 or 4.9e163 < c Initial program 77.9%
Taylor expanded in a around inf 50.9%
associate-*r*50.9%
*-commutative50.9%
associate-*r*43.6%
neg-mul-143.6%
Simplified43.6%
Taylor expanded in a around 0 50.9%
associate-*r*50.9%
Simplified50.9%
if -2.4999999999999998e104 < c < 1.25000000000000006e-102 or 1.5500000000000001e-90 < c < 4.9e163Initial program 95.0%
Taylor expanded in c around 0 69.5%
Final simplification63.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (+ (* x y) (* z t)) 2.0)) (t_2 (* c (* (* c i) (* b -2.0)))))
(if (<= c -7.7e+62)
t_2
(if (<= c 1.25e-102)
t_1
(if (<= c 1.55e-90)
(* (* c i) (* a -2.0))
(if (<= c 760000000000.0) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((x * y) + (z * t)) * 2.0;
double t_2 = c * ((c * i) * (b * -2.0));
double tmp;
if (c <= -7.7e+62) {
tmp = t_2;
} else if (c <= 1.25e-102) {
tmp = t_1;
} else if (c <= 1.55e-90) {
tmp = (c * i) * (a * -2.0);
} else if (c <= 760000000000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((x * y) + (z * t)) * 2.0d0
t_2 = c * ((c * i) * (b * (-2.0d0)))
if (c <= (-7.7d+62)) then
tmp = t_2
else if (c <= 1.25d-102) then
tmp = t_1
else if (c <= 1.55d-90) then
tmp = (c * i) * (a * (-2.0d0))
else if (c <= 760000000000.0d0) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((x * y) + (z * t)) * 2.0;
double t_2 = c * ((c * i) * (b * -2.0));
double tmp;
if (c <= -7.7e+62) {
tmp = t_2;
} else if (c <= 1.25e-102) {
tmp = t_1;
} else if (c <= 1.55e-90) {
tmp = (c * i) * (a * -2.0);
} else if (c <= 760000000000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = ((x * y) + (z * t)) * 2.0 t_2 = c * ((c * i) * (b * -2.0)) tmp = 0 if c <= -7.7e+62: tmp = t_2 elif c <= 1.25e-102: tmp = t_1 elif c <= 1.55e-90: tmp = (c * i) * (a * -2.0) elif c <= 760000000000.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(x * y) + Float64(z * t)) * 2.0) t_2 = Float64(c * Float64(Float64(c * i) * Float64(b * -2.0))) tmp = 0.0 if (c <= -7.7e+62) tmp = t_2; elseif (c <= 1.25e-102) tmp = t_1; elseif (c <= 1.55e-90) tmp = Float64(Float64(c * i) * Float64(a * -2.0)); elseif (c <= 760000000000.0) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = ((x * y) + (z * t)) * 2.0; t_2 = c * ((c * i) * (b * -2.0)); tmp = 0.0; if (c <= -7.7e+62) tmp = t_2; elseif (c <= 1.25e-102) tmp = t_1; elseif (c <= 1.55e-90) tmp = (c * i) * (a * -2.0); elseif (c <= 760000000000.0) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]}, Block[{t$95$2 = N[(c * N[(N[(c * i), $MachinePrecision] * N[(b * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -7.7e+62], t$95$2, If[LessEqual[c, 1.25e-102], t$95$1, If[LessEqual[c, 1.55e-90], N[(N[(c * i), $MachinePrecision] * N[(a * -2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 760000000000.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot y + z \cdot t\right) \cdot 2\\
t_2 := c \cdot \left(\left(c \cdot i\right) \cdot \left(b \cdot -2\right)\right)\\
\mathbf{if}\;c \leq -7.7 \cdot 10^{+62}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq 1.25 \cdot 10^{-102}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq 1.55 \cdot 10^{-90}:\\
\;\;\;\;\left(c \cdot i\right) \cdot \left(a \cdot -2\right)\\
\mathbf{elif}\;c \leq 760000000000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if c < -7.7000000000000003e62 or 7.6e11 < c Initial program 79.7%
Taylor expanded in i around inf 84.9%
Taylor expanded in c around inf 63.7%
associate-*r*63.7%
unpow263.7%
associate-*l*65.0%
*-commutative65.0%
rem-log-exp61.0%
log-pow61.0%
associate-*l*61.0%
*-commutative61.0%
associate-*l*61.0%
*-commutative61.0%
log-pow61.0%
rem-log-exp66.6%
*-commutative66.6%
Simplified66.6%
if -7.7000000000000003e62 < c < 1.25000000000000006e-102 or 1.5500000000000001e-90 < c < 7.6e11Initial program 97.1%
Taylor expanded in c around 0 78.3%
if 1.25000000000000006e-102 < c < 1.5500000000000001e-90Initial program 99.8%
Taylor expanded in a around inf 78.1%
associate-*r*78.1%
*-commutative78.1%
associate-*r*67.5%
neg-mul-167.5%
Simplified67.5%
Taylor expanded in a around 0 78.1%
associate-*r*78.1%
Simplified78.1%
Final simplification73.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (+ (* x y) (* z t)) 2.0)) (t_2 (* (* c i) (* (* b c) -2.0))))
(if (<= c -5.2e+61)
t_2
(if (<= c 1.25e-102)
t_1
(if (<= c 1.55e-90)
(* (* c i) (* a -2.0))
(if (<= c 760000000000.0) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((x * y) + (z * t)) * 2.0;
double t_2 = (c * i) * ((b * c) * -2.0);
double tmp;
if (c <= -5.2e+61) {
tmp = t_2;
} else if (c <= 1.25e-102) {
tmp = t_1;
} else if (c <= 1.55e-90) {
tmp = (c * i) * (a * -2.0);
} else if (c <= 760000000000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((x * y) + (z * t)) * 2.0d0
t_2 = (c * i) * ((b * c) * (-2.0d0))
if (c <= (-5.2d+61)) then
tmp = t_2
else if (c <= 1.25d-102) then
tmp = t_1
else if (c <= 1.55d-90) then
tmp = (c * i) * (a * (-2.0d0))
else if (c <= 760000000000.0d0) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((x * y) + (z * t)) * 2.0;
double t_2 = (c * i) * ((b * c) * -2.0);
double tmp;
if (c <= -5.2e+61) {
tmp = t_2;
} else if (c <= 1.25e-102) {
tmp = t_1;
} else if (c <= 1.55e-90) {
tmp = (c * i) * (a * -2.0);
} else if (c <= 760000000000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = ((x * y) + (z * t)) * 2.0 t_2 = (c * i) * ((b * c) * -2.0) tmp = 0 if c <= -5.2e+61: tmp = t_2 elif c <= 1.25e-102: tmp = t_1 elif c <= 1.55e-90: tmp = (c * i) * (a * -2.0) elif c <= 760000000000.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(x * y) + Float64(z * t)) * 2.0) t_2 = Float64(Float64(c * i) * Float64(Float64(b * c) * -2.0)) tmp = 0.0 if (c <= -5.2e+61) tmp = t_2; elseif (c <= 1.25e-102) tmp = t_1; elseif (c <= 1.55e-90) tmp = Float64(Float64(c * i) * Float64(a * -2.0)); elseif (c <= 760000000000.0) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = ((x * y) + (z * t)) * 2.0; t_2 = (c * i) * ((b * c) * -2.0); tmp = 0.0; if (c <= -5.2e+61) tmp = t_2; elseif (c <= 1.25e-102) tmp = t_1; elseif (c <= 1.55e-90) tmp = (c * i) * (a * -2.0); elseif (c <= 760000000000.0) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(c * i), $MachinePrecision] * N[(N[(b * c), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -5.2e+61], t$95$2, If[LessEqual[c, 1.25e-102], t$95$1, If[LessEqual[c, 1.55e-90], N[(N[(c * i), $MachinePrecision] * N[(a * -2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 760000000000.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot y + z \cdot t\right) \cdot 2\\
t_2 := \left(c \cdot i\right) \cdot \left(\left(b \cdot c\right) \cdot -2\right)\\
\mathbf{if}\;c \leq -5.2 \cdot 10^{+61}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq 1.25 \cdot 10^{-102}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq 1.55 \cdot 10^{-90}:\\
\;\;\;\;\left(c \cdot i\right) \cdot \left(a \cdot -2\right)\\
\mathbf{elif}\;c \leq 760000000000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if c < -5.19999999999999945e61 or 7.6e11 < c Initial program 79.7%
Taylor expanded in b around inf 63.7%
mul-1-neg63.7%
*-commutative63.7%
distribute-rgt-neg-in63.7%
unpow263.7%
associate-*r*65.0%
Simplified65.0%
Taylor expanded in c around 0 63.7%
associate-*r*63.7%
unpow263.7%
associate-*r*65.0%
*-commutative65.0%
Simplified65.0%
Taylor expanded in c around 0 63.7%
Simplified66.7%
if -5.19999999999999945e61 < c < 1.25000000000000006e-102 or 1.5500000000000001e-90 < c < 7.6e11Initial program 97.1%
Taylor expanded in c around 0 78.3%
if 1.25000000000000006e-102 < c < 1.5500000000000001e-90Initial program 99.8%
Taylor expanded in a around inf 78.1%
associate-*r*78.1%
*-commutative78.1%
associate-*r*67.5%
neg-mul-167.5%
Simplified67.5%
Taylor expanded in a around 0 78.1%
associate-*r*78.1%
Simplified78.1%
Final simplification73.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (+ (* x y) (* z t)) 2.0)))
(if (<= c -4.7e+63)
(* (* c i) (* (* b c) -2.0))
(if (<= c 1.25e-102)
t_1
(if (<= c 1.55e-90)
(* (* c i) (* a -2.0))
(if (<= c 760000000000.0) t_1 (* (* c (* c i)) (* b -2.0))))))))
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)) * 2.0;
double tmp;
if (c <= -4.7e+63) {
tmp = (c * i) * ((b * c) * -2.0);
} else if (c <= 1.25e-102) {
tmp = t_1;
} else if (c <= 1.55e-90) {
tmp = (c * i) * (a * -2.0);
} else if (c <= 760000000000.0) {
tmp = t_1;
} else {
tmp = (c * (c * i)) * (b * -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 = ((x * y) + (z * t)) * 2.0d0
if (c <= (-4.7d+63)) then
tmp = (c * i) * ((b * c) * (-2.0d0))
else if (c <= 1.25d-102) then
tmp = t_1
else if (c <= 1.55d-90) then
tmp = (c * i) * (a * (-2.0d0))
else if (c <= 760000000000.0d0) then
tmp = t_1
else
tmp = (c * (c * i)) * (b * (-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 = ((x * y) + (z * t)) * 2.0;
double tmp;
if (c <= -4.7e+63) {
tmp = (c * i) * ((b * c) * -2.0);
} else if (c <= 1.25e-102) {
tmp = t_1;
} else if (c <= 1.55e-90) {
tmp = (c * i) * (a * -2.0);
} else if (c <= 760000000000.0) {
tmp = t_1;
} else {
tmp = (c * (c * i)) * (b * -2.0);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = ((x * y) + (z * t)) * 2.0 tmp = 0 if c <= -4.7e+63: tmp = (c * i) * ((b * c) * -2.0) elif c <= 1.25e-102: tmp = t_1 elif c <= 1.55e-90: tmp = (c * i) * (a * -2.0) elif c <= 760000000000.0: tmp = t_1 else: tmp = (c * (c * i)) * (b * -2.0) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(x * y) + Float64(z * t)) * 2.0) tmp = 0.0 if (c <= -4.7e+63) tmp = Float64(Float64(c * i) * Float64(Float64(b * c) * -2.0)); elseif (c <= 1.25e-102) tmp = t_1; elseif (c <= 1.55e-90) tmp = Float64(Float64(c * i) * Float64(a * -2.0)); elseif (c <= 760000000000.0) tmp = t_1; else tmp = Float64(Float64(c * Float64(c * i)) * Float64(b * -2.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = ((x * y) + (z * t)) * 2.0; tmp = 0.0; if (c <= -4.7e+63) tmp = (c * i) * ((b * c) * -2.0); elseif (c <= 1.25e-102) tmp = t_1; elseif (c <= 1.55e-90) tmp = (c * i) * (a * -2.0); elseif (c <= 760000000000.0) tmp = t_1; else tmp = (c * (c * i)) * (b * -2.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]}, If[LessEqual[c, -4.7e+63], N[(N[(c * i), $MachinePrecision] * N[(N[(b * c), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.25e-102], t$95$1, If[LessEqual[c, 1.55e-90], N[(N[(c * i), $MachinePrecision] * N[(a * -2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 760000000000.0], t$95$1, N[(N[(c * N[(c * i), $MachinePrecision]), $MachinePrecision] * N[(b * -2.0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot y + z \cdot t\right) \cdot 2\\
\mathbf{if}\;c \leq -4.7 \cdot 10^{+63}:\\
\;\;\;\;\left(c \cdot i\right) \cdot \left(\left(b \cdot c\right) \cdot -2\right)\\
\mathbf{elif}\;c \leq 1.25 \cdot 10^{-102}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq 1.55 \cdot 10^{-90}:\\
\;\;\;\;\left(c \cdot i\right) \cdot \left(a \cdot -2\right)\\
\mathbf{elif}\;c \leq 760000000000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\left(c \cdot \left(c \cdot i\right)\right) \cdot \left(b \cdot -2\right)\\
\end{array}
\end{array}
if c < -4.7000000000000003e63Initial program 76.4%
Taylor expanded in b around inf 65.3%
mul-1-neg65.3%
*-commutative65.3%
distribute-rgt-neg-in65.3%
unpow265.3%
associate-*r*66.2%
Simplified66.2%
Taylor expanded in c around 0 65.3%
associate-*r*65.3%
unpow265.3%
associate-*r*66.2%
*-commutative66.2%
Simplified66.2%
Taylor expanded in c around 0 65.3%
Simplified69.6%
if -4.7000000000000003e63 < c < 1.25000000000000006e-102 or 1.5500000000000001e-90 < c < 7.6e11Initial program 97.1%
Taylor expanded in c around 0 78.3%
if 1.25000000000000006e-102 < c < 1.5500000000000001e-90Initial program 99.8%
Taylor expanded in a around inf 78.1%
associate-*r*78.1%
*-commutative78.1%
associate-*r*67.5%
neg-mul-167.5%
Simplified67.5%
Taylor expanded in a around 0 78.1%
associate-*r*78.1%
Simplified78.1%
if 7.6e11 < c Initial program 82.8%
Taylor expanded in b around inf 62.3%
mul-1-neg62.3%
*-commutative62.3%
distribute-rgt-neg-in62.3%
unpow262.3%
associate-*r*63.9%
Simplified63.9%
Taylor expanded in c around 0 62.3%
associate-*r*62.3%
unpow262.3%
associate-*r*63.9%
*-commutative63.9%
Simplified63.9%
Final simplification73.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (* z t))))
(if (<= t -9.2)
t_1
(if (<= t 1.45e-306)
(* -2.0 (* c (* a i)))
(if (<= t 1.05e+40) (* (* 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 = 2.0 * (z * t);
double tmp;
if (t <= -9.2) {
tmp = t_1;
} else if (t <= 1.45e-306) {
tmp = -2.0 * (c * (a * i));
} else if (t <= 1.05e+40) {
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 = 2.0d0 * (z * t)
if (t <= (-9.2d0)) then
tmp = t_1
else if (t <= 1.45d-306) then
tmp = (-2.0d0) * (c * (a * i))
else if (t <= 1.05d+40) 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 = 2.0 * (z * t);
double tmp;
if (t <= -9.2) {
tmp = t_1;
} else if (t <= 1.45e-306) {
tmp = -2.0 * (c * (a * i));
} else if (t <= 1.05e+40) {
tmp = (x * y) * 2.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * (z * t) tmp = 0 if t <= -9.2: tmp = t_1 elif t <= 1.45e-306: tmp = -2.0 * (c * (a * i)) elif t <= 1.05e+40: tmp = (x * y) * 2.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(z * t)) tmp = 0.0 if (t <= -9.2) tmp = t_1; elseif (t <= 1.45e-306) tmp = Float64(-2.0 * Float64(c * Float64(a * i))); elseif (t <= 1.05e+40) tmp = Float64(Float64(x * 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 = 2.0 * (z * t); tmp = 0.0; if (t <= -9.2) tmp = t_1; elseif (t <= 1.45e-306) tmp = -2.0 * (c * (a * i)); elseif (t <= 1.05e+40) 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[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9.2], t$95$1, If[LessEqual[t, 1.45e-306], N[(-2.0 * N[(c * N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.05e+40], N[(N[(x * y), $MachinePrecision] * 2.0), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(z \cdot t\right)\\
\mathbf{if}\;t \leq -9.2:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.45 \cdot 10^{-306}:\\
\;\;\;\;-2 \cdot \left(c \cdot \left(a \cdot i\right)\right)\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{+40}:\\
\;\;\;\;\left(x \cdot y\right) \cdot 2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -9.1999999999999993 or 1.05000000000000005e40 < t Initial program 88.8%
Taylor expanded in z around inf 44.9%
if -9.1999999999999993 < t < 1.4499999999999999e-306Initial program 89.1%
Taylor expanded in i around inf 50.7%
Taylor expanded in c around 0 25.1%
associate-*r*20.9%
*-commutative20.9%
associate-*r*20.9%
Simplified20.9%
if 1.4499999999999999e-306 < t < 1.05000000000000005e40Initial program 91.7%
Taylor expanded in x around inf 35.7%
Final simplification38.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (* z t))))
(if (<= t -9.2)
t_1
(if (<= t 1.42e-306)
(* (* c i) (* a -2.0))
(if (<= t 1.35e+46) (* (* 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 = 2.0 * (z * t);
double tmp;
if (t <= -9.2) {
tmp = t_1;
} else if (t <= 1.42e-306) {
tmp = (c * i) * (a * -2.0);
} else if (t <= 1.35e+46) {
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 = 2.0d0 * (z * t)
if (t <= (-9.2d0)) then
tmp = t_1
else if (t <= 1.42d-306) then
tmp = (c * i) * (a * (-2.0d0))
else if (t <= 1.35d+46) 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 = 2.0 * (z * t);
double tmp;
if (t <= -9.2) {
tmp = t_1;
} else if (t <= 1.42e-306) {
tmp = (c * i) * (a * -2.0);
} else if (t <= 1.35e+46) {
tmp = (x * y) * 2.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * (z * t) tmp = 0 if t <= -9.2: tmp = t_1 elif t <= 1.42e-306: tmp = (c * i) * (a * -2.0) elif t <= 1.35e+46: tmp = (x * y) * 2.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(z * t)) tmp = 0.0 if (t <= -9.2) tmp = t_1; elseif (t <= 1.42e-306) tmp = Float64(Float64(c * i) * Float64(a * -2.0)); elseif (t <= 1.35e+46) tmp = Float64(Float64(x * 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 = 2.0 * (z * t); tmp = 0.0; if (t <= -9.2) tmp = t_1; elseif (t <= 1.42e-306) tmp = (c * i) * (a * -2.0); elseif (t <= 1.35e+46) 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[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9.2], t$95$1, If[LessEqual[t, 1.42e-306], N[(N[(c * i), $MachinePrecision] * N[(a * -2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.35e+46], N[(N[(x * y), $MachinePrecision] * 2.0), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(z \cdot t\right)\\
\mathbf{if}\;t \leq -9.2:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.42 \cdot 10^{-306}:\\
\;\;\;\;\left(c \cdot i\right) \cdot \left(a \cdot -2\right)\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{+46}:\\
\;\;\;\;\left(x \cdot y\right) \cdot 2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -9.1999999999999993 or 1.3500000000000001e46 < t Initial program 88.8%
Taylor expanded in z around inf 44.9%
if -9.1999999999999993 < t < 1.42000000000000005e-306Initial program 89.1%
Taylor expanded in a around inf 25.1%
associate-*r*25.1%
*-commutative25.1%
associate-*r*20.9%
neg-mul-120.9%
Simplified20.9%
Taylor expanded in a around 0 25.1%
associate-*r*25.1%
Simplified25.1%
if 1.42000000000000005e-306 < t < 1.3500000000000001e46Initial program 91.7%
Taylor expanded in x around inf 35.7%
Final simplification38.7%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= z -3.1e+117) (not (<= z 3.3e-78))) (* 2.0 (* z t)) (* (* x y) 2.0)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((z <= -3.1e+117) || !(z <= 3.3e-78)) {
tmp = 2.0 * (z * t);
} else {
tmp = (x * y) * 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 <= (-3.1d+117)) .or. (.not. (z <= 3.3d-78))) then
tmp = 2.0d0 * (z * t)
else
tmp = (x * y) * 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 <= -3.1e+117) || !(z <= 3.3e-78)) {
tmp = 2.0 * (z * t);
} else {
tmp = (x * y) * 2.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (z <= -3.1e+117) or not (z <= 3.3e-78): tmp = 2.0 * (z * t) else: tmp = (x * y) * 2.0 return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((z <= -3.1e+117) || !(z <= 3.3e-78)) tmp = Float64(2.0 * Float64(z * t)); else tmp = Float64(Float64(x * y) * 2.0); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((z <= -3.1e+117) || ~((z <= 3.3e-78))) tmp = 2.0 * (z * t); else tmp = (x * y) * 2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[z, -3.1e+117], N[Not[LessEqual[z, 3.3e-78]], $MachinePrecision]], N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] * 2.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.1 \cdot 10^{+117} \lor \neg \left(z \leq 3.3 \cdot 10^{-78}\right):\\
\;\;\;\;2 \cdot \left(z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot y\right) \cdot 2\\
\end{array}
\end{array}
if z < -3.09999999999999975e117 or 3.29999999999999982e-78 < z Initial program 89.0%
Taylor expanded in z around inf 49.2%
if -3.09999999999999975e117 < z < 3.29999999999999982e-78Initial program 90.5%
Taylor expanded in x around inf 34.2%
Final simplification41.5%
(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.8%
Taylor expanded in z around inf 30.8%
Final simplification30.8%
(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 2023290
(FPCore (x y z t a b c i)
:name "Diagrams.ThreeD.Shapes:frustum from diagrams-lib-1.3.0.3, A"
:precision binary64
:herbie-target
(* 2.0 (- (+ (* x y) (* z t)) (* (+ a (* b c)) (* c i))))
(* 2.0 (- (+ (* x y) (* z t)) (* (* (+ a (* b c)) c) i))))