
(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 10 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 y x (fma z t (* a b))))
double code(double x, double y, double z, double t, double a, double b) {
return fma(y, x, fma(z, t, (a * b)));
}
function code(x, y, z, t, a, b) return fma(y, x, fma(z, t, Float64(a * b))) end
code[x_, y_, z_, t_, a_, b_] := N[(y * x + N[(z * t + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y, x, \mathsf{fma}\left(z, t, a \cdot b\right)\right)
\end{array}
Initial program 96.4%
associate-+l+N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6498.8
Applied egg-rr98.8%
(FPCore (x y z t a b) :precision binary64 (if (<= (* a b) -0.1) (fma y x (* a b)) (if (<= (* a b) 2e+100) (fma t z (* y x)) (fma z t (* a b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a * b) <= -0.1) {
tmp = fma(y, x, (a * b));
} else if ((a * b) <= 2e+100) {
tmp = fma(t, z, (y * x));
} else {
tmp = fma(z, t, (a * b));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(a * b) <= -0.1) tmp = fma(y, x, Float64(a * b)); elseif (Float64(a * b) <= 2e+100) tmp = fma(t, z, Float64(y * x)); else tmp = fma(z, t, Float64(a * b)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(a * b), $MachinePrecision], -0.1], N[(y * x + N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 2e+100], N[(t * z + N[(y * x), $MachinePrecision]), $MachinePrecision], N[(z * t + N[(a * b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -0.1:\\
\;\;\;\;\mathsf{fma}\left(y, x, a \cdot b\right)\\
\mathbf{elif}\;a \cdot b \leq 2 \cdot 10^{+100}:\\
\;\;\;\;\mathsf{fma}\left(t, z, y \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z, t, a \cdot b\right)\\
\end{array}
\end{array}
if (*.f64 a b) < -0.10000000000000001Initial program 90.2%
associate-+l+N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6495.1
Applied egg-rr95.1%
Taylor expanded in z around 0
*-lowering-*.f6482.7
Simplified82.7%
if -0.10000000000000001 < (*.f64 a b) < 2.00000000000000003e100Initial program 100.0%
Taylor expanded in a around 0
accelerator-lowering-fma.f64N/A
*-lowering-*.f6491.8
Simplified91.8%
if 2.00000000000000003e100 < (*.f64 a b) Initial program 93.5%
Taylor expanded in x around 0
accelerator-lowering-fma.f64N/A
*-lowering-*.f6485.1
Simplified85.1%
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6491.6
Applied egg-rr91.6%
Final simplification89.6%
(FPCore (x y z t a b) :precision binary64 (if (<= (* z t) -5e+50) (fma y x (* z t)) (if (<= (* z t) 0.1) (fma a b (* y x)) (fma t z (* y x)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z * t) <= -5e+50) {
tmp = fma(y, x, (z * t));
} else if ((z * t) <= 0.1) {
tmp = fma(a, b, (y * x));
} else {
tmp = fma(t, z, (y * x));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(z * t) <= -5e+50) tmp = fma(y, x, Float64(z * t)); elseif (Float64(z * t) <= 0.1) tmp = fma(a, b, Float64(y * x)); else tmp = fma(t, z, Float64(y * x)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(z * t), $MachinePrecision], -5e+50], N[(y * x + N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z * t), $MachinePrecision], 0.1], N[(a * b + N[(y * x), $MachinePrecision]), $MachinePrecision], N[(t * z + N[(y * x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot t \leq -5 \cdot 10^{+50}:\\
\;\;\;\;\mathsf{fma}\left(y, x, z \cdot t\right)\\
\mathbf{elif}\;z \cdot t \leq 0.1:\\
\;\;\;\;\mathsf{fma}\left(a, b, y \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t, z, y \cdot x\right)\\
\end{array}
\end{array}
if (*.f64 z t) < -5e50Initial program 92.3%
associate-+l+N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64100.0
Applied egg-rr100.0%
Taylor expanded in z around inf
*-lowering-*.f6484.9
Simplified84.9%
if -5e50 < (*.f64 z t) < 0.10000000000000001Initial program 99.2%
Taylor expanded in z around 0
accelerator-lowering-fma.f64N/A
*-lowering-*.f6491.3
Simplified91.3%
if 0.10000000000000001 < (*.f64 z t) Initial program 94.0%
Taylor expanded in a around 0
accelerator-lowering-fma.f64N/A
*-lowering-*.f6485.6
Simplified85.6%
Final simplification88.5%
(FPCore (x y z t a b) :precision binary64 (if (<= (* a b) -0.1) (fma y x (* a b)) (if (<= (* a b) 2e+100) (fma t z (* y x)) (fma a b (* z t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a * b) <= -0.1) {
tmp = fma(y, x, (a * b));
} else if ((a * b) <= 2e+100) {
tmp = fma(t, z, (y * x));
} else {
tmp = fma(a, b, (z * t));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(a * b) <= -0.1) tmp = fma(y, x, Float64(a * b)); elseif (Float64(a * b) <= 2e+100) tmp = fma(t, z, Float64(y * x)); else tmp = fma(a, b, Float64(z * t)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(a * b), $MachinePrecision], -0.1], N[(y * x + N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 2e+100], N[(t * z + N[(y * x), $MachinePrecision]), $MachinePrecision], N[(a * b + N[(z * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -0.1:\\
\;\;\;\;\mathsf{fma}\left(y, x, a \cdot b\right)\\
\mathbf{elif}\;a \cdot b \leq 2 \cdot 10^{+100}:\\
\;\;\;\;\mathsf{fma}\left(t, z, y \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, b, z \cdot t\right)\\
\end{array}
\end{array}
if (*.f64 a b) < -0.10000000000000001Initial program 90.2%
associate-+l+N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6495.1
Applied egg-rr95.1%
Taylor expanded in z around 0
*-lowering-*.f6482.7
Simplified82.7%
if -0.10000000000000001 < (*.f64 a b) < 2.00000000000000003e100Initial program 100.0%
Taylor expanded in a around 0
accelerator-lowering-fma.f64N/A
*-lowering-*.f6491.8
Simplified91.8%
if 2.00000000000000003e100 < (*.f64 a b) Initial program 93.5%
Taylor expanded in x around 0
accelerator-lowering-fma.f64N/A
*-lowering-*.f6485.1
Simplified85.1%
Final simplification88.4%
(FPCore (x y z t a b) :precision binary64 (if (<= (* z t) -1e+101) (fma a b (* z t)) (if (<= (* z t) 0.1) (fma a b (* y x)) (fma t z (* y x)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z * t) <= -1e+101) {
tmp = fma(a, b, (z * t));
} else if ((z * t) <= 0.1) {
tmp = fma(a, b, (y * x));
} else {
tmp = fma(t, z, (y * x));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(z * t) <= -1e+101) tmp = fma(a, b, Float64(z * t)); elseif (Float64(z * t) <= 0.1) tmp = fma(a, b, Float64(y * x)); else tmp = fma(t, z, Float64(y * x)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(z * t), $MachinePrecision], -1e+101], N[(a * b + N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z * t), $MachinePrecision], 0.1], N[(a * b + N[(y * x), $MachinePrecision]), $MachinePrecision], N[(t * z + N[(y * x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot t \leq -1 \cdot 10^{+101}:\\
\;\;\;\;\mathsf{fma}\left(a, b, z \cdot t\right)\\
\mathbf{elif}\;z \cdot t \leq 0.1:\\
\;\;\;\;\mathsf{fma}\left(a, b, y \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t, z, y \cdot x\right)\\
\end{array}
\end{array}
if (*.f64 z t) < -9.9999999999999998e100Initial program 90.5%
Taylor expanded in x around 0
accelerator-lowering-fma.f64N/A
*-lowering-*.f6483.7
Simplified83.7%
if -9.9999999999999998e100 < (*.f64 z t) < 0.10000000000000001Initial program 99.3%
Taylor expanded in z around 0
accelerator-lowering-fma.f64N/A
*-lowering-*.f6490.6
Simplified90.6%
if 0.10000000000000001 < (*.f64 z t) Initial program 94.0%
Taylor expanded in a around 0
accelerator-lowering-fma.f64N/A
*-lowering-*.f6485.6
Simplified85.6%
Final simplification88.2%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (fma a b (* y x)))) (if (<= (* y x) -0.0061) t_1 (if (<= (* y x) 2.5) (fma a b (* z t)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(a, b, (y * x));
double tmp;
if ((y * x) <= -0.0061) {
tmp = t_1;
} else if ((y * x) <= 2.5) {
tmp = fma(a, b, (z * t));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(a, b, Float64(y * x)) tmp = 0.0 if (Float64(y * x) <= -0.0061) tmp = t_1; elseif (Float64(y * x) <= 2.5) tmp = fma(a, b, Float64(z * t)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * b + N[(y * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(y * x), $MachinePrecision], -0.0061], t$95$1, If[LessEqual[N[(y * x), $MachinePrecision], 2.5], N[(a * b + N[(z * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(a, b, y \cdot x\right)\\
\mathbf{if}\;y \cdot x \leq -0.0061:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \cdot x \leq 2.5:\\
\;\;\;\;\mathsf{fma}\left(a, b, z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 x y) < -0.00610000000000000039 or 2.5 < (*.f64 x y) Initial program 93.8%
Taylor expanded in z around 0
accelerator-lowering-fma.f64N/A
*-lowering-*.f6481.3
Simplified81.3%
if -0.00610000000000000039 < (*.f64 x y) < 2.5Initial program 99.2%
Taylor expanded in x around 0
accelerator-lowering-fma.f64N/A
*-lowering-*.f6493.2
Simplified93.2%
Final simplification87.2%
(FPCore (x y z t a b) :precision binary64 (if (<= (* y x) -2.9e+125) (* y x) (if (<= (* y x) 4.8e+49) (fma a b (* z t)) (* y x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y * x) <= -2.9e+125) {
tmp = y * x;
} else if ((y * x) <= 4.8e+49) {
tmp = fma(a, b, (z * t));
} else {
tmp = y * x;
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(y * x) <= -2.9e+125) tmp = Float64(y * x); elseif (Float64(y * x) <= 4.8e+49) tmp = fma(a, b, Float64(z * t)); else tmp = Float64(y * x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(y * x), $MachinePrecision], -2.9e+125], N[(y * x), $MachinePrecision], If[LessEqual[N[(y * x), $MachinePrecision], 4.8e+49], N[(a * b + N[(z * t), $MachinePrecision]), $MachinePrecision], N[(y * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \cdot x \leq -2.9 \cdot 10^{+125}:\\
\;\;\;\;y \cdot x\\
\mathbf{elif}\;y \cdot x \leq 4.8 \cdot 10^{+49}:\\
\;\;\;\;\mathsf{fma}\left(a, b, z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot x\\
\end{array}
\end{array}
if (*.f64 x y) < -2.89999999999999993e125 or 4.8e49 < (*.f64 x y) Initial program 94.2%
Taylor expanded in x around inf
*-lowering-*.f6471.4
Simplified71.4%
if -2.89999999999999993e125 < (*.f64 x y) < 4.8e49Initial program 98.0%
Taylor expanded in x around 0
accelerator-lowering-fma.f64N/A
*-lowering-*.f6486.7
Simplified86.7%
Final simplification80.5%
(FPCore (x y z t a b) :precision binary64 (if (<= (* y x) -0.072) (* y x) (if (<= (* y x) 2.05e+43) (* z t) (* y x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y * x) <= -0.072) {
tmp = y * x;
} else if ((y * x) <= 2.05e+43) {
tmp = z * t;
} else {
tmp = y * x;
}
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 ((y * x) <= (-0.072d0)) then
tmp = y * x
else if ((y * x) <= 2.05d+43) then
tmp = z * t
else
tmp = y * x
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 ((y * x) <= -0.072) {
tmp = y * x;
} else if ((y * x) <= 2.05e+43) {
tmp = z * t;
} else {
tmp = y * x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y * x) <= -0.072: tmp = y * x elif (y * x) <= 2.05e+43: tmp = z * t else: tmp = y * x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(y * x) <= -0.072) tmp = Float64(y * x); elseif (Float64(y * x) <= 2.05e+43) tmp = Float64(z * t); else tmp = Float64(y * x); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y * x) <= -0.072) tmp = y * x; elseif ((y * x) <= 2.05e+43) tmp = z * t; else tmp = y * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(y * x), $MachinePrecision], -0.072], N[(y * x), $MachinePrecision], If[LessEqual[N[(y * x), $MachinePrecision], 2.05e+43], N[(z * t), $MachinePrecision], N[(y * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \cdot x \leq -0.072:\\
\;\;\;\;y \cdot x\\
\mathbf{elif}\;y \cdot x \leq 2.05 \cdot 10^{+43}:\\
\;\;\;\;z \cdot t\\
\mathbf{else}:\\
\;\;\;\;y \cdot x\\
\end{array}
\end{array}
if (*.f64 x y) < -0.0719999999999999946 or 2.05e43 < (*.f64 x y) Initial program 93.3%
Taylor expanded in x around inf
*-lowering-*.f6467.4
Simplified67.4%
if -0.0719999999999999946 < (*.f64 x y) < 2.05e43Initial program 99.2%
Taylor expanded in z around inf
*-lowering-*.f6452.7
Simplified52.7%
Final simplification59.7%
(FPCore (x y z t a b) :precision binary64 (if (<= (* a b) -3700000.0) (* a b) (if (<= (* a b) 1.6e+134) (* z t) (* a b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a * b) <= -3700000.0) {
tmp = a * b;
} else if ((a * b) <= 1.6e+134) {
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) <= (-3700000.0d0)) then
tmp = a * b
else if ((a * b) <= 1.6d+134) 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) <= -3700000.0) {
tmp = a * b;
} else if ((a * b) <= 1.6e+134) {
tmp = z * t;
} else {
tmp = a * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a * b) <= -3700000.0: tmp = a * b elif (a * b) <= 1.6e+134: tmp = z * t else: tmp = a * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(a * b) <= -3700000.0) tmp = Float64(a * b); elseif (Float64(a * b) <= 1.6e+134) 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) <= -3700000.0) tmp = a * b; elseif ((a * b) <= 1.6e+134) 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], -3700000.0], N[(a * b), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 1.6e+134], N[(z * t), $MachinePrecision], N[(a * b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -3700000:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;a \cdot b \leq 1.6 \cdot 10^{+134}:\\
\;\;\;\;z \cdot t\\
\mathbf{else}:\\
\;\;\;\;a \cdot b\\
\end{array}
\end{array}
if (*.f64 a b) < -3.7e6 or 1.6e134 < (*.f64 a b) Initial program 90.8%
Taylor expanded in a around inf
*-lowering-*.f6463.6
Simplified63.6%
if -3.7e6 < (*.f64 a b) < 1.6e134Initial program 100.0%
Taylor expanded in z around inf
*-lowering-*.f6446.5
Simplified46.5%
Final simplification53.1%
(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.4%
Taylor expanded in a around inf
*-lowering-*.f6431.3
Simplified31.3%
herbie shell --seed 2024198
(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)))