
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (* x y) (* z t)) (* a b)) (* c i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((x * y) + (z * t)) + (a * b)) + (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 = (((x * y) + (z * t)) + (a * b)) + (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 (((x * y) + (z * t)) + (a * b)) + (c * i);
}
def code(x, y, z, t, a, b, c, i): return (((x * y) + (z * t)) + (a * b)) + (c * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(x * y) + Float64(z * t)) + Float64(a * b)) + Float64(c * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((x * y) + (z * t)) + (a * b)) + (c * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (* x y) (* z t)) (* a b)) (* c i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((x * y) + (z * t)) + (a * b)) + (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 = (((x * y) + (z * t)) + (a * b)) + (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 (((x * y) + (z * t)) + (a * b)) + (c * i);
}
def code(x, y, z, t, a, b, c, i): return (((x * y) + (z * t)) + (a * b)) + (c * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(x * y) + Float64(z * t)) + Float64(a * b)) + Float64(c * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((x * y) + (z * t)) + (a * b)) + (c * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i
\end{array}
(FPCore (x y z t a b c i) :precision binary64 (let* ((t_1 (+ (+ (+ (* x y) (* z t)) (* a b)) (* c i)))) (if (<= t_1 INFINITY) t_1 (* x (+ y (* a (/ b x)))))))
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)) + (a * b)) + (c * i);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = x * (y + (a * (b / 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 = (((x * y) + (z * t)) + (a * b)) + (c * i);
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = x * (y + (a * (b / x)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (((x * y) + (z * t)) + (a * b)) + (c * i) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = x * (y + (a * (b / x))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(Float64(x * y) + Float64(z * t)) + Float64(a * b)) + Float64(c * i)) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(x * Float64(y + Float64(a * Float64(b / x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (((x * y) + (z * t)) + (a * b)) + (c * i); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = x * (y + (a * (b / x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(x * N[(y + N[(a * N[(b / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(y + a \cdot \frac{b}{x}\right)\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 a b)) (*.f64 c i)) < +inf.0Initial program 100.0%
if +inf.0 < (+.f64 (+.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 a b)) (*.f64 c i)) Initial program 0.0%
Taylor expanded in z around inf 15.4%
Taylor expanded in z around 0 46.2%
Taylor expanded in c around 0 55.0%
Taylor expanded in x around inf 62.2%
associate-/l*62.2%
Simplified62.2%
(FPCore (x y z t a b c i) :precision binary64 (fma c i (fma a b (fma x y (* z t)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return fma(c, i, fma(a, b, fma(x, y, (z * t))));
}
function code(x, y, z, t, a, b, c, i) return fma(c, i, fma(a, b, fma(x, y, Float64(z * t)))) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(c * i + N[(a * b + N[(x * y + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(c, i, \mathsf{fma}\left(a, b, \mathsf{fma}\left(x, y, z \cdot t\right)\right)\right)
\end{array}
Initial program 94.9%
+-commutative94.9%
fma-define96.1%
+-commutative96.1%
fma-define96.9%
fma-define97.2%
Simplified97.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* a b) (* c i))))
(if (<= (* x y) -1.4e+177)
(* x y)
(if (<= (* x y) -6.8e+31)
(* z t)
(if (<= (* x y) 1.85e-79)
t_1
(if (<= (* x y) 1.55e-49)
(* z t)
(if (<= (* x y) 3.4e+101) t_1 (* x y))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (a * b) + (c * i);
double tmp;
if ((x * y) <= -1.4e+177) {
tmp = x * y;
} else if ((x * y) <= -6.8e+31) {
tmp = z * t;
} else if ((x * y) <= 1.85e-79) {
tmp = t_1;
} else if ((x * y) <= 1.55e-49) {
tmp = z * t;
} else if ((x * y) <= 3.4e+101) {
tmp = t_1;
} else {
tmp = x * y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = (a * b) + (c * i)
if ((x * y) <= (-1.4d+177)) then
tmp = x * y
else if ((x * y) <= (-6.8d+31)) then
tmp = z * t
else if ((x * y) <= 1.85d-79) then
tmp = t_1
else if ((x * y) <= 1.55d-49) then
tmp = z * t
else if ((x * y) <= 3.4d+101) then
tmp = t_1
else
tmp = x * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (a * b) + (c * i);
double tmp;
if ((x * y) <= -1.4e+177) {
tmp = x * y;
} else if ((x * y) <= -6.8e+31) {
tmp = z * t;
} else if ((x * y) <= 1.85e-79) {
tmp = t_1;
} else if ((x * y) <= 1.55e-49) {
tmp = z * t;
} else if ((x * y) <= 3.4e+101) {
tmp = t_1;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (a * b) + (c * i) tmp = 0 if (x * y) <= -1.4e+177: tmp = x * y elif (x * y) <= -6.8e+31: tmp = z * t elif (x * y) <= 1.85e-79: tmp = t_1 elif (x * y) <= 1.55e-49: tmp = z * t elif (x * y) <= 3.4e+101: tmp = t_1 else: tmp = x * y return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(a * b) + Float64(c * i)) tmp = 0.0 if (Float64(x * y) <= -1.4e+177) tmp = Float64(x * y); elseif (Float64(x * y) <= -6.8e+31) tmp = Float64(z * t); elseif (Float64(x * y) <= 1.85e-79) tmp = t_1; elseif (Float64(x * y) <= 1.55e-49) tmp = Float64(z * t); elseif (Float64(x * y) <= 3.4e+101) tmp = t_1; else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (a * b) + (c * i); tmp = 0.0; if ((x * y) <= -1.4e+177) tmp = x * y; elseif ((x * y) <= -6.8e+31) tmp = z * t; elseif ((x * y) <= 1.85e-79) tmp = t_1; elseif ((x * y) <= 1.55e-49) tmp = z * t; elseif ((x * y) <= 3.4e+101) tmp = t_1; else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(a * b), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -1.4e+177], N[(x * y), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -6.8e+31], N[(z * t), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 1.85e-79], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 1.55e-49], N[(z * t), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 3.4e+101], t$95$1, N[(x * y), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot b + c \cdot i\\
\mathbf{if}\;x \cdot y \leq -1.4 \cdot 10^{+177}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;x \cdot y \leq -6.8 \cdot 10^{+31}:\\
\;\;\;\;z \cdot t\\
\mathbf{elif}\;x \cdot y \leq 1.85 \cdot 10^{-79}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 1.55 \cdot 10^{-49}:\\
\;\;\;\;z \cdot t\\
\mathbf{elif}\;x \cdot y \leq 3.4 \cdot 10^{+101}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if (*.f64 x y) < -1.40000000000000001e177 or 3.40000000000000017e101 < (*.f64 x y) Initial program 91.0%
Taylor expanded in x around inf 72.1%
if -1.40000000000000001e177 < (*.f64 x y) < -6.7999999999999996e31 or 1.85000000000000009e-79 < (*.f64 x y) < 1.55e-49Initial program 94.7%
Taylor expanded in z around inf 54.5%
if -6.7999999999999996e31 < (*.f64 x y) < 1.85000000000000009e-79 or 1.55e-49 < (*.f64 x y) < 3.40000000000000017e101Initial program 97.1%
Taylor expanded in x around 0 88.3%
Taylor expanded in t around 0 66.4%
Final simplification66.4%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= (* a b) -2.4e+252)
(* a b)
(if (<= (* a b) -2.1e+114)
(* z t)
(if (or (<= (* a b) -8e+38) (not (<= (* a b) 2.85e+62)))
(* a b)
(* x y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((a * b) <= -2.4e+252) {
tmp = a * b;
} else if ((a * b) <= -2.1e+114) {
tmp = z * t;
} else if (((a * b) <= -8e+38) || !((a * b) <= 2.85e+62)) {
tmp = a * b;
} else {
tmp = x * y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((a * b) <= (-2.4d+252)) then
tmp = a * b
else if ((a * b) <= (-2.1d+114)) then
tmp = z * t
else if (((a * b) <= (-8d+38)) .or. (.not. ((a * b) <= 2.85d+62))) then
tmp = a * b
else
tmp = x * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((a * b) <= -2.4e+252) {
tmp = a * b;
} else if ((a * b) <= -2.1e+114) {
tmp = z * t;
} else if (((a * b) <= -8e+38) || !((a * b) <= 2.85e+62)) {
tmp = a * b;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (a * b) <= -2.4e+252: tmp = a * b elif (a * b) <= -2.1e+114: tmp = z * t elif ((a * b) <= -8e+38) or not ((a * b) <= 2.85e+62): tmp = a * b else: tmp = x * y return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(a * b) <= -2.4e+252) tmp = Float64(a * b); elseif (Float64(a * b) <= -2.1e+114) tmp = Float64(z * t); elseif ((Float64(a * b) <= -8e+38) || !(Float64(a * b) <= 2.85e+62)) tmp = Float64(a * b); else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((a * b) <= -2.4e+252) tmp = a * b; elseif ((a * b) <= -2.1e+114) tmp = z * t; elseif (((a * b) <= -8e+38) || ~(((a * b) <= 2.85e+62))) tmp = a * b; else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(a * b), $MachinePrecision], -2.4e+252], N[(a * b), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], -2.1e+114], N[(z * t), $MachinePrecision], If[Or[LessEqual[N[(a * b), $MachinePrecision], -8e+38], N[Not[LessEqual[N[(a * b), $MachinePrecision], 2.85e+62]], $MachinePrecision]], N[(a * b), $MachinePrecision], N[(x * y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -2.4 \cdot 10^{+252}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;a \cdot b \leq -2.1 \cdot 10^{+114}:\\
\;\;\;\;z \cdot t\\
\mathbf{elif}\;a \cdot b \leq -8 \cdot 10^{+38} \lor \neg \left(a \cdot b \leq 2.85 \cdot 10^{+62}\right):\\
\;\;\;\;a \cdot b\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if (*.f64 a b) < -2.3999999999999999e252 or -2.1e114 < (*.f64 a b) < -7.99999999999999982e38 or 2.84999999999999999e62 < (*.f64 a b) Initial program 89.4%
Taylor expanded in a around inf 69.4%
if -2.3999999999999999e252 < (*.f64 a b) < -2.1e114Initial program 89.5%
Taylor expanded in z around inf 43.3%
if -7.99999999999999982e38 < (*.f64 a b) < 2.84999999999999999e62Initial program 98.7%
Taylor expanded in x around inf 44.5%
Final simplification52.7%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= (* c i) -2.2e+257)
(* c i)
(if (<= (* c i) -1.7e-82)
(* z t)
(if (<= (* c i) 1.08e-94)
(* a b)
(if (<= (* c i) 3.1e+149) (* z t) (* c i))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c * i) <= -2.2e+257) {
tmp = c * i;
} else if ((c * i) <= -1.7e-82) {
tmp = z * t;
} else if ((c * i) <= 1.08e-94) {
tmp = a * b;
} else if ((c * i) <= 3.1e+149) {
tmp = z * t;
} else {
tmp = c * i;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((c * i) <= (-2.2d+257)) then
tmp = c * i
else if ((c * i) <= (-1.7d-82)) then
tmp = z * t
else if ((c * i) <= 1.08d-94) then
tmp = a * b
else if ((c * i) <= 3.1d+149) then
tmp = z * t
else
tmp = c * i
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c * i) <= -2.2e+257) {
tmp = c * i;
} else if ((c * i) <= -1.7e-82) {
tmp = z * t;
} else if ((c * i) <= 1.08e-94) {
tmp = a * b;
} else if ((c * i) <= 3.1e+149) {
tmp = z * t;
} else {
tmp = c * i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c * i) <= -2.2e+257: tmp = c * i elif (c * i) <= -1.7e-82: tmp = z * t elif (c * i) <= 1.08e-94: tmp = a * b elif (c * i) <= 3.1e+149: tmp = z * t else: tmp = c * i return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(c * i) <= -2.2e+257) tmp = Float64(c * i); elseif (Float64(c * i) <= -1.7e-82) tmp = Float64(z * t); elseif (Float64(c * i) <= 1.08e-94) tmp = Float64(a * b); elseif (Float64(c * i) <= 3.1e+149) tmp = Float64(z * t); else tmp = Float64(c * i); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((c * i) <= -2.2e+257) tmp = c * i; elseif ((c * i) <= -1.7e-82) tmp = z * t; elseif ((c * i) <= 1.08e-94) tmp = a * b; elseif ((c * i) <= 3.1e+149) tmp = z * t; else tmp = c * i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(c * i), $MachinePrecision], -2.2e+257], N[(c * i), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], -1.7e-82], N[(z * t), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 1.08e-94], N[(a * b), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 3.1e+149], N[(z * t), $MachinePrecision], N[(c * i), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \cdot i \leq -2.2 \cdot 10^{+257}:\\
\;\;\;\;c \cdot i\\
\mathbf{elif}\;c \cdot i \leq -1.7 \cdot 10^{-82}:\\
\;\;\;\;z \cdot t\\
\mathbf{elif}\;c \cdot i \leq 1.08 \cdot 10^{-94}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;c \cdot i \leq 3.1 \cdot 10^{+149}:\\
\;\;\;\;z \cdot t\\
\mathbf{else}:\\
\;\;\;\;c \cdot i\\
\end{array}
\end{array}
if (*.f64 c i) < -2.1999999999999999e257 or 3.09999999999999987e149 < (*.f64 c i) Initial program 86.3%
Taylor expanded in c around inf 71.8%
if -2.1999999999999999e257 < (*.f64 c i) < -1.69999999999999988e-82 or 1.08e-94 < (*.f64 c i) < 3.09999999999999987e149Initial program 96.1%
Taylor expanded in z around inf 40.3%
if -1.69999999999999988e-82 < (*.f64 c i) < 1.08e-94Initial program 98.0%
Taylor expanded in a around inf 40.8%
Final simplification46.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* c i) (* z t))))
(if (<= (* c i) -2.5e+191)
t_1
(if (<= (* c i) 8.5e+51)
(+ (* x y) (* a b))
(if (<= (* c i) 3.1e+149) t_1 (+ (* x y) (* c i)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (c * i) + (z * t);
double tmp;
if ((c * i) <= -2.5e+191) {
tmp = t_1;
} else if ((c * i) <= 8.5e+51) {
tmp = (x * y) + (a * b);
} else if ((c * i) <= 3.1e+149) {
tmp = t_1;
} else {
tmp = (x * y) + (c * i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = (c * i) + (z * t)
if ((c * i) <= (-2.5d+191)) then
tmp = t_1
else if ((c * i) <= 8.5d+51) then
tmp = (x * y) + (a * b)
else if ((c * i) <= 3.1d+149) then
tmp = t_1
else
tmp = (x * y) + (c * i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (c * i) + (z * t);
double tmp;
if ((c * i) <= -2.5e+191) {
tmp = t_1;
} else if ((c * i) <= 8.5e+51) {
tmp = (x * y) + (a * b);
} else if ((c * i) <= 3.1e+149) {
tmp = t_1;
} else {
tmp = (x * y) + (c * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (c * i) + (z * t) tmp = 0 if (c * i) <= -2.5e+191: tmp = t_1 elif (c * i) <= 8.5e+51: tmp = (x * y) + (a * b) elif (c * i) <= 3.1e+149: tmp = t_1 else: tmp = (x * y) + (c * i) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(c * i) + Float64(z * t)) tmp = 0.0 if (Float64(c * i) <= -2.5e+191) tmp = t_1; elseif (Float64(c * i) <= 8.5e+51) tmp = Float64(Float64(x * y) + Float64(a * b)); elseif (Float64(c * i) <= 3.1e+149) tmp = t_1; else tmp = Float64(Float64(x * y) + Float64(c * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (c * i) + (z * t); tmp = 0.0; if ((c * i) <= -2.5e+191) tmp = t_1; elseif ((c * i) <= 8.5e+51) tmp = (x * y) + (a * b); elseif ((c * i) <= 3.1e+149) tmp = t_1; else tmp = (x * y) + (c * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(c * i), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(c * i), $MachinePrecision], -2.5e+191], t$95$1, If[LessEqual[N[(c * i), $MachinePrecision], 8.5e+51], N[(N[(x * y), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 3.1e+149], t$95$1, N[(N[(x * y), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot i + z \cdot t\\
\mathbf{if}\;c \cdot i \leq -2.5 \cdot 10^{+191}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \cdot i \leq 8.5 \cdot 10^{+51}:\\
\;\;\;\;x \cdot y + a \cdot b\\
\mathbf{elif}\;c \cdot i \leq 3.1 \cdot 10^{+149}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot y + c \cdot i\\
\end{array}
\end{array}
if (*.f64 c i) < -2.5000000000000001e191 or 8.4999999999999999e51 < (*.f64 c i) < 3.09999999999999987e149Initial program 90.2%
Taylor expanded in x around 0 88.3%
Taylor expanded in a around 0 81.0%
if -2.5000000000000001e191 < (*.f64 c i) < 8.4999999999999999e51Initial program 98.3%
Taylor expanded in z around inf 93.1%
Taylor expanded in z around 0 75.2%
Taylor expanded in c around 0 69.0%
if 3.09999999999999987e149 < (*.f64 c i) Initial program 82.4%
Taylor expanded in z around inf 85.3%
Taylor expanded in a around 0 79.6%
Taylor expanded in z around 0 85.5%
Final simplification73.1%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= (* c i) -2.1e+257)
(* c i)
(if (<= (* c i) -6.5e+191)
(* z t)
(if (<= (* c i) 4.5e+46) (+ (* x y) (* a b)) (+ (* a b) (* c i))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c * i) <= -2.1e+257) {
tmp = c * i;
} else if ((c * i) <= -6.5e+191) {
tmp = z * t;
} else if ((c * i) <= 4.5e+46) {
tmp = (x * y) + (a * b);
} else {
tmp = (a * b) + (c * i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((c * i) <= (-2.1d+257)) then
tmp = c * i
else if ((c * i) <= (-6.5d+191)) then
tmp = z * t
else if ((c * i) <= 4.5d+46) then
tmp = (x * y) + (a * b)
else
tmp = (a * b) + (c * i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c * i) <= -2.1e+257) {
tmp = c * i;
} else if ((c * i) <= -6.5e+191) {
tmp = z * t;
} else if ((c * i) <= 4.5e+46) {
tmp = (x * y) + (a * b);
} else {
tmp = (a * b) + (c * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c * i) <= -2.1e+257: tmp = c * i elif (c * i) <= -6.5e+191: tmp = z * t elif (c * i) <= 4.5e+46: tmp = (x * y) + (a * b) else: tmp = (a * b) + (c * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(c * i) <= -2.1e+257) tmp = Float64(c * i); elseif (Float64(c * i) <= -6.5e+191) tmp = Float64(z * t); elseif (Float64(c * i) <= 4.5e+46) tmp = Float64(Float64(x * y) + Float64(a * b)); else tmp = Float64(Float64(a * b) + Float64(c * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((c * i) <= -2.1e+257) tmp = c * i; elseif ((c * i) <= -6.5e+191) tmp = z * t; elseif ((c * i) <= 4.5e+46) tmp = (x * y) + (a * b); else tmp = (a * b) + (c * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(c * i), $MachinePrecision], -2.1e+257], N[(c * i), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], -6.5e+191], N[(z * t), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 4.5e+46], N[(N[(x * y), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision], N[(N[(a * b), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \cdot i \leq -2.1 \cdot 10^{+257}:\\
\;\;\;\;c \cdot i\\
\mathbf{elif}\;c \cdot i \leq -6.5 \cdot 10^{+191}:\\
\;\;\;\;z \cdot t\\
\mathbf{elif}\;c \cdot i \leq 4.5 \cdot 10^{+46}:\\
\;\;\;\;x \cdot y + a \cdot b\\
\mathbf{else}:\\
\;\;\;\;a \cdot b + c \cdot i\\
\end{array}
\end{array}
if (*.f64 c i) < -2.10000000000000013e257Initial program 94.1%
Taylor expanded in c around inf 78.4%
if -2.10000000000000013e257 < (*.f64 c i) < -6.50000000000000008e191Initial program 85.7%
Taylor expanded in z around inf 100.0%
if -6.50000000000000008e191 < (*.f64 c i) < 4.5000000000000001e46Initial program 98.3%
Taylor expanded in z around inf 93.0%
Taylor expanded in z around 0 74.7%
Taylor expanded in c around 0 69.4%
if 4.5000000000000001e46 < (*.f64 c i) Initial program 85.4%
Taylor expanded in x around 0 76.8%
Taylor expanded in t around 0 67.0%
Final simplification70.3%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= (* x y) -2e+192)
(* x (+ y (* a (/ b x))))
(if (<= (* x y) 1e+113)
(+ (* c i) (+ (* a b) (* z t)))
(+ (* x y) (* a b)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x * y) <= -2e+192) {
tmp = x * (y + (a * (b / x)));
} else if ((x * y) <= 1e+113) {
tmp = (c * i) + ((a * b) + (z * t));
} else {
tmp = (x * y) + (a * b);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x * y) <= (-2d+192)) then
tmp = x * (y + (a * (b / x)))
else if ((x * y) <= 1d+113) then
tmp = (c * i) + ((a * b) + (z * t))
else
tmp = (x * y) + (a * b)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x * y) <= -2e+192) {
tmp = x * (y + (a * (b / x)));
} else if ((x * y) <= 1e+113) {
tmp = (c * i) + ((a * b) + (z * t));
} else {
tmp = (x * y) + (a * b);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x * y) <= -2e+192: tmp = x * (y + (a * (b / x))) elif (x * y) <= 1e+113: tmp = (c * i) + ((a * b) + (z * t)) else: tmp = (x * y) + (a * b) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(x * y) <= -2e+192) tmp = Float64(x * Float64(y + Float64(a * Float64(b / x)))); elseif (Float64(x * y) <= 1e+113) tmp = Float64(Float64(c * i) + Float64(Float64(a * b) + Float64(z * t))); else tmp = Float64(Float64(x * y) + Float64(a * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x * y) <= -2e+192) tmp = x * (y + (a * (b / x))); elseif ((x * y) <= 1e+113) tmp = (c * i) + ((a * b) + (z * t)); else tmp = (x * y) + (a * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(x * y), $MachinePrecision], -2e+192], N[(x * N[(y + N[(a * N[(b / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 1e+113], N[(N[(c * i), $MachinePrecision] + N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -2 \cdot 10^{+192}:\\
\;\;\;\;x \cdot \left(y + a \cdot \frac{b}{x}\right)\\
\mathbf{elif}\;x \cdot y \leq 10^{+113}:\\
\;\;\;\;c \cdot i + \left(a \cdot b + z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot y + a \cdot b\\
\end{array}
\end{array}
if (*.f64 x y) < -2.00000000000000008e192Initial program 87.9%
Taylor expanded in z around inf 80.9%
Taylor expanded in z around 0 87.9%
Taylor expanded in c around 0 95.9%
Taylor expanded in x around inf 96.0%
associate-/l*96.0%
Simplified96.0%
if -2.00000000000000008e192 < (*.f64 x y) < 1e113Initial program 96.7%
Taylor expanded in x around 0 84.4%
if 1e113 < (*.f64 x y) Initial program 91.3%
Taylor expanded in z around inf 76.7%
Taylor expanded in z around 0 91.5%
Taylor expanded in c around 0 87.4%
Final simplification86.1%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= t -0.98)
(+ (* c i) (* z (+ t (/ (* x y) z))))
(if (<= t 9.4e+142)
(+ (* c i) (+ (* x y) (* a b)))
(+ (* c i) (+ (* a b) (* z t))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (t <= -0.98) {
tmp = (c * i) + (z * (t + ((x * y) / z)));
} else if (t <= 9.4e+142) {
tmp = (c * i) + ((x * y) + (a * b));
} else {
tmp = (c * i) + ((a * b) + (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 (t <= (-0.98d0)) then
tmp = (c * i) + (z * (t + ((x * y) / z)))
else if (t <= 9.4d+142) then
tmp = (c * i) + ((x * y) + (a * b))
else
tmp = (c * i) + ((a * b) + (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 (t <= -0.98) {
tmp = (c * i) + (z * (t + ((x * y) / z)));
} else if (t <= 9.4e+142) {
tmp = (c * i) + ((x * y) + (a * b));
} else {
tmp = (c * i) + ((a * b) + (z * t));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if t <= -0.98: tmp = (c * i) + (z * (t + ((x * y) / z))) elif t <= 9.4e+142: tmp = (c * i) + ((x * y) + (a * b)) else: tmp = (c * i) + ((a * b) + (z * t)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (t <= -0.98) tmp = Float64(Float64(c * i) + Float64(z * Float64(t + Float64(Float64(x * y) / z)))); elseif (t <= 9.4e+142) tmp = Float64(Float64(c * i) + Float64(Float64(x * y) + Float64(a * b))); else tmp = Float64(Float64(c * i) + Float64(Float64(a * b) + Float64(z * t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (t <= -0.98) tmp = (c * i) + (z * (t + ((x * y) / z))); elseif (t <= 9.4e+142) tmp = (c * i) + ((x * y) + (a * b)); else tmp = (c * i) + ((a * b) + (z * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[t, -0.98], N[(N[(c * i), $MachinePrecision] + N[(z * N[(t + N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.4e+142], N[(N[(c * i), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(c * i), $MachinePrecision] + N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -0.98:\\
\;\;\;\;c \cdot i + z \cdot \left(t + \frac{x \cdot y}{z}\right)\\
\mathbf{elif}\;t \leq 9.4 \cdot 10^{+142}:\\
\;\;\;\;c \cdot i + \left(x \cdot y + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;c \cdot i + \left(a \cdot b + z \cdot t\right)\\
\end{array}
\end{array}
if t < -0.97999999999999998Initial program 92.0%
Taylor expanded in z around inf 88.3%
Taylor expanded in a around 0 79.2%
if -0.97999999999999998 < t < 9.4e142Initial program 95.8%
Taylor expanded in z around 0 88.6%
if 9.4e142 < t Initial program 97.1%
Taylor expanded in x around 0 91.5%
Final simplification86.2%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= t -29.0)
(+ (* c i) (* z t))
(if (<= t 3.7e+142)
(+ (* c i) (+ (* x y) (* a b)))
(+ (* c i) (+ (* a b) (* z t))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (t <= -29.0) {
tmp = (c * i) + (z * t);
} else if (t <= 3.7e+142) {
tmp = (c * i) + ((x * y) + (a * b));
} else {
tmp = (c * i) + ((a * b) + (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 (t <= (-29.0d0)) then
tmp = (c * i) + (z * t)
else if (t <= 3.7d+142) then
tmp = (c * i) + ((x * y) + (a * b))
else
tmp = (c * i) + ((a * b) + (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 (t <= -29.0) {
tmp = (c * i) + (z * t);
} else if (t <= 3.7e+142) {
tmp = (c * i) + ((x * y) + (a * b));
} else {
tmp = (c * i) + ((a * b) + (z * t));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if t <= -29.0: tmp = (c * i) + (z * t) elif t <= 3.7e+142: tmp = (c * i) + ((x * y) + (a * b)) else: tmp = (c * i) + ((a * b) + (z * t)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (t <= -29.0) tmp = Float64(Float64(c * i) + Float64(z * t)); elseif (t <= 3.7e+142) tmp = Float64(Float64(c * i) + Float64(Float64(x * y) + Float64(a * b))); else tmp = Float64(Float64(c * i) + Float64(Float64(a * b) + Float64(z * t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (t <= -29.0) tmp = (c * i) + (z * t); elseif (t <= 3.7e+142) tmp = (c * i) + ((x * y) + (a * b)); else tmp = (c * i) + ((a * b) + (z * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[t, -29.0], N[(N[(c * i), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.7e+142], N[(N[(c * i), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(c * i), $MachinePrecision] + N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -29:\\
\;\;\;\;c \cdot i + z \cdot t\\
\mathbf{elif}\;t \leq 3.7 \cdot 10^{+142}:\\
\;\;\;\;c \cdot i + \left(x \cdot y + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;c \cdot i + \left(a \cdot b + z \cdot t\right)\\
\end{array}
\end{array}
if t < -29Initial program 92.0%
Taylor expanded in x around 0 75.3%
Taylor expanded in a around 0 66.2%
if -29 < t < 3.6999999999999997e142Initial program 95.8%
Taylor expanded in z around 0 88.6%
if 3.6999999999999997e142 < t Initial program 97.1%
Taylor expanded in x around 0 91.5%
Final simplification82.4%
(FPCore (x y z t a b c i) :precision binary64 (if (<= (* c i) -2.2e+191) (+ (* c i) (* z t)) (if (<= (* c i) 1.9e+46) (+ (* x y) (* a b)) (+ (* a b) (* c i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c * i) <= -2.2e+191) {
tmp = (c * i) + (z * t);
} else if ((c * i) <= 1.9e+46) {
tmp = (x * y) + (a * b);
} else {
tmp = (a * b) + (c * i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((c * i) <= (-2.2d+191)) then
tmp = (c * i) + (z * t)
else if ((c * i) <= 1.9d+46) then
tmp = (x * y) + (a * b)
else
tmp = (a * b) + (c * i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c * i) <= -2.2e+191) {
tmp = (c * i) + (z * t);
} else if ((c * i) <= 1.9e+46) {
tmp = (x * y) + (a * b);
} else {
tmp = (a * b) + (c * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c * i) <= -2.2e+191: tmp = (c * i) + (z * t) elif (c * i) <= 1.9e+46: tmp = (x * y) + (a * b) else: tmp = (a * b) + (c * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(c * i) <= -2.2e+191) tmp = Float64(Float64(c * i) + Float64(z * t)); elseif (Float64(c * i) <= 1.9e+46) tmp = Float64(Float64(x * y) + Float64(a * b)); else tmp = Float64(Float64(a * b) + Float64(c * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((c * i) <= -2.2e+191) tmp = (c * i) + (z * t); elseif ((c * i) <= 1.9e+46) tmp = (x * y) + (a * b); else tmp = (a * b) + (c * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(c * i), $MachinePrecision], -2.2e+191], N[(N[(c * i), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 1.9e+46], N[(N[(x * y), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision], N[(N[(a * b), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \cdot i \leq -2.2 \cdot 10^{+191}:\\
\;\;\;\;c \cdot i + z \cdot t\\
\mathbf{elif}\;c \cdot i \leq 1.9 \cdot 10^{+46}:\\
\;\;\;\;x \cdot y + a \cdot b\\
\mathbf{else}:\\
\;\;\;\;a \cdot b + c \cdot i\\
\end{array}
\end{array}
if (*.f64 c i) < -2.2e191Initial program 91.7%
Taylor expanded in x around 0 87.9%
Taylor expanded in a around 0 92.1%
if -2.2e191 < (*.f64 c i) < 1.9e46Initial program 98.3%
Taylor expanded in z around inf 93.0%
Taylor expanded in z around 0 74.7%
Taylor expanded in c around 0 69.4%
if 1.9e46 < (*.f64 c i) Initial program 85.4%
Taylor expanded in x around 0 76.8%
Taylor expanded in t around 0 67.0%
Final simplification71.0%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (* c i) -1.2e+142) (not (<= (* c i) 3.8e+43))) (* c i) (* a b)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((c * i) <= -1.2e+142) || !((c * i) <= 3.8e+43)) {
tmp = c * i;
} else {
tmp = a * b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (((c * i) <= (-1.2d+142)) .or. (.not. ((c * i) <= 3.8d+43))) then
tmp = c * i
else
tmp = a * b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((c * i) <= -1.2e+142) || !((c * i) <= 3.8e+43)) {
tmp = c * i;
} else {
tmp = a * b;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((c * i) <= -1.2e+142) or not ((c * i) <= 3.8e+43): tmp = c * i else: tmp = a * b return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(c * i) <= -1.2e+142) || !(Float64(c * i) <= 3.8e+43)) tmp = Float64(c * i); else tmp = Float64(a * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (((c * i) <= -1.2e+142) || ~(((c * i) <= 3.8e+43))) tmp = c * i; else tmp = a * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(c * i), $MachinePrecision], -1.2e+142], N[Not[LessEqual[N[(c * i), $MachinePrecision], 3.8e+43]], $MachinePrecision]], N[(c * i), $MachinePrecision], N[(a * b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \cdot i \leq -1.2 \cdot 10^{+142} \lor \neg \left(c \cdot i \leq 3.8 \cdot 10^{+43}\right):\\
\;\;\;\;c \cdot i\\
\mathbf{else}:\\
\;\;\;\;a \cdot b\\
\end{array}
\end{array}
if (*.f64 c i) < -1.2e142 or 3.80000000000000008e43 < (*.f64 c i) Initial program 88.5%
Taylor expanded in c around inf 51.9%
if -1.2e142 < (*.f64 c i) < 3.80000000000000008e43Initial program 98.2%
Taylor expanded in a around inf 35.5%
Final simplification41.1%
(FPCore (x y z t a b c i) :precision binary64 (* a b))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a * b;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = a * b
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a * b;
}
def code(x, y, z, t, a, b, c, i): return a * b
function code(x, y, z, t, a, b, c, i) return Float64(a * b) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = a * b; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(a * b), $MachinePrecision]
\begin{array}{l}
\\
a \cdot b
\end{array}
Initial program 94.9%
Taylor expanded in a around inf 28.4%
herbie shell --seed 2024100
(FPCore (x y z t a b c i)
:name "Linear.V4:$cdot from linear-1.19.1.3, C"
:precision binary64
(+ (+ (+ (* x y) (* z t)) (* a b)) (* c i)))