
(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 15 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 (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 96.5%
+-commutative96.5%
fma-define97.7%
+-commutative97.7%
fma-define98.4%
fma-define98.8%
Simplified98.8%
(FPCore (x y z t a b c i) :precision binary64 (+ (fma 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 fma(x, y, (z * t)) + ((a * b) + (c * i));
}
function code(x, y, z, t, a, b, c, i) return Float64(fma(x, y, Float64(z * t)) + Float64(Float64(a * b) + Float64(c * i))) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(x * y + N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(N[(a * b), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(x, y, z \cdot t\right) + \left(a \cdot b + c \cdot i\right)
\end{array}
Initial program 96.5%
associate-+l+96.5%
fma-define96.9%
Simplified96.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* a b) (* z t))))
(if (<= (* c i) -2.55e+95)
(+ (* a b) (* c i))
(if (<= (* c i) -1.12e-113)
t_1
(if (<= (* c i) -5e-322)
(+ (* a b) (* x y))
(if (<= (* c i) 0.009)
t_1
(if (<= (* c i) 1.05e+121)
(+ (* x y) (* z t))
(+ (* c i) (* z t)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (a * b) + (z * t);
double tmp;
if ((c * i) <= -2.55e+95) {
tmp = (a * b) + (c * i);
} else if ((c * i) <= -1.12e-113) {
tmp = t_1;
} else if ((c * i) <= -5e-322) {
tmp = (a * b) + (x * y);
} else if ((c * i) <= 0.009) {
tmp = t_1;
} else if ((c * i) <= 1.05e+121) {
tmp = (x * y) + (z * t);
} else {
tmp = (c * i) + (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) :: t_1
real(8) :: tmp
t_1 = (a * b) + (z * t)
if ((c * i) <= (-2.55d+95)) then
tmp = (a * b) + (c * i)
else if ((c * i) <= (-1.12d-113)) then
tmp = t_1
else if ((c * i) <= (-5d-322)) then
tmp = (a * b) + (x * y)
else if ((c * i) <= 0.009d0) then
tmp = t_1
else if ((c * i) <= 1.05d+121) then
tmp = (x * y) + (z * t)
else
tmp = (c * i) + (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 t_1 = (a * b) + (z * t);
double tmp;
if ((c * i) <= -2.55e+95) {
tmp = (a * b) + (c * i);
} else if ((c * i) <= -1.12e-113) {
tmp = t_1;
} else if ((c * i) <= -5e-322) {
tmp = (a * b) + (x * y);
} else if ((c * i) <= 0.009) {
tmp = t_1;
} else if ((c * i) <= 1.05e+121) {
tmp = (x * y) + (z * t);
} else {
tmp = (c * i) + (z * t);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (a * b) + (z * t) tmp = 0 if (c * i) <= -2.55e+95: tmp = (a * b) + (c * i) elif (c * i) <= -1.12e-113: tmp = t_1 elif (c * i) <= -5e-322: tmp = (a * b) + (x * y) elif (c * i) <= 0.009: tmp = t_1 elif (c * i) <= 1.05e+121: tmp = (x * y) + (z * t) else: tmp = (c * i) + (z * t) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(a * b) + Float64(z * t)) tmp = 0.0 if (Float64(c * i) <= -2.55e+95) tmp = Float64(Float64(a * b) + Float64(c * i)); elseif (Float64(c * i) <= -1.12e-113) tmp = t_1; elseif (Float64(c * i) <= -5e-322) tmp = Float64(Float64(a * b) + Float64(x * y)); elseif (Float64(c * i) <= 0.009) tmp = t_1; elseif (Float64(c * i) <= 1.05e+121) tmp = Float64(Float64(x * y) + Float64(z * t)); else tmp = Float64(Float64(c * i) + Float64(z * t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (a * b) + (z * t); tmp = 0.0; if ((c * i) <= -2.55e+95) tmp = (a * b) + (c * i); elseif ((c * i) <= -1.12e-113) tmp = t_1; elseif ((c * i) <= -5e-322) tmp = (a * b) + (x * y); elseif ((c * i) <= 0.009) tmp = t_1; elseif ((c * i) <= 1.05e+121) tmp = (x * y) + (z * t); else tmp = (c * i) + (z * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(c * i), $MachinePrecision], -2.55e+95], N[(N[(a * b), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], -1.12e-113], t$95$1, If[LessEqual[N[(c * i), $MachinePrecision], -5e-322], N[(N[(a * b), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 0.009], t$95$1, If[LessEqual[N[(c * i), $MachinePrecision], 1.05e+121], N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], N[(N[(c * i), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot b + z \cdot t\\
\mathbf{if}\;c \cdot i \leq -2.55 \cdot 10^{+95}:\\
\;\;\;\;a \cdot b + c \cdot i\\
\mathbf{elif}\;c \cdot i \leq -1.12 \cdot 10^{-113}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \cdot i \leq -5 \cdot 10^{-322}:\\
\;\;\;\;a \cdot b + x \cdot y\\
\mathbf{elif}\;c \cdot i \leq 0.009:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \cdot i \leq 1.05 \cdot 10^{+121}:\\
\;\;\;\;x \cdot y + z \cdot t\\
\mathbf{else}:\\
\;\;\;\;c \cdot i + z \cdot t\\
\end{array}
\end{array}
if (*.f64 c i) < -2.55000000000000001e95Initial program 92.5%
Taylor expanded in z around 0 83.2%
Taylor expanded in x around 0 73.5%
if -2.55000000000000001e95 < (*.f64 c i) < -1.1200000000000001e-113 or -4.99006e-322 < (*.f64 c i) < 0.00899999999999999932Initial program 99.1%
Taylor expanded in c around 0 95.2%
Taylor expanded in x around 0 74.6%
if -1.1200000000000001e-113 < (*.f64 c i) < -4.99006e-322Initial program 100.0%
Taylor expanded in c around 0 100.0%
Taylor expanded in t around 0 90.0%
if 0.00899999999999999932 < (*.f64 c i) < 1.0500000000000001e121Initial program 92.3%
Taylor expanded in c around 0 88.5%
Taylor expanded in a around 0 84.9%
if 1.0500000000000001e121 < (*.f64 c i) Initial program 93.5%
Taylor expanded in a around 0 86.9%
Taylor expanded in x around 0 78.6%
Final simplification77.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* a b) (* z t))) (t_2 (+ (* a b) (* x y))))
(if (<= (* c i) -1.45e+97)
(+ (* a b) (* c i))
(if (<= (* c i) -7.4e-115)
t_1
(if (<= (* c i) -5e-322)
t_2
(if (<= (* c i) 7.5e-72)
t_1
(if (<= (* c i) 9.2e+35) t_2 (+ (* c i) (* z t)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (a * b) + (z * t);
double t_2 = (a * b) + (x * y);
double tmp;
if ((c * i) <= -1.45e+97) {
tmp = (a * b) + (c * i);
} else if ((c * i) <= -7.4e-115) {
tmp = t_1;
} else if ((c * i) <= -5e-322) {
tmp = t_2;
} else if ((c * i) <= 7.5e-72) {
tmp = t_1;
} else if ((c * i) <= 9.2e+35) {
tmp = t_2;
} else {
tmp = (c * i) + (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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (a * b) + (z * t)
t_2 = (a * b) + (x * y)
if ((c * i) <= (-1.45d+97)) then
tmp = (a * b) + (c * i)
else if ((c * i) <= (-7.4d-115)) then
tmp = t_1
else if ((c * i) <= (-5d-322)) then
tmp = t_2
else if ((c * i) <= 7.5d-72) then
tmp = t_1
else if ((c * i) <= 9.2d+35) then
tmp = t_2
else
tmp = (c * i) + (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 t_1 = (a * b) + (z * t);
double t_2 = (a * b) + (x * y);
double tmp;
if ((c * i) <= -1.45e+97) {
tmp = (a * b) + (c * i);
} else if ((c * i) <= -7.4e-115) {
tmp = t_1;
} else if ((c * i) <= -5e-322) {
tmp = t_2;
} else if ((c * i) <= 7.5e-72) {
tmp = t_1;
} else if ((c * i) <= 9.2e+35) {
tmp = t_2;
} else {
tmp = (c * i) + (z * t);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (a * b) + (z * t) t_2 = (a * b) + (x * y) tmp = 0 if (c * i) <= -1.45e+97: tmp = (a * b) + (c * i) elif (c * i) <= -7.4e-115: tmp = t_1 elif (c * i) <= -5e-322: tmp = t_2 elif (c * i) <= 7.5e-72: tmp = t_1 elif (c * i) <= 9.2e+35: tmp = t_2 else: tmp = (c * i) + (z * t) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(a * b) + Float64(z * t)) t_2 = Float64(Float64(a * b) + Float64(x * y)) tmp = 0.0 if (Float64(c * i) <= -1.45e+97) tmp = Float64(Float64(a * b) + Float64(c * i)); elseif (Float64(c * i) <= -7.4e-115) tmp = t_1; elseif (Float64(c * i) <= -5e-322) tmp = t_2; elseif (Float64(c * i) <= 7.5e-72) tmp = t_1; elseif (Float64(c * i) <= 9.2e+35) tmp = t_2; else tmp = Float64(Float64(c * i) + Float64(z * t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (a * b) + (z * t); t_2 = (a * b) + (x * y); tmp = 0.0; if ((c * i) <= -1.45e+97) tmp = (a * b) + (c * i); elseif ((c * i) <= -7.4e-115) tmp = t_1; elseif ((c * i) <= -5e-322) tmp = t_2; elseif ((c * i) <= 7.5e-72) tmp = t_1; elseif ((c * i) <= 9.2e+35) tmp = t_2; else tmp = (c * i) + (z * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a * b), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(c * i), $MachinePrecision], -1.45e+97], N[(N[(a * b), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], -7.4e-115], t$95$1, If[LessEqual[N[(c * i), $MachinePrecision], -5e-322], t$95$2, If[LessEqual[N[(c * i), $MachinePrecision], 7.5e-72], t$95$1, If[LessEqual[N[(c * i), $MachinePrecision], 9.2e+35], t$95$2, N[(N[(c * i), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot b + z \cdot t\\
t_2 := a \cdot b + x \cdot y\\
\mathbf{if}\;c \cdot i \leq -1.45 \cdot 10^{+97}:\\
\;\;\;\;a \cdot b + c \cdot i\\
\mathbf{elif}\;c \cdot i \leq -7.4 \cdot 10^{-115}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \cdot i \leq -5 \cdot 10^{-322}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;c \cdot i \leq 7.5 \cdot 10^{-72}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \cdot i \leq 9.2 \cdot 10^{+35}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;c \cdot i + z \cdot t\\
\end{array}
\end{array}
if (*.f64 c i) < -1.44999999999999994e97Initial program 92.5%
Taylor expanded in z around 0 83.2%
Taylor expanded in x around 0 73.5%
if -1.44999999999999994e97 < (*.f64 c i) < -7.4e-115 or -4.99006e-322 < (*.f64 c i) < 7.5000000000000004e-72Initial program 99.1%
Taylor expanded in c around 0 95.8%
Taylor expanded in x around 0 75.8%
if -7.4e-115 < (*.f64 c i) < -4.99006e-322 or 7.5000000000000004e-72 < (*.f64 c i) < 9.1999999999999993e35Initial program 97.7%
Taylor expanded in c around 0 95.6%
Taylor expanded in t around 0 87.2%
if 9.1999999999999993e35 < (*.f64 c i) Initial program 93.5%
Taylor expanded in a around 0 88.7%
Taylor expanded in x around 0 75.9%
Final simplification77.4%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* a b) (* z t))) (t_2 (+ (* a b) (* c i))))
(if (<= (* c i) -3.05e+97)
t_2
(if (<= (* c i) -1.8e-113)
t_1
(if (<= (* c i) -5e-322)
(+ (* a b) (* x y))
(if (<= (* c i) 1.05e+127) 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 = (a * b) + (z * t);
double t_2 = (a * b) + (c * i);
double tmp;
if ((c * i) <= -3.05e+97) {
tmp = t_2;
} else if ((c * i) <= -1.8e-113) {
tmp = t_1;
} else if ((c * i) <= -5e-322) {
tmp = (a * b) + (x * y);
} else if ((c * i) <= 1.05e+127) {
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 = (a * b) + (z * t)
t_2 = (a * b) + (c * i)
if ((c * i) <= (-3.05d+97)) then
tmp = t_2
else if ((c * i) <= (-1.8d-113)) then
tmp = t_1
else if ((c * i) <= (-5d-322)) then
tmp = (a * b) + (x * y)
else if ((c * i) <= 1.05d+127) 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 = (a * b) + (z * t);
double t_2 = (a * b) + (c * i);
double tmp;
if ((c * i) <= -3.05e+97) {
tmp = t_2;
} else if ((c * i) <= -1.8e-113) {
tmp = t_1;
} else if ((c * i) <= -5e-322) {
tmp = (a * b) + (x * y);
} else if ((c * i) <= 1.05e+127) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (a * b) + (z * t) t_2 = (a * b) + (c * i) tmp = 0 if (c * i) <= -3.05e+97: tmp = t_2 elif (c * i) <= -1.8e-113: tmp = t_1 elif (c * i) <= -5e-322: tmp = (a * b) + (x * y) elif (c * i) <= 1.05e+127: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(a * b) + Float64(z * t)) t_2 = Float64(Float64(a * b) + Float64(c * i)) tmp = 0.0 if (Float64(c * i) <= -3.05e+97) tmp = t_2; elseif (Float64(c * i) <= -1.8e-113) tmp = t_1; elseif (Float64(c * i) <= -5e-322) tmp = Float64(Float64(a * b) + Float64(x * y)); elseif (Float64(c * i) <= 1.05e+127) 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 = (a * b) + (z * t); t_2 = (a * b) + (c * i); tmp = 0.0; if ((c * i) <= -3.05e+97) tmp = t_2; elseif ((c * i) <= -1.8e-113) tmp = t_1; elseif ((c * i) <= -5e-322) tmp = (a * b) + (x * y); elseif ((c * i) <= 1.05e+127) 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[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a * b), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(c * i), $MachinePrecision], -3.05e+97], t$95$2, If[LessEqual[N[(c * i), $MachinePrecision], -1.8e-113], t$95$1, If[LessEqual[N[(c * i), $MachinePrecision], -5e-322], N[(N[(a * b), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 1.05e+127], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot b + z \cdot t\\
t_2 := a \cdot b + c \cdot i\\
\mathbf{if}\;c \cdot i \leq -3.05 \cdot 10^{+97}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;c \cdot i \leq -1.8 \cdot 10^{-113}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \cdot i \leq -5 \cdot 10^{-322}:\\
\;\;\;\;a \cdot b + x \cdot y\\
\mathbf{elif}\;c \cdot i \leq 1.05 \cdot 10^{+127}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 c i) < -3.05e97 or 1.04999999999999996e127 < (*.f64 c i) Initial program 93.0%
Taylor expanded in z around 0 83.1%
Taylor expanded in x around 0 75.2%
if -3.05e97 < (*.f64 c i) < -1.79999999999999987e-113 or -4.99006e-322 < (*.f64 c i) < 1.04999999999999996e127Initial program 97.9%
Taylor expanded in c around 0 94.0%
Taylor expanded in x around 0 70.2%
if -1.79999999999999987e-113 < (*.f64 c i) < -4.99006e-322Initial program 100.0%
Taylor expanded in c around 0 100.0%
Taylor expanded in t around 0 90.0%
Final simplification74.1%
(FPCore (x y z t a b c i) :precision binary64 (let* ((t_1 (+ (* x y) (* z t))) (t_2 (+ (* c i) (+ (* a b) t_1)))) (if (<= t_2 INFINITY) t_2 t_1)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (x * y) + (z * t);
double t_2 = (c * i) + ((a * b) + t_1);
double tmp;
if (t_2 <= ((double) INFINITY)) {
tmp = t_2;
} else {
tmp = t_1;
}
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);
double t_2 = (c * i) + ((a * b) + t_1);
double tmp;
if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (x * y) + (z * t) t_2 = (c * i) + ((a * b) + t_1) tmp = 0 if t_2 <= math.inf: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(x * y) + Float64(z * t)) t_2 = Float64(Float64(c * i) + Float64(Float64(a * b) + t_1)) tmp = 0.0 if (t_2 <= Inf) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (x * y) + (z * t); t_2 = (c * i) + ((a * b) + t_1); tmp = 0.0; if (t_2 <= Inf) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(c * i), $MachinePrecision] + N[(N[(a * b), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, Infinity], t$95$2, t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot y + z \cdot t\\
t_2 := c \cdot i + \left(a \cdot b + t\_1\right)\\
\mathbf{if}\;t\_2 \leq \infty:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\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 c around 0 33.3%
Taylor expanded in a around 0 45.4%
Final simplification98.1%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= (* c i) -2.2e+96)
(* c i)
(if (<= (* c i) 0.24)
(* a b)
(if (<= (* c i) 9.5e+35)
(* x y)
(if (<= (* c i) 9.5e+120) (* 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+96) {
tmp = c * i;
} else if ((c * i) <= 0.24) {
tmp = a * b;
} else if ((c * i) <= 9.5e+35) {
tmp = x * y;
} else if ((c * i) <= 9.5e+120) {
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+96)) then
tmp = c * i
else if ((c * i) <= 0.24d0) then
tmp = a * b
else if ((c * i) <= 9.5d+35) then
tmp = x * y
else if ((c * i) <= 9.5d+120) 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+96) {
tmp = c * i;
} else if ((c * i) <= 0.24) {
tmp = a * b;
} else if ((c * i) <= 9.5e+35) {
tmp = x * y;
} else if ((c * i) <= 9.5e+120) {
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+96: tmp = c * i elif (c * i) <= 0.24: tmp = a * b elif (c * i) <= 9.5e+35: tmp = x * y elif (c * i) <= 9.5e+120: 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+96) tmp = Float64(c * i); elseif (Float64(c * i) <= 0.24) tmp = Float64(a * b); elseif (Float64(c * i) <= 9.5e+35) tmp = Float64(x * y); elseif (Float64(c * i) <= 9.5e+120) 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+96) tmp = c * i; elseif ((c * i) <= 0.24) tmp = a * b; elseif ((c * i) <= 9.5e+35) tmp = x * y; elseif ((c * i) <= 9.5e+120) 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+96], N[(c * i), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 0.24], N[(a * b), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 9.5e+35], N[(x * y), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 9.5e+120], N[(z * t), $MachinePrecision], N[(c * i), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \cdot i \leq -2.2 \cdot 10^{+96}:\\
\;\;\;\;c \cdot i\\
\mathbf{elif}\;c \cdot i \leq 0.24:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;c \cdot i \leq 9.5 \cdot 10^{+35}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;c \cdot i \leq 9.5 \cdot 10^{+120}:\\
\;\;\;\;z \cdot t\\
\mathbf{else}:\\
\;\;\;\;c \cdot i\\
\end{array}
\end{array}
if (*.f64 c i) < -2.1999999999999999e96 or 9.5e120 < (*.f64 c i) Initial program 92.0%
Taylor expanded in c around inf 64.6%
if -2.1999999999999999e96 < (*.f64 c i) < 0.23999999999999999Initial program 99.3%
Taylor expanded in a around inf 40.7%
if 0.23999999999999999 < (*.f64 c i) < 9.50000000000000062e35Initial program 90.0%
Taylor expanded in x around inf 70.4%
if 9.50000000000000062e35 < (*.f64 c i) < 9.5e120Initial program 100.0%
Taylor expanded in z around inf 65.8%
Final simplification51.4%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (* c i) -2.5e+169) (not (<= (* c i) 9.6e+120))) (+ (* c i) (+ (* a b) (* x y))) (+ (* a b) (+ (* x y) (* z t)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((c * i) <= -2.5e+169) || !((c * i) <= 9.6e+120)) {
tmp = (c * i) + ((a * b) + (x * y));
} else {
tmp = (a * b) + ((x * y) + (z * t));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (((c * i) <= (-2.5d+169)) .or. (.not. ((c * i) <= 9.6d+120))) then
tmp = (c * i) + ((a * b) + (x * y))
else
tmp = (a * b) + ((x * y) + (z * t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((c * i) <= -2.5e+169) || !((c * i) <= 9.6e+120)) {
tmp = (c * i) + ((a * b) + (x * y));
} else {
tmp = (a * b) + ((x * y) + (z * t));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((c * i) <= -2.5e+169) or not ((c * i) <= 9.6e+120): tmp = (c * i) + ((a * b) + (x * y)) else: tmp = (a * b) + ((x * y) + (z * t)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(c * i) <= -2.5e+169) || !(Float64(c * i) <= 9.6e+120)) tmp = Float64(Float64(c * i) + Float64(Float64(a * b) + Float64(x * y))); else tmp = Float64(Float64(a * b) + Float64(Float64(x * y) + Float64(z * t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (((c * i) <= -2.5e+169) || ~(((c * i) <= 9.6e+120))) tmp = (c * i) + ((a * b) + (x * y)); else tmp = (a * b) + ((x * y) + (z * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(c * i), $MachinePrecision], -2.5e+169], N[Not[LessEqual[N[(c * i), $MachinePrecision], 9.6e+120]], $MachinePrecision]], N[(N[(c * i), $MachinePrecision] + N[(N[(a * b), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * b), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \cdot i \leq -2.5 \cdot 10^{+169} \lor \neg \left(c \cdot i \leq 9.6 \cdot 10^{+120}\right):\\
\;\;\;\;c \cdot i + \left(a \cdot b + x \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot b + \left(x \cdot y + z \cdot t\right)\\
\end{array}
\end{array}
if (*.f64 c i) < -2.50000000000000009e169 or 9.60000000000000004e120 < (*.f64 c i) Initial program 90.9%
Taylor expanded in z around 0 84.6%
if -2.50000000000000009e169 < (*.f64 c i) < 9.60000000000000004e120Initial program 98.9%
Taylor expanded in c around 0 93.8%
Final simplification91.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* x y) (* z t))))
(if (<= (* c i) -3.3e+169)
(+ (* c i) (+ (* a b) (* x y)))
(if (<= (* c i) 1.35e+58) (+ (* a b) t_1) (+ (* c i) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (x * y) + (z * t);
double tmp;
if ((c * i) <= -3.3e+169) {
tmp = (c * i) + ((a * b) + (x * y));
} else if ((c * i) <= 1.35e+58) {
tmp = (a * b) + t_1;
} else {
tmp = (c * i) + t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = (x * y) + (z * t)
if ((c * i) <= (-3.3d+169)) then
tmp = (c * i) + ((a * b) + (x * y))
else if ((c * i) <= 1.35d+58) then
tmp = (a * b) + t_1
else
tmp = (c * i) + t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (x * y) + (z * t);
double tmp;
if ((c * i) <= -3.3e+169) {
tmp = (c * i) + ((a * b) + (x * y));
} else if ((c * i) <= 1.35e+58) {
tmp = (a * b) + t_1;
} else {
tmp = (c * i) + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (x * y) + (z * t) tmp = 0 if (c * i) <= -3.3e+169: tmp = (c * i) + ((a * b) + (x * y)) elif (c * i) <= 1.35e+58: tmp = (a * b) + t_1 else: tmp = (c * i) + t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(x * y) + Float64(z * t)) tmp = 0.0 if (Float64(c * i) <= -3.3e+169) tmp = Float64(Float64(c * i) + Float64(Float64(a * b) + Float64(x * y))); elseif (Float64(c * i) <= 1.35e+58) tmp = Float64(Float64(a * b) + t_1); else tmp = Float64(Float64(c * i) + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (x * y) + (z * t); tmp = 0.0; if ((c * i) <= -3.3e+169) tmp = (c * i) + ((a * b) + (x * y)); elseif ((c * i) <= 1.35e+58) tmp = (a * b) + t_1; else tmp = (c * i) + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(c * i), $MachinePrecision], -3.3e+169], N[(N[(c * i), $MachinePrecision] + N[(N[(a * b), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 1.35e+58], N[(N[(a * b), $MachinePrecision] + t$95$1), $MachinePrecision], N[(N[(c * i), $MachinePrecision] + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot y + z \cdot t\\
\mathbf{if}\;c \cdot i \leq -3.3 \cdot 10^{+169}:\\
\;\;\;\;c \cdot i + \left(a \cdot b + x \cdot y\right)\\
\mathbf{elif}\;c \cdot i \leq 1.35 \cdot 10^{+58}:\\
\;\;\;\;a \cdot b + t\_1\\
\mathbf{else}:\\
\;\;\;\;c \cdot i + t\_1\\
\end{array}
\end{array}
if (*.f64 c i) < -3.2999999999999997e169Initial program 90.0%
Taylor expanded in z around 0 90.0%
if -3.2999999999999997e169 < (*.f64 c i) < 1.3500000000000001e58Initial program 98.8%
Taylor expanded in c around 0 93.9%
if 1.3500000000000001e58 < (*.f64 c i) Initial program 93.1%
Taylor expanded in a around 0 89.6%
Final simplification92.5%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= (* c i) -2.2e+183)
(+ (* c i) (* x y))
(if (<= (* c i) 8.2e+118)
(+ (* a b) (+ (* x y) (* z t)))
(+ (* c i) (* z t)))))
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+183) {
tmp = (c * i) + (x * y);
} else if ((c * i) <= 8.2e+118) {
tmp = (a * b) + ((x * y) + (z * t));
} else {
tmp = (c * i) + (z * t);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((c * i) <= (-2.2d+183)) then
tmp = (c * i) + (x * y)
else if ((c * i) <= 8.2d+118) then
tmp = (a * b) + ((x * y) + (z * t))
else
tmp = (c * i) + (z * t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c * i) <= -2.2e+183) {
tmp = (c * i) + (x * y);
} else if ((c * i) <= 8.2e+118) {
tmp = (a * b) + ((x * y) + (z * t));
} else {
tmp = (c * i) + (z * t);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c * i) <= -2.2e+183: tmp = (c * i) + (x * y) elif (c * i) <= 8.2e+118: tmp = (a * b) + ((x * y) + (z * t)) else: tmp = (c * i) + (z * t) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(c * i) <= -2.2e+183) tmp = Float64(Float64(c * i) + Float64(x * y)); elseif (Float64(c * i) <= 8.2e+118) tmp = Float64(Float64(a * b) + Float64(Float64(x * y) + Float64(z * t))); else tmp = Float64(Float64(c * i) + Float64(z * t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((c * i) <= -2.2e+183) tmp = (c * i) + (x * y); elseif ((c * i) <= 8.2e+118) tmp = (a * b) + ((x * y) + (z * t)); else tmp = (c * i) + (z * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(c * i), $MachinePrecision], -2.2e+183], N[(N[(c * i), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 8.2e+118], N[(N[(a * b), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(c * i), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \cdot i \leq -2.2 \cdot 10^{+183}:\\
\;\;\;\;c \cdot i + x \cdot y\\
\mathbf{elif}\;c \cdot i \leq 8.2 \cdot 10^{+118}:\\
\;\;\;\;a \cdot b + \left(x \cdot y + z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;c \cdot i + z \cdot t\\
\end{array}
\end{array}
if (*.f64 c i) < -2.19999999999999991e183Initial program 89.3%
Taylor expanded in z around 0 89.3%
Taylor expanded in a around 0 82.7%
if -2.19999999999999991e183 < (*.f64 c i) < 8.1999999999999994e118Initial program 98.9%
Taylor expanded in c around 0 93.3%
if 8.1999999999999994e118 < (*.f64 c i) Initial program 91.8%
Taylor expanded in a around 0 87.7%
Taylor expanded in x around 0 77.9%
Final simplification89.2%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= (* c i) -8e+97)
(* c i)
(if (<= (* c i) 1.35e-176)
(* a b)
(if (<= (* c i) 5.5e+120) (* 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) <= -8e+97) {
tmp = c * i;
} else if ((c * i) <= 1.35e-176) {
tmp = a * b;
} else if ((c * i) <= 5.5e+120) {
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) <= (-8d+97)) then
tmp = c * i
else if ((c * i) <= 1.35d-176) then
tmp = a * b
else if ((c * i) <= 5.5d+120) 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) <= -8e+97) {
tmp = c * i;
} else if ((c * i) <= 1.35e-176) {
tmp = a * b;
} else if ((c * i) <= 5.5e+120) {
tmp = z * t;
} else {
tmp = c * i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c * i) <= -8e+97: tmp = c * i elif (c * i) <= 1.35e-176: tmp = a * b elif (c * i) <= 5.5e+120: 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) <= -8e+97) tmp = Float64(c * i); elseif (Float64(c * i) <= 1.35e-176) tmp = Float64(a * b); elseif (Float64(c * i) <= 5.5e+120) 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) <= -8e+97) tmp = c * i; elseif ((c * i) <= 1.35e-176) tmp = a * b; elseif ((c * i) <= 5.5e+120) 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], -8e+97], N[(c * i), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 1.35e-176], N[(a * b), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 5.5e+120], N[(z * t), $MachinePrecision], N[(c * i), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \cdot i \leq -8 \cdot 10^{+97}:\\
\;\;\;\;c \cdot i\\
\mathbf{elif}\;c \cdot i \leq 1.35 \cdot 10^{-176}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;c \cdot i \leq 5.5 \cdot 10^{+120}:\\
\;\;\;\;z \cdot t\\
\mathbf{else}:\\
\;\;\;\;c \cdot i\\
\end{array}
\end{array}
if (*.f64 c i) < -8.0000000000000006e97 or 5.50000000000000003e120 < (*.f64 c i) Initial program 92.0%
Taylor expanded in c around inf 64.6%
if -8.0000000000000006e97 < (*.f64 c i) < 1.3499999999999999e-176Initial program 100.0%
Taylor expanded in a around inf 42.1%
if 1.3499999999999999e-176 < (*.f64 c i) < 5.50000000000000003e120Initial program 96.4%
Taylor expanded in z around inf 42.8%
Final simplification49.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (* c i) -1.1e+96) (not (<= (* c i) 9.5e+120))) (+ (* 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 (((c * i) <= -1.1e+96) || !((c * i) <= 9.5e+120)) {
tmp = (a * b) + (c * i);
} else {
tmp = (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 (((c * i) <= (-1.1d+96)) .or. (.not. ((c * i) <= 9.5d+120))) then
tmp = (a * b) + (c * i)
else
tmp = (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 (((c * i) <= -1.1e+96) || !((c * i) <= 9.5e+120)) {
tmp = (a * b) + (c * i);
} else {
tmp = (a * b) + (z * t);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((c * i) <= -1.1e+96) or not ((c * i) <= 9.5e+120): tmp = (a * b) + (c * i) else: tmp = (a * b) + (z * t) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(c * i) <= -1.1e+96) || !(Float64(c * i) <= 9.5e+120)) tmp = Float64(Float64(a * b) + Float64(c * i)); else tmp = 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 (((c * i) <= -1.1e+96) || ~(((c * i) <= 9.5e+120))) tmp = (a * b) + (c * i); else tmp = (a * b) + (z * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(c * i), $MachinePrecision], -1.1e+96], N[Not[LessEqual[N[(c * i), $MachinePrecision], 9.5e+120]], $MachinePrecision]], N[(N[(a * b), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision], N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \cdot i \leq -1.1 \cdot 10^{+96} \lor \neg \left(c \cdot i \leq 9.5 \cdot 10^{+120}\right):\\
\;\;\;\;a \cdot b + c \cdot i\\
\mathbf{else}:\\
\;\;\;\;a \cdot b + z \cdot t\\
\end{array}
\end{array}
if (*.f64 c i) < -1.0999999999999999e96 or 9.5e120 < (*.f64 c i) Initial program 92.0%
Taylor expanded in z around 0 82.1%
Taylor expanded in x around 0 74.4%
if -1.0999999999999999e96 < (*.f64 c i) < 9.5e120Initial program 98.8%
Taylor expanded in c around 0 95.5%
Taylor expanded in x around 0 67.5%
Final simplification69.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (* x y) -1.15e+237) (not (<= (* x y) 7.8e+232))) (* x y) (+ (* 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 (((x * y) <= -1.15e+237) || !((x * y) <= 7.8e+232)) {
tmp = x * y;
} 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 (((x * y) <= (-1.15d+237)) .or. (.not. ((x * y) <= 7.8d+232))) then
tmp = x * y
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 (((x * y) <= -1.15e+237) || !((x * y) <= 7.8e+232)) {
tmp = x * y;
} else {
tmp = (a * b) + (c * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((x * y) <= -1.15e+237) or not ((x * y) <= 7.8e+232): tmp = x * y else: tmp = (a * b) + (c * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(x * y) <= -1.15e+237) || !(Float64(x * y) <= 7.8e+232)) tmp = Float64(x * y); 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 (((x * y) <= -1.15e+237) || ~(((x * y) <= 7.8e+232))) tmp = x * y; else tmp = (a * b) + (c * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(x * y), $MachinePrecision], -1.15e+237], N[Not[LessEqual[N[(x * y), $MachinePrecision], 7.8e+232]], $MachinePrecision]], N[(x * y), $MachinePrecision], N[(N[(a * b), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -1.15 \cdot 10^{+237} \lor \neg \left(x \cdot y \leq 7.8 \cdot 10^{+232}\right):\\
\;\;\;\;x \cdot y\\
\mathbf{else}:\\
\;\;\;\;a \cdot b + c \cdot i\\
\end{array}
\end{array}
if (*.f64 x y) < -1.14999999999999998e237 or 7.7999999999999998e232 < (*.f64 x y) Initial program 88.4%
Taylor expanded in x around inf 78.2%
if -1.14999999999999998e237 < (*.f64 x y) < 7.7999999999999998e232Initial program 98.1%
Taylor expanded in z around 0 71.2%
Taylor expanded in x around 0 58.8%
Final simplification62.1%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (* c i) -6.8e+97) (not (<= (* c i) 1.6e+58))) (* 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) <= -6.8e+97) || !((c * i) <= 1.6e+58)) {
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) <= (-6.8d+97)) .or. (.not. ((c * i) <= 1.6d+58))) 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) <= -6.8e+97) || !((c * i) <= 1.6e+58)) {
tmp = c * i;
} else {
tmp = a * b;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((c * i) <= -6.8e+97) or not ((c * i) <= 1.6e+58): 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) <= -6.8e+97) || !(Float64(c * i) <= 1.6e+58)) 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) <= -6.8e+97) || ~(((c * i) <= 1.6e+58))) 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], -6.8e+97], N[Not[LessEqual[N[(c * i), $MachinePrecision], 1.6e+58]], $MachinePrecision]], N[(c * i), $MachinePrecision], N[(a * b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \cdot i \leq -6.8 \cdot 10^{+97} \lor \neg \left(c \cdot i \leq 1.6 \cdot 10^{+58}\right):\\
\;\;\;\;c \cdot i\\
\mathbf{else}:\\
\;\;\;\;a \cdot b\\
\end{array}
\end{array}
if (*.f64 c i) < -6.8000000000000002e97 or 1.60000000000000008e58 < (*.f64 c i) Initial program 92.9%
Taylor expanded in c around inf 58.7%
if -6.8000000000000002e97 < (*.f64 c i) < 1.60000000000000008e58Initial program 98.7%
Taylor expanded in a around inf 39.2%
Final simplification46.7%
(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 96.5%
Taylor expanded in a around inf 29.5%
herbie shell --seed 2024137
(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)))