
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (* x y) (* z t)) (* a b)) (* c i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((x * y) + (z * t)) + (a * b)) + (c * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (((x * y) + (z * t)) + (a * b)) + (c * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((x * y) + (z * t)) + (a * b)) + (c * i);
}
def code(x, y, z, t, a, b, c, i): return (((x * y) + (z * t)) + (a * b)) + (c * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(x * y) + Float64(z * t)) + Float64(a * b)) + Float64(c * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((x * y) + (z * t)) + (a * b)) + (c * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (* x y) (* z t)) (* a b)) (* c i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((x * y) + (z * t)) + (a * b)) + (c * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (((x * y) + (z * t)) + (a * b)) + (c * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((x * y) + (z * t)) + (a * b)) + (c * i);
}
def code(x, y, z, t, a, b, c, i): return (((x * y) + (z * t)) + (a * b)) + (c * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(x * y) + Float64(z * t)) + Float64(a * b)) + Float64(c * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((x * y) + (z * t)) + (a * b)) + (c * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i
\end{array}
(FPCore (x y z t a b c i) :precision binary64 (let* ((t_1 (+ (+ (+ (* x y) (* z t)) (* a b)) (* c i)))) (if (<= t_1 INFINITY) t_1 (* x (+ y (/ a (/ x b)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (((x * y) + (z * t)) + (a * b)) + (c * i);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = x * (y + (a / (x / b)));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (((x * y) + (z * t)) + (a * b)) + (c * i);
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = x * (y + (a / (x / b)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (((x * y) + (z * t)) + (a * b)) + (c * i) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = x * (y + (a / (x / b))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(Float64(x * y) + Float64(z * t)) + Float64(a * b)) + Float64(c * i)) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(x * Float64(y + Float64(a / Float64(x / b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (((x * y) + (z * t)) + (a * b)) + (c * i); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = x * (y + (a / (x / b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(x * N[(y + N[(a / N[(x / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(y + \frac{a}{\frac{x}{b}}\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 c around 0
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6422.2%
Simplified22.2%
Taylor expanded in a around inf
*-lowering-*.f6444.4%
Simplified44.4%
*-rgt-identityN/A
lft-mult-inverseN/A
associate-*l*N/A
div-invN/A
*-commutativeN/A
distribute-lft-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f6477.8%
Applied egg-rr77.8%
Final simplification99.2%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= (* x y) -2e+100)
(* x (+ y (/ a (/ x b))))
(if (<= (* x y) -5e-184)
(+ (* c i) (* z t))
(if (<= (* x y) 2e-189)
(+ (* a b) (* c i))
(if (<= (* x y) 2e-6) (* i (+ c (/ (* z t) i))) (+ (* x y) (* 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) <= -2e+100) {
tmp = x * (y + (a / (x / b)));
} else if ((x * y) <= -5e-184) {
tmp = (c * i) + (z * t);
} else if ((x * y) <= 2e-189) {
tmp = (a * b) + (c * i);
} else if ((x * y) <= 2e-6) {
tmp = i * (c + ((z * t) / i));
} else {
tmp = (x * y) + (c * i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x * y) <= (-2d+100)) then
tmp = x * (y + (a / (x / b)))
else if ((x * y) <= (-5d-184)) then
tmp = (c * i) + (z * t)
else if ((x * y) <= 2d-189) then
tmp = (a * b) + (c * i)
else if ((x * y) <= 2d-6) then
tmp = i * (c + ((z * t) / i))
else
tmp = (x * y) + (c * i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x * y) <= -2e+100) {
tmp = x * (y + (a / (x / b)));
} else if ((x * y) <= -5e-184) {
tmp = (c * i) + (z * t);
} else if ((x * y) <= 2e-189) {
tmp = (a * b) + (c * i);
} else if ((x * y) <= 2e-6) {
tmp = i * (c + ((z * t) / i));
} else {
tmp = (x * y) + (c * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x * y) <= -2e+100: tmp = x * (y + (a / (x / b))) elif (x * y) <= -5e-184: tmp = (c * i) + (z * t) elif (x * y) <= 2e-189: tmp = (a * b) + (c * i) elif (x * y) <= 2e-6: tmp = i * (c + ((z * t) / i)) else: tmp = (x * y) + (c * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(x * y) <= -2e+100) tmp = Float64(x * Float64(y + Float64(a / Float64(x / b)))); elseif (Float64(x * y) <= -5e-184) tmp = Float64(Float64(c * i) + Float64(z * t)); elseif (Float64(x * y) <= 2e-189) tmp = Float64(Float64(a * b) + Float64(c * i)); elseif (Float64(x * y) <= 2e-6) tmp = Float64(i * Float64(c + Float64(Float64(z * t) / i))); else tmp = Float64(Float64(x * y) + Float64(c * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x * y) <= -2e+100) tmp = x * (y + (a / (x / b))); elseif ((x * y) <= -5e-184) tmp = (c * i) + (z * t); elseif ((x * y) <= 2e-189) tmp = (a * b) + (c * i); elseif ((x * y) <= 2e-6) tmp = i * (c + ((z * t) / i)); else tmp = (x * y) + (c * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(x * y), $MachinePrecision], -2e+100], N[(x * N[(y + N[(a / N[(x / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -5e-184], N[(N[(c * i), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 2e-189], N[(N[(a * b), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 2e-6], N[(i * N[(c + N[(N[(z * t), $MachinePrecision] / i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -2 \cdot 10^{+100}:\\
\;\;\;\;x \cdot \left(y + \frac{a}{\frac{x}{b}}\right)\\
\mathbf{elif}\;x \cdot y \leq -5 \cdot 10^{-184}:\\
\;\;\;\;c \cdot i + z \cdot t\\
\mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{-189}:\\
\;\;\;\;a \cdot b + c \cdot i\\
\mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{-6}:\\
\;\;\;\;i \cdot \left(c + \frac{z \cdot t}{i}\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot y + c \cdot i\\
\end{array}
\end{array}
if (*.f64 x y) < -2.00000000000000003e100Initial program 90.7%
Taylor expanded in c around 0
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6488.5%
Simplified88.5%
Taylor expanded in a around inf
*-lowering-*.f6488.5%
Simplified88.5%
*-rgt-identityN/A
lft-mult-inverseN/A
associate-*l*N/A
div-invN/A
*-commutativeN/A
distribute-lft-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f6490.8%
Applied egg-rr90.8%
if -2.00000000000000003e100 < (*.f64 x y) < -5.00000000000000003e-184Initial program 100.0%
Taylor expanded in z around inf
*-lowering-*.f6474.0%
Simplified74.0%
if -5.00000000000000003e-184 < (*.f64 x y) < 2.00000000000000014e-189Initial program 100.0%
Taylor expanded in a around inf
*-lowering-*.f6477.7%
Simplified77.7%
if 2.00000000000000014e-189 < (*.f64 x y) < 1.99999999999999991e-6Initial program 97.3%
Taylor expanded in z around inf
*-lowering-*.f6478.5%
Simplified78.5%
Taylor expanded in i around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6476.4%
Simplified76.4%
if 1.99999999999999991e-6 < (*.f64 x y) Initial program 93.4%
Taylor expanded in x around inf
*-lowering-*.f6477.5%
Simplified77.5%
Final simplification78.9%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= (* x y) -1.45e+89)
(+ (* x y) (* a b))
(if (<= (* x y) -1.75e-206)
(+ (* c i) (* z t))
(if (<= (* x y) 3.3e-189)
(+ (* a b) (* c i))
(if (<= (* x y) 1.4) (* i (+ c (/ (* z t) i))) (+ (* x y) (* 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.45e+89) {
tmp = (x * y) + (a * b);
} else if ((x * y) <= -1.75e-206) {
tmp = (c * i) + (z * t);
} else if ((x * y) <= 3.3e-189) {
tmp = (a * b) + (c * i);
} else if ((x * y) <= 1.4) {
tmp = i * (c + ((z * t) / i));
} else {
tmp = (x * y) + (c * i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x * y) <= (-1.45d+89)) then
tmp = (x * y) + (a * b)
else if ((x * y) <= (-1.75d-206)) then
tmp = (c * i) + (z * t)
else if ((x * y) <= 3.3d-189) then
tmp = (a * b) + (c * i)
else if ((x * y) <= 1.4d0) then
tmp = i * (c + ((z * t) / i))
else
tmp = (x * y) + (c * i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x * y) <= -1.45e+89) {
tmp = (x * y) + (a * b);
} else if ((x * y) <= -1.75e-206) {
tmp = (c * i) + (z * t);
} else if ((x * y) <= 3.3e-189) {
tmp = (a * b) + (c * i);
} else if ((x * y) <= 1.4) {
tmp = i * (c + ((z * t) / i));
} else {
tmp = (x * y) + (c * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x * y) <= -1.45e+89: tmp = (x * y) + (a * b) elif (x * y) <= -1.75e-206: tmp = (c * i) + (z * t) elif (x * y) <= 3.3e-189: tmp = (a * b) + (c * i) elif (x * y) <= 1.4: tmp = i * (c + ((z * t) / i)) else: tmp = (x * y) + (c * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(x * y) <= -1.45e+89) tmp = Float64(Float64(x * y) + Float64(a * b)); elseif (Float64(x * y) <= -1.75e-206) tmp = Float64(Float64(c * i) + Float64(z * t)); elseif (Float64(x * y) <= 3.3e-189) tmp = Float64(Float64(a * b) + Float64(c * i)); elseif (Float64(x * y) <= 1.4) tmp = Float64(i * Float64(c + Float64(Float64(z * t) / i))); else tmp = Float64(Float64(x * y) + Float64(c * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x * y) <= -1.45e+89) tmp = (x * y) + (a * b); elseif ((x * y) <= -1.75e-206) tmp = (c * i) + (z * t); elseif ((x * y) <= 3.3e-189) tmp = (a * b) + (c * i); elseif ((x * y) <= 1.4) tmp = i * (c + ((z * t) / i)); else tmp = (x * y) + (c * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(x * y), $MachinePrecision], -1.45e+89], N[(N[(x * y), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -1.75e-206], N[(N[(c * i), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 3.3e-189], N[(N[(a * b), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 1.4], N[(i * N[(c + N[(N[(z * t), $MachinePrecision] / i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -1.45 \cdot 10^{+89}:\\
\;\;\;\;x \cdot y + a \cdot b\\
\mathbf{elif}\;x \cdot y \leq -1.75 \cdot 10^{-206}:\\
\;\;\;\;c \cdot i + z \cdot t\\
\mathbf{elif}\;x \cdot y \leq 3.3 \cdot 10^{-189}:\\
\;\;\;\;a \cdot b + c \cdot i\\
\mathbf{elif}\;x \cdot y \leq 1.4:\\
\;\;\;\;i \cdot \left(c + \frac{z \cdot t}{i}\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot y + c \cdot i\\
\end{array}
\end{array}
if (*.f64 x y) < -1.45000000000000013e89Initial program 90.7%
Taylor expanded in c around 0
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6488.5%
Simplified88.5%
Taylor expanded in a around inf
*-lowering-*.f6488.5%
Simplified88.5%
if -1.45000000000000013e89 < (*.f64 x y) < -1.74999999999999995e-206Initial program 100.0%
Taylor expanded in z around inf
*-lowering-*.f6474.0%
Simplified74.0%
if -1.74999999999999995e-206 < (*.f64 x y) < 3.3000000000000001e-189Initial program 100.0%
Taylor expanded in a around inf
*-lowering-*.f6477.7%
Simplified77.7%
if 3.3000000000000001e-189 < (*.f64 x y) < 1.3999999999999999Initial program 97.3%
Taylor expanded in z around inf
*-lowering-*.f6478.5%
Simplified78.5%
Taylor expanded in i around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6476.4%
Simplified76.4%
if 1.3999999999999999 < (*.f64 x y) Initial program 93.4%
Taylor expanded in x around inf
*-lowering-*.f6477.5%
Simplified77.5%
Final simplification78.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* c i) (* z t))))
(if (<= (* x y) -4.5e+97)
(+ (* x y) (* a b))
(if (<= (* x y) -3.9e-208)
t_1
(if (<= (* x y) 9e-165)
(+ (* a b) (* c i))
(if (<= (* x y) 1.02) t_1 (+ (* x y) (* c i))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (c * i) + (z * t);
double tmp;
if ((x * y) <= -4.5e+97) {
tmp = (x * y) + (a * b);
} else if ((x * y) <= -3.9e-208) {
tmp = t_1;
} else if ((x * y) <= 9e-165) {
tmp = (a * b) + (c * i);
} else if ((x * y) <= 1.02) {
tmp = t_1;
} else {
tmp = (x * y) + (c * i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = (c * i) + (z * t)
if ((x * y) <= (-4.5d+97)) then
tmp = (x * y) + (a * b)
else if ((x * y) <= (-3.9d-208)) then
tmp = t_1
else if ((x * y) <= 9d-165) then
tmp = (a * b) + (c * i)
else if ((x * y) <= 1.02d0) then
tmp = t_1
else
tmp = (x * y) + (c * i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (c * i) + (z * t);
double tmp;
if ((x * y) <= -4.5e+97) {
tmp = (x * y) + (a * b);
} else if ((x * y) <= -3.9e-208) {
tmp = t_1;
} else if ((x * y) <= 9e-165) {
tmp = (a * b) + (c * i);
} else if ((x * y) <= 1.02) {
tmp = t_1;
} else {
tmp = (x * y) + (c * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (c * i) + (z * t) tmp = 0 if (x * y) <= -4.5e+97: tmp = (x * y) + (a * b) elif (x * y) <= -3.9e-208: tmp = t_1 elif (x * y) <= 9e-165: tmp = (a * b) + (c * i) elif (x * y) <= 1.02: tmp = t_1 else: tmp = (x * y) + (c * i) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(c * i) + Float64(z * t)) tmp = 0.0 if (Float64(x * y) <= -4.5e+97) tmp = Float64(Float64(x * y) + Float64(a * b)); elseif (Float64(x * y) <= -3.9e-208) tmp = t_1; elseif (Float64(x * y) <= 9e-165) tmp = Float64(Float64(a * b) + Float64(c * i)); elseif (Float64(x * y) <= 1.02) tmp = t_1; else tmp = Float64(Float64(x * y) + Float64(c * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (c * i) + (z * t); tmp = 0.0; if ((x * y) <= -4.5e+97) tmp = (x * y) + (a * b); elseif ((x * y) <= -3.9e-208) tmp = t_1; elseif ((x * y) <= 9e-165) tmp = (a * b) + (c * i); elseif ((x * y) <= 1.02) tmp = t_1; else tmp = (x * y) + (c * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(c * i), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -4.5e+97], N[(N[(x * y), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -3.9e-208], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 9e-165], N[(N[(a * b), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 1.02], t$95$1, N[(N[(x * y), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot i + z \cdot t\\
\mathbf{if}\;x \cdot y \leq -4.5 \cdot 10^{+97}:\\
\;\;\;\;x \cdot y + a \cdot b\\
\mathbf{elif}\;x \cdot y \leq -3.9 \cdot 10^{-208}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 9 \cdot 10^{-165}:\\
\;\;\;\;a \cdot b + c \cdot i\\
\mathbf{elif}\;x \cdot y \leq 1.02:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot y + c \cdot i\\
\end{array}
\end{array}
if (*.f64 x y) < -4.49999999999999976e97Initial program 90.7%
Taylor expanded in c around 0
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6488.5%
Simplified88.5%
Taylor expanded in a around inf
*-lowering-*.f6488.5%
Simplified88.5%
if -4.49999999999999976e97 < (*.f64 x y) < -3.90000000000000004e-208 or 8.99999999999999985e-165 < (*.f64 x y) < 1.02Initial program 100.0%
Taylor expanded in z around inf
*-lowering-*.f6476.9%
Simplified76.9%
if -3.90000000000000004e-208 < (*.f64 x y) < 8.99999999999999985e-165Initial program 98.6%
Taylor expanded in a around inf
*-lowering-*.f6476.5%
Simplified76.5%
if 1.02 < (*.f64 x y) Initial program 93.4%
Taylor expanded in x around inf
*-lowering-*.f6477.5%
Simplified77.5%
Final simplification78.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* c i) (* z t))) (t_2 (+ (* x y) (* a b))))
(if (<= (* x y) -1.08e+99)
t_2
(if (<= (* x y) -1.25e-189)
t_1
(if (<= (* x y) 1.75e-164)
(+ (* a b) (* c i))
(if (<= (* x y) 3.6e+203) 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 = (c * i) + (z * t);
double t_2 = (x * y) + (a * b);
double tmp;
if ((x * y) <= -1.08e+99) {
tmp = t_2;
} else if ((x * y) <= -1.25e-189) {
tmp = t_1;
} else if ((x * y) <= 1.75e-164) {
tmp = (a * b) + (c * i);
} else if ((x * y) <= 3.6e+203) {
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 = (c * i) + (z * t)
t_2 = (x * y) + (a * b)
if ((x * y) <= (-1.08d+99)) then
tmp = t_2
else if ((x * y) <= (-1.25d-189)) then
tmp = t_1
else if ((x * y) <= 1.75d-164) then
tmp = (a * b) + (c * i)
else if ((x * y) <= 3.6d+203) 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 = (c * i) + (z * t);
double t_2 = (x * y) + (a * b);
double tmp;
if ((x * y) <= -1.08e+99) {
tmp = t_2;
} else if ((x * y) <= -1.25e-189) {
tmp = t_1;
} else if ((x * y) <= 1.75e-164) {
tmp = (a * b) + (c * i);
} else if ((x * y) <= 3.6e+203) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (c * i) + (z * t) t_2 = (x * y) + (a * b) tmp = 0 if (x * y) <= -1.08e+99: tmp = t_2 elif (x * y) <= -1.25e-189: tmp = t_1 elif (x * y) <= 1.75e-164: tmp = (a * b) + (c * i) elif (x * y) <= 3.6e+203: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(c * i) + Float64(z * t)) t_2 = Float64(Float64(x * y) + Float64(a * b)) tmp = 0.0 if (Float64(x * y) <= -1.08e+99) tmp = t_2; elseif (Float64(x * y) <= -1.25e-189) tmp = t_1; elseif (Float64(x * y) <= 1.75e-164) tmp = Float64(Float64(a * b) + Float64(c * i)); elseif (Float64(x * y) <= 3.6e+203) 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 = (c * i) + (z * t); t_2 = (x * y) + (a * b); tmp = 0.0; if ((x * y) <= -1.08e+99) tmp = t_2; elseif ((x * y) <= -1.25e-189) tmp = t_1; elseif ((x * y) <= 1.75e-164) tmp = (a * b) + (c * i); elseif ((x * y) <= 3.6e+203) 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[(c * i), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -1.08e+99], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], -1.25e-189], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 1.75e-164], N[(N[(a * b), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 3.6e+203], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot i + z \cdot t\\
t_2 := x \cdot y + a \cdot b\\
\mathbf{if}\;x \cdot y \leq -1.08 \cdot 10^{+99}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \cdot y \leq -1.25 \cdot 10^{-189}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 1.75 \cdot 10^{-164}:\\
\;\;\;\;a \cdot b + c \cdot i\\
\mathbf{elif}\;x \cdot y \leq 3.6 \cdot 10^{+203}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 x y) < -1.08e99 or 3.59999999999999982e203 < (*.f64 x y) Initial program 89.3%
Taylor expanded in c around 0
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6489.4%
Simplified89.4%
Taylor expanded in a around inf
*-lowering-*.f6488.2%
Simplified88.2%
if -1.08e99 < (*.f64 x y) < -1.2499999999999999e-189 or 1.75e-164 < (*.f64 x y) < 3.59999999999999982e203Initial program 100.0%
Taylor expanded in z around inf
*-lowering-*.f6471.9%
Simplified71.9%
if -1.2499999999999999e-189 < (*.f64 x y) < 1.75e-164Initial program 98.6%
Taylor expanded in a around inf
*-lowering-*.f6476.5%
Simplified76.5%
Final simplification78.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* c i) (* z t))))
(if (<= (* x y) -6.8e+109)
(* x y)
(if (<= (* x y) -2.45e-198)
t_1
(if (<= (* x y) 5.6e-164)
(+ (* a b) (* c i))
(if (<= (* x y) 2.25e+206) t_1 (* x y)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (c * i) + (z * t);
double tmp;
if ((x * y) <= -6.8e+109) {
tmp = x * y;
} else if ((x * y) <= -2.45e-198) {
tmp = t_1;
} else if ((x * y) <= 5.6e-164) {
tmp = (a * b) + (c * i);
} else if ((x * y) <= 2.25e+206) {
tmp = t_1;
} else {
tmp = x * y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = (c * i) + (z * t)
if ((x * y) <= (-6.8d+109)) then
tmp = x * y
else if ((x * y) <= (-2.45d-198)) then
tmp = t_1
else if ((x * y) <= 5.6d-164) then
tmp = (a * b) + (c * i)
else if ((x * y) <= 2.25d+206) then
tmp = t_1
else
tmp = x * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (c * i) + (z * t);
double tmp;
if ((x * y) <= -6.8e+109) {
tmp = x * y;
} else if ((x * y) <= -2.45e-198) {
tmp = t_1;
} else if ((x * y) <= 5.6e-164) {
tmp = (a * b) + (c * i);
} else if ((x * y) <= 2.25e+206) {
tmp = t_1;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (c * i) + (z * t) tmp = 0 if (x * y) <= -6.8e+109: tmp = x * y elif (x * y) <= -2.45e-198: tmp = t_1 elif (x * y) <= 5.6e-164: tmp = (a * b) + (c * i) elif (x * y) <= 2.25e+206: tmp = t_1 else: tmp = x * y 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(x * y) <= -6.8e+109) tmp = Float64(x * y); elseif (Float64(x * y) <= -2.45e-198) tmp = t_1; elseif (Float64(x * y) <= 5.6e-164) tmp = Float64(Float64(a * b) + Float64(c * i)); elseif (Float64(x * y) <= 2.25e+206) tmp = t_1; else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (c * i) + (z * t); tmp = 0.0; if ((x * y) <= -6.8e+109) tmp = x * y; elseif ((x * y) <= -2.45e-198) tmp = t_1; elseif ((x * y) <= 5.6e-164) tmp = (a * b) + (c * i); elseif ((x * y) <= 2.25e+206) tmp = t_1; else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(c * i), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -6.8e+109], N[(x * y), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -2.45e-198], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 5.6e-164], N[(N[(a * b), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 2.25e+206], t$95$1, N[(x * y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot i + z \cdot t\\
\mathbf{if}\;x \cdot y \leq -6.8 \cdot 10^{+109}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;x \cdot y \leq -2.45 \cdot 10^{-198}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 5.6 \cdot 10^{-164}:\\
\;\;\;\;a \cdot b + c \cdot i\\
\mathbf{elif}\;x \cdot y \leq 2.25 \cdot 10^{+206}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if (*.f64 x y) < -6.80000000000000013e109 or 2.25000000000000009e206 < (*.f64 x y) Initial program 89.0%
Taylor expanded in x around inf
*-lowering-*.f6479.8%
Simplified79.8%
if -6.80000000000000013e109 < (*.f64 x y) < -2.4500000000000001e-198 or 5.6000000000000002e-164 < (*.f64 x y) < 2.25000000000000009e206Initial program 100.0%
Taylor expanded in z around inf
*-lowering-*.f6470.7%
Simplified70.7%
if -2.4500000000000001e-198 < (*.f64 x y) < 5.6000000000000002e-164Initial program 98.6%
Taylor expanded in a around inf
*-lowering-*.f6476.5%
Simplified76.5%
Final simplification74.9%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= (* c i) -3.5e+150)
(* c i)
(if (<= (* c i) -1.2e-131)
(* a b)
(if (<= (* c i) 2.5e+64)
(* x y)
(if (<= (* c i) 4.7e+127) (* 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) <= -3.5e+150) {
tmp = c * i;
} else if ((c * i) <= -1.2e-131) {
tmp = a * b;
} else if ((c * i) <= 2.5e+64) {
tmp = x * y;
} else if ((c * i) <= 4.7e+127) {
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) <= (-3.5d+150)) then
tmp = c * i
else if ((c * i) <= (-1.2d-131)) then
tmp = a * b
else if ((c * i) <= 2.5d+64) then
tmp = x * y
else if ((c * i) <= 4.7d+127) 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) <= -3.5e+150) {
tmp = c * i;
} else if ((c * i) <= -1.2e-131) {
tmp = a * b;
} else if ((c * i) <= 2.5e+64) {
tmp = x * y;
} else if ((c * i) <= 4.7e+127) {
tmp = z * t;
} else {
tmp = c * i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c * i) <= -3.5e+150: tmp = c * i elif (c * i) <= -1.2e-131: tmp = a * b elif (c * i) <= 2.5e+64: tmp = x * y elif (c * i) <= 4.7e+127: 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) <= -3.5e+150) tmp = Float64(c * i); elseif (Float64(c * i) <= -1.2e-131) tmp = Float64(a * b); elseif (Float64(c * i) <= 2.5e+64) tmp = Float64(x * y); elseif (Float64(c * i) <= 4.7e+127) 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) <= -3.5e+150) tmp = c * i; elseif ((c * i) <= -1.2e-131) tmp = a * b; elseif ((c * i) <= 2.5e+64) tmp = x * y; elseif ((c * i) <= 4.7e+127) 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], -3.5e+150], N[(c * i), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], -1.2e-131], N[(a * b), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 2.5e+64], N[(x * y), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 4.7e+127], N[(z * t), $MachinePrecision], N[(c * i), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \cdot i \leq -3.5 \cdot 10^{+150}:\\
\;\;\;\;c \cdot i\\
\mathbf{elif}\;c \cdot i \leq -1.2 \cdot 10^{-131}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;c \cdot i \leq 2.5 \cdot 10^{+64}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;c \cdot i \leq 4.7 \cdot 10^{+127}:\\
\;\;\;\;z \cdot t\\
\mathbf{else}:\\
\;\;\;\;c \cdot i\\
\end{array}
\end{array}
if (*.f64 c i) < -3.49999999999999984e150 or 4.70000000000000035e127 < (*.f64 c i) Initial program 93.6%
Taylor expanded in c around inf
*-lowering-*.f6474.6%
Simplified74.6%
if -3.49999999999999984e150 < (*.f64 c i) < -1.2e-131Initial program 97.8%
Taylor expanded in a around inf
*-lowering-*.f6446.8%
Simplified46.8%
if -1.2e-131 < (*.f64 c i) < 2.5e64Initial program 97.5%
Taylor expanded in x around inf
*-lowering-*.f6442.6%
Simplified42.6%
if 2.5e64 < (*.f64 c i) < 4.70000000000000035e127Initial program 100.0%
Taylor expanded in z around inf
*-lowering-*.f6467.6%
Simplified67.6%
Final simplification54.3%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= (* x y) -1.8e+200)
(* x y)
(if (<= (* x y) -1.5e-176)
(+ (* a b) (* z t))
(if (<= (* x y) 2.15e+121) (+ (* 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) <= -1.8e+200) {
tmp = x * y;
} else if ((x * y) <= -1.5e-176) {
tmp = (a * b) + (z * t);
} else if ((x * y) <= 2.15e+121) {
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) <= (-1.8d+200)) then
tmp = x * y
else if ((x * y) <= (-1.5d-176)) then
tmp = (a * b) + (z * t)
else if ((x * y) <= 2.15d+121) 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) <= -1.8e+200) {
tmp = x * y;
} else if ((x * y) <= -1.5e-176) {
tmp = (a * b) + (z * t);
} else if ((x * y) <= 2.15e+121) {
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) <= -1.8e+200: tmp = x * y elif (x * y) <= -1.5e-176: tmp = (a * b) + (z * t) elif (x * y) <= 2.15e+121: 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) <= -1.8e+200) tmp = Float64(x * y); elseif (Float64(x * y) <= -1.5e-176) tmp = Float64(Float64(a * b) + Float64(z * t)); elseif (Float64(x * y) <= 2.15e+121) 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) <= -1.8e+200) tmp = x * y; elseif ((x * y) <= -1.5e-176) tmp = (a * b) + (z * t); elseif ((x * y) <= 2.15e+121) 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], -1.8e+200], N[(x * y), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -1.5e-176], N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 2.15e+121], 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 -1.8 \cdot 10^{+200}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;x \cdot y \leq -1.5 \cdot 10^{-176}:\\
\;\;\;\;a \cdot b + z \cdot t\\
\mathbf{elif}\;x \cdot y \leq 2.15 \cdot 10^{+121}:\\
\;\;\;\;a \cdot b + c \cdot i\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if (*.f64 x y) < -1.7999999999999999e200 or 2.1499999999999999e121 < (*.f64 x y) Initial program 89.3%
Taylor expanded in x around inf
*-lowering-*.f6479.3%
Simplified79.3%
if -1.7999999999999999e200 < (*.f64 x y) < -1.5e-176Initial program 99.9%
Taylor expanded in c around 0
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6476.7%
Simplified76.7%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6463.6%
Simplified63.6%
if -1.5e-176 < (*.f64 x y) < 2.1499999999999999e121Initial program 99.2%
Taylor expanded in a around inf
*-lowering-*.f6467.1%
Simplified67.1%
Final simplification69.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* i (+ c (/ (* z t) i)))))
(if (<= (* c i) -1e+164)
t_1
(if (<= (* c i) 4e+56) (+ (* x y) (+ (* a b) (* z t))) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = i * (c + ((z * t) / i));
double tmp;
if ((c * i) <= -1e+164) {
tmp = t_1;
} else if ((c * i) <= 4e+56) {
tmp = (x * y) + ((a * b) + (z * t));
} 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 = i * (c + ((z * t) / i))
if ((c * i) <= (-1d+164)) then
tmp = t_1
else if ((c * i) <= 4d+56) then
tmp = (x * y) + ((a * b) + (z * t))
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 = i * (c + ((z * t) / i));
double tmp;
if ((c * i) <= -1e+164) {
tmp = t_1;
} else if ((c * i) <= 4e+56) {
tmp = (x * y) + ((a * b) + (z * t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = i * (c + ((z * t) / i)) tmp = 0 if (c * i) <= -1e+164: tmp = t_1 elif (c * i) <= 4e+56: tmp = (x * y) + ((a * b) + (z * t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(i * Float64(c + Float64(Float64(z * t) / i))) tmp = 0.0 if (Float64(c * i) <= -1e+164) tmp = t_1; elseif (Float64(c * i) <= 4e+56) tmp = Float64(Float64(x * y) + Float64(Float64(a * b) + Float64(z * t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = i * (c + ((z * t) / i)); tmp = 0.0; if ((c * i) <= -1e+164) tmp = t_1; elseif ((c * i) <= 4e+56) tmp = (x * y) + ((a * b) + (z * t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(i * N[(c + N[(N[(z * t), $MachinePrecision] / i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(c * i), $MachinePrecision], -1e+164], t$95$1, If[LessEqual[N[(c * i), $MachinePrecision], 4e+56], N[(N[(x * y), $MachinePrecision] + N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := i \cdot \left(c + \frac{z \cdot t}{i}\right)\\
\mathbf{if}\;c \cdot i \leq -1 \cdot 10^{+164}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \cdot i \leq 4 \cdot 10^{+56}:\\
\;\;\;\;x \cdot y + \left(a \cdot b + z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 c i) < -1e164 or 4.00000000000000037e56 < (*.f64 c i) Initial program 94.5%
Taylor expanded in z around inf
*-lowering-*.f6484.5%
Simplified84.5%
Taylor expanded in i around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6484.5%
Simplified84.5%
if -1e164 < (*.f64 c i) < 4.00000000000000037e56Initial program 97.5%
Taylor expanded in c around 0
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6492.2%
Simplified92.2%
Final simplification89.5%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= (* c i) -2.5e+151)
(* c i)
(if (<= (* c i) -1.45e-95)
(* a b)
(if (<= (* c i) 3.3e+123) (* 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.5e+151) {
tmp = c * i;
} else if ((c * i) <= -1.45e-95) {
tmp = a * b;
} else if ((c * i) <= 3.3e+123) {
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.5d+151)) then
tmp = c * i
else if ((c * i) <= (-1.45d-95)) then
tmp = a * b
else if ((c * i) <= 3.3d+123) 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.5e+151) {
tmp = c * i;
} else if ((c * i) <= -1.45e-95) {
tmp = a * b;
} else if ((c * i) <= 3.3e+123) {
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.5e+151: tmp = c * i elif (c * i) <= -1.45e-95: tmp = a * b elif (c * i) <= 3.3e+123: 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.5e+151) tmp = Float64(c * i); elseif (Float64(c * i) <= -1.45e-95) tmp = Float64(a * b); elseif (Float64(c * i) <= 3.3e+123) 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.5e+151) tmp = c * i; elseif ((c * i) <= -1.45e-95) tmp = a * b; elseif ((c * i) <= 3.3e+123) 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.5e+151], N[(c * i), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], -1.45e-95], N[(a * b), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 3.3e+123], N[(z * t), $MachinePrecision], N[(c * i), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \cdot i \leq -2.5 \cdot 10^{+151}:\\
\;\;\;\;c \cdot i\\
\mathbf{elif}\;c \cdot i \leq -1.45 \cdot 10^{-95}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;c \cdot i \leq 3.3 \cdot 10^{+123}:\\
\;\;\;\;z \cdot t\\
\mathbf{else}:\\
\;\;\;\;c \cdot i\\
\end{array}
\end{array}
if (*.f64 c i) < -2.5000000000000001e151 or 3.30000000000000003e123 < (*.f64 c i) Initial program 93.6%
Taylor expanded in c around inf
*-lowering-*.f6474.6%
Simplified74.6%
if -2.5000000000000001e151 < (*.f64 c i) < -1.45000000000000001e-95Initial program 97.6%
Taylor expanded in a around inf
*-lowering-*.f6446.4%
Simplified46.4%
if -1.45000000000000001e-95 < (*.f64 c i) < 3.30000000000000003e123Initial program 97.8%
Taylor expanded in z around inf
*-lowering-*.f6438.0%
Simplified38.0%
Final simplification50.5%
(FPCore (x y z t a b c i) :precision binary64 (if (<= (* x y) -5.5e+206) (* x y) (if (<= (* x y) 7.6e+123) (+ (* 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) <= -5.5e+206) {
tmp = x * y;
} else if ((x * y) <= 7.6e+123) {
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) <= (-5.5d+206)) then
tmp = x * y
else if ((x * y) <= 7.6d+123) 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) <= -5.5e+206) {
tmp = x * y;
} else if ((x * y) <= 7.6e+123) {
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) <= -5.5e+206: tmp = x * y elif (x * y) <= 7.6e+123: 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) <= -5.5e+206) tmp = Float64(x * y); elseif (Float64(x * y) <= 7.6e+123) 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) <= -5.5e+206) tmp = x * y; elseif ((x * y) <= 7.6e+123) 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], -5.5e+206], N[(x * y), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 7.6e+123], 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 -5.5 \cdot 10^{+206}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;x \cdot y \leq 7.6 \cdot 10^{+123}:\\
\;\;\;\;a \cdot b + c \cdot i\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if (*.f64 x y) < -5.50000000000000021e206 or 7.59999999999999989e123 < (*.f64 x y) Initial program 90.4%
Taylor expanded in x around inf
*-lowering-*.f6480.1%
Simplified80.1%
if -5.50000000000000021e206 < (*.f64 x y) < 7.59999999999999989e123Initial program 98.9%
Taylor expanded in a around inf
*-lowering-*.f6461.9%
Simplified61.9%
(FPCore (x y z t a b c i) :precision binary64 (if (<= (* c i) -2.7e+139) (* c i) (if (<= (* c i) 7e+50) (* a b) (* c i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c * i) <= -2.7e+139) {
tmp = c * i;
} else if ((c * i) <= 7e+50) {
tmp = a * b;
} 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.7d+139)) then
tmp = c * i
else if ((c * i) <= 7d+50) then
tmp = a * b
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.7e+139) {
tmp = c * i;
} else if ((c * i) <= 7e+50) {
tmp = a * b;
} else {
tmp = c * i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c * i) <= -2.7e+139: tmp = c * i elif (c * i) <= 7e+50: tmp = a * b else: tmp = c * i return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(c * i) <= -2.7e+139) tmp = Float64(c * i); elseif (Float64(c * i) <= 7e+50) tmp = Float64(a * b); 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.7e+139) tmp = c * i; elseif ((c * i) <= 7e+50) tmp = a * b; 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.7e+139], N[(c * i), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 7e+50], N[(a * b), $MachinePrecision], N[(c * i), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \cdot i \leq -2.7 \cdot 10^{+139}:\\
\;\;\;\;c \cdot i\\
\mathbf{elif}\;c \cdot i \leq 7 \cdot 10^{+50}:\\
\;\;\;\;a \cdot b\\
\mathbf{else}:\\
\;\;\;\;c \cdot i\\
\end{array}
\end{array}
if (*.f64 c i) < -2.6999999999999998e139 or 7.00000000000000012e50 < (*.f64 c i) Initial program 94.8%
Taylor expanded in c around inf
*-lowering-*.f6464.8%
Simplified64.8%
if -2.6999999999999998e139 < (*.f64 c i) < 7.00000000000000012e50Initial program 97.5%
Taylor expanded in a around inf
*-lowering-*.f6434.0%
Simplified34.0%
(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
*-lowering-*.f6426.3%
Simplified26.3%
herbie shell --seed 2024185
(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)))