
(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 (let* ((t_1 (+ (* a b) (+ (* z t) (* x y))))) (if (<= t_1 1e+306) t_1 (* z (+ t (+ (* x (/ y z)) (* a (/ b z))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a * b) + ((z * t) + (x * y));
double tmp;
if (t_1 <= 1e+306) {
tmp = t_1;
} else {
tmp = z * (t + ((x * (y / z)) + (a * (b / z))));
}
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) :: t_1
real(8) :: tmp
t_1 = (a * b) + ((z * t) + (x * y))
if (t_1 <= 1d+306) then
tmp = t_1
else
tmp = z * (t + ((x * (y / z)) + (a * (b / z))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a * b) + ((z * t) + (x * y));
double tmp;
if (t_1 <= 1e+306) {
tmp = t_1;
} else {
tmp = z * (t + ((x * (y / z)) + (a * (b / z))));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a * b) + ((z * t) + (x * y)) tmp = 0 if t_1 <= 1e+306: tmp = t_1 else: tmp = z * (t + ((x * (y / z)) + (a * (b / z)))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a * b) + Float64(Float64(z * t) + Float64(x * y))) tmp = 0.0 if (t_1 <= 1e+306) tmp = t_1; else tmp = Float64(z * Float64(t + Float64(Float64(x * Float64(y / z)) + Float64(a * Float64(b / z))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a * b) + ((z * t) + (x * y)); tmp = 0.0; if (t_1 <= 1e+306) tmp = t_1; else tmp = z * (t + ((x * (y / z)) + (a * (b / z)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a * b), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 1e+306], t$95$1, N[(z * N[(t + N[(N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision] + N[(a * N[(b / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot b + \left(z \cdot t + x \cdot y\right)\\
\mathbf{if}\;t\_1 \leq 10^{+306}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(t + \left(x \cdot \frac{y}{z} + a \cdot \frac{b}{z}\right)\right)\\
\end{array}
\end{array}
if (+.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 a b)) < 1.00000000000000002e306Initial program 100.0%
if 1.00000000000000002e306 < (+.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 a b)) Initial program 82.6%
fma-define89.1%
Simplified89.1%
Taylor expanded in z around inf 91.3%
+-commutative91.3%
associate-/l*97.8%
associate-/l*100.0%
Simplified100.0%
Final simplification100.0%
(FPCore (x y z t a b) :precision binary64 (fma x y (fma z t (* a b))))
double code(double x, double y, double z, double t, double a, double b) {
return fma(x, y, fma(z, t, (a * b)));
}
function code(x, y, z, t, a, b) return fma(x, y, fma(z, t, Float64(a * b))) end
code[x_, y_, z_, t_, a_, b_] := N[(x * y + N[(z * t + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(x, y, \mathsf{fma}\left(z, t, a \cdot b\right)\right)
\end{array}
Initial program 96.9%
associate-+l+96.9%
fma-define98.0%
fma-define98.4%
Simplified98.4%
(FPCore (x y z t a b) :precision binary64 (fma a b (fma x y (* z t))))
double code(double x, double y, double z, double t, double a, double b) {
return fma(a, b, fma(x, y, (z * t)));
}
function code(x, y, z, t, a, b) return fma(a, b, fma(x, y, Float64(z * t))) end
code[x_, y_, z_, t_, a_, b_] := N[(a * b + N[(x * y + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(a, b, \mathsf{fma}\left(x, y, z \cdot t\right)\right)
\end{array}
Initial program 96.9%
+-commutative96.9%
fma-define97.3%
fma-define98.4%
Simplified98.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= (* a b) -6.8e+112)
(* a b)
(if (<= (* a b) -8e-36)
(* z t)
(if (<= (* a b) 5.5e-280)
(* x y)
(if (<= (* a b) 5.6e+64) (* z t) (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a * b) <= -6.8e+112) {
tmp = a * b;
} else if ((a * b) <= -8e-36) {
tmp = z * t;
} else if ((a * b) <= 5.5e-280) {
tmp = x * y;
} else if ((a * b) <= 5.6e+64) {
tmp = z * t;
} 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.8d+112)) then
tmp = a * b
else if ((a * b) <= (-8d-36)) then
tmp = z * t
else if ((a * b) <= 5.5d-280) then
tmp = x * y
else if ((a * b) <= 5.6d+64) then
tmp = z * t
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.8e+112) {
tmp = a * b;
} else if ((a * b) <= -8e-36) {
tmp = z * t;
} else if ((a * b) <= 5.5e-280) {
tmp = x * y;
} else if ((a * b) <= 5.6e+64) {
tmp = z * t;
} else {
tmp = a * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a * b) <= -6.8e+112: tmp = a * b elif (a * b) <= -8e-36: tmp = z * t elif (a * b) <= 5.5e-280: tmp = x * y elif (a * b) <= 5.6e+64: tmp = z * t else: tmp = a * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(a * b) <= -6.8e+112) tmp = Float64(a * b); elseif (Float64(a * b) <= -8e-36) tmp = Float64(z * t); elseif (Float64(a * b) <= 5.5e-280) tmp = Float64(x * y); elseif (Float64(a * b) <= 5.6e+64) tmp = Float64(z * t); 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.8e+112) tmp = a * b; elseif ((a * b) <= -8e-36) tmp = z * t; elseif ((a * b) <= 5.5e-280) tmp = x * y; elseif ((a * b) <= 5.6e+64) tmp = z * t; else tmp = a * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(a * b), $MachinePrecision], -6.8e+112], N[(a * b), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], -8e-36], N[(z * t), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 5.5e-280], N[(x * y), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 5.6e+64], N[(z * t), $MachinePrecision], N[(a * b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -6.8 \cdot 10^{+112}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;a \cdot b \leq -8 \cdot 10^{-36}:\\
\;\;\;\;z \cdot t\\
\mathbf{elif}\;a \cdot b \leq 5.5 \cdot 10^{-280}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;a \cdot b \leq 5.6 \cdot 10^{+64}:\\
\;\;\;\;z \cdot t\\
\mathbf{else}:\\
\;\;\;\;a \cdot b\\
\end{array}
\end{array}
if (*.f64 a b) < -6.79999999999999987e112 or 5.60000000000000047e64 < (*.f64 a b) Initial program 96.7%
fma-define97.8%
Simplified97.8%
Taylor expanded in a around inf 72.3%
if -6.79999999999999987e112 < (*.f64 a b) < -7.9999999999999995e-36 or 5.50000000000000001e-280 < (*.f64 a b) < 5.60000000000000047e64Initial program 97.9%
fma-define98.9%
Simplified98.9%
Taylor expanded in x around 0 68.0%
Taylor expanded in a around 0 55.8%
*-commutative55.8%
Simplified55.8%
if -7.9999999999999995e-36 < (*.f64 a b) < 5.50000000000000001e-280Initial program 95.7%
Taylor expanded in x around inf 62.5%
Taylor expanded in x around inf 58.3%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (+ (* a b) (+ (* z t) (* x y))))) (if (<= t_1 INFINITY) t_1 (* z t))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a * b) + ((z * t) + (x * y));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = z * t;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a * b) + ((z * t) + (x * y));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = z * t;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a * b) + ((z * t) + (x * y)) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = z * t return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a * b) + Float64(Float64(z * t) + Float64(x * y))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(z * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a * b) + ((z * t) + (x * y)); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = z * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a * b), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(z * t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot b + \left(z \cdot t + x \cdot y\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;z \cdot t\\
\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%
fma-define37.5%
Simplified37.5%
Taylor expanded in x around 0 37.5%
Taylor expanded in a around 0 50.0%
*-commutative50.0%
Simplified50.0%
Final simplification98.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= (* a b) -1.55e+127) (not (<= (* a b) 0.16))) (+ (* a b) (* z t)) (+ (* z t) (* x y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((a * b) <= -1.55e+127) || !((a * b) <= 0.16)) {
tmp = (a * b) + (z * t);
} else {
tmp = (z * t) + (x * y);
}
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) <= (-1.55d+127)) .or. (.not. ((a * b) <= 0.16d0))) then
tmp = (a * b) + (z * t)
else
tmp = (z * t) + (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 tmp;
if (((a * b) <= -1.55e+127) || !((a * b) <= 0.16)) {
tmp = (a * b) + (z * t);
} else {
tmp = (z * t) + (x * y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if ((a * b) <= -1.55e+127) or not ((a * b) <= 0.16): tmp = (a * b) + (z * t) else: tmp = (z * t) + (x * y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((Float64(a * b) <= -1.55e+127) || !(Float64(a * b) <= 0.16)) tmp = Float64(Float64(a * b) + Float64(z * t)); else tmp = Float64(Float64(z * t) + Float64(x * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (((a * b) <= -1.55e+127) || ~(((a * b) <= 0.16))) tmp = (a * b) + (z * t); else tmp = (z * t) + (x * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[N[(a * b), $MachinePrecision], -1.55e+127], N[Not[LessEqual[N[(a * b), $MachinePrecision], 0.16]], $MachinePrecision]], N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -1.55 \cdot 10^{+127} \lor \neg \left(a \cdot b \leq 0.16\right):\\
\;\;\;\;a \cdot b + z \cdot t\\
\mathbf{else}:\\
\;\;\;\;z \cdot t + x \cdot y\\
\end{array}
\end{array}
if (*.f64 a b) < -1.5500000000000001e127 or 0.160000000000000003 < (*.f64 a b) Initial program 96.2%
fma-define97.1%
Simplified97.1%
Taylor expanded in x around 0 87.5%
if -1.5500000000000001e127 < (*.f64 a b) < 0.160000000000000003Initial program 97.4%
fma-define98.7%
Simplified98.7%
Taylor expanded in z around inf 89.3%
+-commutative89.3%
associate-/l*87.8%
associate-/l*85.9%
Simplified85.9%
Taylor expanded in a around 0 80.4%
Taylor expanded in z around 0 87.8%
Final simplification87.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= (* x y) -5.5e+105) (not (<= (* x y) 8.5e+120))) (* 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) <= -5.5e+105) || !((x * y) <= 8.5e+120)) {
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) <= (-5.5d+105)) .or. (.not. ((x * y) <= 8.5d+120))) 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) <= -5.5e+105) || !((x * y) <= 8.5e+120)) {
tmp = x * y;
} else {
tmp = (a * b) + (z * t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if ((x * y) <= -5.5e+105) or not ((x * y) <= 8.5e+120): 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) <= -5.5e+105) || !(Float64(x * y) <= 8.5e+120)) 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) <= -5.5e+105) || ~(((x * y) <= 8.5e+120))) 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], -5.5e+105], N[Not[LessEqual[N[(x * y), $MachinePrecision], 8.5e+120]], $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 -5.5 \cdot 10^{+105} \lor \neg \left(x \cdot y \leq 8.5 \cdot 10^{+120}\right):\\
\;\;\;\;x \cdot y\\
\mathbf{else}:\\
\;\;\;\;a \cdot b + z \cdot t\\
\end{array}
\end{array}
if (*.f64 x y) < -5.49999999999999979e105 or 8.50000000000000026e120 < (*.f64 x y) Initial program 91.5%
Taylor expanded in x around inf 86.8%
Taylor expanded in x around inf 72.9%
if -5.49999999999999979e105 < (*.f64 x y) < 8.50000000000000026e120Initial program 99.4%
fma-define99.4%
Simplified99.4%
Taylor expanded in x around 0 86.9%
Final simplification82.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= (* a b) -1.72e+111) (not (<= (* a b) 1.5e+17))) (* a b) (* x y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((a * b) <= -1.72e+111) || !((a * b) <= 1.5e+17)) {
tmp = a * b;
} else {
tmp = x * y;
}
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) <= (-1.72d+111)) .or. (.not. ((a * b) <= 1.5d+17))) then
tmp = a * b
else
tmp = x * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((a * b) <= -1.72e+111) || !((a * b) <= 1.5e+17)) {
tmp = a * b;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if ((a * b) <= -1.72e+111) or not ((a * b) <= 1.5e+17): tmp = a * b else: tmp = x * y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((Float64(a * b) <= -1.72e+111) || !(Float64(a * b) <= 1.5e+17)) tmp = Float64(a * b); else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (((a * b) <= -1.72e+111) || ~(((a * b) <= 1.5e+17))) tmp = a * b; else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[N[(a * b), $MachinePrecision], -1.72e+111], N[Not[LessEqual[N[(a * b), $MachinePrecision], 1.5e+17]], $MachinePrecision]], N[(a * b), $MachinePrecision], N[(x * y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -1.72 \cdot 10^{+111} \lor \neg \left(a \cdot b \leq 1.5 \cdot 10^{+17}\right):\\
\;\;\;\;a \cdot b\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if (*.f64 a b) < -1.72000000000000003e111 or 1.5e17 < (*.f64 a b) Initial program 97.0%
fma-define98.0%
Simplified98.0%
Taylor expanded in a around inf 66.1%
if -1.72000000000000003e111 < (*.f64 a b) < 1.5e17Initial program 96.8%
Taylor expanded in x around inf 55.8%
Taylor expanded in x around inf 46.4%
Final simplification54.2%
(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.9%
fma-define98.0%
Simplified98.0%
Taylor expanded in a around inf 32.9%
herbie shell --seed 2024143
(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)))