
(FPCore (x y z t a b) :precision binary64 (+ (+ (* x y) (* z t)) (* a b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * t)) + (a * b);
}
real(8) function code(x, y, z, t, a, b)
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
code = ((x * y) + (z * t)) + (a * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * t)) + (a * b);
}
def code(x, y, z, t, a, b): return ((x * y) + (z * t)) + (a * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * y) + Float64(z * t)) + Float64(a * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * y) + (z * t)) + (a * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot y + z \cdot t\right) + a \cdot b
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 9 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (+ (* x y) (* z t)) (* a b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * t)) + (a * b);
}
real(8) function code(x, y, z, t, a, b)
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
code = ((x * y) + (z * t)) + (a * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * t)) + (a * b);
}
def code(x, y, z, t, a, b): return ((x * y) + (z * t)) + (a * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * y) + Float64(z * t)) + Float64(a * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * y) + (z * t)) + (a * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot y + z \cdot t\right) + a \cdot b
\end{array}
(FPCore (x y z t a b) :precision binary64 (fma z t (fma a b (* x y))))
double code(double x, double y, double z, double t, double a, double b) {
return fma(z, t, fma(a, b, (x * y)));
}
function code(x, y, z, t, a, b) return fma(z, t, fma(a, b, Float64(x * y))) end
code[x_, y_, z_, t_, a_, b_] := N[(z * t + N[(a * b + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(z, t, \mathsf{fma}\left(a, b, x \cdot y\right)\right)
\end{array}
Initial program 96.5%
+-commutative96.5%
associate-+l+96.5%
fma-define97.6%
+-commutative97.6%
fma-define98.4%
Simplified98.4%
(FPCore (x y z t a b) :precision binary64 (+ (fma y x (* z t)) (* a b)))
double code(double x, double y, double z, double t, double a, double b) {
return fma(y, x, (z * t)) + (a * b);
}
function code(x, y, z, t, a, b) return Float64(fma(y, x, Float64(z * t)) + Float64(a * b)) end
code[x_, y_, z_, t_, a_, b_] := N[(N[(y * x + N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y, x, z \cdot t\right) + a \cdot b
\end{array}
Initial program 96.5%
*-commutative96.5%
fma-define97.2%
Applied egg-rr97.2%
(FPCore (x y z t a b)
:precision binary64
(if (<= (* a b) -6.5e+203)
(* a b)
(if (<= (* a b) 1e-323)
(* z t)
(if (<= (* a b) 3.5e-218)
(* x y)
(if (<= (* a b) 1.15e-145)
(* z t)
(if (<= (* a b) 4.4e-13) (* x y) (* a b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a * b) <= -6.5e+203) {
tmp = a * b;
} else if ((a * b) <= 1e-323) {
tmp = z * t;
} else if ((a * b) <= 3.5e-218) {
tmp = x * y;
} else if ((a * b) <= 1.15e-145) {
tmp = z * t;
} else if ((a * b) <= 4.4e-13) {
tmp = x * y;
} else {
tmp = a * b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if ((a * b) <= (-6.5d+203)) then
tmp = a * b
else if ((a * b) <= 1d-323) then
tmp = z * t
else if ((a * b) <= 3.5d-218) then
tmp = x * y
else if ((a * b) <= 1.15d-145) then
tmp = z * t
else if ((a * b) <= 4.4d-13) then
tmp = x * y
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 tmp;
if ((a * b) <= -6.5e+203) {
tmp = a * b;
} else if ((a * b) <= 1e-323) {
tmp = z * t;
} else if ((a * b) <= 3.5e-218) {
tmp = x * y;
} else if ((a * b) <= 1.15e-145) {
tmp = z * t;
} else if ((a * b) <= 4.4e-13) {
tmp = x * y;
} else {
tmp = a * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a * b) <= -6.5e+203: tmp = a * b elif (a * b) <= 1e-323: tmp = z * t elif (a * b) <= 3.5e-218: tmp = x * y elif (a * b) <= 1.15e-145: tmp = z * t elif (a * b) <= 4.4e-13: tmp = x * y else: tmp = a * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(a * b) <= -6.5e+203) tmp = Float64(a * b); elseif (Float64(a * b) <= 1e-323) tmp = Float64(z * t); elseif (Float64(a * b) <= 3.5e-218) tmp = Float64(x * y); elseif (Float64(a * b) <= 1.15e-145) tmp = Float64(z * t); elseif (Float64(a * b) <= 4.4e-13) tmp = Float64(x * y); else tmp = Float64(a * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a * b) <= -6.5e+203) tmp = a * b; elseif ((a * b) <= 1e-323) tmp = z * t; elseif ((a * b) <= 3.5e-218) tmp = x * y; elseif ((a * b) <= 1.15e-145) tmp = z * t; elseif ((a * b) <= 4.4e-13) tmp = x * y; else tmp = a * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(a * b), $MachinePrecision], -6.5e+203], N[(a * b), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 1e-323], N[(z * t), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 3.5e-218], N[(x * y), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 1.15e-145], N[(z * t), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 4.4e-13], N[(x * y), $MachinePrecision], N[(a * b), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -6.5 \cdot 10^{+203}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;a \cdot b \leq 10^{-323}:\\
\;\;\;\;z \cdot t\\
\mathbf{elif}\;a \cdot b \leq 3.5 \cdot 10^{-218}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;a \cdot b \leq 1.15 \cdot 10^{-145}:\\
\;\;\;\;z \cdot t\\
\mathbf{elif}\;a \cdot b \leq 4.4 \cdot 10^{-13}:\\
\;\;\;\;x \cdot y\\
\mathbf{else}:\\
\;\;\;\;a \cdot b\\
\end{array}
\end{array}
if (*.f64 a b) < -6.5000000000000003e203 or 4.39999999999999993e-13 < (*.f64 a b) Initial program 94.3%
Taylor expanded in a around inf 69.7%
if -6.5000000000000003e203 < (*.f64 a b) < 9.88131e-324 or 3.5e-218 < (*.f64 a b) < 1.15000000000000004e-145Initial program 97.4%
Taylor expanded in z around inf 54.5%
if 9.88131e-324 < (*.f64 a b) < 3.5e-218 or 1.15000000000000004e-145 < (*.f64 a b) < 4.39999999999999993e-13Initial program 100.0%
Taylor expanded in x around inf 72.8%
Final simplification63.1%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (+ (* a b) (+ (* x y) (* z t))))) (if (<= t_1 INFINITY) t_1 (* z (+ t (/ (* x y) z))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a * b) + ((x * y) + (z * t));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = z * (t + ((x * y) / z));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a * b) + ((x * y) + (z * t));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = z * (t + ((x * y) / z));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a * b) + ((x * y) + (z * t)) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = z * (t + ((x * y) / z)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a * b) + Float64(Float64(x * y) + Float64(z * t))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(z * Float64(t + Float64(Float64(x * y) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a * b) + ((x * y) + (z * t)); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = z * (t + ((x * y) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a * b), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(z * N[(t + N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot b + \left(x \cdot y + z \cdot t\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(t + \frac{x \cdot y}{z}\right)\\
\end{array}
\end{array}
if (+.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 a b)) < +inf.0Initial program 100.0%
if +inf.0 < (+.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 a b)) Initial program 0.0%
Taylor expanded in a around 0 44.4%
Taylor expanded in z around inf 55.6%
Final simplification98.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= (* x y) -4e+111) (not (<= (* x y) 5e+43))) (+ (* x y) (* a b)) (+ (* a b) (* z t))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((x * y) <= -4e+111) || !((x * y) <= 5e+43)) {
tmp = (x * y) + (a * b);
} else {
tmp = (a * b) + (z * t);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if (((x * y) <= (-4d+111)) .or. (.not. ((x * y) <= 5d+43))) then
tmp = (x * y) + (a * b)
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 tmp;
if (((x * y) <= -4e+111) || !((x * y) <= 5e+43)) {
tmp = (x * y) + (a * b);
} else {
tmp = (a * b) + (z * t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if ((x * y) <= -4e+111) or not ((x * y) <= 5e+43): tmp = (x * y) + (a * b) else: tmp = (a * b) + (z * t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((Float64(x * y) <= -4e+111) || !(Float64(x * y) <= 5e+43)) tmp = Float64(Float64(x * y) + Float64(a * b)); else tmp = Float64(Float64(a * b) + Float64(z * t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (((x * y) <= -4e+111) || ~(((x * y) <= 5e+43))) tmp = (x * y) + (a * b); else tmp = (a * b) + (z * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[N[(x * y), $MachinePrecision], -4e+111], N[Not[LessEqual[N[(x * y), $MachinePrecision], 5e+43]], $MachinePrecision]], N[(N[(x * y), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision], N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -4 \cdot 10^{+111} \lor \neg \left(x \cdot y \leq 5 \cdot 10^{+43}\right):\\
\;\;\;\;x \cdot y + a \cdot b\\
\mathbf{else}:\\
\;\;\;\;a \cdot b + z \cdot t\\
\end{array}
\end{array}
if (*.f64 x y) < -3.99999999999999983e111 or 5.0000000000000004e43 < (*.f64 x y) Initial program 93.1%
Taylor expanded in z around 0 82.8%
if -3.99999999999999983e111 < (*.f64 x y) < 5.0000000000000004e43Initial program 98.7%
Taylor expanded in x around 0 89.1%
Final simplification86.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= (* x y) -2e+181) (not (<= (* x y) 1e+138))) (* x y) (+ (* a b) (* z t))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((x * y) <= -2e+181) || !((x * y) <= 1e+138)) {
tmp = x * y;
} else {
tmp = (a * b) + (z * t);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if (((x * y) <= (-2d+181)) .or. (.not. ((x * y) <= 1d+138))) then
tmp = x * y
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 tmp;
if (((x * y) <= -2e+181) || !((x * y) <= 1e+138)) {
tmp = x * y;
} else {
tmp = (a * b) + (z * t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if ((x * y) <= -2e+181) or not ((x * y) <= 1e+138): tmp = x * y else: tmp = (a * b) + (z * t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((Float64(x * y) <= -2e+181) || !(Float64(x * y) <= 1e+138)) tmp = Float64(x * y); else tmp = Float64(Float64(a * b) + Float64(z * t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (((x * y) <= -2e+181) || ~(((x * y) <= 1e+138))) tmp = x * y; else tmp = (a * b) + (z * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[N[(x * y), $MachinePrecision], -2e+181], N[Not[LessEqual[N[(x * y), $MachinePrecision], 1e+138]], $MachinePrecision]], N[(x * y), $MachinePrecision], N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -2 \cdot 10^{+181} \lor \neg \left(x \cdot y \leq 10^{+138}\right):\\
\;\;\;\;x \cdot y\\
\mathbf{else}:\\
\;\;\;\;a \cdot b + z \cdot t\\
\end{array}
\end{array}
if (*.f64 x y) < -1.9999999999999998e181 or 1e138 < (*.f64 x y) Initial program 91.4%
Taylor expanded in x around inf 78.7%
if -1.9999999999999998e181 < (*.f64 x y) < 1e138Initial program 98.4%
Taylor expanded in x around 0 83.6%
Final simplification82.3%
(FPCore (x y z t a b) :precision binary64 (if (<= (* x y) -4e+111) (+ (* x y) (* a b)) (if (<= (* x y) 2000.0) (+ (* a b) (* z t)) (+ (* x y) (* z t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x * y) <= -4e+111) {
tmp = (x * y) + (a * b);
} else if ((x * y) <= 2000.0) {
tmp = (a * b) + (z * t);
} else {
tmp = (x * y) + (z * t);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if ((x * y) <= (-4d+111)) then
tmp = (x * y) + (a * b)
else if ((x * y) <= 2000.0d0) then
tmp = (a * b) + (z * t)
else
tmp = (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 tmp;
if ((x * y) <= -4e+111) {
tmp = (x * y) + (a * b);
} else if ((x * y) <= 2000.0) {
tmp = (a * b) + (z * t);
} else {
tmp = (x * y) + (z * t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (x * y) <= -4e+111: tmp = (x * y) + (a * b) elif (x * y) <= 2000.0: tmp = (a * b) + (z * t) else: tmp = (x * y) + (z * t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(x * y) <= -4e+111) tmp = Float64(Float64(x * y) + Float64(a * b)); elseif (Float64(x * y) <= 2000.0) tmp = Float64(Float64(a * b) + Float64(z * t)); else tmp = Float64(Float64(x * y) + Float64(z * t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((x * y) <= -4e+111) tmp = (x * y) + (a * b); elseif ((x * y) <= 2000.0) tmp = (a * b) + (z * t); else tmp = (x * y) + (z * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(x * y), $MachinePrecision], -4e+111], N[(N[(x * y), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 2000.0], N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -4 \cdot 10^{+111}:\\
\;\;\;\;x \cdot y + a \cdot b\\
\mathbf{elif}\;x \cdot y \leq 2000:\\
\;\;\;\;a \cdot b + z \cdot t\\
\mathbf{else}:\\
\;\;\;\;x \cdot y + z \cdot t\\
\end{array}
\end{array}
if (*.f64 x y) < -3.99999999999999983e111Initial program 93.0%
Taylor expanded in z around 0 88.1%
if -3.99999999999999983e111 < (*.f64 x y) < 2e3Initial program 99.3%
Taylor expanded in x around 0 90.6%
if 2e3 < (*.f64 x y) Initial program 92.4%
Taylor expanded in a around 0 78.5%
Final simplification87.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= (* a b) -6.5e+203) (not (<= (* a b) 4.3e-129))) (* a b) (* z t)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((a * b) <= -6.5e+203) || !((a * b) <= 4.3e-129)) {
tmp = a * b;
} else {
tmp = z * t;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if (((a * b) <= (-6.5d+203)) .or. (.not. ((a * b) <= 4.3d-129))) then
tmp = a * b
else
tmp = z * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((a * b) <= -6.5e+203) || !((a * b) <= 4.3e-129)) {
tmp = a * b;
} else {
tmp = z * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if ((a * b) <= -6.5e+203) or not ((a * b) <= 4.3e-129): tmp = a * b else: tmp = z * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((Float64(a * b) <= -6.5e+203) || !(Float64(a * b) <= 4.3e-129)) tmp = Float64(a * b); else tmp = Float64(z * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (((a * b) <= -6.5e+203) || ~(((a * b) <= 4.3e-129))) tmp = a * b; else tmp = z * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[N[(a * b), $MachinePrecision], -6.5e+203], N[Not[LessEqual[N[(a * b), $MachinePrecision], 4.3e-129]], $MachinePrecision]], N[(a * b), $MachinePrecision], N[(z * t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -6.5 \cdot 10^{+203} \lor \neg \left(a \cdot b \leq 4.3 \cdot 10^{-129}\right):\\
\;\;\;\;a \cdot b\\
\mathbf{else}:\\
\;\;\;\;z \cdot t\\
\end{array}
\end{array}
if (*.f64 a b) < -6.5000000000000003e203 or 4.29999999999999981e-129 < (*.f64 a b) Initial program 95.0%
Taylor expanded in a around inf 62.5%
if -6.5000000000000003e203 < (*.f64 a b) < 4.29999999999999981e-129Initial program 97.8%
Taylor expanded in z around inf 50.9%
Final simplification56.4%
(FPCore (x y z t a b) :precision binary64 (* a b))
double code(double x, double y, double z, double t, double a, double b) {
return a * b;
}
real(8) function code(x, y, z, t, a, b)
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
code = a * b
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return a * b;
}
def code(x, y, z, t, a, b): return a * b
function code(x, y, z, t, a, b) return Float64(a * b) end
function tmp = code(x, y, z, t, a, b) tmp = a * b; end
code[x_, y_, z_, t_, a_, b_] := N[(a * b), $MachinePrecision]
\begin{array}{l}
\\
a \cdot b
\end{array}
Initial program 96.5%
Taylor expanded in a around inf 36.5%
herbie shell --seed 2024096
(FPCore (x y z t a b)
:name "Linear.V3:$cdot from linear-1.19.1.3, B"
:precision binary64
(+ (+ (* x y) (* z t)) (* a b)))