
(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 (+ (* c i) (* 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) + ((a * b) + ((x * y) + (z * t)));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = (c * i) + (x * y);
}
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 = (c * i) + (x * y);
}
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 = (c * i) + (x * y) 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(Float64(c * i) + Float64(x * y)); 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 = (c * i) + (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[(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[(N[(c * i), $MachinePrecision] + N[(x * y), $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}:\\
\;\;\;\;c \cdot i + x \cdot y\\
\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 57.3%
Final simplification98.8%
(FPCore (x y z t a b c i) :precision binary64 (fma a b (fma x y (fma c i (* z t)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return fma(a, b, fma(x, y, fma(c, i, (z * t))));
}
function code(x, y, z, t, a, b, c, i) return fma(a, b, fma(x, y, fma(c, i, Float64(z * t)))) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(a * b + N[(x * y + N[(c * i + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(a, b, \mathsf{fma}\left(x, y, \mathsf{fma}\left(c, i, z \cdot t\right)\right)\right)
\end{array}
Initial program 97.3%
+-commutative97.3%
associate-+l+97.3%
fma-def98.4%
associate-+l+98.4%
fma-def98.4%
+-commutative98.4%
fma-def98.8%
Simplified98.8%
Final simplification98.8%
(FPCore (x y z t a b c i) :precision binary64 (fma z t (+ (fma x y (* a b)) (* c i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return fma(z, t, (fma(x, y, (a * b)) + (c * i)));
}
function code(x, y, z, t, a, b, c, i) return fma(z, t, Float64(fma(x, y, Float64(a * b)) + Float64(c * i))) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(z * t + N[(N[(x * y + N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(z, t, \mathsf{fma}\left(x, y, a \cdot b\right) + c \cdot i\right)
\end{array}
Initial program 97.3%
associate-+l+97.3%
+-commutative97.3%
associate-+l+97.3%
fma-def98.0%
associate-+r+98.0%
+-commutative98.0%
fma-def98.0%
fma-def98.4%
Simplified98.4%
fma-udef98.4%
+-commutative98.4%
Applied egg-rr98.4%
Final simplification98.4%
(FPCore (x y z t a b c i) :precision binary64 (+ (* c i) (+ (fma x y (* a b)) (* z t))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (c * i) + (fma(x, y, (a * b)) + (z * t));
}
function code(x, y, z, t, a, b, c, i) return Float64(Float64(c * i) + Float64(fma(x, y, Float64(a * b)) + Float64(z * t))) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(c * i), $MachinePrecision] + N[(N[(x * y + N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
c \cdot i + \left(\mathsf{fma}\left(x, y, a \cdot b\right) + z \cdot t\right)
\end{array}
Initial program 97.3%
associate-+l+97.3%
+-commutative97.3%
associate-+l+97.3%
fma-def98.0%
associate-+r+98.0%
+-commutative98.0%
fma-def98.0%
fma-def98.4%
Simplified98.4%
fma-udef98.4%
+-commutative98.4%
Applied egg-rr98.4%
fma-udef97.7%
*-commutative97.7%
associate-+r+97.7%
*-commutative97.7%
Applied egg-rr97.7%
Final simplification97.7%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= (* c i) -7.2e+133)
(* c i)
(if (<= (* c i) -2.55e-130)
(* x y)
(if (<= (* c i) -1.6e-284)
(* a b)
(if (<= (* c i) -4e-309)
(* x y)
(if (<= (* c i) 5.5e-241)
(* z t)
(if (<= (* c i) 1.12e-129)
(* a b)
(if (<= (* c i) 160000.0)
(* x y)
(if (<= (* c i) 2.45e+76)
(* a b)
(if (<= (* c i) 8e+95) (* 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) <= -7.2e+133) {
tmp = c * i;
} else if ((c * i) <= -2.55e-130) {
tmp = x * y;
} else if ((c * i) <= -1.6e-284) {
tmp = a * b;
} else if ((c * i) <= -4e-309) {
tmp = x * y;
} else if ((c * i) <= 5.5e-241) {
tmp = z * t;
} else if ((c * i) <= 1.12e-129) {
tmp = a * b;
} else if ((c * i) <= 160000.0) {
tmp = x * y;
} else if ((c * i) <= 2.45e+76) {
tmp = a * b;
} else if ((c * i) <= 8e+95) {
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) <= (-7.2d+133)) then
tmp = c * i
else if ((c * i) <= (-2.55d-130)) then
tmp = x * y
else if ((c * i) <= (-1.6d-284)) then
tmp = a * b
else if ((c * i) <= (-4d-309)) then
tmp = x * y
else if ((c * i) <= 5.5d-241) then
tmp = z * t
else if ((c * i) <= 1.12d-129) then
tmp = a * b
else if ((c * i) <= 160000.0d0) then
tmp = x * y
else if ((c * i) <= 2.45d+76) then
tmp = a * b
else if ((c * i) <= 8d+95) 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) <= -7.2e+133) {
tmp = c * i;
} else if ((c * i) <= -2.55e-130) {
tmp = x * y;
} else if ((c * i) <= -1.6e-284) {
tmp = a * b;
} else if ((c * i) <= -4e-309) {
tmp = x * y;
} else if ((c * i) <= 5.5e-241) {
tmp = z * t;
} else if ((c * i) <= 1.12e-129) {
tmp = a * b;
} else if ((c * i) <= 160000.0) {
tmp = x * y;
} else if ((c * i) <= 2.45e+76) {
tmp = a * b;
} else if ((c * i) <= 8e+95) {
tmp = z * t;
} else {
tmp = c * i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c * i) <= -7.2e+133: tmp = c * i elif (c * i) <= -2.55e-130: tmp = x * y elif (c * i) <= -1.6e-284: tmp = a * b elif (c * i) <= -4e-309: tmp = x * y elif (c * i) <= 5.5e-241: tmp = z * t elif (c * i) <= 1.12e-129: tmp = a * b elif (c * i) <= 160000.0: tmp = x * y elif (c * i) <= 2.45e+76: tmp = a * b elif (c * i) <= 8e+95: 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) <= -7.2e+133) tmp = Float64(c * i); elseif (Float64(c * i) <= -2.55e-130) tmp = Float64(x * y); elseif (Float64(c * i) <= -1.6e-284) tmp = Float64(a * b); elseif (Float64(c * i) <= -4e-309) tmp = Float64(x * y); elseif (Float64(c * i) <= 5.5e-241) tmp = Float64(z * t); elseif (Float64(c * i) <= 1.12e-129) tmp = Float64(a * b); elseif (Float64(c * i) <= 160000.0) tmp = Float64(x * y); elseif (Float64(c * i) <= 2.45e+76) tmp = Float64(a * b); elseif (Float64(c * i) <= 8e+95) 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) <= -7.2e+133) tmp = c * i; elseif ((c * i) <= -2.55e-130) tmp = x * y; elseif ((c * i) <= -1.6e-284) tmp = a * b; elseif ((c * i) <= -4e-309) tmp = x * y; elseif ((c * i) <= 5.5e-241) tmp = z * t; elseif ((c * i) <= 1.12e-129) tmp = a * b; elseif ((c * i) <= 160000.0) tmp = x * y; elseif ((c * i) <= 2.45e+76) tmp = a * b; elseif ((c * i) <= 8e+95) 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], -7.2e+133], N[(c * i), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], -2.55e-130], N[(x * y), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], -1.6e-284], N[(a * b), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], -4e-309], N[(x * y), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 5.5e-241], N[(z * t), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 1.12e-129], N[(a * b), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 160000.0], N[(x * y), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 2.45e+76], N[(a * b), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 8e+95], N[(z * t), $MachinePrecision], N[(c * i), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \cdot i \leq -7.2 \cdot 10^{+133}:\\
\;\;\;\;c \cdot i\\
\mathbf{elif}\;c \cdot i \leq -2.55 \cdot 10^{-130}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;c \cdot i \leq -1.6 \cdot 10^{-284}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;c \cdot i \leq -4 \cdot 10^{-309}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;c \cdot i \leq 5.5 \cdot 10^{-241}:\\
\;\;\;\;z \cdot t\\
\mathbf{elif}\;c \cdot i \leq 1.12 \cdot 10^{-129}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;c \cdot i \leq 160000:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;c \cdot i \leq 2.45 \cdot 10^{+76}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;c \cdot i \leq 8 \cdot 10^{+95}:\\
\;\;\;\;z \cdot t\\
\mathbf{else}:\\
\;\;\;\;c \cdot i\\
\end{array}
\end{array}
if (*.f64 c i) < -7.19999999999999956e133 or 8.00000000000000016e95 < (*.f64 c i) Initial program 95.2%
Taylor expanded in c around inf 74.0%
if -7.19999999999999956e133 < (*.f64 c i) < -2.5499999999999999e-130 or -1.60000000000000012e-284 < (*.f64 c i) < -3.9999999999999977e-309 or 1.12000000000000006e-129 < (*.f64 c i) < 1.6e5Initial program 98.9%
associate-+l+98.9%
+-commutative98.9%
associate-+l+98.9%
fma-def98.9%
associate-+r+98.9%
+-commutative98.9%
fma-def98.9%
fma-def98.9%
Simplified98.9%
fma-udef98.9%
+-commutative98.9%
Applied egg-rr98.9%
fma-udef98.9%
*-commutative98.9%
associate-+r+98.9%
*-commutative98.9%
Applied egg-rr98.9%
Taylor expanded in x around inf 48.7%
if -2.5499999999999999e-130 < (*.f64 c i) < -1.60000000000000012e-284 or 5.4999999999999998e-241 < (*.f64 c i) < 1.12000000000000006e-129 or 1.6e5 < (*.f64 c i) < 2.45000000000000013e76Initial program 97.5%
associate-+l+97.5%
+-commutative97.5%
associate-+l+97.5%
fma-def100.0%
associate-+r+100.0%
+-commutative100.0%
fma-def100.0%
fma-def100.0%
Simplified100.0%
fma-udef100.0%
+-commutative100.0%
Applied egg-rr100.0%
fma-udef97.5%
*-commutative97.5%
associate-+r+97.5%
*-commutative97.5%
Applied egg-rr97.5%
Taylor expanded in a around inf 62.1%
if -3.9999999999999977e-309 < (*.f64 c i) < 5.4999999999999998e-241 or 2.45000000000000013e76 < (*.f64 c i) < 8.00000000000000016e95Initial program 97.6%
associate-+l+97.6%
+-commutative97.6%
associate-+l+97.6%
fma-def97.6%
associate-+r+97.6%
+-commutative97.6%
fma-def97.6%
fma-def97.6%
Simplified97.6%
fma-udef97.6%
+-commutative97.6%
Applied egg-rr97.6%
Taylor expanded in z around inf 51.5%
Final simplification59.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* a b) (* x y)))
(t_2 (+ (* x y) (* z t)))
(t_3 (+ (* a b) (* c i))))
(if (<= (* c i) -8.5e+64)
t_3
(if (<= (* c i) -4e-279)
t_1
(if (<= (* c i) 9.2e-242)
t_2
(if (<= (* c i) 9.5e-67)
t_1
(if (<= (* c i) 5800000.0)
t_2
(if (<= (* c i) 1.75e+51) t_1 t_3))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (a * b) + (x * y);
double t_2 = (x * y) + (z * t);
double t_3 = (a * b) + (c * i);
double tmp;
if ((c * i) <= -8.5e+64) {
tmp = t_3;
} else if ((c * i) <= -4e-279) {
tmp = t_1;
} else if ((c * i) <= 9.2e-242) {
tmp = t_2;
} else if ((c * i) <= 9.5e-67) {
tmp = t_1;
} else if ((c * i) <= 5800000.0) {
tmp = t_2;
} else if ((c * i) <= 1.75e+51) {
tmp = t_1;
} else {
tmp = t_3;
}
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) :: t_3
real(8) :: tmp
t_1 = (a * b) + (x * y)
t_2 = (x * y) + (z * t)
t_3 = (a * b) + (c * i)
if ((c * i) <= (-8.5d+64)) then
tmp = t_3
else if ((c * i) <= (-4d-279)) then
tmp = t_1
else if ((c * i) <= 9.2d-242) then
tmp = t_2
else if ((c * i) <= 9.5d-67) then
tmp = t_1
else if ((c * i) <= 5800000.0d0) then
tmp = t_2
else if ((c * i) <= 1.75d+51) then
tmp = t_1
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (a * b) + (x * y);
double t_2 = (x * y) + (z * t);
double t_3 = (a * b) + (c * i);
double tmp;
if ((c * i) <= -8.5e+64) {
tmp = t_3;
} else if ((c * i) <= -4e-279) {
tmp = t_1;
} else if ((c * i) <= 9.2e-242) {
tmp = t_2;
} else if ((c * i) <= 9.5e-67) {
tmp = t_1;
} else if ((c * i) <= 5800000.0) {
tmp = t_2;
} else if ((c * i) <= 1.75e+51) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (a * b) + (x * y) t_2 = (x * y) + (z * t) t_3 = (a * b) + (c * i) tmp = 0 if (c * i) <= -8.5e+64: tmp = t_3 elif (c * i) <= -4e-279: tmp = t_1 elif (c * i) <= 9.2e-242: tmp = t_2 elif (c * i) <= 9.5e-67: tmp = t_1 elif (c * i) <= 5800000.0: tmp = t_2 elif (c * i) <= 1.75e+51: tmp = t_1 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(a * b) + Float64(x * y)) t_2 = Float64(Float64(x * y) + Float64(z * t)) t_3 = Float64(Float64(a * b) + Float64(c * i)) tmp = 0.0 if (Float64(c * i) <= -8.5e+64) tmp = t_3; elseif (Float64(c * i) <= -4e-279) tmp = t_1; elseif (Float64(c * i) <= 9.2e-242) tmp = t_2; elseif (Float64(c * i) <= 9.5e-67) tmp = t_1; elseif (Float64(c * i) <= 5800000.0) tmp = t_2; elseif (Float64(c * i) <= 1.75e+51) tmp = t_1; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (a * b) + (x * y); t_2 = (x * y) + (z * t); t_3 = (a * b) + (c * i); tmp = 0.0; if ((c * i) <= -8.5e+64) tmp = t_3; elseif ((c * i) <= -4e-279) tmp = t_1; elseif ((c * i) <= 9.2e-242) tmp = t_2; elseif ((c * i) <= 9.5e-67) tmp = t_1; elseif ((c * i) <= 5800000.0) tmp = t_2; elseif ((c * i) <= 1.75e+51) tmp = t_1; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(a * b), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(a * b), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(c * i), $MachinePrecision], -8.5e+64], t$95$3, If[LessEqual[N[(c * i), $MachinePrecision], -4e-279], t$95$1, If[LessEqual[N[(c * i), $MachinePrecision], 9.2e-242], t$95$2, If[LessEqual[N[(c * i), $MachinePrecision], 9.5e-67], t$95$1, If[LessEqual[N[(c * i), $MachinePrecision], 5800000.0], t$95$2, If[LessEqual[N[(c * i), $MachinePrecision], 1.75e+51], t$95$1, t$95$3]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot b + x \cdot y\\
t_2 := x \cdot y + z \cdot t\\
t_3 := a \cdot b + c \cdot i\\
\mathbf{if}\;c \cdot i \leq -8.5 \cdot 10^{+64}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;c \cdot i \leq -4 \cdot 10^{-279}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \cdot i \leq 9.2 \cdot 10^{-242}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \cdot i \leq 9.5 \cdot 10^{-67}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \cdot i \leq 5800000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \cdot i \leq 1.75 \cdot 10^{+51}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if (*.f64 c i) < -8.4999999999999998e64 or 1.75e51 < (*.f64 c i) Initial program 94.3%
Taylor expanded in a around inf 79.5%
if -8.4999999999999998e64 < (*.f64 c i) < -4.00000000000000022e-279 or 9.19999999999999939e-242 < (*.f64 c i) < 9.4999999999999994e-67 or 5.8e6 < (*.f64 c i) < 1.75e51Initial program 98.8%
associate-+l+98.8%
+-commutative98.8%
associate-+l+98.8%
fma-def100.0%
associate-+r+100.0%
+-commutative100.0%
fma-def100.0%
fma-def100.0%
Simplified100.0%
fma-udef100.0%
+-commutative100.0%
Applied egg-rr100.0%
fma-udef98.8%
*-commutative98.8%
associate-+r+98.8%
*-commutative98.8%
Applied egg-rr98.8%
Taylor expanded in z around 0 87.6%
+-commutative87.6%
fma-udef87.6%
Simplified87.6%
Taylor expanded in c around 0 83.0%
if -4.00000000000000022e-279 < (*.f64 c i) < 9.19999999999999939e-242 or 9.4999999999999994e-67 < (*.f64 c i) < 5.8e6Initial program 100.0%
Taylor expanded in a around 0 81.0%
Taylor expanded in c around 0 80.9%
Final simplification81.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* a b) (* x y))) (t_2 (+ (* x y) (* z t))))
(if (<= (* c i) -3.7e+67)
(+ (* c i) (* x y))
(if (<= (* c i) -2.35e-281)
t_1
(if (<= (* c i) 2.5e-241)
t_2
(if (<= (* c i) 2.5e-68)
t_1
(if (<= (* c i) 500000.0)
t_2
(if (<= (* c i) 3e+47) t_1 (+ (* a b) (* c i))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (a * b) + (x * y);
double t_2 = (x * y) + (z * t);
double tmp;
if ((c * i) <= -3.7e+67) {
tmp = (c * i) + (x * y);
} else if ((c * i) <= -2.35e-281) {
tmp = t_1;
} else if ((c * i) <= 2.5e-241) {
tmp = t_2;
} else if ((c * i) <= 2.5e-68) {
tmp = t_1;
} else if ((c * i) <= 500000.0) {
tmp = t_2;
} else if ((c * i) <= 3e+47) {
tmp = t_1;
} 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (a * b) + (x * y)
t_2 = (x * y) + (z * t)
if ((c * i) <= (-3.7d+67)) then
tmp = (c * i) + (x * y)
else if ((c * i) <= (-2.35d-281)) then
tmp = t_1
else if ((c * i) <= 2.5d-241) then
tmp = t_2
else if ((c * i) <= 2.5d-68) then
tmp = t_1
else if ((c * i) <= 500000.0d0) then
tmp = t_2
else if ((c * i) <= 3d+47) then
tmp = t_1
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 t_1 = (a * b) + (x * y);
double t_2 = (x * y) + (z * t);
double tmp;
if ((c * i) <= -3.7e+67) {
tmp = (c * i) + (x * y);
} else if ((c * i) <= -2.35e-281) {
tmp = t_1;
} else if ((c * i) <= 2.5e-241) {
tmp = t_2;
} else if ((c * i) <= 2.5e-68) {
tmp = t_1;
} else if ((c * i) <= 500000.0) {
tmp = t_2;
} else if ((c * i) <= 3e+47) {
tmp = t_1;
} else {
tmp = (a * b) + (c * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (a * b) + (x * y) t_2 = (x * y) + (z * t) tmp = 0 if (c * i) <= -3.7e+67: tmp = (c * i) + (x * y) elif (c * i) <= -2.35e-281: tmp = t_1 elif (c * i) <= 2.5e-241: tmp = t_2 elif (c * i) <= 2.5e-68: tmp = t_1 elif (c * i) <= 500000.0: tmp = t_2 elif (c * i) <= 3e+47: tmp = t_1 else: tmp = (a * b) + (c * i) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(a * b) + Float64(x * y)) t_2 = Float64(Float64(x * y) + Float64(z * t)) tmp = 0.0 if (Float64(c * i) <= -3.7e+67) tmp = Float64(Float64(c * i) + Float64(x * y)); elseif (Float64(c * i) <= -2.35e-281) tmp = t_1; elseif (Float64(c * i) <= 2.5e-241) tmp = t_2; elseif (Float64(c * i) <= 2.5e-68) tmp = t_1; elseif (Float64(c * i) <= 500000.0) tmp = t_2; elseif (Float64(c * i) <= 3e+47) tmp = t_1; 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) t_1 = (a * b) + (x * y); t_2 = (x * y) + (z * t); tmp = 0.0; if ((c * i) <= -3.7e+67) tmp = (c * i) + (x * y); elseif ((c * i) <= -2.35e-281) tmp = t_1; elseif ((c * i) <= 2.5e-241) tmp = t_2; elseif ((c * i) <= 2.5e-68) tmp = t_1; elseif ((c * i) <= 500000.0) tmp = t_2; elseif ((c * i) <= 3e+47) tmp = t_1; else tmp = (a * b) + (c * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(a * b), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(c * i), $MachinePrecision], -3.7e+67], N[(N[(c * i), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], -2.35e-281], t$95$1, If[LessEqual[N[(c * i), $MachinePrecision], 2.5e-241], t$95$2, If[LessEqual[N[(c * i), $MachinePrecision], 2.5e-68], t$95$1, If[LessEqual[N[(c * i), $MachinePrecision], 500000.0], t$95$2, If[LessEqual[N[(c * i), $MachinePrecision], 3e+47], t$95$1, N[(N[(a * b), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot b + x \cdot y\\
t_2 := x \cdot y + z \cdot t\\
\mathbf{if}\;c \cdot i \leq -3.7 \cdot 10^{+67}:\\
\;\;\;\;c \cdot i + x \cdot y\\
\mathbf{elif}\;c \cdot i \leq -2.35 \cdot 10^{-281}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \cdot i \leq 2.5 \cdot 10^{-241}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \cdot i \leq 2.5 \cdot 10^{-68}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \cdot i \leq 500000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \cdot i \leq 3 \cdot 10^{+47}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot b + c \cdot i\\
\end{array}
\end{array}
if (*.f64 c i) < -3.6999999999999997e67Initial program 90.7%
Taylor expanded in x around inf 83.6%
if -3.6999999999999997e67 < (*.f64 c i) < -2.3500000000000001e-281 or 2.4999999999999999e-241 < (*.f64 c i) < 2.49999999999999986e-68 or 5e5 < (*.f64 c i) < 3.0000000000000001e47Initial program 98.8%
associate-+l+98.8%
+-commutative98.8%
associate-+l+98.8%
fma-def100.0%
associate-+r+100.0%
+-commutative100.0%
fma-def100.0%
fma-def100.0%
Simplified100.0%
fma-udef100.0%
+-commutative100.0%
Applied egg-rr100.0%
fma-udef98.8%
*-commutative98.8%
associate-+r+98.8%
*-commutative98.8%
Applied egg-rr98.8%
Taylor expanded in z around 0 87.6%
+-commutative87.6%
fma-udef87.6%
Simplified87.6%
Taylor expanded in c around 0 83.0%
if -2.3500000000000001e-281 < (*.f64 c i) < 2.4999999999999999e-241 or 2.49999999999999986e-68 < (*.f64 c i) < 5e5Initial program 100.0%
Taylor expanded in a around 0 81.0%
Taylor expanded in c around 0 80.9%
if 3.0000000000000001e47 < (*.f64 c i) Initial program 96.8%
Taylor expanded in a around inf 78.4%
Final simplification81.4%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= (* a b) -9.5e+26)
(* a b)
(if (<= (* a b) -2.3e-39)
(* z t)
(if (<= (* a b) 5.1e-21)
(* c i)
(if (<= (* a b) 6.9e+87)
(* z t)
(if (<= (* a b) 6.5e+120) (* 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) <= -9.5e+26) {
tmp = a * b;
} else if ((a * b) <= -2.3e-39) {
tmp = z * t;
} else if ((a * b) <= 5.1e-21) {
tmp = c * i;
} else if ((a * b) <= 6.9e+87) {
tmp = z * t;
} else if ((a * b) <= 6.5e+120) {
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) <= (-9.5d+26)) then
tmp = a * b
else if ((a * b) <= (-2.3d-39)) then
tmp = z * t
else if ((a * b) <= 5.1d-21) then
tmp = c * i
else if ((a * b) <= 6.9d+87) then
tmp = z * t
else if ((a * b) <= 6.5d+120) 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) <= -9.5e+26) {
tmp = a * b;
} else if ((a * b) <= -2.3e-39) {
tmp = z * t;
} else if ((a * b) <= 5.1e-21) {
tmp = c * i;
} else if ((a * b) <= 6.9e+87) {
tmp = z * t;
} else if ((a * b) <= 6.5e+120) {
tmp = c * i;
} else {
tmp = a * b;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (a * b) <= -9.5e+26: tmp = a * b elif (a * b) <= -2.3e-39: tmp = z * t elif (a * b) <= 5.1e-21: tmp = c * i elif (a * b) <= 6.9e+87: tmp = z * t elif (a * b) <= 6.5e+120: 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) <= -9.5e+26) tmp = Float64(a * b); elseif (Float64(a * b) <= -2.3e-39) tmp = Float64(z * t); elseif (Float64(a * b) <= 5.1e-21) tmp = Float64(c * i); elseif (Float64(a * b) <= 6.9e+87) tmp = Float64(z * t); elseif (Float64(a * b) <= 6.5e+120) 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) <= -9.5e+26) tmp = a * b; elseif ((a * b) <= -2.3e-39) tmp = z * t; elseif ((a * b) <= 5.1e-21) tmp = c * i; elseif ((a * b) <= 6.9e+87) tmp = z * t; elseif ((a * b) <= 6.5e+120) 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], -9.5e+26], N[(a * b), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], -2.3e-39], N[(z * t), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 5.1e-21], N[(c * i), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 6.9e+87], N[(z * t), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 6.5e+120], N[(c * i), $MachinePrecision], N[(a * b), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -9.5 \cdot 10^{+26}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;a \cdot b \leq -2.3 \cdot 10^{-39}:\\
\;\;\;\;z \cdot t\\
\mathbf{elif}\;a \cdot b \leq 5.1 \cdot 10^{-21}:\\
\;\;\;\;c \cdot i\\
\mathbf{elif}\;a \cdot b \leq 6.9 \cdot 10^{+87}:\\
\;\;\;\;z \cdot t\\
\mathbf{elif}\;a \cdot b \leq 6.5 \cdot 10^{+120}:\\
\;\;\;\;c \cdot i\\
\mathbf{else}:\\
\;\;\;\;a \cdot b\\
\end{array}
\end{array}
if (*.f64 a b) < -9.50000000000000054e26 or 6.4999999999999997e120 < (*.f64 a b) Initial program 95.2%
associate-+l+95.2%
+-commutative95.2%
associate-+l+95.2%
fma-def96.2%
associate-+r+96.2%
+-commutative96.2%
fma-def96.2%
fma-def97.1%
Simplified97.1%
fma-udef97.1%
+-commutative97.1%
Applied egg-rr97.1%
fma-udef96.2%
*-commutative96.2%
associate-+r+96.2%
*-commutative96.2%
Applied egg-rr96.2%
Taylor expanded in a around inf 60.9%
if -9.50000000000000054e26 < (*.f64 a b) < -2.30000000000000008e-39 or 5.10000000000000004e-21 < (*.f64 a b) < 6.89999999999999963e87Initial program 100.0%
associate-+l+100.0%
+-commutative100.0%
associate-+l+100.0%
fma-def100.0%
associate-+r+100.0%
+-commutative100.0%
fma-def100.0%
fma-def100.0%
Simplified100.0%
fma-udef100.0%
+-commutative100.0%
Applied egg-rr100.0%
Taylor expanded in z around inf 47.8%
if -2.30000000000000008e-39 < (*.f64 a b) < 5.10000000000000004e-21 or 6.89999999999999963e87 < (*.f64 a b) < 6.4999999999999997e120Initial program 98.2%
Taylor expanded in c around inf 46.0%
Final simplification52.4%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* a b) (* x y))) (t_2 (+ (* a b) (* c i))))
(if (<= (* c i) -5.6e+63)
t_2
(if (<= (* c i) -1.6e-155)
t_1
(if (<= (* c i) 1.15e-236)
(+ (* a b) (* z t))
(if (<= (* c i) 3.8e+51) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (a * b) + (x * y);
double t_2 = (a * b) + (c * i);
double tmp;
if ((c * i) <= -5.6e+63) {
tmp = t_2;
} else if ((c * i) <= -1.6e-155) {
tmp = t_1;
} else if ((c * i) <= 1.15e-236) {
tmp = (a * b) + (z * t);
} else if ((c * i) <= 3.8e+51) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (a * b) + (x * y)
t_2 = (a * b) + (c * i)
if ((c * i) <= (-5.6d+63)) then
tmp = t_2
else if ((c * i) <= (-1.6d-155)) then
tmp = t_1
else if ((c * i) <= 1.15d-236) then
tmp = (a * b) + (z * t)
else if ((c * i) <= 3.8d+51) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (a * b) + (x * y);
double t_2 = (a * b) + (c * i);
double tmp;
if ((c * i) <= -5.6e+63) {
tmp = t_2;
} else if ((c * i) <= -1.6e-155) {
tmp = t_1;
} else if ((c * i) <= 1.15e-236) {
tmp = (a * b) + (z * t);
} else if ((c * i) <= 3.8e+51) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (a * b) + (x * y) t_2 = (a * b) + (c * i) tmp = 0 if (c * i) <= -5.6e+63: tmp = t_2 elif (c * i) <= -1.6e-155: tmp = t_1 elif (c * i) <= 1.15e-236: tmp = (a * b) + (z * t) elif (c * i) <= 3.8e+51: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(a * b) + Float64(x * y)) t_2 = Float64(Float64(a * b) + Float64(c * i)) tmp = 0.0 if (Float64(c * i) <= -5.6e+63) tmp = t_2; elseif (Float64(c * i) <= -1.6e-155) tmp = t_1; elseif (Float64(c * i) <= 1.15e-236) tmp = Float64(Float64(a * b) + Float64(z * t)); elseif (Float64(c * i) <= 3.8e+51) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (a * b) + (x * y); t_2 = (a * b) + (c * i); tmp = 0.0; if ((c * i) <= -5.6e+63) tmp = t_2; elseif ((c * i) <= -1.6e-155) tmp = t_1; elseif ((c * i) <= 1.15e-236) tmp = (a * b) + (z * t); elseif ((c * i) <= 3.8e+51) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(a * b), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a * b), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(c * i), $MachinePrecision], -5.6e+63], t$95$2, If[LessEqual[N[(c * i), $MachinePrecision], -1.6e-155], t$95$1, If[LessEqual[N[(c * i), $MachinePrecision], 1.15e-236], N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 3.8e+51], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot b + x \cdot y\\
t_2 := a \cdot b + c \cdot i\\
\mathbf{if}\;c \cdot i \leq -5.6 \cdot 10^{+63}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \cdot i \leq -1.6 \cdot 10^{-155}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \cdot i \leq 1.15 \cdot 10^{-236}:\\
\;\;\;\;a \cdot b + z \cdot t\\
\mathbf{elif}\;c \cdot i \leq 3.8 \cdot 10^{+51}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if (*.f64 c i) < -5.59999999999999974e63 or 3.7999999999999997e51 < (*.f64 c i) Initial program 94.3%
Taylor expanded in a around inf 79.5%
if -5.59999999999999974e63 < (*.f64 c i) < -1.60000000000000006e-155 or 1.15000000000000003e-236 < (*.f64 c i) < 3.7999999999999997e51Initial program 98.9%
associate-+l+98.9%
+-commutative98.9%
associate-+l+98.9%
fma-def100.0%
associate-+r+100.0%
+-commutative100.0%
fma-def100.0%
fma-def100.0%
Simplified100.0%
fma-udef100.0%
+-commutative100.0%
Applied egg-rr100.0%
fma-udef98.9%
*-commutative98.9%
associate-+r+98.9%
*-commutative98.9%
Applied egg-rr98.9%
Taylor expanded in z around 0 84.7%
+-commutative84.7%
fma-udef84.7%
Simplified84.7%
Taylor expanded in c around 0 80.6%
if -1.60000000000000006e-155 < (*.f64 c i) < 1.15000000000000003e-236Initial program 100.0%
Taylor expanded in x around 0 72.4%
Taylor expanded in c around 0 72.4%
Final simplification78.4%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* a b) (* c i))))
(if (<= (* c i) -6.8e-25)
t_1
(if (<= (* c i) -1.45e-125)
(* x y)
(if (<= (* c i) 3.4e+90) (+ (* 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 = (a * b) + (c * i);
double tmp;
if ((c * i) <= -6.8e-25) {
tmp = t_1;
} else if ((c * i) <= -1.45e-125) {
tmp = x * y;
} else if ((c * i) <= 3.4e+90) {
tmp = (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 = (a * b) + (c * i)
if ((c * i) <= (-6.8d-25)) then
tmp = t_1
else if ((c * i) <= (-1.45d-125)) then
tmp = x * y
else if ((c * i) <= 3.4d+90) then
tmp = (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 = (a * b) + (c * i);
double tmp;
if ((c * i) <= -6.8e-25) {
tmp = t_1;
} else if ((c * i) <= -1.45e-125) {
tmp = x * y;
} else if ((c * i) <= 3.4e+90) {
tmp = (a * b) + (z * t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (a * b) + (c * i) tmp = 0 if (c * i) <= -6.8e-25: tmp = t_1 elif (c * i) <= -1.45e-125: tmp = x * y elif (c * i) <= 3.4e+90: tmp = (a * b) + (z * t) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(a * b) + Float64(c * i)) tmp = 0.0 if (Float64(c * i) <= -6.8e-25) tmp = t_1; elseif (Float64(c * i) <= -1.45e-125) tmp = Float64(x * y); elseif (Float64(c * i) <= 3.4e+90) tmp = 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 = (a * b) + (c * i); tmp = 0.0; if ((c * i) <= -6.8e-25) tmp = t_1; elseif ((c * i) <= -1.45e-125) tmp = x * y; elseif ((c * i) <= 3.4e+90) tmp = (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[(N[(a * b), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(c * i), $MachinePrecision], -6.8e-25], t$95$1, If[LessEqual[N[(c * i), $MachinePrecision], -1.45e-125], N[(x * y), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 3.4e+90], N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot b + c \cdot i\\
\mathbf{if}\;c \cdot i \leq -6.8 \cdot 10^{-25}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \cdot i \leq -1.45 \cdot 10^{-125}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;c \cdot i \leq 3.4 \cdot 10^{+90}:\\
\;\;\;\;a \cdot b + z \cdot t\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (*.f64 c i) < -6.80000000000000003e-25 or 3.40000000000000018e90 < (*.f64 c i) Initial program 94.4%
Taylor expanded in a around inf 79.4%
if -6.80000000000000003e-25 < (*.f64 c i) < -1.4500000000000001e-125Initial program 100.0%
associate-+l+100.0%
+-commutative100.0%
associate-+l+100.0%
fma-def100.0%
associate-+r+100.0%
+-commutative100.0%
fma-def100.0%
fma-def100.0%
Simplified100.0%
fma-udef100.0%
+-commutative100.0%
Applied egg-rr100.0%
fma-udef100.0%
*-commutative100.0%
associate-+r+100.0%
*-commutative100.0%
Applied egg-rr100.0%
Taylor expanded in x around inf 65.3%
if -1.4500000000000001e-125 < (*.f64 c i) < 3.40000000000000018e90Initial program 99.2%
Taylor expanded in x around 0 68.9%
Taylor expanded in c around 0 65.6%
Final simplification71.3%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (* z t) -4e-48) (not (<= (* z t) 1e-23))) (+ (* 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 (((z * t) <= -4e-48) || !((z * t) <= 1e-23)) {
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 (((z * t) <= (-4d-48)) .or. (.not. ((z * t) <= 1d-23))) 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 (((z * t) <= -4e-48) || !((z * t) <= 1e-23)) {
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 ((z * t) <= -4e-48) or not ((z * t) <= 1e-23): 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(z * t) <= -4e-48) || !(Float64(z * t) <= 1e-23)) 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 (((z * t) <= -4e-48) || ~(((z * t) <= 1e-23))) 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[Or[LessEqual[N[(z * t), $MachinePrecision], -4e-48], N[Not[LessEqual[N[(z * t), $MachinePrecision], 1e-23]], $MachinePrecision]], 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}\;z \cdot t \leq -4 \cdot 10^{-48} \lor \neg \left(z \cdot t \leq 10^{-23}\right):\\
\;\;\;\;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 z t) < -3.9999999999999999e-48 or 9.9999999999999996e-24 < (*.f64 z t) Initial program 94.2%
Taylor expanded in x around 0 83.7%
if -3.9999999999999999e-48 < (*.f64 z t) < 9.9999999999999996e-24Initial program 100.0%
Taylor expanded in z around 0 98.6%
Final simplification91.6%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= (* x y) -1.45e+185)
(+ (* x y) (* z t))
(if (<= (* x y) 1.45e+90)
(+ (* c i) (+ (* a b) (* z t)))
(+ (* a b) (* x y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x * y) <= -1.45e+185) {
tmp = (x * y) + (z * t);
} else if ((x * y) <= 1.45e+90) {
tmp = (c * i) + ((a * b) + (z * t));
} else {
tmp = (a * b) + (x * y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x * y) <= (-1.45d+185)) then
tmp = (x * y) + (z * t)
else if ((x * y) <= 1.45d+90) then
tmp = (c * i) + ((a * b) + (z * t))
else
tmp = (a * b) + (x * y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x * y) <= -1.45e+185) {
tmp = (x * y) + (z * t);
} else if ((x * y) <= 1.45e+90) {
tmp = (c * i) + ((a * b) + (z * t));
} else {
tmp = (a * b) + (x * y);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x * y) <= -1.45e+185: tmp = (x * y) + (z * t) elif (x * y) <= 1.45e+90: tmp = (c * i) + ((a * b) + (z * t)) else: tmp = (a * b) + (x * y) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(x * y) <= -1.45e+185) tmp = Float64(Float64(x * y) + Float64(z * t)); elseif (Float64(x * y) <= 1.45e+90) tmp = Float64(Float64(c * i) + Float64(Float64(a * b) + Float64(z * t))); else tmp = Float64(Float64(a * b) + Float64(x * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x * y) <= -1.45e+185) tmp = (x * y) + (z * t); elseif ((x * y) <= 1.45e+90) tmp = (c * i) + ((a * b) + (z * t)); else tmp = (a * b) + (x * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(x * y), $MachinePrecision], -1.45e+185], N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 1.45e+90], N[(N[(c * i), $MachinePrecision] + N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * b), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -1.45 \cdot 10^{+185}:\\
\;\;\;\;x \cdot y + z \cdot t\\
\mathbf{elif}\;x \cdot y \leq 1.45 \cdot 10^{+90}:\\
\;\;\;\;c \cdot i + \left(a \cdot b + z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot b + x \cdot y\\
\end{array}
\end{array}
if (*.f64 x y) < -1.44999999999999994e185Initial program 95.8%
Taylor expanded in a around 0 100.0%
Taylor expanded in c around 0 100.0%
if -1.44999999999999994e185 < (*.f64 x y) < 1.4500000000000001e90Initial program 97.8%
Taylor expanded in x around 0 87.9%
if 1.4500000000000001e90 < (*.f64 x y) Initial program 95.7%
associate-+l+95.7%
+-commutative95.7%
associate-+l+95.7%
fma-def95.7%
associate-+r+95.7%
+-commutative95.7%
fma-def95.7%
fma-def97.9%
Simplified97.9%
fma-udef97.9%
+-commutative97.9%
Applied egg-rr97.9%
fma-udef97.9%
*-commutative97.9%
associate-+r+97.9%
*-commutative97.9%
Applied egg-rr97.9%
Taylor expanded in z around 0 91.8%
+-commutative91.8%
fma-udef94.0%
Simplified94.0%
Taylor expanded in c around 0 79.4%
Final simplification87.5%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= (* z t) -4e+39)
(+ (* c i) (+ (* x y) (* z t)))
(if (<= (* z t) 1e-23)
(+ (* c i) (+ (* a b) (* x y)))
(+ (* 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 ((z * t) <= -4e+39) {
tmp = (c * i) + ((x * y) + (z * t));
} else if ((z * t) <= 1e-23) {
tmp = (c * i) + ((a * b) + (x * y));
} 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 ((z * t) <= (-4d+39)) then
tmp = (c * i) + ((x * y) + (z * t))
else if ((z * t) <= 1d-23) then
tmp = (c * i) + ((a * b) + (x * y))
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 ((z * t) <= -4e+39) {
tmp = (c * i) + ((x * y) + (z * t));
} else if ((z * t) <= 1e-23) {
tmp = (c * i) + ((a * b) + (x * y));
} else {
tmp = (c * i) + ((a * b) + (z * t));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (z * t) <= -4e+39: tmp = (c * i) + ((x * y) + (z * t)) elif (z * t) <= 1e-23: tmp = (c * i) + ((a * b) + (x * y)) 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(z * t) <= -4e+39) tmp = Float64(Float64(c * i) + Float64(Float64(x * y) + Float64(z * t))); elseif (Float64(z * t) <= 1e-23) tmp = Float64(Float64(c * i) + Float64(Float64(a * b) + Float64(x * y))); 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 ((z * t) <= -4e+39) tmp = (c * i) + ((x * y) + (z * t)); elseif ((z * t) <= 1e-23) tmp = (c * i) + ((a * b) + (x * y)); else tmp = (c * i) + ((a * b) + (z * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(z * t), $MachinePrecision], -4e+39], N[(N[(c * i), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z * t), $MachinePrecision], 1e-23], N[(N[(c * i), $MachinePrecision] + N[(N[(a * b), $MachinePrecision] + N[(x * y), $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}\;z \cdot t \leq -4 \cdot 10^{+39}:\\
\;\;\;\;c \cdot i + \left(x \cdot y + z \cdot t\right)\\
\mathbf{elif}\;z \cdot t \leq 10^{-23}:\\
\;\;\;\;c \cdot i + \left(a \cdot b + x \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;c \cdot i + \left(a \cdot b + z \cdot t\right)\\
\end{array}
\end{array}
if (*.f64 z t) < -3.99999999999999976e39Initial program 91.1%
Taylor expanded in a around 0 87.1%
if -3.99999999999999976e39 < (*.f64 z t) < 9.9999999999999996e-24Initial program 100.0%
Taylor expanded in z around 0 95.6%
if 9.9999999999999996e-24 < (*.f64 z t) Initial program 94.7%
Taylor expanded in x around 0 89.8%
Final simplification92.8%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (* x y) -2.4e+187) (not (<= (* x y) 2.4e+141))) (* x y) (+ (* a b) (* c i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((x * y) <= -2.4e+187) || !((x * y) <= 2.4e+141)) {
tmp = x * y;
} else {
tmp = (a * b) + (c * i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (((x * y) <= (-2.4d+187)) .or. (.not. ((x * y) <= 2.4d+141))) then
tmp = x * y
else
tmp = (a * b) + (c * i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((x * y) <= -2.4e+187) || !((x * y) <= 2.4e+141)) {
tmp = x * y;
} else {
tmp = (a * b) + (c * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((x * y) <= -2.4e+187) or not ((x * y) <= 2.4e+141): tmp = x * y else: tmp = (a * b) + (c * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(x * y) <= -2.4e+187) || !(Float64(x * y) <= 2.4e+141)) tmp = Float64(x * y); else tmp = Float64(Float64(a * b) + Float64(c * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (((x * y) <= -2.4e+187) || ~(((x * y) <= 2.4e+141))) tmp = x * y; else tmp = (a * b) + (c * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(x * y), $MachinePrecision], -2.4e+187], N[Not[LessEqual[N[(x * y), $MachinePrecision], 2.4e+141]], $MachinePrecision]], N[(x * y), $MachinePrecision], N[(N[(a * b), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -2.4 \cdot 10^{+187} \lor \neg \left(x \cdot y \leq 2.4 \cdot 10^{+141}\right):\\
\;\;\;\;x \cdot y\\
\mathbf{else}:\\
\;\;\;\;a \cdot b + c \cdot i\\
\end{array}
\end{array}
if (*.f64 x y) < -2.39999999999999985e187 or 2.39999999999999997e141 < (*.f64 x y) Initial program 95.1%
associate-+l+95.1%
+-commutative95.1%
associate-+l+95.1%
fma-def95.1%
associate-+r+95.1%
+-commutative95.1%
fma-def95.1%
fma-def96.7%
Simplified96.7%
fma-udef96.7%
+-commutative96.7%
Applied egg-rr96.7%
fma-udef96.7%
*-commutative96.7%
associate-+r+96.7%
*-commutative96.7%
Applied egg-rr96.7%
Taylor expanded in x around inf 77.9%
if -2.39999999999999985e187 < (*.f64 x y) < 2.39999999999999997e141Initial program 97.9%
Taylor expanded in a around inf 65.7%
Final simplification68.6%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (* a b) -7.8e+145) (not (<= (* a b) 3.9e-21))) (* 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 (((a * b) <= -7.8e+145) || !((a * b) <= 3.9e-21)) {
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 (((a * b) <= (-7.8d+145)) .or. (.not. ((a * b) <= 3.9d-21))) 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 (((a * b) <= -7.8e+145) || !((a * b) <= 3.9e-21)) {
tmp = a * b;
} else {
tmp = c * i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((a * b) <= -7.8e+145) or not ((a * b) <= 3.9e-21): tmp = a * b else: tmp = c * i return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(a * b) <= -7.8e+145) || !(Float64(a * b) <= 3.9e-21)) 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 (((a * b) <= -7.8e+145) || ~(((a * b) <= 3.9e-21))) tmp = a * b; else tmp = c * i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(a * b), $MachinePrecision], -7.8e+145], N[Not[LessEqual[N[(a * b), $MachinePrecision], 3.9e-21]], $MachinePrecision]], N[(a * b), $MachinePrecision], N[(c * i), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -7.8 \cdot 10^{+145} \lor \neg \left(a \cdot b \leq 3.9 \cdot 10^{-21}\right):\\
\;\;\;\;a \cdot b\\
\mathbf{else}:\\
\;\;\;\;c \cdot i\\
\end{array}
\end{array}
if (*.f64 a b) < -7.7999999999999995e145 or 3.9000000000000001e-21 < (*.f64 a b) Initial program 95.4%
associate-+l+95.4%
+-commutative95.4%
associate-+l+95.4%
fma-def96.3%
associate-+r+96.3%
+-commutative96.3%
fma-def96.3%
fma-def97.3%
Simplified97.3%
fma-udef97.3%
+-commutative97.3%
Applied egg-rr97.3%
fma-udef96.4%
*-commutative96.4%
associate-+r+96.4%
*-commutative96.4%
Applied egg-rr96.4%
Taylor expanded in a around inf 59.3%
if -7.7999999999999995e145 < (*.f64 a b) < 3.9000000000000001e-21Initial program 98.6%
Taylor expanded in c around inf 40.1%
Final simplification48.4%
(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 97.3%
associate-+l+97.3%
+-commutative97.3%
associate-+l+97.3%
fma-def98.0%
associate-+r+98.0%
+-commutative98.0%
fma-def98.0%
fma-def98.4%
Simplified98.4%
fma-udef98.4%
+-commutative98.4%
Applied egg-rr98.4%
fma-udef97.7%
*-commutative97.7%
associate-+r+97.7%
*-commutative97.7%
Applied egg-rr97.7%
Taylor expanded in a around inf 29.5%
Final simplification29.5%
herbie shell --seed 2023309
(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)))