
(FPCore (x y z) :precision binary64 (+ (+ (/ x 2.0) (* y x)) z))
double code(double x, double y, double z) {
return ((x / 2.0) + (y * x)) + z;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((x / 2.0d0) + (y * x)) + z
end function
public static double code(double x, double y, double z) {
return ((x / 2.0) + (y * x)) + z;
}
def code(x, y, z): return ((x / 2.0) + (y * x)) + z
function code(x, y, z) return Float64(Float64(Float64(x / 2.0) + Float64(y * x)) + z) end
function tmp = code(x, y, z) tmp = ((x / 2.0) + (y * x)) + z; end
code[x_, y_, z_] := N[(N[(N[(x / 2.0), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]
\begin{array}{l}
\\
\left(\frac{x}{2} + y \cdot x\right) + z
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 9 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (+ (+ (/ x 2.0) (* y x)) z))
double code(double x, double y, double z) {
return ((x / 2.0) + (y * x)) + z;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((x / 2.0d0) + (y * x)) + z
end function
public static double code(double x, double y, double z) {
return ((x / 2.0) + (y * x)) + z;
}
def code(x, y, z): return ((x / 2.0) + (y * x)) + z
function code(x, y, z) return Float64(Float64(Float64(x / 2.0) + Float64(y * x)) + z) end
function tmp = code(x, y, z) tmp = ((x / 2.0) + (y * x)) + z; end
code[x_, y_, z_] := N[(N[(N[(x / 2.0), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]
\begin{array}{l}
\\
\left(\frac{x}{2} + y \cdot x\right) + z
\end{array}
(FPCore (x y z) :precision binary64 (+ (/ x 2.0) (+ (* x y) z)))
double code(double x, double y, double z) {
return (x / 2.0) + ((x * y) + z);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (x / 2.0d0) + ((x * y) + z)
end function
public static double code(double x, double y, double z) {
return (x / 2.0) + ((x * y) + z);
}
def code(x, y, z): return (x / 2.0) + ((x * y) + z)
function code(x, y, z) return Float64(Float64(x / 2.0) + Float64(Float64(x * y) + z)) end
function tmp = code(x, y, z) tmp = (x / 2.0) + ((x * y) + z); end
code[x_, y_, z_] := N[(N[(x / 2.0), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{2} + \left(x \cdot y + z\right)
\end{array}
Initial program 100.0%
associate-+l+100.0%
*-commutative100.0%
Simplified100.0%
Final simplification100.0%
(FPCore (x y z)
:precision binary64
(if (<= y -1.45e+38)
(* x y)
(if (<= y -3.45e-242)
z
(if (<= y 2.5e-211)
(* x 0.5)
(if (<= y 1.15e-62)
z
(if (<= y 3.55e-6) (* x 0.5) (if (<= y 1.25e+20) z (* x y))))))))
double code(double x, double y, double z) {
double tmp;
if (y <= -1.45e+38) {
tmp = x * y;
} else if (y <= -3.45e-242) {
tmp = z;
} else if (y <= 2.5e-211) {
tmp = x * 0.5;
} else if (y <= 1.15e-62) {
tmp = z;
} else if (y <= 3.55e-6) {
tmp = x * 0.5;
} else if (y <= 1.25e+20) {
tmp = z;
} 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 (y <= (-1.45d+38)) then
tmp = x * y
else if (y <= (-3.45d-242)) then
tmp = z
else if (y <= 2.5d-211) then
tmp = x * 0.5d0
else if (y <= 1.15d-62) then
tmp = z
else if (y <= 3.55d-6) then
tmp = x * 0.5d0
else if (y <= 1.25d+20) then
tmp = z
else
tmp = x * y
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= -1.45e+38) {
tmp = x * y;
} else if (y <= -3.45e-242) {
tmp = z;
} else if (y <= 2.5e-211) {
tmp = x * 0.5;
} else if (y <= 1.15e-62) {
tmp = z;
} else if (y <= 3.55e-6) {
tmp = x * 0.5;
} else if (y <= 1.25e+20) {
tmp = z;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -1.45e+38: tmp = x * y elif y <= -3.45e-242: tmp = z elif y <= 2.5e-211: tmp = x * 0.5 elif y <= 1.15e-62: tmp = z elif y <= 3.55e-6: tmp = x * 0.5 elif y <= 1.25e+20: tmp = z else: tmp = x * y return tmp
function code(x, y, z) tmp = 0.0 if (y <= -1.45e+38) tmp = Float64(x * y); elseif (y <= -3.45e-242) tmp = z; elseif (y <= 2.5e-211) tmp = Float64(x * 0.5); elseif (y <= 1.15e-62) tmp = z; elseif (y <= 3.55e-6) tmp = Float64(x * 0.5); elseif (y <= 1.25e+20) tmp = z; else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -1.45e+38) tmp = x * y; elseif (y <= -3.45e-242) tmp = z; elseif (y <= 2.5e-211) tmp = x * 0.5; elseif (y <= 1.15e-62) tmp = z; elseif (y <= 3.55e-6) tmp = x * 0.5; elseif (y <= 1.25e+20) tmp = z; else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -1.45e+38], N[(x * y), $MachinePrecision], If[LessEqual[y, -3.45e-242], z, If[LessEqual[y, 2.5e-211], N[(x * 0.5), $MachinePrecision], If[LessEqual[y, 1.15e-62], z, If[LessEqual[y, 3.55e-6], N[(x * 0.5), $MachinePrecision], If[LessEqual[y, 1.25e+20], z, N[(x * y), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.45 \cdot 10^{+38}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;y \leq -3.45 \cdot 10^{-242}:\\
\;\;\;\;z\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{-211}:\\
\;\;\;\;x \cdot 0.5\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{-62}:\\
\;\;\;\;z\\
\mathbf{elif}\;y \leq 3.55 \cdot 10^{-6}:\\
\;\;\;\;x \cdot 0.5\\
\mathbf{elif}\;y \leq 1.25 \cdot 10^{+20}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if y < -1.45000000000000003e38 or 1.25e20 < y Initial program 100.0%
+-commutative100.0%
remove-double-neg100.0%
distribute-frac-neg100.0%
sub-neg100.0%
neg-mul-1100.0%
*-commutative100.0%
associate-/l*100.0%
*-commutative100.0%
distribute-rgt-out--100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around inf 90.7%
+-commutative90.7%
+-commutative90.7%
associate-+l+90.7%
+-commutative90.7%
Simplified90.7%
Taylor expanded in y around inf 77.4%
if -1.45000000000000003e38 < y < -3.44999999999999998e-242 or 2.5000000000000001e-211 < y < 1.15e-62 or 3.5499999999999999e-6 < y < 1.25e20Initial program 100.0%
+-commutative100.0%
remove-double-neg100.0%
distribute-frac-neg100.0%
sub-neg100.0%
neg-mul-1100.0%
*-commutative100.0%
associate-/l*100.0%
*-commutative100.0%
distribute-rgt-out--100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around 0 60.4%
if -3.44999999999999998e-242 < y < 2.5000000000000001e-211 or 1.15e-62 < y < 3.5499999999999999e-6Initial program 100.0%
+-commutative100.0%
remove-double-neg100.0%
distribute-frac-neg100.0%
sub-neg100.0%
neg-mul-1100.0%
*-commutative100.0%
associate-/l*100.0%
*-commutative100.0%
distribute-rgt-out--99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf 93.0%
+-commutative93.0%
+-commutative93.0%
associate-+l+93.0%
+-commutative93.0%
Simplified93.0%
Taylor expanded in x around inf 70.5%
Taylor expanded in y around 0 69.0%
Final simplification70.3%
(FPCore (x y z) :precision binary64 (if (or (<= x -2.7e-99) (not (<= x 9e-95))) (* x (+ y 0.5)) z))
double code(double x, double y, double z) {
double tmp;
if ((x <= -2.7e-99) || !(x <= 9e-95)) {
tmp = x * (y + 0.5);
} else {
tmp = 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 <= (-2.7d-99)) .or. (.not. (x <= 9d-95))) then
tmp = x * (y + 0.5d0)
else
tmp = z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -2.7e-99) || !(x <= 9e-95)) {
tmp = x * (y + 0.5);
} else {
tmp = z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -2.7e-99) or not (x <= 9e-95): tmp = x * (y + 0.5) else: tmp = z return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -2.7e-99) || !(x <= 9e-95)) tmp = Float64(x * Float64(y + 0.5)); else tmp = z; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -2.7e-99) || ~((x <= 9e-95))) tmp = x * (y + 0.5); else tmp = z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -2.7e-99], N[Not[LessEqual[x, 9e-95]], $MachinePrecision]], N[(x * N[(y + 0.5), $MachinePrecision]), $MachinePrecision], z]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.7 \cdot 10^{-99} \lor \neg \left(x \leq 9 \cdot 10^{-95}\right):\\
\;\;\;\;x \cdot \left(y + 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;z\\
\end{array}
\end{array}
if x < -2.7e-99 or 9e-95 < x Initial program 100.0%
+-commutative100.0%
remove-double-neg100.0%
distribute-frac-neg100.0%
sub-neg100.0%
neg-mul-1100.0%
*-commutative100.0%
associate-/l*100.0%
*-commutative100.0%
distribute-rgt-out--100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around inf 99.4%
+-commutative99.4%
+-commutative99.4%
associate-+l+99.4%
+-commutative99.4%
Simplified99.4%
Taylor expanded in x around inf 83.1%
if -2.7e-99 < x < 9e-95Initial program 100.0%
+-commutative100.0%
remove-double-neg100.0%
distribute-frac-neg100.0%
sub-neg100.0%
neg-mul-1100.0%
*-commutative100.0%
associate-/l*100.0%
*-commutative100.0%
distribute-rgt-out--100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around 0 70.6%
Final simplification78.7%
(FPCore (x y z) :precision binary64 (if (or (<= y -5.1e+35) (not (<= y 6.7e+28))) (* x y) (+ z (* x 0.5))))
double code(double x, double y, double z) {
double tmp;
if ((y <= -5.1e+35) || !(y <= 6.7e+28)) {
tmp = x * y;
} else {
tmp = z + (x * 0.5);
}
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 ((y <= (-5.1d+35)) .or. (.not. (y <= 6.7d+28))) then
tmp = x * y
else
tmp = z + (x * 0.5d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -5.1e+35) || !(y <= 6.7e+28)) {
tmp = x * y;
} else {
tmp = z + (x * 0.5);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -5.1e+35) or not (y <= 6.7e+28): tmp = x * y else: tmp = z + (x * 0.5) return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -5.1e+35) || !(y <= 6.7e+28)) tmp = Float64(x * y); else tmp = Float64(z + Float64(x * 0.5)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -5.1e+35) || ~((y <= 6.7e+28))) tmp = x * y; else tmp = z + (x * 0.5); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -5.1e+35], N[Not[LessEqual[y, 6.7e+28]], $MachinePrecision]], N[(x * y), $MachinePrecision], N[(z + N[(x * 0.5), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.1 \cdot 10^{+35} \lor \neg \left(y \leq 6.7 \cdot 10^{+28}\right):\\
\;\;\;\;x \cdot y\\
\mathbf{else}:\\
\;\;\;\;z + x \cdot 0.5\\
\end{array}
\end{array}
if y < -5.10000000000000017e35 or 6.7e28 < y Initial program 100.0%
+-commutative100.0%
remove-double-neg100.0%
distribute-frac-neg100.0%
sub-neg100.0%
neg-mul-1100.0%
*-commutative100.0%
associate-/l*100.0%
*-commutative100.0%
distribute-rgt-out--100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around inf 90.5%
+-commutative90.5%
+-commutative90.5%
associate-+l+90.5%
+-commutative90.5%
Simplified90.5%
Taylor expanded in y around inf 77.8%
if -5.10000000000000017e35 < y < 6.7e28Initial program 100.0%
+-commutative100.0%
remove-double-neg100.0%
distribute-frac-neg100.0%
sub-neg100.0%
neg-mul-1100.0%
*-commutative100.0%
associate-/l*100.0%
*-commutative100.0%
distribute-rgt-out--100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around 0 96.2%
*-commutative96.2%
Simplified96.2%
Final simplification87.7%
(FPCore (x y z) :precision binary64 (if (or (<= y -82.0) (not (<= y 0.00112))) (+ (* x y) z) (+ z (* x 0.5))))
double code(double x, double y, double z) {
double tmp;
if ((y <= -82.0) || !(y <= 0.00112)) {
tmp = (x * y) + z;
} else {
tmp = z + (x * 0.5);
}
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 ((y <= (-82.0d0)) .or. (.not. (y <= 0.00112d0))) then
tmp = (x * y) + z
else
tmp = z + (x * 0.5d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -82.0) || !(y <= 0.00112)) {
tmp = (x * y) + z;
} else {
tmp = z + (x * 0.5);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -82.0) or not (y <= 0.00112): tmp = (x * y) + z else: tmp = z + (x * 0.5) return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -82.0) || !(y <= 0.00112)) tmp = Float64(Float64(x * y) + z); else tmp = Float64(z + Float64(x * 0.5)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -82.0) || ~((y <= 0.00112))) tmp = (x * y) + z; else tmp = z + (x * 0.5); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -82.0], N[Not[LessEqual[y, 0.00112]], $MachinePrecision]], N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision], N[(z + N[(x * 0.5), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -82 \lor \neg \left(y \leq 0.00112\right):\\
\;\;\;\;x \cdot y + z\\
\mathbf{else}:\\
\;\;\;\;z + x \cdot 0.5\\
\end{array}
\end{array}
if y < -82 or 0.0011199999999999999 < y Initial program 100.0%
+-commutative100.0%
remove-double-neg100.0%
distribute-frac-neg100.0%
sub-neg100.0%
neg-mul-1100.0%
*-commutative100.0%
associate-/l*100.0%
*-commutative100.0%
distribute-rgt-out--100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around inf 99.4%
if -82 < y < 0.0011199999999999999Initial program 100.0%
+-commutative100.0%
remove-double-neg100.0%
distribute-frac-neg100.0%
sub-neg100.0%
neg-mul-1100.0%
*-commutative100.0%
associate-/l*100.0%
*-commutative100.0%
distribute-rgt-out--100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around 0 98.9%
*-commutative98.9%
Simplified98.9%
Final simplification99.2%
(FPCore (x y z) :precision binary64 (if (<= z -5.5e-49) z (if (<= z 2.4e-71) (* x 0.5) z)))
double code(double x, double y, double z) {
double tmp;
if (z <= -5.5e-49) {
tmp = z;
} else if (z <= 2.4e-71) {
tmp = x * 0.5;
} else {
tmp = 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 (z <= (-5.5d-49)) then
tmp = z
else if (z <= 2.4d-71) then
tmp = x * 0.5d0
else
tmp = z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -5.5e-49) {
tmp = z;
} else if (z <= 2.4e-71) {
tmp = x * 0.5;
} else {
tmp = z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -5.5e-49: tmp = z elif z <= 2.4e-71: tmp = x * 0.5 else: tmp = z return tmp
function code(x, y, z) tmp = 0.0 if (z <= -5.5e-49) tmp = z; elseif (z <= 2.4e-71) tmp = Float64(x * 0.5); else tmp = z; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -5.5e-49) tmp = z; elseif (z <= 2.4e-71) tmp = x * 0.5; else tmp = z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -5.5e-49], z, If[LessEqual[z, 2.4e-71], N[(x * 0.5), $MachinePrecision], z]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \cdot 10^{-49}:\\
\;\;\;\;z\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{-71}:\\
\;\;\;\;x \cdot 0.5\\
\mathbf{else}:\\
\;\;\;\;z\\
\end{array}
\end{array}
if z < -5.50000000000000031e-49 or 2.4e-71 < z Initial program 100.0%
+-commutative100.0%
remove-double-neg100.0%
distribute-frac-neg100.0%
sub-neg100.0%
neg-mul-1100.0%
*-commutative100.0%
associate-/l*100.0%
*-commutative100.0%
distribute-rgt-out--100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around 0 60.8%
if -5.50000000000000031e-49 < z < 2.4e-71Initial program 100.0%
+-commutative100.0%
remove-double-neg100.0%
distribute-frac-neg100.0%
sub-neg100.0%
neg-mul-1100.0%
*-commutative100.0%
associate-/l*100.0%
*-commutative100.0%
distribute-rgt-out--100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around inf 99.9%
+-commutative99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in x around inf 89.6%
Taylor expanded in y around 0 45.3%
Final simplification53.2%
(FPCore (x y z) :precision binary64 (+ z (+ (/ x 2.0) (* x y))))
double code(double x, double y, double z) {
return z + ((x / 2.0) + (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 = z + ((x / 2.0d0) + (x * y))
end function
public static double code(double x, double y, double z) {
return z + ((x / 2.0) + (x * y));
}
def code(x, y, z): return z + ((x / 2.0) + (x * y))
function code(x, y, z) return Float64(z + Float64(Float64(x / 2.0) + Float64(x * y))) end
function tmp = code(x, y, z) tmp = z + ((x / 2.0) + (x * y)); end
code[x_, y_, z_] := N[(z + N[(N[(x / 2.0), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
z + \left(\frac{x}{2} + x \cdot y\right)
\end{array}
Initial program 100.0%
Final simplification100.0%
(FPCore (x y z) :precision binary64 (+ z (* x (- y -0.5))))
double code(double x, double y, double z) {
return z + (x * (y - -0.5));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = z + (x * (y - (-0.5d0)))
end function
public static double code(double x, double y, double z) {
return z + (x * (y - -0.5));
}
def code(x, y, z): return z + (x * (y - -0.5))
function code(x, y, z) return Float64(z + Float64(x * Float64(y - -0.5))) end
function tmp = code(x, y, z) tmp = z + (x * (y - -0.5)); end
code[x_, y_, z_] := N[(z + N[(x * N[(y - -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
z + x \cdot \left(y - -0.5\right)
\end{array}
Initial program 100.0%
+-commutative100.0%
remove-double-neg100.0%
distribute-frac-neg100.0%
sub-neg100.0%
neg-mul-1100.0%
*-commutative100.0%
associate-/l*100.0%
*-commutative100.0%
distribute-rgt-out--100.0%
metadata-eval100.0%
Simplified100.0%
Final simplification100.0%
(FPCore (x y z) :precision binary64 z)
double code(double x, double y, double z) {
return z;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = z
end function
public static double code(double x, double y, double z) {
return z;
}
def code(x, y, z): return z
function code(x, y, z) return z end
function tmp = code(x, y, z) tmp = z; end
code[x_, y_, z_] := z
\begin{array}{l}
\\
z
\end{array}
Initial program 100.0%
+-commutative100.0%
remove-double-neg100.0%
distribute-frac-neg100.0%
sub-neg100.0%
neg-mul-1100.0%
*-commutative100.0%
associate-/l*100.0%
*-commutative100.0%
distribute-rgt-out--100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around 0 36.8%
Final simplification36.8%
herbie shell --seed 2024053
(FPCore (x y z)
:name "Data.Histogram.Bin.BinF:$cfromIndex from histogram-fill-0.8.4.1"
:precision binary64
(+ (+ (/ x 2.0) (* y x)) z))