
(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 a b (fma t z (* x y))))
double code(double x, double y, double z, double t, double a, double b) {
return fma(a, b, fma(t, z, (x * y)));
}
function code(x, y, z, t, a, b) return fma(a, b, fma(t, z, Float64(x * y))) end
code[x_, y_, z_, t_, a_, b_] := N[(a * b + N[(t * z + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(a, b, \mathsf{fma}\left(t, z, x \cdot y\right)\right)
\end{array}
Initial program 98.8%
Taylor expanded in x around 0 98.8%
fma-def99.2%
fma-def100.0%
Simplified100.0%
Final simplification100.0%
(FPCore (x y z t a b) :precision binary64 (+ (* a b) (fma x y (* t z))))
double code(double x, double y, double z, double t, double a, double b) {
return (a * b) + fma(x, y, (t * z));
}
function code(x, y, z, t, a, b) return Float64(Float64(a * b) + fma(x, y, Float64(t * z))) end
code[x_, y_, z_, t_, a_, b_] := N[(N[(a * b), $MachinePrecision] + N[(x * y + N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a \cdot b + \mathsf{fma}\left(x, y, t \cdot z\right)
\end{array}
Initial program 98.8%
fma-def98.8%
Simplified98.8%
Final simplification98.8%
(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.8%
+-commutative98.8%
associate-+l+98.8%
fma-def99.2%
fma-def99.2%
Simplified99.2%
fma-udef99.2%
Applied egg-rr99.2%
Final simplification99.2%
(FPCore (x y z t a b)
:precision binary64
(if (<= (* x y) -4.8e+61)
(* x y)
(if (<= (* x y) 4.8e-241)
(* t z)
(if (<= (* x y) 1.45e-60)
(* a b)
(if (<= (* x y) 9.2e+98) (* t z) (* x y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x * y) <= -4.8e+61) {
tmp = x * y;
} else if ((x * y) <= 4.8e-241) {
tmp = t * z;
} else if ((x * y) <= 1.45e-60) {
tmp = a * b;
} else if ((x * y) <= 9.2e+98) {
tmp = t * z;
} 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) <= (-4.8d+61)) then
tmp = x * y
else if ((x * y) <= 4.8d-241) then
tmp = t * z
else if ((x * y) <= 1.45d-60) then
tmp = a * b
else if ((x * y) <= 9.2d+98) then
tmp = t * z
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) <= -4.8e+61) {
tmp = x * y;
} else if ((x * y) <= 4.8e-241) {
tmp = t * z;
} else if ((x * y) <= 1.45e-60) {
tmp = a * b;
} else if ((x * y) <= 9.2e+98) {
tmp = t * z;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (x * y) <= -4.8e+61: tmp = x * y elif (x * y) <= 4.8e-241: tmp = t * z elif (x * y) <= 1.45e-60: tmp = a * b elif (x * y) <= 9.2e+98: tmp = t * z else: tmp = x * y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(x * y) <= -4.8e+61) tmp = Float64(x * y); elseif (Float64(x * y) <= 4.8e-241) tmp = Float64(t * z); elseif (Float64(x * y) <= 1.45e-60) tmp = Float64(a * b); elseif (Float64(x * y) <= 9.2e+98) tmp = Float64(t * z); 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) <= -4.8e+61) tmp = x * y; elseif ((x * y) <= 4.8e-241) tmp = t * z; elseif ((x * y) <= 1.45e-60) tmp = a * b; elseif ((x * y) <= 9.2e+98) tmp = t * z; else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(x * y), $MachinePrecision], -4.8e+61], N[(x * y), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 4.8e-241], N[(t * z), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 1.45e-60], N[(a * b), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 9.2e+98], N[(t * z), $MachinePrecision], N[(x * y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -4.8 \cdot 10^{+61}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;x \cdot y \leq 4.8 \cdot 10^{-241}:\\
\;\;\;\;t \cdot z\\
\mathbf{elif}\;x \cdot y \leq 1.45 \cdot 10^{-60}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;x \cdot y \leq 9.2 \cdot 10^{+98}:\\
\;\;\;\;t \cdot z\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if (*.f64 x y) < -4.7999999999999998e61 or 9.20000000000000053e98 < (*.f64 x y) Initial program 96.6%
Taylor expanded in x around 0 96.6%
fma-def97.8%
fma-def100.0%
Simplified100.0%
Taylor expanded in x around inf 74.9%
if -4.7999999999999998e61 < (*.f64 x y) < 4.8e-241 or 1.45e-60 < (*.f64 x y) < 9.20000000000000053e98Initial program 100.0%
Taylor expanded in x around 0 100.0%
fma-def100.0%
fma-def100.0%
Simplified100.0%
Taylor expanded in t around inf 55.1%
if 4.8e-241 < (*.f64 x y) < 1.45e-60Initial program 100.0%
Taylor expanded in a around inf 60.5%
Final simplification62.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= (* x y) -1.7e+73) (not (<= (* x y) 2e+105))) (* x y) (+ (* a b) (* t z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((x * y) <= -1.7e+73) || !((x * y) <= 2e+105)) {
tmp = x * y;
} else {
tmp = (a * b) + (t * 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) :: tmp
if (((x * y) <= (-1.7d+73)) .or. (.not. ((x * y) <= 2d+105))) then
tmp = x * y
else
tmp = (a * b) + (t * z)
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.7e+73) || !((x * y) <= 2e+105)) {
tmp = x * y;
} else {
tmp = (a * b) + (t * z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if ((x * y) <= -1.7e+73) or not ((x * y) <= 2e+105): tmp = x * y else: tmp = (a * b) + (t * z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((Float64(x * y) <= -1.7e+73) || !(Float64(x * y) <= 2e+105)) tmp = Float64(x * y); else tmp = Float64(Float64(a * b) + Float64(t * z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (((x * y) <= -1.7e+73) || ~(((x * y) <= 2e+105))) tmp = x * y; else tmp = (a * b) + (t * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[N[(x * y), $MachinePrecision], -1.7e+73], N[Not[LessEqual[N[(x * y), $MachinePrecision], 2e+105]], $MachinePrecision]], N[(x * y), $MachinePrecision], N[(N[(a * b), $MachinePrecision] + N[(t * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -1.7 \cdot 10^{+73} \lor \neg \left(x \cdot y \leq 2 \cdot 10^{+105}\right):\\
\;\;\;\;x \cdot y\\
\mathbf{else}:\\
\;\;\;\;a \cdot b + t \cdot z\\
\end{array}
\end{array}
if (*.f64 x y) < -1.7000000000000001e73 or 1.9999999999999999e105 < (*.f64 x y) Initial program 96.5%
Taylor expanded in x around 0 96.5%
fma-def97.7%
fma-def100.0%
Simplified100.0%
Taylor expanded in x around inf 77.2%
if -1.7000000000000001e73 < (*.f64 x y) < 1.9999999999999999e105Initial program 100.0%
Taylor expanded in x around 0 87.7%
Final simplification84.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= (* a b) -1.28e+26) (not (<= (* a b) 3.5e+24))) (+ (* a b) (* t z)) (+ (* x y) (* t z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((a * b) <= -1.28e+26) || !((a * b) <= 3.5e+24)) {
tmp = (a * b) + (t * z);
} else {
tmp = (x * y) + (t * 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) :: tmp
if (((a * b) <= (-1.28d+26)) .or. (.not. ((a * b) <= 3.5d+24))) then
tmp = (a * b) + (t * z)
else
tmp = (x * y) + (t * z)
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.28e+26) || !((a * b) <= 3.5e+24)) {
tmp = (a * b) + (t * z);
} else {
tmp = (x * y) + (t * z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if ((a * b) <= -1.28e+26) or not ((a * b) <= 3.5e+24): tmp = (a * b) + (t * z) else: tmp = (x * y) + (t * z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((Float64(a * b) <= -1.28e+26) || !(Float64(a * b) <= 3.5e+24)) tmp = Float64(Float64(a * b) + Float64(t * z)); else tmp = Float64(Float64(x * y) + Float64(t * z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (((a * b) <= -1.28e+26) || ~(((a * b) <= 3.5e+24))) tmp = (a * b) + (t * z); else tmp = (x * y) + (t * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[N[(a * b), $MachinePrecision], -1.28e+26], N[Not[LessEqual[N[(a * b), $MachinePrecision], 3.5e+24]], $MachinePrecision]], N[(N[(a * b), $MachinePrecision] + N[(t * z), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] + N[(t * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -1.28 \cdot 10^{+26} \lor \neg \left(a \cdot b \leq 3.5 \cdot 10^{+24}\right):\\
\;\;\;\;a \cdot b + t \cdot z\\
\mathbf{else}:\\
\;\;\;\;x \cdot y + t \cdot z\\
\end{array}
\end{array}
if (*.f64 a b) < -1.28e26 or 3.5000000000000002e24 < (*.f64 a b) Initial program 98.1%
Taylor expanded in x around 0 85.8%
if -1.28e26 < (*.f64 a b) < 3.5000000000000002e24Initial program 99.3%
Taylor expanded in x around 0 99.3%
fma-def99.3%
fma-def100.0%
Simplified100.0%
Taylor expanded in a around 0 94.2%
Final simplification90.7%
(FPCore (x y z t a b) :precision binary64 (if (<= (* a b) -2.1e+106) (+ (* x y) (* a b)) (if (<= (* a b) 8e+28) (+ (* x y) (* t z)) (+ (* a b) (* t z)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a * b) <= -2.1e+106) {
tmp = (x * y) + (a * b);
} else if ((a * b) <= 8e+28) {
tmp = (x * y) + (t * z);
} else {
tmp = (a * b) + (t * 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) :: tmp
if ((a * b) <= (-2.1d+106)) then
tmp = (x * y) + (a * b)
else if ((a * b) <= 8d+28) then
tmp = (x * y) + (t * z)
else
tmp = (a * b) + (t * z)
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) <= -2.1e+106) {
tmp = (x * y) + (a * b);
} else if ((a * b) <= 8e+28) {
tmp = (x * y) + (t * z);
} else {
tmp = (a * b) + (t * z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a * b) <= -2.1e+106: tmp = (x * y) + (a * b) elif (a * b) <= 8e+28: tmp = (x * y) + (t * z) else: tmp = (a * b) + (t * z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(a * b) <= -2.1e+106) tmp = Float64(Float64(x * y) + Float64(a * b)); elseif (Float64(a * b) <= 8e+28) tmp = Float64(Float64(x * y) + Float64(t * z)); else tmp = Float64(Float64(a * b) + Float64(t * z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a * b) <= -2.1e+106) tmp = (x * y) + (a * b); elseif ((a * b) <= 8e+28) tmp = (x * y) + (t * z); else tmp = (a * b) + (t * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(a * b), $MachinePrecision], -2.1e+106], N[(N[(x * y), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 8e+28], N[(N[(x * y), $MachinePrecision] + N[(t * z), $MachinePrecision]), $MachinePrecision], N[(N[(a * b), $MachinePrecision] + N[(t * z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -2.1 \cdot 10^{+106}:\\
\;\;\;\;x \cdot y + a \cdot b\\
\mathbf{elif}\;a \cdot b \leq 8 \cdot 10^{+28}:\\
\;\;\;\;x \cdot y + t \cdot z\\
\mathbf{else}:\\
\;\;\;\;a \cdot b + t \cdot z\\
\end{array}
\end{array}
if (*.f64 a b) < -2.10000000000000005e106Initial program 100.0%
Taylor expanded in x around inf 85.9%
if -2.10000000000000005e106 < (*.f64 a b) < 7.99999999999999967e28Initial program 99.4%
Taylor expanded in x around 0 99.4%
fma-def99.4%
fma-def100.0%
Simplified100.0%
Taylor expanded in a around 0 91.2%
if 7.99999999999999967e28 < (*.f64 a b) Initial program 95.6%
Taylor expanded in x around 0 95.6%
Final simplification91.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= (* a b) -5.5e+133) (not (<= (* a b) 4.4e+21))) (* a b) (* t z)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((a * b) <= -5.5e+133) || !((a * b) <= 4.4e+21)) {
tmp = a * b;
} else {
tmp = t * 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) :: tmp
if (((a * b) <= (-5.5d+133)) .or. (.not. ((a * b) <= 4.4d+21))) then
tmp = a * b
else
tmp = t * z
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) <= -5.5e+133) || !((a * b) <= 4.4e+21)) {
tmp = a * b;
} else {
tmp = t * z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if ((a * b) <= -5.5e+133) or not ((a * b) <= 4.4e+21): tmp = a * b else: tmp = t * z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((Float64(a * b) <= -5.5e+133) || !(Float64(a * b) <= 4.4e+21)) tmp = Float64(a * b); else tmp = Float64(t * z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (((a * b) <= -5.5e+133) || ~(((a * b) <= 4.4e+21))) tmp = a * b; else tmp = t * z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[N[(a * b), $MachinePrecision], -5.5e+133], N[Not[LessEqual[N[(a * b), $MachinePrecision], 4.4e+21]], $MachinePrecision]], N[(a * b), $MachinePrecision], N[(t * z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -5.5 \cdot 10^{+133} \lor \neg \left(a \cdot b \leq 4.4 \cdot 10^{+21}\right):\\
\;\;\;\;a \cdot b\\
\mathbf{else}:\\
\;\;\;\;t \cdot z\\
\end{array}
\end{array}
if (*.f64 a b) < -5.5e133 or 4.4e21 < (*.f64 a b) Initial program 97.6%
Taylor expanded in a around inf 75.0%
if -5.5e133 < (*.f64 a b) < 4.4e21Initial program 99.4%
Taylor expanded in x around 0 99.4%
fma-def99.4%
fma-def100.0%
Simplified100.0%
Taylor expanded in t around inf 46.4%
Final simplification55.8%
(FPCore (x y z t a b) :precision binary64 (+ (* a b) (+ (* x y) (* t z))))
double code(double x, double y, double z, double t, double a, double b) {
return (a * b) + ((x * y) + (t * z));
}
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) + (t * z))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (a * b) + ((x * y) + (t * z));
}
def code(x, y, z, t, a, b): return (a * b) + ((x * y) + (t * z))
function code(x, y, z, t, a, b) return Float64(Float64(a * b) + Float64(Float64(x * y) + Float64(t * z))) end
function tmp = code(x, y, z, t, a, b) tmp = (a * b) + ((x * y) + (t * z)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(a * b), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] + N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a \cdot b + \left(x \cdot y + t \cdot z\right)
\end{array}
Initial program 98.8%
Final simplification98.8%
(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.8%
Taylor expanded in a around inf 32.4%
Final simplification32.4%
herbie shell --seed 2023310
(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)))