
(FPCore (x y z) :precision binary64 (+ (* x (+ y z)) (* z 5.0)))
double code(double x, double y, double z) {
return (x * (y + z)) + (z * 5.0);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (x * (y + z)) + (z * 5.0d0)
end function
public static double code(double x, double y, double z) {
return (x * (y + z)) + (z * 5.0);
}
def code(x, y, z): return (x * (y + z)) + (z * 5.0)
function code(x, y, z) return Float64(Float64(x * Float64(y + z)) + Float64(z * 5.0)) end
function tmp = code(x, y, z) tmp = (x * (y + z)) + (z * 5.0); end
code[x_, y_, z_] := N[(N[(x * N[(y + z), $MachinePrecision]), $MachinePrecision] + N[(z * 5.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(y + z\right) + z \cdot 5
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 8 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (+ (* x (+ y z)) (* z 5.0)))
double code(double x, double y, double z) {
return (x * (y + z)) + (z * 5.0);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (x * (y + z)) + (z * 5.0d0)
end function
public static double code(double x, double y, double z) {
return (x * (y + z)) + (z * 5.0);
}
def code(x, y, z): return (x * (y + z)) + (z * 5.0)
function code(x, y, z) return Float64(Float64(x * Float64(y + z)) + Float64(z * 5.0)) end
function tmp = code(x, y, z) tmp = (x * (y + z)) + (z * 5.0); end
code[x_, y_, z_] := N[(N[(x * N[(y + z), $MachinePrecision]), $MachinePrecision] + N[(z * 5.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(y + z\right) + z \cdot 5
\end{array}
(FPCore (x y z) :precision binary64 (+ (* x (+ y z)) (* z 5.0)))
double code(double x, double y, double z) {
return (x * (y + z)) + (z * 5.0);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (x * (y + z)) + (z * 5.0d0)
end function
public static double code(double x, double y, double z) {
return (x * (y + z)) + (z * 5.0);
}
def code(x, y, z): return (x * (y + z)) + (z * 5.0)
function code(x, y, z) return Float64(Float64(x * Float64(y + z)) + Float64(z * 5.0)) end
function tmp = code(x, y, z) tmp = (x * (y + z)) + (z * 5.0); end
code[x_, y_, z_] := N[(N[(x * N[(y + z), $MachinePrecision]), $MachinePrecision] + N[(z * 5.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(y + z\right) + z \cdot 5
\end{array}
Initial program 99.9%
(FPCore (x y z)
:precision binary64
(if (<= x -6.2e+138)
(* x z)
(if (<= x -1.6e-64)
(* x y)
(if (<= x 6e-45) (* z 5.0) (if (<= x 1.2e+204) (* x y) (* x z))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -6.2e+138) {
tmp = x * z;
} else if (x <= -1.6e-64) {
tmp = x * y;
} else if (x <= 6e-45) {
tmp = z * 5.0;
} else if (x <= 1.2e+204) {
tmp = x * y;
} else {
tmp = x * z;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-6.2d+138)) then
tmp = x * z
else if (x <= (-1.6d-64)) then
tmp = x * y
else if (x <= 6d-45) then
tmp = z * 5.0d0
else if (x <= 1.2d+204) then
tmp = x * y
else
tmp = x * z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -6.2e+138) {
tmp = x * z;
} else if (x <= -1.6e-64) {
tmp = x * y;
} else if (x <= 6e-45) {
tmp = z * 5.0;
} else if (x <= 1.2e+204) {
tmp = x * y;
} else {
tmp = x * z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -6.2e+138: tmp = x * z elif x <= -1.6e-64: tmp = x * y elif x <= 6e-45: tmp = z * 5.0 elif x <= 1.2e+204: tmp = x * y else: tmp = x * z return tmp
function code(x, y, z) tmp = 0.0 if (x <= -6.2e+138) tmp = Float64(x * z); elseif (x <= -1.6e-64) tmp = Float64(x * y); elseif (x <= 6e-45) tmp = Float64(z * 5.0); elseif (x <= 1.2e+204) tmp = Float64(x * y); else tmp = Float64(x * z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -6.2e+138) tmp = x * z; elseif (x <= -1.6e-64) tmp = x * y; elseif (x <= 6e-45) tmp = z * 5.0; elseif (x <= 1.2e+204) tmp = x * y; else tmp = x * z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -6.2e+138], N[(x * z), $MachinePrecision], If[LessEqual[x, -1.6e-64], N[(x * y), $MachinePrecision], If[LessEqual[x, 6e-45], N[(z * 5.0), $MachinePrecision], If[LessEqual[x, 1.2e+204], N[(x * y), $MachinePrecision], N[(x * z), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.2 \cdot 10^{+138}:\\
\;\;\;\;x \cdot z\\
\mathbf{elif}\;x \leq -1.6 \cdot 10^{-64}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;x \leq 6 \cdot 10^{-45}:\\
\;\;\;\;z \cdot 5\\
\mathbf{elif}\;x \leq 1.2 \cdot 10^{+204}:\\
\;\;\;\;x \cdot y\\
\mathbf{else}:\\
\;\;\;\;x \cdot z\\
\end{array}
\end{array}
if x < -6.1999999999999995e138 or 1.2e204 < x Initial program 100.0%
distribute-rgt-inN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6492.2%
Simplified92.2%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-lowering-+.f6464.1%
Simplified64.1%
Taylor expanded in x around inf
*-commutativeN/A
*-lowering-*.f6464.1%
Simplified64.1%
if -6.1999999999999995e138 < x < -1.59999999999999988e-64 or 6.00000000000000022e-45 < x < 1.2e204Initial program 99.9%
distribute-rgt-inN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6497.8%
Simplified97.8%
Taylor expanded in y around inf
*-lowering-*.f6460.9%
Simplified60.9%
if -1.59999999999999988e-64 < x < 6.00000000000000022e-45Initial program 99.9%
distribute-rgt-inN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6499.9%
Simplified99.9%
Taylor expanded in x around 0
*-lowering-*.f6474.1%
Simplified74.1%
Final simplification67.4%
(FPCore (x y z) :precision binary64 (let* ((t_0 (* x (+ y z)))) (if (<= x -5.0) t_0 (if (<= x 0.0001) (+ (* x y) (* z 5.0)) t_0))))
double code(double x, double y, double z) {
double t_0 = x * (y + z);
double tmp;
if (x <= -5.0) {
tmp = t_0;
} else if (x <= 0.0001) {
tmp = (x * y) + (z * 5.0);
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = x * (y + z)
if (x <= (-5.0d0)) then
tmp = t_0
else if (x <= 0.0001d0) then
tmp = (x * y) + (z * 5.0d0)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x * (y + z);
double tmp;
if (x <= -5.0) {
tmp = t_0;
} else if (x <= 0.0001) {
tmp = (x * y) + (z * 5.0);
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = x * (y + z) tmp = 0 if x <= -5.0: tmp = t_0 elif x <= 0.0001: tmp = (x * y) + (z * 5.0) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(x * Float64(y + z)) tmp = 0.0 if (x <= -5.0) tmp = t_0; elseif (x <= 0.0001) tmp = Float64(Float64(x * y) + Float64(z * 5.0)); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (y + z); tmp = 0.0; if (x <= -5.0) tmp = t_0; elseif (x <= 0.0001) tmp = (x * y) + (z * 5.0); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(y + z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5.0], t$95$0, If[LessEqual[x, 0.0001], N[(N[(x * y), $MachinePrecision] + N[(z * 5.0), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(y + z\right)\\
\mathbf{if}\;x \leq -5:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 0.0001:\\
\;\;\;\;x \cdot y + z \cdot 5\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -5 or 1.00000000000000005e-4 < x Initial program 99.9%
distribute-rgt-inN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6494.7%
Simplified94.7%
Taylor expanded in x around inf
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f6498.5%
Simplified98.5%
if -5 < x < 1.00000000000000005e-4Initial program 99.9%
distribute-rgt-inN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6499.9%
Simplified99.9%
Taylor expanded in x around 0
Simplified98.5%
Final simplification98.5%
(FPCore (x y z) :precision binary64 (let* ((t_0 (* x (+ y z)))) (if (<= y -7.8e+76) t_0 (if (<= y 2.1e-16) (* z (+ x 5.0)) t_0))))
double code(double x, double y, double z) {
double t_0 = x * (y + z);
double tmp;
if (y <= -7.8e+76) {
tmp = t_0;
} else if (y <= 2.1e-16) {
tmp = z * (x + 5.0);
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = x * (y + z)
if (y <= (-7.8d+76)) then
tmp = t_0
else if (y <= 2.1d-16) then
tmp = z * (x + 5.0d0)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x * (y + z);
double tmp;
if (y <= -7.8e+76) {
tmp = t_0;
} else if (y <= 2.1e-16) {
tmp = z * (x + 5.0);
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = x * (y + z) tmp = 0 if y <= -7.8e+76: tmp = t_0 elif y <= 2.1e-16: tmp = z * (x + 5.0) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(x * Float64(y + z)) tmp = 0.0 if (y <= -7.8e+76) tmp = t_0; elseif (y <= 2.1e-16) tmp = Float64(z * Float64(x + 5.0)); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (y + z); tmp = 0.0; if (y <= -7.8e+76) tmp = t_0; elseif (y <= 2.1e-16) tmp = z * (x + 5.0); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(y + z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.8e+76], t$95$0, If[LessEqual[y, 2.1e-16], N[(z * N[(x + 5.0), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(y + z\right)\\
\mathbf{if}\;y \leq -7.8 \cdot 10^{+76}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{-16}:\\
\;\;\;\;z \cdot \left(x + 5\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y < -7.79999999999999979e76 or 2.1000000000000001e-16 < y Initial program 99.9%
distribute-rgt-inN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6494.9%
Simplified94.9%
Taylor expanded in x around inf
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f6480.7%
Simplified80.7%
if -7.79999999999999979e76 < y < 2.1000000000000001e-16Initial program 99.9%
distribute-rgt-inN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6499.9%
Simplified99.9%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-lowering-+.f6487.7%
Simplified87.7%
Final simplification84.5%
(FPCore (x y z) :precision binary64 (let* ((t_0 (* x (+ y z)))) (if (<= x -2.3e-54) t_0 (if (<= x 5.2e-45) (* z 5.0) t_0))))
double code(double x, double y, double z) {
double t_0 = x * (y + z);
double tmp;
if (x <= -2.3e-54) {
tmp = t_0;
} else if (x <= 5.2e-45) {
tmp = z * 5.0;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = x * (y + z)
if (x <= (-2.3d-54)) then
tmp = t_0
else if (x <= 5.2d-45) then
tmp = z * 5.0d0
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x * (y + z);
double tmp;
if (x <= -2.3e-54) {
tmp = t_0;
} else if (x <= 5.2e-45) {
tmp = z * 5.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = x * (y + z) tmp = 0 if x <= -2.3e-54: tmp = t_0 elif x <= 5.2e-45: tmp = z * 5.0 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(x * Float64(y + z)) tmp = 0.0 if (x <= -2.3e-54) tmp = t_0; elseif (x <= 5.2e-45) tmp = Float64(z * 5.0); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (y + z); tmp = 0.0; if (x <= -2.3e-54) tmp = t_0; elseif (x <= 5.2e-45) tmp = z * 5.0; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(y + z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.3e-54], t$95$0, If[LessEqual[x, 5.2e-45], N[(z * 5.0), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(y + z\right)\\
\mathbf{if}\;x \leq -2.3 \cdot 10^{-54}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 5.2 \cdot 10^{-45}:\\
\;\;\;\;z \cdot 5\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -2.2999999999999999e-54 or 5.19999999999999973e-45 < x Initial program 100.0%
distribute-rgt-inN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6495.7%
Simplified95.7%
Taylor expanded in x around inf
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f6492.0%
Simplified92.0%
if -2.2999999999999999e-54 < x < 5.19999999999999973e-45Initial program 99.9%
distribute-rgt-inN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6499.9%
Simplified99.9%
Taylor expanded in x around 0
*-lowering-*.f6473.7%
Simplified73.7%
Final simplification83.7%
(FPCore (x y z) :precision binary64 (if (<= x -2.5e-65) (* x y) (if (<= x 6.5e-45) (* z 5.0) (* x y))))
double code(double x, double y, double z) {
double tmp;
if (x <= -2.5e-65) {
tmp = x * y;
} else if (x <= 6.5e-45) {
tmp = z * 5.0;
} else {
tmp = x * y;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-2.5d-65)) then
tmp = x * y
else if (x <= 6.5d-45) then
tmp = z * 5.0d0
else
tmp = x * y
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -2.5e-65) {
tmp = x * y;
} else if (x <= 6.5e-45) {
tmp = z * 5.0;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -2.5e-65: tmp = x * y elif x <= 6.5e-45: tmp = z * 5.0 else: tmp = x * y return tmp
function code(x, y, z) tmp = 0.0 if (x <= -2.5e-65) tmp = Float64(x * y); elseif (x <= 6.5e-45) tmp = Float64(z * 5.0); else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -2.5e-65) tmp = x * y; elseif (x <= 6.5e-45) tmp = z * 5.0; else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -2.5e-65], N[(x * y), $MachinePrecision], If[LessEqual[x, 6.5e-45], N[(z * 5.0), $MachinePrecision], N[(x * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.5 \cdot 10^{-65}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;x \leq 6.5 \cdot 10^{-45}:\\
\;\;\;\;z \cdot 5\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if x < -2.49999999999999991e-65 or 6.4999999999999995e-45 < x Initial program 100.0%
distribute-rgt-inN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6495.8%
Simplified95.8%
Taylor expanded in y around inf
*-lowering-*.f6454.5%
Simplified54.5%
if -2.49999999999999991e-65 < x < 6.4999999999999995e-45Initial program 99.9%
distribute-rgt-inN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6499.9%
Simplified99.9%
Taylor expanded in x around 0
*-lowering-*.f6474.1%
Simplified74.1%
Final simplification63.2%
(FPCore (x y z) :precision binary64 (+ (* x y) (* z (+ x 5.0))))
double code(double x, double y, double z) {
return (x * y) + (z * (x + 5.0));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (x * y) + (z * (x + 5.0d0))
end function
public static double code(double x, double y, double z) {
return (x * y) + (z * (x + 5.0));
}
def code(x, y, z): return (x * y) + (z * (x + 5.0))
function code(x, y, z) return Float64(Float64(x * y) + Float64(z * Float64(x + 5.0))) end
function tmp = code(x, y, z) tmp = (x * y) + (z * (x + 5.0)); end
code[x_, y_, z_] := N[(N[(x * y), $MachinePrecision] + N[(z * N[(x + 5.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot y + z \cdot \left(x + 5\right)
\end{array}
Initial program 99.9%
distribute-rgt-inN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6497.6%
Simplified97.6%
(FPCore (x y z) :precision binary64 (* z 5.0))
double code(double x, double y, double z) {
return z * 5.0;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = z * 5.0d0
end function
public static double code(double x, double y, double z) {
return z * 5.0;
}
def code(x, y, z): return z * 5.0
function code(x, y, z) return Float64(z * 5.0) end
function tmp = code(x, y, z) tmp = z * 5.0; end
code[x_, y_, z_] := N[(z * 5.0), $MachinePrecision]
\begin{array}{l}
\\
z \cdot 5
\end{array}
Initial program 99.9%
distribute-rgt-inN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6497.6%
Simplified97.6%
Taylor expanded in x around 0
*-lowering-*.f6438.1%
Simplified38.1%
Final simplification38.1%
(FPCore (x y z) :precision binary64 (+ (* (+ x 5.0) z) (* x y)))
double code(double x, double y, double z) {
return ((x + 5.0) * z) + (x * y);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((x + 5.0d0) * z) + (x * y)
end function
public static double code(double x, double y, double z) {
return ((x + 5.0) * z) + (x * y);
}
def code(x, y, z): return ((x + 5.0) * z) + (x * y)
function code(x, y, z) return Float64(Float64(Float64(x + 5.0) * z) + Float64(x * y)) end
function tmp = code(x, y, z) tmp = ((x + 5.0) * z) + (x * y); end
code[x_, y_, z_] := N[(N[(N[(x + 5.0), $MachinePrecision] * z), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + 5\right) \cdot z + x \cdot y
\end{array}
herbie shell --seed 2024152
(FPCore (x y z)
:name "Graphics.Rendering.Plot.Render.Plot.Legend:renderLegendOutside from plot-0.2.3.4, C"
:precision binary64
:alt
(! :herbie-platform default (+ (* (+ x 5) z) (* x y)))
(+ (* x (+ y z)) (* z 5.0)))