
(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 16 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 x y (fma z t (* a b)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return fma(c, i, fma(x, y, fma(z, t, (a * b))));
}
function code(x, y, z, t, a, b, c, i) return fma(c, i, fma(x, y, fma(z, t, Float64(a * b)))) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(c * i + N[(x * y + N[(z * t + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(c, i, \mathsf{fma}\left(x, y, \mathsf{fma}\left(z, t, a \cdot b\right)\right)\right)
\end{array}
Initial program 96.5%
+-commutative96.5%
fma-define96.9%
associate-+l+96.9%
fma-define98.0%
fma-define98.4%
Simplified98.4%
(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-define96.9%
+-commutative96.9%
fma-define97.3%
fma-define97.6%
Simplified97.6%
(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
(if (<= (* a b) -1.7e+226)
(* a b)
(if (<= (* a b) -1.15e-164)
(* z t)
(if (<= (* a b) -6.5e-299)
(* c i)
(if (<= (* a b) 8.2e-194)
(* z t)
(if (<= (* a b) 1.16e-35)
(* x y)
(if (<= (* a b) 2.1e+63) (* z t) (* a b))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((a * b) <= -1.7e+226) {
tmp = a * b;
} else if ((a * b) <= -1.15e-164) {
tmp = z * t;
} else if ((a * b) <= -6.5e-299) {
tmp = c * i;
} else if ((a * b) <= 8.2e-194) {
tmp = z * t;
} else if ((a * b) <= 1.16e-35) {
tmp = x * y;
} else if ((a * b) <= 2.1e+63) {
tmp = z * t;
} 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 ((a * b) <= (-1.7d+226)) then
tmp = a * b
else if ((a * b) <= (-1.15d-164)) then
tmp = z * t
else if ((a * b) <= (-6.5d-299)) then
tmp = c * i
else if ((a * b) <= 8.2d-194) then
tmp = z * t
else if ((a * b) <= 1.16d-35) then
tmp = x * y
else if ((a * b) <= 2.1d+63) then
tmp = z * t
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 ((a * b) <= -1.7e+226) {
tmp = a * b;
} else if ((a * b) <= -1.15e-164) {
tmp = z * t;
} else if ((a * b) <= -6.5e-299) {
tmp = c * i;
} else if ((a * b) <= 8.2e-194) {
tmp = z * t;
} else if ((a * b) <= 1.16e-35) {
tmp = x * y;
} else if ((a * b) <= 2.1e+63) {
tmp = z * t;
} else {
tmp = a * b;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (a * b) <= -1.7e+226: tmp = a * b elif (a * b) <= -1.15e-164: tmp = z * t elif (a * b) <= -6.5e-299: tmp = c * i elif (a * b) <= 8.2e-194: tmp = z * t elif (a * b) <= 1.16e-35: tmp = x * y elif (a * b) <= 2.1e+63: tmp = z * t else: tmp = a * b return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(a * b) <= -1.7e+226) tmp = Float64(a * b); elseif (Float64(a * b) <= -1.15e-164) tmp = Float64(z * t); elseif (Float64(a * b) <= -6.5e-299) tmp = Float64(c * i); elseif (Float64(a * b) <= 8.2e-194) tmp = Float64(z * t); elseif (Float64(a * b) <= 1.16e-35) tmp = Float64(x * y); elseif (Float64(a * b) <= 2.1e+63) tmp = Float64(z * t); 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 ((a * b) <= -1.7e+226) tmp = a * b; elseif ((a * b) <= -1.15e-164) tmp = z * t; elseif ((a * b) <= -6.5e-299) tmp = c * i; elseif ((a * b) <= 8.2e-194) tmp = z * t; elseif ((a * b) <= 1.16e-35) tmp = x * y; elseif ((a * b) <= 2.1e+63) tmp = z * t; else tmp = a * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(a * b), $MachinePrecision], -1.7e+226], N[(a * b), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], -1.15e-164], N[(z * t), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], -6.5e-299], N[(c * i), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 8.2e-194], N[(z * t), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 1.16e-35], N[(x * y), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 2.1e+63], N[(z * t), $MachinePrecision], N[(a * b), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -1.7 \cdot 10^{+226}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;a \cdot b \leq -1.15 \cdot 10^{-164}:\\
\;\;\;\;z \cdot t\\
\mathbf{elif}\;a \cdot b \leq -6.5 \cdot 10^{-299}:\\
\;\;\;\;c \cdot i\\
\mathbf{elif}\;a \cdot b \leq 8.2 \cdot 10^{-194}:\\
\;\;\;\;z \cdot t\\
\mathbf{elif}\;a \cdot b \leq 1.16 \cdot 10^{-35}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;a \cdot b \leq 2.1 \cdot 10^{+63}:\\
\;\;\;\;z \cdot t\\
\mathbf{else}:\\
\;\;\;\;a \cdot b\\
\end{array}
\end{array}
if (*.f64 a b) < -1.69999999999999989e226 or 2.1000000000000002e63 < (*.f64 a b) Initial program 93.2%
Taylor expanded in a around inf 77.6%
if -1.69999999999999989e226 < (*.f64 a b) < -1.14999999999999993e-164 or -6.4999999999999997e-299 < (*.f64 a b) < 8.2000000000000005e-194 or 1.16000000000000005e-35 < (*.f64 a b) < 2.1000000000000002e63Initial program 97.9%
Taylor expanded in z around inf 43.4%
if -1.14999999999999993e-164 < (*.f64 a b) < -6.4999999999999997e-299Initial program 100.0%
Taylor expanded in c around inf 58.9%
if 8.2000000000000005e-194 < (*.f64 a b) < 1.16000000000000005e-35Initial program 96.6%
Taylor expanded in x around inf 49.9%
Final simplification54.7%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= (* a b) -3e+215)
(* a b)
(if (<= (* a b) -8.2e-166)
(* z t)
(if (<= (* a b) -4.7e-302)
(* c i)
(if (<= (* a b) 4.6e-254)
(* z t)
(if (<= (* a b) 0.225)
(* c i)
(if (<= (* a b) 8.5e+63) (* z t) (* a b))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((a * b) <= -3e+215) {
tmp = a * b;
} else if ((a * b) <= -8.2e-166) {
tmp = z * t;
} else if ((a * b) <= -4.7e-302) {
tmp = c * i;
} else if ((a * b) <= 4.6e-254) {
tmp = z * t;
} else if ((a * b) <= 0.225) {
tmp = c * i;
} else if ((a * b) <= 8.5e+63) {
tmp = z * t;
} 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 ((a * b) <= (-3d+215)) then
tmp = a * b
else if ((a * b) <= (-8.2d-166)) then
tmp = z * t
else if ((a * b) <= (-4.7d-302)) then
tmp = c * i
else if ((a * b) <= 4.6d-254) then
tmp = z * t
else if ((a * b) <= 0.225d0) then
tmp = c * i
else if ((a * b) <= 8.5d+63) then
tmp = z * t
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 ((a * b) <= -3e+215) {
tmp = a * b;
} else if ((a * b) <= -8.2e-166) {
tmp = z * t;
} else if ((a * b) <= -4.7e-302) {
tmp = c * i;
} else if ((a * b) <= 4.6e-254) {
tmp = z * t;
} else if ((a * b) <= 0.225) {
tmp = c * i;
} else if ((a * b) <= 8.5e+63) {
tmp = z * t;
} else {
tmp = a * b;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (a * b) <= -3e+215: tmp = a * b elif (a * b) <= -8.2e-166: tmp = z * t elif (a * b) <= -4.7e-302: tmp = c * i elif (a * b) <= 4.6e-254: tmp = z * t elif (a * b) <= 0.225: tmp = c * i elif (a * b) <= 8.5e+63: tmp = z * t else: tmp = a * b return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(a * b) <= -3e+215) tmp = Float64(a * b); elseif (Float64(a * b) <= -8.2e-166) tmp = Float64(z * t); elseif (Float64(a * b) <= -4.7e-302) tmp = Float64(c * i); elseif (Float64(a * b) <= 4.6e-254) tmp = Float64(z * t); elseif (Float64(a * b) <= 0.225) tmp = Float64(c * i); elseif (Float64(a * b) <= 8.5e+63) tmp = Float64(z * t); 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 ((a * b) <= -3e+215) tmp = a * b; elseif ((a * b) <= -8.2e-166) tmp = z * t; elseif ((a * b) <= -4.7e-302) tmp = c * i; elseif ((a * b) <= 4.6e-254) tmp = z * t; elseif ((a * b) <= 0.225) tmp = c * i; elseif ((a * b) <= 8.5e+63) tmp = z * t; else tmp = a * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(a * b), $MachinePrecision], -3e+215], N[(a * b), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], -8.2e-166], N[(z * t), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], -4.7e-302], N[(c * i), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 4.6e-254], N[(z * t), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 0.225], N[(c * i), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 8.5e+63], N[(z * t), $MachinePrecision], N[(a * b), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -3 \cdot 10^{+215}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;a \cdot b \leq -8.2 \cdot 10^{-166}:\\
\;\;\;\;z \cdot t\\
\mathbf{elif}\;a \cdot b \leq -4.7 \cdot 10^{-302}:\\
\;\;\;\;c \cdot i\\
\mathbf{elif}\;a \cdot b \leq 4.6 \cdot 10^{-254}:\\
\;\;\;\;z \cdot t\\
\mathbf{elif}\;a \cdot b \leq 0.225:\\
\;\;\;\;c \cdot i\\
\mathbf{elif}\;a \cdot b \leq 8.5 \cdot 10^{+63}:\\
\;\;\;\;z \cdot t\\
\mathbf{else}:\\
\;\;\;\;a \cdot b\\
\end{array}
\end{array}
if (*.f64 a b) < -2.9999999999999999e215 or 8.5000000000000004e63 < (*.f64 a b) Initial program 93.2%
Taylor expanded in a around inf 77.6%
if -2.9999999999999999e215 < (*.f64 a b) < -8.1999999999999995e-166 or -4.7000000000000005e-302 < (*.f64 a b) < 4.5999999999999997e-254 or 0.225000000000000006 < (*.f64 a b) < 8.5000000000000004e63Initial program 98.4%
Taylor expanded in z around inf 44.1%
if -8.1999999999999995e-166 < (*.f64 a b) < -4.7000000000000005e-302 or 4.5999999999999997e-254 < (*.f64 a b) < 0.225000000000000006Initial program 96.1%
Taylor expanded in c around inf 45.5%
Final simplification54.1%
(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) -7.6e+140)
t_2
(if (<= (* c i) 6.5e-247)
t_1
(if (<= (* c i) 1.35e+35)
(+ (* a b) (* x y))
(if (<= (* c i) 3e+177)
t_1
(if (<= (* c i) 4.2e+196) (* x y) t_2)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (a * b) + (z * t);
double t_2 = (a * b) + (c * i);
double tmp;
if ((c * i) <= -7.6e+140) {
tmp = t_2;
} else if ((c * i) <= 6.5e-247) {
tmp = t_1;
} else if ((c * i) <= 1.35e+35) {
tmp = (a * b) + (x * y);
} else if ((c * i) <= 3e+177) {
tmp = t_1;
} else if ((c * i) <= 4.2e+196) {
tmp = x * y;
} 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) <= (-7.6d+140)) then
tmp = t_2
else if ((c * i) <= 6.5d-247) then
tmp = t_1
else if ((c * i) <= 1.35d+35) then
tmp = (a * b) + (x * y)
else if ((c * i) <= 3d+177) then
tmp = t_1
else if ((c * i) <= 4.2d+196) then
tmp = x * y
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) <= -7.6e+140) {
tmp = t_2;
} else if ((c * i) <= 6.5e-247) {
tmp = t_1;
} else if ((c * i) <= 1.35e+35) {
tmp = (a * b) + (x * y);
} else if ((c * i) <= 3e+177) {
tmp = t_1;
} else if ((c * i) <= 4.2e+196) {
tmp = x * y;
} 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) <= -7.6e+140: tmp = t_2 elif (c * i) <= 6.5e-247: tmp = t_1 elif (c * i) <= 1.35e+35: tmp = (a * b) + (x * y) elif (c * i) <= 3e+177: tmp = t_1 elif (c * i) <= 4.2e+196: tmp = x * y 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) <= -7.6e+140) tmp = t_2; elseif (Float64(c * i) <= 6.5e-247) tmp = t_1; elseif (Float64(c * i) <= 1.35e+35) tmp = Float64(Float64(a * b) + Float64(x * y)); elseif (Float64(c * i) <= 3e+177) tmp = t_1; elseif (Float64(c * i) <= 4.2e+196) tmp = Float64(x * y); 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) <= -7.6e+140) tmp = t_2; elseif ((c * i) <= 6.5e-247) tmp = t_1; elseif ((c * i) <= 1.35e+35) tmp = (a * b) + (x * y); elseif ((c * i) <= 3e+177) tmp = t_1; elseif ((c * i) <= 4.2e+196) tmp = x * y; 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], -7.6e+140], t$95$2, If[LessEqual[N[(c * i), $MachinePrecision], 6.5e-247], t$95$1, If[LessEqual[N[(c * i), $MachinePrecision], 1.35e+35], N[(N[(a * b), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 3e+177], t$95$1, If[LessEqual[N[(c * i), $MachinePrecision], 4.2e+196], N[(x * y), $MachinePrecision], 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 -7.6 \cdot 10^{+140}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;c \cdot i \leq 6.5 \cdot 10^{-247}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \cdot i \leq 1.35 \cdot 10^{+35}:\\
\;\;\;\;a \cdot b + x \cdot y\\
\mathbf{elif}\;c \cdot i \leq 3 \cdot 10^{+177}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \cdot i \leq 4.2 \cdot 10^{+196}:\\
\;\;\;\;x \cdot y\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 c i) < -7.6000000000000002e140 or 4.20000000000000029e196 < (*.f64 c i) Initial program 92.4%
Taylor expanded in x around 0 83.3%
Taylor expanded in t around 0 80.5%
if -7.6000000000000002e140 < (*.f64 c i) < 6.4999999999999996e-247 or 1.35000000000000001e35 < (*.f64 c i) < 3e177Initial program 97.8%
Taylor expanded in x around 0 80.4%
Taylor expanded in c around 0 72.2%
if 6.4999999999999996e-247 < (*.f64 c i) < 1.35000000000000001e35Initial program 98.0%
Taylor expanded in z around 0 78.1%
Taylor expanded in c around 0 74.0%
if 3e177 < (*.f64 c i) < 4.20000000000000029e196Initial program 99.5%
Taylor expanded in x around inf 100.0%
Final simplification75.0%
(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) -2.05e+137)
t_2
(if (<= (* c i) 2.5e-143)
t_1
(if (<= (* c i) 6.6e-85) (* x y) (if (<= (* c i) 2.1e+162) 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) <= -2.05e+137) {
tmp = t_2;
} else if ((c * i) <= 2.5e-143) {
tmp = t_1;
} else if ((c * i) <= 6.6e-85) {
tmp = x * y;
} else if ((c * i) <= 2.1e+162) {
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) <= (-2.05d+137)) then
tmp = t_2
else if ((c * i) <= 2.5d-143) then
tmp = t_1
else if ((c * i) <= 6.6d-85) then
tmp = x * y
else if ((c * i) <= 2.1d+162) 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) <= -2.05e+137) {
tmp = t_2;
} else if ((c * i) <= 2.5e-143) {
tmp = t_1;
} else if ((c * i) <= 6.6e-85) {
tmp = x * y;
} else if ((c * i) <= 2.1e+162) {
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) <= -2.05e+137: tmp = t_2 elif (c * i) <= 2.5e-143: tmp = t_1 elif (c * i) <= 6.6e-85: tmp = x * y elif (c * i) <= 2.1e+162: 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) <= -2.05e+137) tmp = t_2; elseif (Float64(c * i) <= 2.5e-143) tmp = t_1; elseif (Float64(c * i) <= 6.6e-85) tmp = Float64(x * y); elseif (Float64(c * i) <= 2.1e+162) 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) <= -2.05e+137) tmp = t_2; elseif ((c * i) <= 2.5e-143) tmp = t_1; elseif ((c * i) <= 6.6e-85) tmp = x * y; elseif ((c * i) <= 2.1e+162) 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], -2.05e+137], t$95$2, If[LessEqual[N[(c * i), $MachinePrecision], 2.5e-143], t$95$1, If[LessEqual[N[(c * i), $MachinePrecision], 6.6e-85], N[(x * y), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 2.1e+162], 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 -2.05 \cdot 10^{+137}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;c \cdot i \leq 2.5 \cdot 10^{-143}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \cdot i \leq 6.6 \cdot 10^{-85}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;c \cdot i \leq 2.1 \cdot 10^{+162}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 c i) < -2.04999999999999998e137 or 2.1e162 < (*.f64 c i) Initial program 93.0%
Taylor expanded in x around 0 80.5%
Taylor expanded in t around 0 76.6%
if -2.04999999999999998e137 < (*.f64 c i) < 2.5000000000000001e-143 or 6.59999999999999945e-85 < (*.f64 c i) < 2.1e162Initial program 97.7%
Taylor expanded in x around 0 76.3%
Taylor expanded in c around 0 70.5%
if 2.5000000000000001e-143 < (*.f64 c i) < 6.59999999999999945e-85Initial program 100.0%
Taylor expanded in x around inf 75.5%
Final simplification72.3%
(FPCore (x y z t a b c i) :precision binary64 (let* ((t_1 (+ (* c i) (+ (* a b) (+ (* x y) (* z t)))))) (if (<= t_1 INFINITY) t_1 (* i (+ c (/ (* z t) i))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (c * i) + ((a * b) + ((x * y) + (z * t)));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = i * (c + ((z * t) / i));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (c * i) + ((a * b) + ((x * y) + (z * t)));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = i * (c + ((z * t) / i));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (c * i) + ((a * b) + ((x * y) + (z * t))) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = i * (c + ((z * t) / i)) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(c * i) + Float64(Float64(a * b) + Float64(Float64(x * y) + Float64(z * t)))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(i * Float64(c + Float64(Float64(z * t) / i))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (c * i) + ((a * b) + ((x * y) + (z * t))); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = i * (c + ((z * t) / 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[(N[(a * b), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(i * N[(c + N[(N[(z * t), $MachinePrecision] / i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot i + \left(a \cdot b + \left(x \cdot y + z \cdot t\right)\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;i \cdot \left(c + \frac{z \cdot t}{i}\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 i around inf 11.1%
Taylor expanded in a around 0 33.3%
Taylor expanded in x around 0 45.0%
Final simplification98.0%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= (* c i) -4e+142)
(* i (+ c (/ (* z t) i)))
(if (<= (* c i) 5e-255)
(+ (* a b) (* z t))
(if (<= (* c i) 5e+94) (+ (* a b) (* x y)) (+ (* c i) (* x y))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c * i) <= -4e+142) {
tmp = i * (c + ((z * t) / i));
} else if ((c * i) <= 5e-255) {
tmp = (a * b) + (z * t);
} else if ((c * i) <= 5e+94) {
tmp = (a * b) + (x * y);
} else {
tmp = (c * i) + (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 ((c * i) <= (-4d+142)) then
tmp = i * (c + ((z * t) / i))
else if ((c * i) <= 5d-255) then
tmp = (a * b) + (z * t)
else if ((c * i) <= 5d+94) then
tmp = (a * b) + (x * y)
else
tmp = (c * i) + (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 ((c * i) <= -4e+142) {
tmp = i * (c + ((z * t) / i));
} else if ((c * i) <= 5e-255) {
tmp = (a * b) + (z * t);
} else if ((c * i) <= 5e+94) {
tmp = (a * b) + (x * y);
} else {
tmp = (c * i) + (x * y);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c * i) <= -4e+142: tmp = i * (c + ((z * t) / i)) elif (c * i) <= 5e-255: tmp = (a * b) + (z * t) elif (c * i) <= 5e+94: tmp = (a * b) + (x * y) else: tmp = (c * i) + (x * y) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(c * i) <= -4e+142) tmp = Float64(i * Float64(c + Float64(Float64(z * t) / i))); elseif (Float64(c * i) <= 5e-255) tmp = Float64(Float64(a * b) + Float64(z * t)); elseif (Float64(c * i) <= 5e+94) tmp = Float64(Float64(a * b) + Float64(x * y)); else tmp = Float64(Float64(c * i) + Float64(x * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((c * i) <= -4e+142) tmp = i * (c + ((z * t) / i)); elseif ((c * i) <= 5e-255) tmp = (a * b) + (z * t); elseif ((c * i) <= 5e+94) tmp = (a * b) + (x * y); else tmp = (c * i) + (x * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(c * i), $MachinePrecision], -4e+142], N[(i * N[(c + N[(N[(z * t), $MachinePrecision] / i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 5e-255], N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 5e+94], N[(N[(a * b), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision], N[(N[(c * i), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \cdot i \leq -4 \cdot 10^{+142}:\\
\;\;\;\;i \cdot \left(c + \frac{z \cdot t}{i}\right)\\
\mathbf{elif}\;c \cdot i \leq 5 \cdot 10^{-255}:\\
\;\;\;\;a \cdot b + z \cdot t\\
\mathbf{elif}\;c \cdot i \leq 5 \cdot 10^{+94}:\\
\;\;\;\;a \cdot b + x \cdot y\\
\mathbf{else}:\\
\;\;\;\;c \cdot i + x \cdot y\\
\end{array}
\end{array}
if (*.f64 c i) < -4.0000000000000002e142Initial program 87.5%
Taylor expanded in i around inf 90.6%
Taylor expanded in a around 0 84.5%
Taylor expanded in x around 0 72.2%
if -4.0000000000000002e142 < (*.f64 c i) < 4.9999999999999996e-255Initial program 98.2%
Taylor expanded in x around 0 79.6%
Taylor expanded in c around 0 76.0%
if 4.9999999999999996e-255 < (*.f64 c i) < 5.0000000000000001e94Initial program 98.2%
Taylor expanded in z around 0 75.2%
Taylor expanded in c around 0 70.1%
if 5.0000000000000001e94 < (*.f64 c i) Initial program 96.5%
Taylor expanded in z around 0 88.1%
Taylor expanded in a around 0 82.9%
Final simplification75.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* c i) (* x y))))
(if (<= (* c i) -9.6e+139)
t_1
(if (<= (* c i) 4.75e-253)
(+ (* a b) (* z t))
(if (<= (* c i) 4.4e+94) (+ (* a b) (* x y)) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (c * i) + (x * y);
double tmp;
if ((c * i) <= -9.6e+139) {
tmp = t_1;
} else if ((c * i) <= 4.75e-253) {
tmp = (a * b) + (z * t);
} else if ((c * i) <= 4.4e+94) {
tmp = (a * b) + (x * y);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = (c * i) + (x * y)
if ((c * i) <= (-9.6d+139)) then
tmp = t_1
else if ((c * i) <= 4.75d-253) then
tmp = (a * b) + (z * t)
else if ((c * i) <= 4.4d+94) then
tmp = (a * b) + (x * y)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (c * i) + (x * y);
double tmp;
if ((c * i) <= -9.6e+139) {
tmp = t_1;
} else if ((c * i) <= 4.75e-253) {
tmp = (a * b) + (z * t);
} else if ((c * i) <= 4.4e+94) {
tmp = (a * b) + (x * y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (c * i) + (x * y) tmp = 0 if (c * i) <= -9.6e+139: tmp = t_1 elif (c * i) <= 4.75e-253: tmp = (a * b) + (z * t) elif (c * i) <= 4.4e+94: tmp = (a * b) + (x * y) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(c * i) + Float64(x * y)) tmp = 0.0 if (Float64(c * i) <= -9.6e+139) tmp = t_1; elseif (Float64(c * i) <= 4.75e-253) tmp = Float64(Float64(a * b) + Float64(z * t)); elseif (Float64(c * i) <= 4.4e+94) tmp = Float64(Float64(a * b) + Float64(x * y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (c * i) + (x * y); tmp = 0.0; if ((c * i) <= -9.6e+139) tmp = t_1; elseif ((c * i) <= 4.75e-253) tmp = (a * b) + (z * t); elseif ((c * i) <= 4.4e+94) tmp = (a * b) + (x * y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(c * i), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(c * i), $MachinePrecision], -9.6e+139], t$95$1, If[LessEqual[N[(c * i), $MachinePrecision], 4.75e-253], N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 4.4e+94], N[(N[(a * b), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot i + x \cdot y\\
\mathbf{if}\;c \cdot i \leq -9.6 \cdot 10^{+139}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \cdot i \leq 4.75 \cdot 10^{-253}:\\
\;\;\;\;a \cdot b + z \cdot t\\
\mathbf{elif}\;c \cdot i \leq 4.4 \cdot 10^{+94}:\\
\;\;\;\;a \cdot b + x \cdot y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 c i) < -9.60000000000000032e139 or 4.40000000000000024e94 < (*.f64 c i) Initial program 93.2%
Taylor expanded in z around 0 84.6%
Taylor expanded in a around 0 79.1%
if -9.60000000000000032e139 < (*.f64 c i) < 4.75e-253Initial program 98.2%
Taylor expanded in x around 0 79.6%
Taylor expanded in c around 0 76.0%
if 4.75e-253 < (*.f64 c i) < 4.40000000000000024e94Initial program 98.2%
Taylor expanded in z around 0 75.2%
Taylor expanded in c around 0 70.1%
Final simplification75.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* c i) (* z t))))
(if (<= (* c i) -3e+138)
t_1
(if (<= (* c i) 4.75e-253)
(+ (* a b) (* z t))
(if (<= (* c i) 5.5e+105) (+ (* a b) (* x y)) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (c * i) + (z * t);
double tmp;
if ((c * i) <= -3e+138) {
tmp = t_1;
} else if ((c * i) <= 4.75e-253) {
tmp = (a * b) + (z * t);
} else if ((c * i) <= 5.5e+105) {
tmp = (a * b) + (x * y);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = (c * i) + (z * t)
if ((c * i) <= (-3d+138)) then
tmp = t_1
else if ((c * i) <= 4.75d-253) then
tmp = (a * b) + (z * t)
else if ((c * i) <= 5.5d+105) then
tmp = (a * b) + (x * y)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (c * i) + (z * t);
double tmp;
if ((c * i) <= -3e+138) {
tmp = t_1;
} else if ((c * i) <= 4.75e-253) {
tmp = (a * b) + (z * t);
} else if ((c * i) <= 5.5e+105) {
tmp = (a * b) + (x * y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (c * i) + (z * t) tmp = 0 if (c * i) <= -3e+138: tmp = t_1 elif (c * i) <= 4.75e-253: tmp = (a * b) + (z * t) elif (c * i) <= 5.5e+105: tmp = (a * b) + (x * y) else: tmp = t_1 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) <= -3e+138) tmp = t_1; elseif (Float64(c * i) <= 4.75e-253) tmp = Float64(Float64(a * b) + Float64(z * t)); elseif (Float64(c * i) <= 5.5e+105) tmp = Float64(Float64(a * b) + Float64(x * y)); else tmp = t_1; 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) <= -3e+138) tmp = t_1; elseif ((c * i) <= 4.75e-253) tmp = (a * b) + (z * t); elseif ((c * i) <= 5.5e+105) tmp = (a * b) + (x * y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(c * i), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(c * i), $MachinePrecision], -3e+138], t$95$1, If[LessEqual[N[(c * i), $MachinePrecision], 4.75e-253], N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 5.5e+105], N[(N[(a * b), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot i + z \cdot t\\
\mathbf{if}\;c \cdot i \leq -3 \cdot 10^{+138}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \cdot i \leq 4.75 \cdot 10^{-253}:\\
\;\;\;\;a \cdot b + z \cdot t\\
\mathbf{elif}\;c \cdot i \leq 5.5 \cdot 10^{+105}:\\
\;\;\;\;a \cdot b + x \cdot y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 c i) < -3.0000000000000001e138 or 5.49999999999999979e105 < (*.f64 c i) Initial program 92.9%
Taylor expanded in x around 0 81.2%
Taylor expanded in a around 0 74.5%
if -3.0000000000000001e138 < (*.f64 c i) < 4.75e-253Initial program 98.2%
Taylor expanded in x around 0 79.6%
Taylor expanded in c around 0 76.0%
if 4.75e-253 < (*.f64 c i) < 5.49999999999999979e105Initial program 98.4%
Taylor expanded in z around 0 76.8%
Taylor expanded in c around 0 70.4%
Final simplification74.1%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (* x y) -1.05e+102) (not (<= (* x y) 9.5e+65))) (+ (* c i) (+ (* a b) (* x y))) (+ (* a b) (+ (* 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 (((x * y) <= -1.05e+102) || !((x * y) <= 9.5e+65)) {
tmp = (c * i) + ((a * b) + (x * y));
} else {
tmp = (a * b) + ((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 (((x * y) <= (-1.05d+102)) .or. (.not. ((x * y) <= 9.5d+65))) then
tmp = (c * i) + ((a * b) + (x * y))
else
tmp = (a * b) + ((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 (((x * y) <= -1.05e+102) || !((x * y) <= 9.5e+65)) {
tmp = (c * i) + ((a * b) + (x * y));
} else {
tmp = (a * b) + ((c * i) + (z * t));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((x * y) <= -1.05e+102) or not ((x * y) <= 9.5e+65): tmp = (c * i) + ((a * b) + (x * y)) else: tmp = (a * b) + ((c * i) + (z * t)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(x * y) <= -1.05e+102) || !(Float64(x * y) <= 9.5e+65)) tmp = Float64(Float64(c * i) + Float64(Float64(a * b) + Float64(x * y))); else tmp = Float64(Float64(a * b) + 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 (((x * y) <= -1.05e+102) || ~(((x * y) <= 9.5e+65))) tmp = (c * i) + ((a * b) + (x * y)); else tmp = (a * b) + ((c * i) + (z * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(x * y), $MachinePrecision], -1.05e+102], N[Not[LessEqual[N[(x * y), $MachinePrecision], 9.5e+65]], $MachinePrecision]], N[(N[(c * i), $MachinePrecision] + N[(N[(a * b), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * b), $MachinePrecision] + N[(N[(c * i), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -1.05 \cdot 10^{+102} \lor \neg \left(x \cdot y \leq 9.5 \cdot 10^{+65}\right):\\
\;\;\;\;c \cdot i + \left(a \cdot b + x \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot b + \left(c \cdot i + z \cdot t\right)\\
\end{array}
\end{array}
if (*.f64 x y) < -1.05000000000000001e102 or 9.5000000000000005e65 < (*.f64 x y) Initial program 91.8%
Taylor expanded in z around 0 85.1%
if -1.05000000000000001e102 < (*.f64 x y) < 9.5000000000000005e65Initial program 98.8%
Taylor expanded in x around 0 94.3%
Final simplification91.2%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= (* x y) -2.05e+175)
(+ (* c i) (* x y))
(if (<= (* x y) 4.2e+160)
(+ (* a b) (+ (* c i) (* z t)))
(+ (* 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 ((x * y) <= -2.05e+175) {
tmp = (c * i) + (x * y);
} else if ((x * y) <= 4.2e+160) {
tmp = (a * b) + ((c * i) + (z * t));
} else {
tmp = (a * b) + (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 ((x * y) <= (-2.05d+175)) then
tmp = (c * i) + (x * y)
else if ((x * y) <= 4.2d+160) then
tmp = (a * b) + ((c * i) + (z * t))
else
tmp = (a * b) + (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 ((x * y) <= -2.05e+175) {
tmp = (c * i) + (x * y);
} else if ((x * y) <= 4.2e+160) {
tmp = (a * b) + ((c * i) + (z * t));
} else {
tmp = (a * b) + (x * y);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x * y) <= -2.05e+175: tmp = (c * i) + (x * y) elif (x * y) <= 4.2e+160: tmp = (a * b) + ((c * i) + (z * t)) else: tmp = (a * b) + (x * y) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(x * y) <= -2.05e+175) tmp = Float64(Float64(c * i) + Float64(x * y)); elseif (Float64(x * y) <= 4.2e+160) tmp = Float64(Float64(a * b) + Float64(Float64(c * i) + Float64(z * t))); else tmp = Float64(Float64(a * b) + Float64(x * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x * y) <= -2.05e+175) tmp = (c * i) + (x * y); elseif ((x * y) <= 4.2e+160) tmp = (a * b) + ((c * i) + (z * t)); else tmp = (a * b) + (x * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(x * y), $MachinePrecision], -2.05e+175], N[(N[(c * i), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 4.2e+160], N[(N[(a * b), $MachinePrecision] + N[(N[(c * i), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * b), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -2.05 \cdot 10^{+175}:\\
\;\;\;\;c \cdot i + x \cdot y\\
\mathbf{elif}\;x \cdot y \leq 4.2 \cdot 10^{+160}:\\
\;\;\;\;a \cdot b + \left(c \cdot i + z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot b + x \cdot y\\
\end{array}
\end{array}
if (*.f64 x y) < -2.04999999999999989e175Initial program 90.3%
Taylor expanded in z around 0 87.2%
Taylor expanded in a around 0 87.2%
if -2.04999999999999989e175 < (*.f64 x y) < 4.19999999999999993e160Initial program 97.3%
Taylor expanded in x around 0 91.1%
if 4.19999999999999993e160 < (*.f64 x y) Initial program 97.4%
Taylor expanded in z around 0 87.6%
Taylor expanded in c around 0 85.5%
Final simplification89.8%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (* x y) -5.6e+173) (not (<= (* x y) 3.2e+158))) (* 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) <= -5.6e+173) || !((x * y) <= 3.2e+158)) {
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) <= (-5.6d+173)) .or. (.not. ((x * y) <= 3.2d+158))) 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) <= -5.6e+173) || !((x * y) <= 3.2e+158)) {
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) <= -5.6e+173) or not ((x * y) <= 3.2e+158): 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) <= -5.6e+173) || !(Float64(x * y) <= 3.2e+158)) 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) <= -5.6e+173) || ~(((x * y) <= 3.2e+158))) 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], -5.6e+173], N[Not[LessEqual[N[(x * y), $MachinePrecision], 3.2e+158]], $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 -5.6 \cdot 10^{+173} \lor \neg \left(x \cdot y \leq 3.2 \cdot 10^{+158}\right):\\
\;\;\;\;x \cdot y\\
\mathbf{else}:\\
\;\;\;\;a \cdot b + c \cdot i\\
\end{array}
\end{array}
if (*.f64 x y) < -5.59999999999999964e173 or 3.19999999999999995e158 < (*.f64 x y) Initial program 94.3%
Taylor expanded in x around inf 78.0%
if -5.59999999999999964e173 < (*.f64 x y) < 3.19999999999999995e158Initial program 97.3%
Taylor expanded in x around 0 91.1%
Taylor expanded in t around 0 63.4%
Final simplification67.3%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (* c i) -3.1e+139) (not (<= (* c i) 4e+94))) (* 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) <= -3.1e+139) || !((c * i) <= 4e+94)) {
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) <= (-3.1d+139)) .or. (.not. ((c * i) <= 4d+94))) 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) <= -3.1e+139) || !((c * i) <= 4e+94)) {
tmp = c * i;
} else {
tmp = a * b;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((c * i) <= -3.1e+139) or not ((c * i) <= 4e+94): 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) <= -3.1e+139) || !(Float64(c * i) <= 4e+94)) 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) <= -3.1e+139) || ~(((c * i) <= 4e+94))) 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], -3.1e+139], N[Not[LessEqual[N[(c * i), $MachinePrecision], 4e+94]], $MachinePrecision]], N[(c * i), $MachinePrecision], N[(a * b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \cdot i \leq -3.1 \cdot 10^{+139} \lor \neg \left(c \cdot i \leq 4 \cdot 10^{+94}\right):\\
\;\;\;\;c \cdot i\\
\mathbf{else}:\\
\;\;\;\;a \cdot b\\
\end{array}
\end{array}
if (*.f64 c i) < -3.1e139 or 4.0000000000000001e94 < (*.f64 c i) Initial program 93.2%
Taylor expanded in c around inf 62.6%
if -3.1e139 < (*.f64 c i) < 4.0000000000000001e94Initial program 98.2%
Taylor expanded in a around inf 38.6%
Final simplification46.9%
(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 30.1%
herbie shell --seed 2024101
(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)))