
(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 (+ (* x y) (* a b))))
double code(double x, double y, double z, double t, double a, double b) {
return fma(z, t, ((x * y) + (a * b)));
}
function code(x, y, z, t, a, b) return fma(z, t, Float64(Float64(x * y) + Float64(a * b))) end
code[x_, y_, z_, t_, a_, b_] := N[(z * t + N[(N[(x * y), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(z, t, x \cdot y + a \cdot b\right)
\end{array}
Initial program 98.4%
+-commutativeN/A
associate-+l+N/A
fma-defineN/A
fma-lowering-fma.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6499.2%
Applied egg-rr99.2%
(FPCore (x y z t a b) :precision binary64 (fma y x (+ (* a b) (* z t))))
double code(double x, double y, double z, double t, double a, double b) {
return fma(y, x, ((a * b) + (z * t)));
}
function code(x, y, z, t, a, b) return fma(y, x, Float64(Float64(a * b) + Float64(z * t))) end
code[x_, y_, z_, t_, a_, b_] := N[(y * x + N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y, x, a \cdot b + z \cdot t\right)
\end{array}
Initial program 98.4%
associate-+l+N/A
*-commutativeN/A
fma-defineN/A
fma-lowering-fma.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6499.2%
Applied egg-rr99.2%
Final simplification99.2%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -1.15e-43)
(* z t)
(if (<= t 3.7e-297)
(* a b)
(if (<= t 2.1e-83)
(* x y)
(if (<= t 5.6e+28) (* a b) (if (<= t 1.5e+63) (* x y) (* z t)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.15e-43) {
tmp = z * t;
} else if (t <= 3.7e-297) {
tmp = a * b;
} else if (t <= 2.1e-83) {
tmp = x * y;
} else if (t <= 5.6e+28) {
tmp = a * b;
} else if (t <= 1.5e+63) {
tmp = x * y;
} 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 (t <= (-1.15d-43)) then
tmp = z * t
else if (t <= 3.7d-297) then
tmp = a * b
else if (t <= 2.1d-83) then
tmp = x * y
else if (t <= 5.6d+28) then
tmp = a * b
else if (t <= 1.5d+63) then
tmp = x * y
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 (t <= -1.15e-43) {
tmp = z * t;
} else if (t <= 3.7e-297) {
tmp = a * b;
} else if (t <= 2.1e-83) {
tmp = x * y;
} else if (t <= 5.6e+28) {
tmp = a * b;
} else if (t <= 1.5e+63) {
tmp = x * y;
} else {
tmp = z * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.15e-43: tmp = z * t elif t <= 3.7e-297: tmp = a * b elif t <= 2.1e-83: tmp = x * y elif t <= 5.6e+28: tmp = a * b elif t <= 1.5e+63: tmp = x * y else: tmp = z * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.15e-43) tmp = Float64(z * t); elseif (t <= 3.7e-297) tmp = Float64(a * b); elseif (t <= 2.1e-83) tmp = Float64(x * y); elseif (t <= 5.6e+28) tmp = Float64(a * b); elseif (t <= 1.5e+63) tmp = Float64(x * y); else tmp = Float64(z * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -1.15e-43) tmp = z * t; elseif (t <= 3.7e-297) tmp = a * b; elseif (t <= 2.1e-83) tmp = x * y; elseif (t <= 5.6e+28) tmp = a * b; elseif (t <= 1.5e+63) tmp = x * y; else tmp = z * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.15e-43], N[(z * t), $MachinePrecision], If[LessEqual[t, 3.7e-297], N[(a * b), $MachinePrecision], If[LessEqual[t, 2.1e-83], N[(x * y), $MachinePrecision], If[LessEqual[t, 5.6e+28], N[(a * b), $MachinePrecision], If[LessEqual[t, 1.5e+63], N[(x * y), $MachinePrecision], N[(z * t), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.15 \cdot 10^{-43}:\\
\;\;\;\;z \cdot t\\
\mathbf{elif}\;t \leq 3.7 \cdot 10^{-297}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{-83}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;t \leq 5.6 \cdot 10^{+28}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;t \leq 1.5 \cdot 10^{+63}:\\
\;\;\;\;x \cdot y\\
\mathbf{else}:\\
\;\;\;\;z \cdot t\\
\end{array}
\end{array}
if t < -1.1499999999999999e-43 or 1.5e63 < t Initial program 98.2%
Taylor expanded in z around inf
*-lowering-*.f6455.7%
Simplified55.7%
if -1.1499999999999999e-43 < t < 3.7e-297 or 2.0999999999999999e-83 < t < 5.6000000000000003e28Initial program 98.8%
Taylor expanded in a around inf
*-lowering-*.f6454.3%
Simplified54.3%
if 3.7e-297 < t < 2.0999999999999999e-83 or 5.6000000000000003e28 < t < 1.5e63Initial program 98.1%
Taylor expanded in x around inf
*-lowering-*.f6460.5%
Simplified60.5%
Final simplification56.2%
(FPCore (x y z t a b) :precision binary64 (if (<= (* a b) -5e-63) (+ (* a b) (* z t)) (if (<= (* a b) 2e+31) (+ (* x y) (* z t)) (+ (* x y) (* a b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a * b) <= -5e-63) {
tmp = (a * b) + (z * t);
} else if ((a * b) <= 2e+31) {
tmp = (x * y) + (z * t);
} else {
tmp = (x * y) + (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) <= (-5d-63)) then
tmp = (a * b) + (z * t)
else if ((a * b) <= 2d+31) then
tmp = (x * y) + (z * t)
else
tmp = (x * y) + (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) <= -5e-63) {
tmp = (a * b) + (z * t);
} else if ((a * b) <= 2e+31) {
tmp = (x * y) + (z * t);
} else {
tmp = (x * y) + (a * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a * b) <= -5e-63: tmp = (a * b) + (z * t) elif (a * b) <= 2e+31: tmp = (x * y) + (z * t) else: tmp = (x * y) + (a * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(a * b) <= -5e-63) tmp = Float64(Float64(a * b) + Float64(z * t)); elseif (Float64(a * b) <= 2e+31) tmp = Float64(Float64(x * y) + Float64(z * t)); else tmp = Float64(Float64(x * y) + Float64(a * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a * b) <= -5e-63) tmp = (a * b) + (z * t); elseif ((a * b) <= 2e+31) tmp = (x * y) + (z * t); else tmp = (x * y) + (a * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(a * b), $MachinePrecision], -5e-63], N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 2e+31], N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -5 \cdot 10^{-63}:\\
\;\;\;\;a \cdot b + z \cdot t\\
\mathbf{elif}\;a \cdot b \leq 2 \cdot 10^{+31}:\\
\;\;\;\;x \cdot y + z \cdot t\\
\mathbf{else}:\\
\;\;\;\;x \cdot y + a \cdot b\\
\end{array}
\end{array}
if (*.f64 a b) < -5.0000000000000002e-63Initial program 97.4%
Taylor expanded in x around 0
*-lowering-*.f6481.4%
Simplified81.4%
if -5.0000000000000002e-63 < (*.f64 a b) < 1.9999999999999999e31Initial program 99.2%
Taylor expanded in a around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6492.9%
Simplified92.9%
if 1.9999999999999999e31 < (*.f64 a b) Initial program 97.7%
Taylor expanded in x around inf
*-lowering-*.f6489.2%
Simplified89.2%
Final simplification88.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* a b) (* z t))))
(if (<= (* a b) -6e-63)
t_1
(if (<= (* a b) 1.25e+36) (+ (* x y) (* z t)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a * b) + (z * t);
double tmp;
if ((a * b) <= -6e-63) {
tmp = t_1;
} else if ((a * b) <= 1.25e+36) {
tmp = (x * y) + (z * t);
} else {
tmp = t_1;
}
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)
if ((a * b) <= (-6d-63)) then
tmp = t_1
else if ((a * b) <= 1.25d+36) then
tmp = (x * y) + (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 t_1 = (a * b) + (z * t);
double tmp;
if ((a * b) <= -6e-63) {
tmp = t_1;
} else if ((a * b) <= 1.25e+36) {
tmp = (x * y) + (z * t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a * b) + (z * t) tmp = 0 if (a * b) <= -6e-63: tmp = t_1 elif (a * b) <= 1.25e+36: tmp = (x * y) + (z * t) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a * b) + Float64(z * t)) tmp = 0.0 if (Float64(a * b) <= -6e-63) tmp = t_1; elseif (Float64(a * b) <= 1.25e+36) tmp = Float64(Float64(x * y) + Float64(z * t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a * b) + (z * t); tmp = 0.0; if ((a * b) <= -6e-63) tmp = t_1; elseif ((a * b) <= 1.25e+36) tmp = (x * y) + (z * t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * b), $MachinePrecision], -6e-63], t$95$1, If[LessEqual[N[(a * b), $MachinePrecision], 1.25e+36], N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot b + z \cdot t\\
\mathbf{if}\;a \cdot b \leq -6 \cdot 10^{-63}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \cdot b \leq 1.25 \cdot 10^{+36}:\\
\;\;\;\;x \cdot y + z \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 a b) < -5.99999999999999959e-63 or 1.24999999999999994e36 < (*.f64 a b) Initial program 97.5%
Taylor expanded in x around 0
*-lowering-*.f6483.2%
Simplified83.2%
if -5.99999999999999959e-63 < (*.f64 a b) < 1.24999999999999994e36Initial program 99.2%
Taylor expanded in a around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6492.9%
Simplified92.9%
Final simplification88.4%
(FPCore (x y z t a b) :precision binary64 (if (<= (* x y) -1.15e+157) (* x y) (if (<= (* x y) 3.7e+88) (+ (* a b) (* z t)) (* x y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x * y) <= -1.15e+157) {
tmp = x * y;
} else if ((x * y) <= 3.7e+88) {
tmp = (a * b) + (z * t);
} 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 ((x * y) <= (-1.15d+157)) then
tmp = x * y
else if ((x * y) <= 3.7d+88) then
tmp = (a * b) + (z * t)
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 ((x * y) <= -1.15e+157) {
tmp = x * y;
} else if ((x * y) <= 3.7e+88) {
tmp = (a * b) + (z * t);
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (x * y) <= -1.15e+157: tmp = x * y elif (x * y) <= 3.7e+88: tmp = (a * b) + (z * t) else: tmp = x * y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(x * y) <= -1.15e+157) tmp = Float64(x * y); elseif (Float64(x * y) <= 3.7e+88) tmp = Float64(Float64(a * b) + Float64(z * t)); else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((x * y) <= -1.15e+157) tmp = x * y; elseif ((x * y) <= 3.7e+88) tmp = (a * b) + (z * t); else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(x * y), $MachinePrecision], -1.15e+157], N[(x * y), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 3.7e+88], N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], N[(x * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -1.15 \cdot 10^{+157}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;x \cdot y \leq 3.7 \cdot 10^{+88}:\\
\;\;\;\;a \cdot b + z \cdot t\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if (*.f64 x y) < -1.15000000000000002e157 or 3.69999999999999994e88 < (*.f64 x y) Initial program 97.0%
Taylor expanded in x around inf
*-lowering-*.f6472.0%
Simplified72.0%
if -1.15000000000000002e157 < (*.f64 x y) < 3.69999999999999994e88Initial program 99.3%
Taylor expanded in x around 0
*-lowering-*.f6486.5%
Simplified86.5%
Final simplification80.7%
(FPCore (x y z t a b) :precision binary64 (if (<= t -1.15e-43) (* z t) (if (<= t 2.9e+26) (* a b) (* z t))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.15e-43) {
tmp = z * t;
} else if (t <= 2.9e+26) {
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 (t <= (-1.15d-43)) then
tmp = z * t
else if (t <= 2.9d+26) 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 (t <= -1.15e-43) {
tmp = z * t;
} else if (t <= 2.9e+26) {
tmp = a * b;
} else {
tmp = z * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.15e-43: tmp = z * t elif t <= 2.9e+26: tmp = a * b else: tmp = z * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.15e-43) tmp = Float64(z * t); elseif (t <= 2.9e+26) 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 (t <= -1.15e-43) tmp = z * t; elseif (t <= 2.9e+26) tmp = a * b; else tmp = z * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.15e-43], N[(z * t), $MachinePrecision], If[LessEqual[t, 2.9e+26], N[(a * b), $MachinePrecision], N[(z * t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.15 \cdot 10^{-43}:\\
\;\;\;\;z \cdot t\\
\mathbf{elif}\;t \leq 2.9 \cdot 10^{+26}:\\
\;\;\;\;a \cdot b\\
\mathbf{else}:\\
\;\;\;\;z \cdot t\\
\end{array}
\end{array}
if t < -1.1499999999999999e-43 or 2.9e26 < t Initial program 98.4%
Taylor expanded in z around inf
*-lowering-*.f6452.6%
Simplified52.6%
if -1.1499999999999999e-43 < t < 2.9e26Initial program 98.4%
Taylor expanded in a around inf
*-lowering-*.f6445.9%
Simplified45.9%
Final simplification49.2%
(FPCore (x y z t a b) :precision binary64 (+ (* a b) (+ (* x y) (* z t))))
double code(double x, double y, double z, double t, double a, double b) {
return (a * b) + ((x * y) + (z * t));
}
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) + ((x * y) + (z * t))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (a * b) + ((x * y) + (z * t));
}
def code(x, y, z, t, a, b): return (a * b) + ((x * y) + (z * t))
function code(x, y, z, t, a, b) return Float64(Float64(a * b) + Float64(Float64(x * y) + Float64(z * t))) end
function tmp = code(x, y, z, t, a, b) tmp = (a * b) + ((x * y) + (z * t)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(a * b), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a \cdot b + \left(x \cdot y + z \cdot t\right)
\end{array}
Initial program 98.4%
Final simplification98.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 98.4%
Taylor expanded in a around inf
*-lowering-*.f6435.3%
Simplified35.3%
herbie shell --seed 2024158
(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)))