
(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
(let* ((t_1 (+ (* c i) (+ (* a b) (+ (* x y) (* z t))))))
(if (<= t_1 INFINITY)
t_1
(* a (+ b (+ (* c (/ i a)) (+ (* t (/ z a)) (* x (/ y a)))))))))
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 = a * (b + ((c * (i / a)) + ((t * (z / a)) + (x * (y / a)))));
}
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 = a * (b + ((c * (i / a)) + ((t * (z / a)) + (x * (y / a)))));
}
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 = a * (b + ((c * (i / a)) + ((t * (z / a)) + (x * (y / a))))) 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(a * Float64(b + Float64(Float64(c * Float64(i / a)) + Float64(Float64(t * Float64(z / a)) + Float64(x * Float64(y / a)))))); 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 = a * (b + ((c * (i / a)) + ((t * (z / a)) + (x * (y / a))))); 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[(a * N[(b + N[(N[(c * N[(i / a), $MachinePrecision]), $MachinePrecision] + N[(N[(t * N[(z / a), $MachinePrecision]), $MachinePrecision] + N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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}:\\
\;\;\;\;a \cdot \left(b + \left(c \cdot \frac{i}{a} + \left(t \cdot \frac{z}{a} + x \cdot \frac{y}{a}\right)\right)\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 a around inf 45.5%
associate-/l*54.5%
associate-/l*72.7%
associate-/l*81.8%
Simplified81.8%
Final simplification99.2%
(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 95.7%
+-commutative95.7%
fma-define96.5%
associate-+l+96.5%
fma-define96.9%
fma-define97.6%
Simplified97.6%
(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 95.7%
+-commutative95.7%
fma-define96.5%
+-commutative96.5%
fma-define96.9%
fma-define97.2%
Simplified97.2%
(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 (* a (+ b (* c (/ i a)))))))
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 = a * (b + (c * (i / a)));
}
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 = a * (b + (c * (i / a)));
}
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 = a * (b + (c * (i / a))) 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(a * Float64(b + Float64(c * Float64(i / a)))); 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 = a * (b + (c * (i / a))); 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[(a * N[(b + N[(c * N[(i / a), $MachinePrecision]), $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}:\\
\;\;\;\;a \cdot \left(b + c \cdot \frac{i}{a}\right)\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 a b)) (*.f64 c i)) < +inf.0Initial program 100.0%
if +inf.0 < (+.f64 (+.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 a b)) (*.f64 c i)) Initial program 0.0%
Taylor expanded in z around 0 27.3%
Taylor expanded in x around 0 27.3%
Taylor expanded in a around inf 63.7%
associate-/l*63.7%
Simplified63.7%
Final simplification98.4%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (* c i) -1e+100) (not (<= (* c i) 400000000.0))) (+ (* c i) (* z (+ t (/ (* x y) z)))) (+ (* a b) (+ (* x y) (* z t)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((c * i) <= -1e+100) || !((c * i) <= 400000000.0)) {
tmp = (c * i) + (z * (t + ((x * y) / z)));
} else {
tmp = (a * b) + ((x * y) + (z * t));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (((c * i) <= (-1d+100)) .or. (.not. ((c * i) <= 400000000.0d0))) then
tmp = (c * i) + (z * (t + ((x * y) / z)))
else
tmp = (a * b) + ((x * y) + (z * t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((c * i) <= -1e+100) || !((c * i) <= 400000000.0)) {
tmp = (c * i) + (z * (t + ((x * y) / z)));
} else {
tmp = (a * b) + ((x * y) + (z * t));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((c * i) <= -1e+100) or not ((c * i) <= 400000000.0): tmp = (c * i) + (z * (t + ((x * y) / z))) else: tmp = (a * b) + ((x * y) + (z * t)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(c * i) <= -1e+100) || !(Float64(c * i) <= 400000000.0)) tmp = Float64(Float64(c * i) + Float64(z * Float64(t + Float64(Float64(x * y) / z)))); else tmp = Float64(Float64(a * b) + Float64(Float64(x * y) + Float64(z * t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (((c * i) <= -1e+100) || ~(((c * i) <= 400000000.0))) tmp = (c * i) + (z * (t + ((x * y) / z))); else tmp = (a * b) + ((x * y) + (z * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(c * i), $MachinePrecision], -1e+100], N[Not[LessEqual[N[(c * i), $MachinePrecision], 400000000.0]], $MachinePrecision]], N[(N[(c * i), $MachinePrecision] + N[(z * N[(t + N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * b), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \cdot i \leq -1 \cdot 10^{+100} \lor \neg \left(c \cdot i \leq 400000000\right):\\
\;\;\;\;c \cdot i + z \cdot \left(t + \frac{x \cdot y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot b + \left(x \cdot y + z \cdot t\right)\\
\end{array}
\end{array}
if (*.f64 c i) < -1.00000000000000002e100 or 4e8 < (*.f64 c i) Initial program 91.2%
Taylor expanded in z around inf 85.8%
Taylor expanded in a around 0 84.9%
if -1.00000000000000002e100 < (*.f64 c i) < 4e8Initial program 98.7%
Taylor expanded in c around 0 95.0%
Final simplification91.0%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (* x y) -5e+30) (not (<= (* x y) 5e+78))) (+ (* a b) (+ (* x y) (* z t))) (+ (* c i) (+ (* a b) (* z t)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((x * y) <= -5e+30) || !((x * y) <= 5e+78)) {
tmp = (a * b) + ((x * y) + (z * t));
} else {
tmp = (c * i) + ((a * b) + (z * t));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (((x * y) <= (-5d+30)) .or. (.not. ((x * y) <= 5d+78))) then
tmp = (a * b) + ((x * y) + (z * t))
else
tmp = (c * i) + ((a * b) + (z * t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((x * y) <= -5e+30) || !((x * y) <= 5e+78)) {
tmp = (a * b) + ((x * y) + (z * t));
} else {
tmp = (c * i) + ((a * b) + (z * t));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((x * y) <= -5e+30) or not ((x * y) <= 5e+78): tmp = (a * b) + ((x * y) + (z * t)) else: tmp = (c * i) + ((a * b) + (z * t)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(x * y) <= -5e+30) || !(Float64(x * y) <= 5e+78)) tmp = Float64(Float64(a * b) + Float64(Float64(x * y) + Float64(z * t))); else tmp = Float64(Float64(c * i) + Float64(Float64(a * b) + Float64(z * t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (((x * y) <= -5e+30) || ~(((x * y) <= 5e+78))) tmp = (a * b) + ((x * y) + (z * t)); else tmp = (c * i) + ((a * b) + (z * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(x * y), $MachinePrecision], -5e+30], N[Not[LessEqual[N[(x * y), $MachinePrecision], 5e+78]], $MachinePrecision]], N[(N[(a * b), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(c * i), $MachinePrecision] + N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -5 \cdot 10^{+30} \lor \neg \left(x \cdot y \leq 5 \cdot 10^{+78}\right):\\
\;\;\;\;a \cdot b + \left(x \cdot y + z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;c \cdot i + \left(a \cdot b + z \cdot t\right)\\
\end{array}
\end{array}
if (*.f64 x y) < -4.9999999999999998e30 or 4.99999999999999984e78 < (*.f64 x y) Initial program 98.1%
Taylor expanded in c around 0 86.7%
if -4.9999999999999998e30 < (*.f64 x y) < 4.99999999999999984e78Initial program 94.0%
Taylor expanded in x around 0 92.8%
Final simplification90.3%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= (* x y) -5e+30)
(+ (* a b) (+ (* x y) (* z t)))
(if (<= (* x y) 1e+76)
(+ (* c i) (+ (* a b) (* z t)))
(+ (* c i) (+ (* 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) <= -5e+30) {
tmp = (a * b) + ((x * y) + (z * t));
} else if ((x * y) <= 1e+76) {
tmp = (c * i) + ((a * b) + (z * t));
} else {
tmp = (c * i) + ((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) <= (-5d+30)) then
tmp = (a * b) + ((x * y) + (z * t))
else if ((x * y) <= 1d+76) then
tmp = (c * i) + ((a * b) + (z * t))
else
tmp = (c * i) + ((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) <= -5e+30) {
tmp = (a * b) + ((x * y) + (z * t));
} else if ((x * y) <= 1e+76) {
tmp = (c * i) + ((a * b) + (z * t));
} else {
tmp = (c * i) + ((a * b) + (x * y));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x * y) <= -5e+30: tmp = (a * b) + ((x * y) + (z * t)) elif (x * y) <= 1e+76: tmp = (c * i) + ((a * b) + (z * t)) else: tmp = (c * i) + ((a * b) + (x * y)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(x * y) <= -5e+30) tmp = Float64(Float64(a * b) + Float64(Float64(x * y) + Float64(z * t))); elseif (Float64(x * y) <= 1e+76) tmp = Float64(Float64(c * i) + Float64(Float64(a * b) + Float64(z * t))); else tmp = Float64(Float64(c * i) + 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) <= -5e+30) tmp = (a * b) + ((x * y) + (z * t)); elseif ((x * y) <= 1e+76) tmp = (c * i) + ((a * b) + (z * t)); else tmp = (c * i) + ((a * b) + (x * y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(x * y), $MachinePrecision], -5e+30], N[(N[(a * b), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 1e+76], N[(N[(c * i), $MachinePrecision] + N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(c * i), $MachinePrecision] + N[(N[(a * b), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -5 \cdot 10^{+30}:\\
\;\;\;\;a \cdot b + \left(x \cdot y + z \cdot t\right)\\
\mathbf{elif}\;x \cdot y \leq 10^{+76}:\\
\;\;\;\;c \cdot i + \left(a \cdot b + z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;c \cdot i + \left(a \cdot b + x \cdot y\right)\\
\end{array}
\end{array}
if (*.f64 x y) < -4.9999999999999998e30Initial program 99.9%
Taylor expanded in c around 0 88.5%
if -4.9999999999999998e30 < (*.f64 x y) < 1e76Initial program 93.9%
Taylor expanded in x around 0 92.7%
if 1e76 < (*.f64 x y) Initial program 96.2%
Taylor expanded in z around 0 86.7%
Final simplification90.6%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= (* c i) -1e+100)
(+ (* c i) (* z t))
(if (<= (* c i) 1e+179)
(+ (* a b) (+ (* x y) (* z t)))
(+ (* 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 ((c * i) <= -1e+100) {
tmp = (c * i) + (z * t);
} else if ((c * i) <= 1e+179) {
tmp = (a * b) + ((x * y) + (z * t));
} 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 ((c * i) <= (-1d+100)) then
tmp = (c * i) + (z * t)
else if ((c * i) <= 1d+179) then
tmp = (a * b) + ((x * y) + (z * t))
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 ((c * i) <= -1e+100) {
tmp = (c * i) + (z * t);
} else if ((c * i) <= 1e+179) {
tmp = (a * b) + ((x * y) + (z * t));
} else {
tmp = (x * y) + (c * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c * i) <= -1e+100: tmp = (c * i) + (z * t) elif (c * i) <= 1e+179: tmp = (a * b) + ((x * y) + (z * t)) else: tmp = (x * y) + (c * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(c * i) <= -1e+100) tmp = Float64(Float64(c * i) + Float64(z * t)); elseif (Float64(c * i) <= 1e+179) tmp = Float64(Float64(a * b) + Float64(Float64(x * y) + Float64(z * t))); 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 ((c * i) <= -1e+100) tmp = (c * i) + (z * t); elseif ((c * i) <= 1e+179) tmp = (a * b) + ((x * y) + (z * t)); else tmp = (x * y) + (c * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(c * i), $MachinePrecision], -1e+100], N[(N[(c * i), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 1e+179], N[(N[(a * b), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \cdot i \leq -1 \cdot 10^{+100}:\\
\;\;\;\;c \cdot i + z \cdot t\\
\mathbf{elif}\;c \cdot i \leq 10^{+179}:\\
\;\;\;\;a \cdot b + \left(x \cdot y + z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot y + c \cdot i\\
\end{array}
\end{array}
if (*.f64 c i) < -1.00000000000000002e100Initial program 85.3%
Taylor expanded in z around inf 83.0%
Taylor expanded in z around inf 78.4%
Taylor expanded in a around 0 81.6%
if -1.00000000000000002e100 < (*.f64 c i) < 9.9999999999999998e178Initial program 98.4%
Taylor expanded in c around 0 90.1%
if 9.9999999999999998e178 < (*.f64 c i) Initial program 93.3%
Taylor expanded in z around 0 90.3%
Taylor expanded in a around 0 87.6%
Final simplification88.4%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= t -5.8e+50)
(* z t)
(if (<= t 1.12e-116)
(* a b)
(if (<= t 3.2e-57) (* x y) (if (<= t 2e+111) (* 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 (t <= -5.8e+50) {
tmp = z * t;
} else if (t <= 1.12e-116) {
tmp = a * b;
} else if (t <= 3.2e-57) {
tmp = x * y;
} else if (t <= 2e+111) {
tmp = c * i;
} 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 (t <= (-5.8d+50)) then
tmp = z * t
else if (t <= 1.12d-116) then
tmp = a * b
else if (t <= 3.2d-57) then
tmp = x * y
else if (t <= 2d+111) then
tmp = c * i
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 (t <= -5.8e+50) {
tmp = z * t;
} else if (t <= 1.12e-116) {
tmp = a * b;
} else if (t <= 3.2e-57) {
tmp = x * y;
} else if (t <= 2e+111) {
tmp = c * i;
} else {
tmp = z * t;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if t <= -5.8e+50: tmp = z * t elif t <= 1.12e-116: tmp = a * b elif t <= 3.2e-57: tmp = x * y elif t <= 2e+111: tmp = c * i else: tmp = z * t return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (t <= -5.8e+50) tmp = Float64(z * t); elseif (t <= 1.12e-116) tmp = Float64(a * b); elseif (t <= 3.2e-57) tmp = Float64(x * y); elseif (t <= 2e+111) tmp = Float64(c * i); 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 (t <= -5.8e+50) tmp = z * t; elseif (t <= 1.12e-116) tmp = a * b; elseif (t <= 3.2e-57) tmp = x * y; elseif (t <= 2e+111) tmp = c * i; else tmp = z * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[t, -5.8e+50], N[(z * t), $MachinePrecision], If[LessEqual[t, 1.12e-116], N[(a * b), $MachinePrecision], If[LessEqual[t, 3.2e-57], N[(x * y), $MachinePrecision], If[LessEqual[t, 2e+111], N[(c * i), $MachinePrecision], N[(z * t), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.8 \cdot 10^{+50}:\\
\;\;\;\;z \cdot t\\
\mathbf{elif}\;t \leq 1.12 \cdot 10^{-116}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{-57}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;t \leq 2 \cdot 10^{+111}:\\
\;\;\;\;c \cdot i\\
\mathbf{else}:\\
\;\;\;\;z \cdot t\\
\end{array}
\end{array}
if t < -5.8e50 or 1.99999999999999991e111 < t Initial program 92.4%
Taylor expanded in z around inf 49.8%
if -5.8e50 < t < 1.12e-116Initial program 97.0%
Taylor expanded in a around inf 35.4%
if 1.12e-116 < t < 3.2000000000000001e-57Initial program 100.0%
Taylor expanded in x around inf 67.5%
if 3.2000000000000001e-57 < t < 1.99999999999999991e111Initial program 100.0%
Taylor expanded in c around inf 37.8%
Final simplification43.7%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (* c i) -3.6e+99) (not (<= (* c i) 6.8e-22))) (+ (* c i) (* z t)) (+ (* a b) (* z t))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((c * i) <= -3.6e+99) || !((c * i) <= 6.8e-22)) {
tmp = (c * i) + (z * t);
} else {
tmp = (a * b) + (z * t);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (((c * i) <= (-3.6d+99)) .or. (.not. ((c * i) <= 6.8d-22))) then
tmp = (c * i) + (z * t)
else
tmp = (a * b) + (z * t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((c * i) <= -3.6e+99) || !((c * i) <= 6.8e-22)) {
tmp = (c * i) + (z * t);
} else {
tmp = (a * b) + (z * t);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((c * i) <= -3.6e+99) or not ((c * i) <= 6.8e-22): tmp = (c * i) + (z * t) else: tmp = (a * b) + (z * t) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(c * i) <= -3.6e+99) || !(Float64(c * i) <= 6.8e-22)) tmp = Float64(Float64(c * i) + Float64(z * t)); else tmp = Float64(Float64(a * b) + Float64(z * t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (((c * i) <= -3.6e+99) || ~(((c * i) <= 6.8e-22))) tmp = (c * i) + (z * t); else tmp = (a * b) + (z * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(c * i), $MachinePrecision], -3.6e+99], N[Not[LessEqual[N[(c * i), $MachinePrecision], 6.8e-22]], $MachinePrecision]], N[(N[(c * i), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \cdot i \leq -3.6 \cdot 10^{+99} \lor \neg \left(c \cdot i \leq 6.8 \cdot 10^{-22}\right):\\
\;\;\;\;c \cdot i + z \cdot t\\
\mathbf{else}:\\
\;\;\;\;a \cdot b + z \cdot t\\
\end{array}
\end{array}
if (*.f64 c i) < -3.6000000000000002e99 or 6.7999999999999997e-22 < (*.f64 c i) Initial program 91.7%
Taylor expanded in z around inf 84.8%
Taylor expanded in z around inf 77.1%
Taylor expanded in a around 0 75.2%
if -3.6000000000000002e99 < (*.f64 c i) < 6.7999999999999997e-22Initial program 98.6%
Taylor expanded in z around inf 90.2%
Taylor expanded in z around inf 74.1%
Taylor expanded in c around 0 70.9%
Final simplification72.7%
(FPCore (x y z t a b c i) :precision binary64 (if (<= (* c i) -1e+100) (+ (* c i) (* z t)) (if (<= (* c i) 2e-39) (+ (* a b) (* z t)) (+ (* 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 ((c * i) <= -1e+100) {
tmp = (c * i) + (z * t);
} else if ((c * i) <= 2e-39) {
tmp = (a * b) + (z * t);
} 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 ((c * i) <= (-1d+100)) then
tmp = (c * i) + (z * t)
else if ((c * i) <= 2d-39) then
tmp = (a * b) + (z * t)
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 ((c * i) <= -1e+100) {
tmp = (c * i) + (z * t);
} else if ((c * i) <= 2e-39) {
tmp = (a * b) + (z * t);
} else {
tmp = (x * y) + (c * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c * i) <= -1e+100: tmp = (c * i) + (z * t) elif (c * i) <= 2e-39: tmp = (a * b) + (z * t) else: tmp = (x * y) + (c * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(c * i) <= -1e+100) tmp = Float64(Float64(c * i) + Float64(z * t)); elseif (Float64(c * i) <= 2e-39) tmp = Float64(Float64(a * b) + Float64(z * t)); 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 ((c * i) <= -1e+100) tmp = (c * i) + (z * t); elseif ((c * i) <= 2e-39) tmp = (a * b) + (z * t); else tmp = (x * y) + (c * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(c * i), $MachinePrecision], -1e+100], N[(N[(c * i), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 2e-39], N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \cdot i \leq -1 \cdot 10^{+100}:\\
\;\;\;\;c \cdot i + z \cdot t\\
\mathbf{elif}\;c \cdot i \leq 2 \cdot 10^{-39}:\\
\;\;\;\;a \cdot b + z \cdot t\\
\mathbf{else}:\\
\;\;\;\;x \cdot y + c \cdot i\\
\end{array}
\end{array}
if (*.f64 c i) < -1.00000000000000002e100Initial program 85.3%
Taylor expanded in z around inf 83.0%
Taylor expanded in z around inf 78.4%
Taylor expanded in a around 0 81.6%
if -1.00000000000000002e100 < (*.f64 c i) < 1.99999999999999986e-39Initial program 98.6%
Taylor expanded in z around inf 90.0%
Taylor expanded in z around inf 75.1%
Taylor expanded in c around 0 71.9%
if 1.99999999999999986e-39 < (*.f64 c i) Initial program 95.7%
Taylor expanded in z around 0 77.8%
Taylor expanded in a around 0 69.6%
Final simplification72.8%
(FPCore (x y z t a b c i) :precision binary64 (if (<= t -8.5e+46) (* z t) (if (<= t 3.05e-65) (* a b) (if (<= t 2.32e+111) (* 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 (t <= -8.5e+46) {
tmp = z * t;
} else if (t <= 3.05e-65) {
tmp = a * b;
} else if (t <= 2.32e+111) {
tmp = c * i;
} 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 (t <= (-8.5d+46)) then
tmp = z * t
else if (t <= 3.05d-65) then
tmp = a * b
else if (t <= 2.32d+111) then
tmp = c * i
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 (t <= -8.5e+46) {
tmp = z * t;
} else if (t <= 3.05e-65) {
tmp = a * b;
} else if (t <= 2.32e+111) {
tmp = c * i;
} else {
tmp = z * t;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if t <= -8.5e+46: tmp = z * t elif t <= 3.05e-65: tmp = a * b elif t <= 2.32e+111: tmp = c * i else: tmp = z * t return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (t <= -8.5e+46) tmp = Float64(z * t); elseif (t <= 3.05e-65) tmp = Float64(a * b); elseif (t <= 2.32e+111) tmp = Float64(c * i); 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 (t <= -8.5e+46) tmp = z * t; elseif (t <= 3.05e-65) tmp = a * b; elseif (t <= 2.32e+111) tmp = c * i; else tmp = z * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[t, -8.5e+46], N[(z * t), $MachinePrecision], If[LessEqual[t, 3.05e-65], N[(a * b), $MachinePrecision], If[LessEqual[t, 2.32e+111], N[(c * i), $MachinePrecision], N[(z * t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.5 \cdot 10^{+46}:\\
\;\;\;\;z \cdot t\\
\mathbf{elif}\;t \leq 3.05 \cdot 10^{-65}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;t \leq 2.32 \cdot 10^{+111}:\\
\;\;\;\;c \cdot i\\
\mathbf{else}:\\
\;\;\;\;z \cdot t\\
\end{array}
\end{array}
if t < -8.4999999999999996e46 or 2.32e111 < t Initial program 92.6%
Taylor expanded in z around inf 48.9%
if -8.4999999999999996e46 < t < 3.05000000000000007e-65Initial program 97.3%
Taylor expanded in a around inf 34.1%
if 3.05000000000000007e-65 < t < 2.32e111Initial program 100.0%
Taylor expanded in c around inf 36.7%
Final simplification40.7%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= t -6.2e-149) (not (<= t 2e+111))) (+ (* a b) (* z t)) (+ (* 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 ((t <= -6.2e-149) || !(t <= 2e+111)) {
tmp = (a * b) + (z * t);
} 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 ((t <= (-6.2d-149)) .or. (.not. (t <= 2d+111))) then
tmp = (a * b) + (z * t)
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 ((t <= -6.2e-149) || !(t <= 2e+111)) {
tmp = (a * b) + (z * t);
} else {
tmp = (a * b) + (c * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (t <= -6.2e-149) or not (t <= 2e+111): tmp = (a * b) + (z * t) else: tmp = (a * b) + (c * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((t <= -6.2e-149) || !(t <= 2e+111)) tmp = Float64(Float64(a * b) + Float64(z * t)); 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 ((t <= -6.2e-149) || ~((t <= 2e+111))) tmp = (a * b) + (z * t); else tmp = (a * b) + (c * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[t, -6.2e-149], N[Not[LessEqual[t, 2e+111]], $MachinePrecision]], N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], N[(N[(a * b), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.2 \cdot 10^{-149} \lor \neg \left(t \leq 2 \cdot 10^{+111}\right):\\
\;\;\;\;a \cdot b + z \cdot t\\
\mathbf{else}:\\
\;\;\;\;a \cdot b + c \cdot i\\
\end{array}
\end{array}
if t < -6.19999999999999974e-149 or 1.99999999999999991e111 < t Initial program 93.7%
Taylor expanded in z around inf 85.7%
Taylor expanded in z around inf 83.5%
Taylor expanded in c around 0 68.3%
if -6.19999999999999974e-149 < t < 1.99999999999999991e111Initial program 98.2%
Taylor expanded in z around 0 86.5%
Taylor expanded in x around 0 53.3%
Final simplification61.7%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= z -1.7e+211) (not (<= z 6.8e-18))) (* z t) (+ (* 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 ((z <= -1.7e+211) || !(z <= 6.8e-18)) {
tmp = z * t;
} 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 ((z <= (-1.7d+211)) .or. (.not. (z <= 6.8d-18))) then
tmp = z * t
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 ((z <= -1.7e+211) || !(z <= 6.8e-18)) {
tmp = z * t;
} else {
tmp = (a * b) + (c * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (z <= -1.7e+211) or not (z <= 6.8e-18): tmp = z * t else: tmp = (a * b) + (c * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((z <= -1.7e+211) || !(z <= 6.8e-18)) tmp = Float64(z * t); 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 ((z <= -1.7e+211) || ~((z <= 6.8e-18))) tmp = z * t; else tmp = (a * b) + (c * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[z, -1.7e+211], N[Not[LessEqual[z, 6.8e-18]], $MachinePrecision]], N[(z * t), $MachinePrecision], N[(N[(a * b), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{+211} \lor \neg \left(z \leq 6.8 \cdot 10^{-18}\right):\\
\;\;\;\;z \cdot t\\
\mathbf{else}:\\
\;\;\;\;a \cdot b + c \cdot i\\
\end{array}
\end{array}
if z < -1.69999999999999995e211 or 6.80000000000000002e-18 < z Initial program 93.0%
Taylor expanded in z around inf 56.7%
if -1.69999999999999995e211 < z < 6.80000000000000002e-18Initial program 97.0%
Taylor expanded in z around 0 84.9%
Taylor expanded in x around 0 62.3%
Final simplification60.4%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (* c i) -6.4e+99) (not (<= (* c i) 2.4e-22))) (* c i) (* a b)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((c * i) <= -6.4e+99) || !((c * i) <= 2.4e-22)) {
tmp = c * i;
} else {
tmp = a * b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (((c * i) <= (-6.4d+99)) .or. (.not. ((c * i) <= 2.4d-22))) then
tmp = c * i
else
tmp = a * b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((c * i) <= -6.4e+99) || !((c * i) <= 2.4e-22)) {
tmp = c * i;
} else {
tmp = a * b;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((c * i) <= -6.4e+99) or not ((c * i) <= 2.4e-22): tmp = c * i else: tmp = a * b return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(c * i) <= -6.4e+99) || !(Float64(c * i) <= 2.4e-22)) tmp = Float64(c * i); else tmp = Float64(a * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (((c * i) <= -6.4e+99) || ~(((c * i) <= 2.4e-22))) tmp = c * i; else tmp = a * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(c * i), $MachinePrecision], -6.4e+99], N[Not[LessEqual[N[(c * i), $MachinePrecision], 2.4e-22]], $MachinePrecision]], N[(c * i), $MachinePrecision], N[(a * b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \cdot i \leq -6.4 \cdot 10^{+99} \lor \neg \left(c \cdot i \leq 2.4 \cdot 10^{-22}\right):\\
\;\;\;\;c \cdot i\\
\mathbf{else}:\\
\;\;\;\;a \cdot b\\
\end{array}
\end{array}
if (*.f64 c i) < -6.39999999999999999e99 or 2.40000000000000002e-22 < (*.f64 c i) Initial program 91.7%
Taylor expanded in c around inf 54.6%
if -6.39999999999999999e99 < (*.f64 c i) < 2.40000000000000002e-22Initial program 98.6%
Taylor expanded in a around inf 41.6%
Final simplification47.1%
(FPCore (x y z t a b c i) :precision binary64 (* a b))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a * b;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = a * b
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a * b;
}
def code(x, y, z, t, a, b, c, i): return a * b
function code(x, y, z, t, a, b, c, i) return Float64(a * b) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = a * b; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(a * b), $MachinePrecision]
\begin{array}{l}
\\
a \cdot b
\end{array}
Initial program 95.7%
Taylor expanded in a around inf 28.9%
herbie shell --seed 2024086
(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)))