
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (* x y) (* z t)) (* a b)) (* c i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((x * y) + (z * t)) + (a * b)) + (c * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (((x * y) + (z * t)) + (a * b)) + (c * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((x * y) + (z * t)) + (a * b)) + (c * i);
}
def code(x, y, z, t, a, b, c, i): return (((x * y) + (z * t)) + (a * b)) + (c * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(x * y) + Float64(z * t)) + Float64(a * b)) + Float64(c * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((x * y) + (z * t)) + (a * b)) + (c * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (* x y) (* z t)) (* a b)) (* c i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((x * y) + (z * t)) + (a * b)) + (c * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (((x * y) + (z * t)) + (a * b)) + (c * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((x * y) + (z * t)) + (a * b)) + (c * i);
}
def code(x, y, z, t, a, b, c, i): return (((x * y) + (z * t)) + (a * b)) + (c * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(x * y) + Float64(z * t)) + Float64(a * b)) + Float64(c * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((x * y) + (z * t)) + (a * b)) + (c * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i
\end{array}
(FPCore (x y z t a b c i) :precision binary64 (let* ((t_1 (+ (+ (+ (* x y) (* z t)) (* a b)) (* c i)))) (if (<= t_1 INFINITY) t_1 (* i (+ c (* x (/ y i)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (((x * y) + (z * t)) + (a * b)) + (c * i);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = i * (c + (x * (y / 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 = (((x * y) + (z * t)) + (a * b)) + (c * i);
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = i * (c + (x * (y / i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (((x * y) + (z * t)) + (a * b)) + (c * i) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = i * (c + (x * (y / i))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(Float64(x * y) + Float64(z * t)) + Float64(a * b)) + Float64(c * i)) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(i * Float64(c + Float64(x * Float64(y / i)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (((x * y) + (z * t)) + (a * b)) + (c * i); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = i * (c + (x * (y / i))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(i * N[(c + N[(x * N[(y / i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;i \cdot \left(c + x \cdot \frac{y}{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 x around inf
*-lowering-*.f6450.0%
Simplified50.0%
Taylor expanded in i around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6462.5%
Simplified62.5%
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6475.0%
Applied egg-rr75.0%
Final simplification99.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* z t) (+ (* x y) (* a b)))))
(if (<= (* x y) (- INFINITY))
(* x y)
(if (<= (* x y) -2e+70)
t_1
(if (<= (* x y) 1e-48) (+ (* c i) (* b (+ a (/ (* z t) b)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (z * t) + ((x * y) + (a * b));
double tmp;
if ((x * y) <= -((double) INFINITY)) {
tmp = x * y;
} else if ((x * y) <= -2e+70) {
tmp = t_1;
} else if ((x * y) <= 1e-48) {
tmp = (c * i) + (b * (a + ((z * t) / b)));
} 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 = (z * t) + ((x * y) + (a * b));
double tmp;
if ((x * y) <= -Double.POSITIVE_INFINITY) {
tmp = x * y;
} else if ((x * y) <= -2e+70) {
tmp = t_1;
} else if ((x * y) <= 1e-48) {
tmp = (c * i) + (b * (a + ((z * t) / b)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (z * t) + ((x * y) + (a * b)) tmp = 0 if (x * y) <= -math.inf: tmp = x * y elif (x * y) <= -2e+70: tmp = t_1 elif (x * y) <= 1e-48: tmp = (c * i) + (b * (a + ((z * t) / b))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(z * t) + Float64(Float64(x * y) + Float64(a * b))) tmp = 0.0 if (Float64(x * y) <= Float64(-Inf)) tmp = Float64(x * y); elseif (Float64(x * y) <= -2e+70) tmp = t_1; elseif (Float64(x * y) <= 1e-48) tmp = Float64(Float64(c * i) + Float64(b * Float64(a + Float64(Float64(z * t) / b)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (z * t) + ((x * y) + (a * b)); tmp = 0.0; if ((x * y) <= -Inf) tmp = x * y; elseif ((x * y) <= -2e+70) tmp = t_1; elseif ((x * y) <= 1e-48) tmp = (c * i) + (b * (a + ((z * t) / b))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(z * t), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], (-Infinity)], N[(x * y), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -2e+70], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 1e-48], N[(N[(c * i), $MachinePrecision] + N[(b * N[(a + N[(N[(z * t), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot t + \left(x \cdot y + a \cdot b\right)\\
\mathbf{if}\;x \cdot y \leq -\infty:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;x \cdot y \leq -2 \cdot 10^{+70}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 10^{-48}:\\
\;\;\;\;c \cdot i + b \cdot \left(a + \frac{z \cdot t}{b}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 x y) < -inf.0Initial program 66.7%
Taylor expanded in x around inf
*-lowering-*.f64100.0%
Simplified100.0%
if -inf.0 < (*.f64 x y) < -2.00000000000000015e70 or 9.9999999999999997e-49 < (*.f64 x y) Initial program 97.4%
Taylor expanded in c around 0
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6489.3%
Simplified89.3%
if -2.00000000000000015e70 < (*.f64 x y) < 9.9999999999999997e-49Initial program 100.0%
Taylor expanded in b around -inf
mul-1-negN/A
distribute-rgt-neg-inN/A
distribute-lft-outN/A
mul-1-negN/A
remove-double-negN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6495.4%
Simplified95.4%
Taylor expanded in x around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6493.6%
Simplified93.6%
Final simplification92.0%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= (* c i) -5e+214)
(+ (* c i) (* z t))
(if (<= (* c i) 5e+155)
(+ (* z t) (+ (* x y) (* a b)))
(+ (* a b) (* c i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c * i) <= -5e+214) {
tmp = (c * i) + (z * t);
} else if ((c * i) <= 5e+155) {
tmp = (z * t) + ((x * y) + (a * b));
} else {
tmp = (a * b) + (c * i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((c * i) <= (-5d+214)) then
tmp = (c * i) + (z * t)
else if ((c * i) <= 5d+155) then
tmp = (z * t) + ((x * y) + (a * b))
else
tmp = (a * b) + (c * i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c * i) <= -5e+214) {
tmp = (c * i) + (z * t);
} else if ((c * i) <= 5e+155) {
tmp = (z * t) + ((x * y) + (a * b));
} else {
tmp = (a * b) + (c * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c * i) <= -5e+214: tmp = (c * i) + (z * t) elif (c * i) <= 5e+155: tmp = (z * t) + ((x * y) + (a * b)) else: tmp = (a * b) + (c * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(c * i) <= -5e+214) tmp = Float64(Float64(c * i) + Float64(z * t)); elseif (Float64(c * i) <= 5e+155) tmp = Float64(Float64(z * t) + Float64(Float64(x * y) + Float64(a * b))); else tmp = Float64(Float64(a * b) + Float64(c * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((c * i) <= -5e+214) tmp = (c * i) + (z * t); elseif ((c * i) <= 5e+155) tmp = (z * t) + ((x * y) + (a * b)); else tmp = (a * b) + (c * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(c * i), $MachinePrecision], -5e+214], N[(N[(c * i), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 5e+155], N[(N[(z * t), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * b), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \cdot i \leq -5 \cdot 10^{+214}:\\
\;\;\;\;c \cdot i + z \cdot t\\
\mathbf{elif}\;c \cdot i \leq 5 \cdot 10^{+155}:\\
\;\;\;\;z \cdot t + \left(x \cdot y + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot b + c \cdot i\\
\end{array}
\end{array}
if (*.f64 c i) < -4.99999999999999953e214Initial program 92.5%
Taylor expanded in z around inf
*-lowering-*.f6484.8%
Simplified84.8%
if -4.99999999999999953e214 < (*.f64 c i) < 4.9999999999999999e155Initial program 97.4%
Taylor expanded in c around 0
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6487.6%
Simplified87.6%
if 4.9999999999999999e155 < (*.f64 c i) Initial program 97.1%
Taylor expanded in a around inf
*-lowering-*.f6483.8%
Simplified83.8%
Final simplification86.8%
(FPCore (x y z t a b c i) :precision binary64 (if (<= (* x y) -1e+130) (+ (* x y) (* z t)) (if (<= (* x y) 20000.0) (+ (* c i) (* z t)) (+ (* x y) (* a b)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x * y) <= -1e+130) {
tmp = (x * y) + (z * t);
} else if ((x * y) <= 20000.0) {
tmp = (c * i) + (z * t);
} else {
tmp = (x * y) + (a * b);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x * y) <= (-1d+130)) then
tmp = (x * y) + (z * t)
else if ((x * y) <= 20000.0d0) then
tmp = (c * i) + (z * t)
else
tmp = (x * y) + (a * b)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x * y) <= -1e+130) {
tmp = (x * y) + (z * t);
} else if ((x * y) <= 20000.0) {
tmp = (c * i) + (z * t);
} else {
tmp = (x * y) + (a * b);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x * y) <= -1e+130: tmp = (x * y) + (z * t) elif (x * y) <= 20000.0: tmp = (c * i) + (z * t) else: tmp = (x * y) + (a * b) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(x * y) <= -1e+130) tmp = Float64(Float64(x * y) + Float64(z * t)); elseif (Float64(x * y) <= 20000.0) tmp = Float64(Float64(c * i) + Float64(z * t)); else tmp = Float64(Float64(x * y) + Float64(a * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x * y) <= -1e+130) tmp = (x * y) + (z * t); elseif ((x * y) <= 20000.0) tmp = (c * i) + (z * t); else tmp = (x * y) + (a * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(x * y), $MachinePrecision], -1e+130], N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 20000.0], N[(N[(c * i), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -1 \cdot 10^{+130}:\\
\;\;\;\;x \cdot y + z \cdot t\\
\mathbf{elif}\;x \cdot y \leq 20000:\\
\;\;\;\;c \cdot i + z \cdot t\\
\mathbf{else}:\\
\;\;\;\;x \cdot y + a \cdot b\\
\end{array}
\end{array}
if (*.f64 x y) < -1.0000000000000001e130Initial program 89.1%
Taylor expanded in c around 0
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6483.8%
Simplified83.8%
Taylor expanded in a around 0
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6483.6%
Simplified83.6%
if -1.0000000000000001e130 < (*.f64 x y) < 2e4Initial program 100.0%
Taylor expanded in z around inf
*-lowering-*.f6472.9%
Simplified72.9%
if 2e4 < (*.f64 x y) Initial program 95.5%
Taylor expanded in c around 0
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6489.7%
Simplified89.7%
Taylor expanded in t around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6477.4%
Simplified77.4%
Final simplification76.0%
(FPCore (x y z t a b c i) :precision binary64 (if (<= (* x y) -1.06e+127) (+ (* x y) (* c i)) (if (<= (* x y) 44000000.0) (+ (* c i) (* z t)) (+ (* x y) (* a b)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x * y) <= -1.06e+127) {
tmp = (x * y) + (c * i);
} else if ((x * y) <= 44000000.0) {
tmp = (c * i) + (z * t);
} else {
tmp = (x * y) + (a * b);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x * y) <= (-1.06d+127)) then
tmp = (x * y) + (c * i)
else if ((x * y) <= 44000000.0d0) then
tmp = (c * i) + (z * t)
else
tmp = (x * y) + (a * b)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x * y) <= -1.06e+127) {
tmp = (x * y) + (c * i);
} else if ((x * y) <= 44000000.0) {
tmp = (c * i) + (z * t);
} else {
tmp = (x * y) + (a * b);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x * y) <= -1.06e+127: tmp = (x * y) + (c * i) elif (x * y) <= 44000000.0: tmp = (c * i) + (z * t) else: tmp = (x * y) + (a * b) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(x * y) <= -1.06e+127) tmp = Float64(Float64(x * y) + Float64(c * i)); elseif (Float64(x * y) <= 44000000.0) tmp = Float64(Float64(c * i) + Float64(z * t)); else tmp = Float64(Float64(x * y) + Float64(a * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x * y) <= -1.06e+127) tmp = (x * y) + (c * i); elseif ((x * y) <= 44000000.0) tmp = (c * i) + (z * t); else tmp = (x * y) + (a * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(x * y), $MachinePrecision], -1.06e+127], N[(N[(x * y), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 44000000.0], N[(N[(c * i), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -1.06 \cdot 10^{+127}:\\
\;\;\;\;x \cdot y + c \cdot i\\
\mathbf{elif}\;x \cdot y \leq 44000000:\\
\;\;\;\;c \cdot i + z \cdot t\\
\mathbf{else}:\\
\;\;\;\;x \cdot y + a \cdot b\\
\end{array}
\end{array}
if (*.f64 x y) < -1.06000000000000006e127Initial program 89.1%
Taylor expanded in x around inf
*-lowering-*.f6480.9%
Simplified80.9%
if -1.06000000000000006e127 < (*.f64 x y) < 4.4e7Initial program 100.0%
Taylor expanded in z around inf
*-lowering-*.f6472.9%
Simplified72.9%
if 4.4e7 < (*.f64 x y) Initial program 95.5%
Taylor expanded in c around 0
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6489.7%
Simplified89.7%
Taylor expanded in t around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6477.4%
Simplified77.4%
Final simplification75.5%
(FPCore (x y z t a b c i) :precision binary64 (if (<= (* x y) -1.55e+130) (* x y) (if (<= (* x y) 650000000.0) (+ (* c i) (* z t)) (+ (* x y) (* a b)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x * y) <= -1.55e+130) {
tmp = x * y;
} else if ((x * y) <= 650000000.0) {
tmp = (c * i) + (z * t);
} else {
tmp = (x * y) + (a * b);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x * y) <= (-1.55d+130)) then
tmp = x * y
else if ((x * y) <= 650000000.0d0) then
tmp = (c * i) + (z * t)
else
tmp = (x * y) + (a * b)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x * y) <= -1.55e+130) {
tmp = x * y;
} else if ((x * y) <= 650000000.0) {
tmp = (c * i) + (z * t);
} else {
tmp = (x * y) + (a * b);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x * y) <= -1.55e+130: tmp = x * y elif (x * y) <= 650000000.0: tmp = (c * i) + (z * t) else: tmp = (x * y) + (a * b) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(x * y) <= -1.55e+130) tmp = Float64(x * y); elseif (Float64(x * y) <= 650000000.0) tmp = Float64(Float64(c * i) + Float64(z * t)); else tmp = Float64(Float64(x * y) + Float64(a * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x * y) <= -1.55e+130) tmp = x * y; elseif ((x * y) <= 650000000.0) tmp = (c * i) + (z * t); else tmp = (x * y) + (a * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(x * y), $MachinePrecision], -1.55e+130], N[(x * y), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 650000000.0], N[(N[(c * i), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -1.55 \cdot 10^{+130}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;x \cdot y \leq 650000000:\\
\;\;\;\;c \cdot i + z \cdot t\\
\mathbf{else}:\\
\;\;\;\;x \cdot y + a \cdot b\\
\end{array}
\end{array}
if (*.f64 x y) < -1.55e130Initial program 89.1%
Taylor expanded in x around inf
*-lowering-*.f6473.4%
Simplified73.4%
if -1.55e130 < (*.f64 x y) < 6.5e8Initial program 100.0%
Taylor expanded in z around inf
*-lowering-*.f6472.9%
Simplified72.9%
if 6.5e8 < (*.f64 x y) Initial program 95.5%
Taylor expanded in c around 0
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6489.7%
Simplified89.7%
Taylor expanded in t around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6477.4%
Simplified77.4%
Final simplification74.2%
(FPCore (x y z t a b c i) :precision binary64 (if (<= (* x y) -2.3e+128) (* x y) (if (<= (* x y) 1.75e+91) (+ (* a b) (* z t)) (+ (* x y) (* a b)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x * y) <= -2.3e+128) {
tmp = x * y;
} else if ((x * y) <= 1.75e+91) {
tmp = (a * b) + (z * t);
} else {
tmp = (x * y) + (a * b);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x * y) <= (-2.3d+128)) then
tmp = x * y
else if ((x * y) <= 1.75d+91) then
tmp = (a * b) + (z * t)
else
tmp = (x * y) + (a * b)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x * y) <= -2.3e+128) {
tmp = x * y;
} else if ((x * y) <= 1.75e+91) {
tmp = (a * b) + (z * t);
} else {
tmp = (x * y) + (a * b);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x * y) <= -2.3e+128: tmp = x * y elif (x * y) <= 1.75e+91: tmp = (a * b) + (z * t) else: tmp = (x * y) + (a * b) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(x * y) <= -2.3e+128) tmp = Float64(x * y); elseif (Float64(x * y) <= 1.75e+91) tmp = Float64(Float64(a * b) + Float64(z * t)); else tmp = Float64(Float64(x * y) + Float64(a * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x * y) <= -2.3e+128) tmp = x * y; elseif ((x * y) <= 1.75e+91) tmp = (a * b) + (z * t); else tmp = (x * y) + (a * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(x * y), $MachinePrecision], -2.3e+128], N[(x * y), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 1.75e+91], N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -2.3 \cdot 10^{+128}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;x \cdot y \leq 1.75 \cdot 10^{+91}:\\
\;\;\;\;a \cdot b + z \cdot t\\
\mathbf{else}:\\
\;\;\;\;x \cdot y + a \cdot b\\
\end{array}
\end{array}
if (*.f64 x y) < -2.29999999999999998e128Initial program 89.1%
Taylor expanded in x around inf
*-lowering-*.f6473.4%
Simplified73.4%
if -2.29999999999999998e128 < (*.f64 x y) < 1.75e91Initial program 99.4%
Taylor expanded in c around 0
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6469.2%
Simplified69.2%
Taylor expanded in a around inf
*-lowering-*.f6464.3%
Simplified64.3%
if 1.75e91 < (*.f64 x y) Initial program 96.0%
Taylor expanded in c around 0
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6490.1%
Simplified90.1%
Taylor expanded in t around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6484.2%
Simplified84.2%
Final simplification69.8%
(FPCore (x y z t a b c i) :precision binary64 (if (<= (* x y) -1.95e+129) (* x y) (if (<= (* x y) 0.042) (+ (* a b) (* c i)) (+ (* x y) (* a b)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x * y) <= -1.95e+129) {
tmp = x * y;
} else if ((x * y) <= 0.042) {
tmp = (a * b) + (c * i);
} else {
tmp = (x * y) + (a * b);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x * y) <= (-1.95d+129)) then
tmp = x * y
else if ((x * y) <= 0.042d0) then
tmp = (a * b) + (c * i)
else
tmp = (x * y) + (a * b)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x * y) <= -1.95e+129) {
tmp = x * y;
} else if ((x * y) <= 0.042) {
tmp = (a * b) + (c * i);
} else {
tmp = (x * y) + (a * b);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x * y) <= -1.95e+129: tmp = x * y elif (x * y) <= 0.042: tmp = (a * b) + (c * i) else: tmp = (x * y) + (a * b) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(x * y) <= -1.95e+129) tmp = Float64(x * y); elseif (Float64(x * y) <= 0.042) tmp = Float64(Float64(a * b) + Float64(c * i)); else tmp = Float64(Float64(x * y) + Float64(a * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x * y) <= -1.95e+129) tmp = x * y; elseif ((x * y) <= 0.042) tmp = (a * b) + (c * i); else tmp = (x * y) + (a * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(x * y), $MachinePrecision], -1.95e+129], N[(x * y), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 0.042], N[(N[(a * b), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -1.95 \cdot 10^{+129}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;x \cdot y \leq 0.042:\\
\;\;\;\;a \cdot b + c \cdot i\\
\mathbf{else}:\\
\;\;\;\;x \cdot y + a \cdot b\\
\end{array}
\end{array}
if (*.f64 x y) < -1.9499999999999999e129Initial program 89.1%
Taylor expanded in x around inf
*-lowering-*.f6473.4%
Simplified73.4%
if -1.9499999999999999e129 < (*.f64 x y) < 0.0420000000000000026Initial program 100.0%
Taylor expanded in a around inf
*-lowering-*.f6462.1%
Simplified62.1%
if 0.0420000000000000026 < (*.f64 x y) Initial program 95.7%
Taylor expanded in c around 0
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6490.0%
Simplified90.0%
Taylor expanded in t around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6475.1%
Simplified75.1%
Final simplification67.7%
(FPCore (x y z t a b c i) :precision binary64 (if (<= (* x y) -2.6e+129) (* x y) (if (<= (* x y) 7.2e+154) (+ (* a b) (* 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 ((x * y) <= -2.6e+129) {
tmp = x * y;
} else if ((x * y) <= 7.2e+154) {
tmp = (a * b) + (c * i);
} else {
tmp = x * y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x * y) <= (-2.6d+129)) then
tmp = x * y
else if ((x * y) <= 7.2d+154) then
tmp = (a * b) + (c * i)
else
tmp = x * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x * y) <= -2.6e+129) {
tmp = x * y;
} else if ((x * y) <= 7.2e+154) {
tmp = (a * b) + (c * i);
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x * y) <= -2.6e+129: tmp = x * y elif (x * y) <= 7.2e+154: tmp = (a * b) + (c * i) else: tmp = x * y return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(x * y) <= -2.6e+129) tmp = Float64(x * y); elseif (Float64(x * y) <= 7.2e+154) tmp = Float64(Float64(a * b) + Float64(c * i)); else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x * y) <= -2.6e+129) tmp = x * y; elseif ((x * y) <= 7.2e+154) tmp = (a * b) + (c * i); else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(x * y), $MachinePrecision], -2.6e+129], N[(x * y), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 7.2e+154], N[(N[(a * b), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision], N[(x * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -2.6 \cdot 10^{+129}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;x \cdot y \leq 7.2 \cdot 10^{+154}:\\
\;\;\;\;a \cdot b + c \cdot i\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if (*.f64 x y) < -2.60000000000000012e129 or 7.2000000000000001e154 < (*.f64 x y) Initial program 91.9%
Taylor expanded in x around inf
*-lowering-*.f6476.8%
Simplified76.8%
if -2.60000000000000012e129 < (*.f64 x y) < 7.2000000000000001e154Initial program 99.4%
Taylor expanded in a around inf
*-lowering-*.f6459.9%
Simplified59.9%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -5.2e+61) (* z t) (if (<= z 3.1e-221) (* c i) (if (<= z 2.8e-116) (* 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 (z <= -5.2e+61) {
tmp = z * t;
} else if (z <= 3.1e-221) {
tmp = c * i;
} else if (z <= 2.8e-116) {
tmp = a * b;
} else {
tmp = 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 (z <= (-5.2d+61)) then
tmp = z * t
else if (z <= 3.1d-221) then
tmp = c * i
else if (z <= 2.8d-116) then
tmp = a * b
else
tmp = 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 (z <= -5.2e+61) {
tmp = z * t;
} else if (z <= 3.1e-221) {
tmp = c * i;
} else if (z <= 2.8e-116) {
tmp = a * b;
} else {
tmp = z * t;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -5.2e+61: tmp = z * t elif z <= 3.1e-221: tmp = c * i elif z <= 2.8e-116: tmp = a * b else: tmp = z * t return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -5.2e+61) tmp = Float64(z * t); elseif (z <= 3.1e-221) tmp = Float64(c * i); elseif (z <= 2.8e-116) tmp = Float64(a * b); else tmp = Float64(z * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (z <= -5.2e+61) tmp = z * t; elseif (z <= 3.1e-221) tmp = c * i; elseif (z <= 2.8e-116) tmp = a * b; else tmp = z * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -5.2e+61], N[(z * t), $MachinePrecision], If[LessEqual[z, 3.1e-221], N[(c * i), $MachinePrecision], If[LessEqual[z, 2.8e-116], N[(a * b), $MachinePrecision], N[(z * t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.2 \cdot 10^{+61}:\\
\;\;\;\;z \cdot t\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{-221}:\\
\;\;\;\;c \cdot i\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{-116}:\\
\;\;\;\;a \cdot b\\
\mathbf{else}:\\
\;\;\;\;z \cdot t\\
\end{array}
\end{array}
if z < -5.19999999999999945e61 or 2.7999999999999999e-116 < z Initial program 96.1%
Taylor expanded in z around inf
*-lowering-*.f6446.5%
Simplified46.5%
if -5.19999999999999945e61 < z < 3.0999999999999999e-221Initial program 97.6%
Taylor expanded in c around inf
*-lowering-*.f6427.9%
Simplified27.9%
if 3.0999999999999999e-221 < z < 2.7999999999999999e-116Initial program 100.0%
Taylor expanded in a around inf
*-lowering-*.f6436.8%
Simplified36.8%
Final simplification39.6%
(FPCore (x y z t a b c i) :precision binary64 (if (<= (* x y) -3.6e+129) (* x y) (if (<= (* x y) 2.05e+89) (* z t) (* 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) <= -3.6e+129) {
tmp = x * y;
} else if ((x * y) <= 2.05e+89) {
tmp = z * t;
} else {
tmp = x * y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x * y) <= (-3.6d+129)) then
tmp = x * y
else if ((x * y) <= 2.05d+89) then
tmp = z * t
else
tmp = x * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x * y) <= -3.6e+129) {
tmp = x * y;
} else if ((x * y) <= 2.05e+89) {
tmp = z * t;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x * y) <= -3.6e+129: tmp = x * y elif (x * y) <= 2.05e+89: tmp = z * t else: tmp = x * y return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(x * y) <= -3.6e+129) tmp = Float64(x * y); elseif (Float64(x * y) <= 2.05e+89) tmp = Float64(z * t); else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x * y) <= -3.6e+129) tmp = x * y; elseif ((x * y) <= 2.05e+89) tmp = z * t; else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(x * y), $MachinePrecision], -3.6e+129], N[(x * y), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 2.05e+89], N[(z * t), $MachinePrecision], N[(x * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -3.6 \cdot 10^{+129}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;x \cdot y \leq 2.05 \cdot 10^{+89}:\\
\;\;\;\;z \cdot t\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if (*.f64 x y) < -3.6000000000000001e129 or 2.04999999999999993e89 < (*.f64 x y) Initial program 92.7%
Taylor expanded in x around inf
*-lowering-*.f6472.9%
Simplified72.9%
if -3.6000000000000001e129 < (*.f64 x y) < 2.04999999999999993e89Initial program 99.4%
Taylor expanded in z around inf
*-lowering-*.f6438.1%
Simplified38.1%
Final simplification51.2%
(FPCore (x y z t a b c i) :precision binary64 (if (<= (* a b) -4.5e+170) (* a b) (if (<= (* a b) 1.3e+127) (* 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 ((a * b) <= -4.5e+170) {
tmp = a * b;
} else if ((a * b) <= 1.3e+127) {
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 ((a * b) <= (-4.5d+170)) then
tmp = a * b
else if ((a * b) <= 1.3d+127) 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 ((a * b) <= -4.5e+170) {
tmp = a * b;
} else if ((a * b) <= 1.3e+127) {
tmp = c * i;
} else {
tmp = a * b;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (a * b) <= -4.5e+170: tmp = a * b elif (a * b) <= 1.3e+127: tmp = c * i else: tmp = a * b return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(a * b) <= -4.5e+170) tmp = Float64(a * b); elseif (Float64(a * b) <= 1.3e+127) 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 ((a * b) <= -4.5e+170) tmp = a * b; elseif ((a * b) <= 1.3e+127) tmp = c * i; else tmp = a * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(a * b), $MachinePrecision], -4.5e+170], N[(a * b), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 1.3e+127], N[(c * i), $MachinePrecision], N[(a * b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -4.5 \cdot 10^{+170}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;a \cdot b \leq 1.3 \cdot 10^{+127}:\\
\;\;\;\;c \cdot i\\
\mathbf{else}:\\
\;\;\;\;a \cdot b\\
\end{array}
\end{array}
if (*.f64 a b) < -4.50000000000000022e170 or 1.3000000000000001e127 < (*.f64 a b) Initial program 95.9%
Taylor expanded in a around inf
*-lowering-*.f6462.3%
Simplified62.3%
if -4.50000000000000022e170 < (*.f64 a b) < 1.3000000000000001e127Initial program 97.2%
Taylor expanded in c around inf
*-lowering-*.f6432.5%
Simplified32.5%
(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.9%
Taylor expanded in a around inf
*-lowering-*.f6422.5%
Simplified22.5%
herbie shell --seed 2024161
(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)))