
(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 8 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(Float64(x / 2.0) + 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[(N[(x / 2.0), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]
\begin{array}{l}
\\
\left(\frac{x}{2} + x \cdot y\right) + z
\end{array}
Initial program 100.0%
Final simplification100.0%
(FPCore (x y z)
:precision binary64
(if (<= y -0.5)
(* x y)
(if (<= y -1.9e-138)
(* x 0.5)
(if (<= y 1.75e-269)
z
(if (<= y 7e-147) (* x 0.5) (if (<= y 1650000.0) z (* x y)))))))
double code(double x, double y, double z) {
double tmp;
if (y <= -0.5) {
tmp = x * y;
} else if (y <= -1.9e-138) {
tmp = x * 0.5;
} else if (y <= 1.75e-269) {
tmp = z;
} else if (y <= 7e-147) {
tmp = x * 0.5;
} else if (y <= 1650000.0) {
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 <= (-0.5d0)) then
tmp = x * y
else if (y <= (-1.9d-138)) then
tmp = x * 0.5d0
else if (y <= 1.75d-269) then
tmp = z
else if (y <= 7d-147) then
tmp = x * 0.5d0
else if (y <= 1650000.0d0) 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 <= -0.5) {
tmp = x * y;
} else if (y <= -1.9e-138) {
tmp = x * 0.5;
} else if (y <= 1.75e-269) {
tmp = z;
} else if (y <= 7e-147) {
tmp = x * 0.5;
} else if (y <= 1650000.0) {
tmp = z;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -0.5: tmp = x * y elif y <= -1.9e-138: tmp = x * 0.5 elif y <= 1.75e-269: tmp = z elif y <= 7e-147: tmp = x * 0.5 elif y <= 1650000.0: tmp = z else: tmp = x * y return tmp
function code(x, y, z) tmp = 0.0 if (y <= -0.5) tmp = Float64(x * y); elseif (y <= -1.9e-138) tmp = Float64(x * 0.5); elseif (y <= 1.75e-269) tmp = z; elseif (y <= 7e-147) tmp = Float64(x * 0.5); elseif (y <= 1650000.0) tmp = z; else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -0.5) tmp = x * y; elseif (y <= -1.9e-138) tmp = x * 0.5; elseif (y <= 1.75e-269) tmp = z; elseif (y <= 7e-147) tmp = x * 0.5; elseif (y <= 1650000.0) tmp = z; else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -0.5], N[(x * y), $MachinePrecision], If[LessEqual[y, -1.9e-138], N[(x * 0.5), $MachinePrecision], If[LessEqual[y, 1.75e-269], z, If[LessEqual[y, 7e-147], N[(x * 0.5), $MachinePrecision], If[LessEqual[y, 1650000.0], z, N[(x * y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.5:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;y \leq -1.9 \cdot 10^{-138}:\\
\;\;\;\;x \cdot 0.5\\
\mathbf{elif}\;y \leq 1.75 \cdot 10^{-269}:\\
\;\;\;\;z\\
\mathbf{elif}\;y \leq 7 \cdot 10^{-147}:\\
\;\;\;\;x \cdot 0.5\\
\mathbf{elif}\;y \leq 1650000:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if y < -0.5 or 1.65e6 < y Initial program 100.0%
+-commutative100.0%
remove-double-neg100.0%
distribute-neg-in100.0%
distribute-frac-neg100.0%
distribute-rgt-neg-out100.0%
unsub-neg100.0%
*-commutative100.0%
cancel-sign-sub-inv100.0%
neg-mul-1100.0%
*-commutative100.0%
associate-/l*100.0%
distribute-lft-out--100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around inf 89.8%
distribute-lft-in89.8%
metadata-eval89.8%
neg-mul-189.8%
sub-neg89.8%
Simplified89.8%
Taylor expanded in y around inf 75.8%
if -0.5 < y < -1.9000000000000001e-138 or 1.75000000000000009e-269 < y < 7.00000000000000007e-147Initial program 100.0%
+-commutative100.0%
remove-double-neg100.0%
distribute-neg-in100.0%
distribute-frac-neg100.0%
distribute-rgt-neg-out100.0%
unsub-neg100.0%
*-commutative100.0%
cancel-sign-sub-inv100.0%
neg-mul-1100.0%
*-commutative100.0%
associate-/l*100.0%
distribute-lft-out--100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around 0 66.6%
+-commutative66.6%
Simplified66.6%
Taylor expanded in y around 0 65.8%
*-commutative65.8%
Simplified65.8%
if -1.9000000000000001e-138 < y < 1.75000000000000009e-269 or 7.00000000000000007e-147 < y < 1.65e6Initial program 100.0%
+-commutative100.0%
remove-double-neg100.0%
distribute-neg-in100.0%
distribute-frac-neg100.0%
distribute-rgt-neg-out100.0%
unsub-neg100.0%
*-commutative100.0%
cancel-sign-sub-inv100.0%
neg-mul-1100.0%
*-commutative100.0%
associate-/l*100.0%
distribute-lft-out--100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around inf 80.1%
distribute-lft-in80.1%
metadata-eval80.1%
neg-mul-180.1%
sub-neg80.1%
Simplified80.1%
Taylor expanded in x around 0 59.5%
Final simplification68.2%
(FPCore (x y z) :precision binary64 (if (or (<= x -7.5e+26) (not (<= x 2.1e-50))) (* x (+ y 0.5)) (+ z (* x y))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -7.5e+26) || !(x <= 2.1e-50)) {
tmp = x * (y + 0.5);
} else {
tmp = z + (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 <= (-7.5d+26)) .or. (.not. (x <= 2.1d-50))) then
tmp = x * (y + 0.5d0)
else
tmp = z + (x * y)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -7.5e+26) || !(x <= 2.1e-50)) {
tmp = x * (y + 0.5);
} else {
tmp = z + (x * y);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -7.5e+26) or not (x <= 2.1e-50): tmp = x * (y + 0.5) else: tmp = z + (x * y) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -7.5e+26) || !(x <= 2.1e-50)) tmp = Float64(x * Float64(y + 0.5)); else tmp = Float64(z + Float64(x * y)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -7.5e+26) || ~((x <= 2.1e-50))) tmp = x * (y + 0.5); else tmp = z + (x * y); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -7.5e+26], N[Not[LessEqual[x, 2.1e-50]], $MachinePrecision]], N[(x * N[(y + 0.5), $MachinePrecision]), $MachinePrecision], N[(z + N[(x * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.5 \cdot 10^{+26} \lor \neg \left(x \leq 2.1 \cdot 10^{-50}\right):\\
\;\;\;\;x \cdot \left(y + 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;z + x \cdot y\\
\end{array}
\end{array}
if x < -7.49999999999999941e26 or 2.1000000000000001e-50 < x Initial program 100.0%
+-commutative100.0%
remove-double-neg100.0%
distribute-neg-in100.0%
distribute-frac-neg100.0%
distribute-rgt-neg-out100.0%
unsub-neg100.0%
*-commutative100.0%
cancel-sign-sub-inv100.0%
neg-mul-1100.0%
*-commutative100.0%
associate-/l*100.0%
distribute-lft-out--100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around 0 88.9%
+-commutative88.9%
Simplified88.9%
if -7.49999999999999941e26 < x < 2.1000000000000001e-50Initial program 100.0%
+-commutative100.0%
remove-double-neg100.0%
distribute-neg-in100.0%
distribute-frac-neg100.0%
distribute-rgt-neg-out100.0%
unsub-neg100.0%
*-commutative100.0%
cancel-sign-sub-inv100.0%
neg-mul-1100.0%
*-commutative100.0%
associate-/l*100.0%
distribute-lft-out--100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around inf 94.7%
mul-1-neg94.7%
distribute-rgt-neg-out94.7%
Simplified94.7%
*-commutative94.7%
cancel-sign-sub94.7%
*-commutative94.7%
+-commutative94.7%
Applied egg-rr94.7%
Final simplification91.6%
(FPCore (x y z) :precision binary64 (if (or (<= y -0.5) (not (<= y 0.0072))) (+ z (* x y)) (- z (* x -0.5))))
double code(double x, double y, double z) {
double tmp;
if ((y <= -0.5) || !(y <= 0.0072)) {
tmp = z + (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 <= (-0.5d0)) .or. (.not. (y <= 0.0072d0))) then
tmp = z + (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 <= -0.5) || !(y <= 0.0072)) {
tmp = z + (x * y);
} else {
tmp = z - (x * -0.5);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -0.5) or not (y <= 0.0072): tmp = z + (x * y) else: tmp = z - (x * -0.5) return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -0.5) || !(y <= 0.0072)) tmp = Float64(z + 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 <= -0.5) || ~((y <= 0.0072))) tmp = z + (x * y); else tmp = z - (x * -0.5); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -0.5], N[Not[LessEqual[y, 0.0072]], $MachinePrecision]], N[(z + N[(x * y), $MachinePrecision]), $MachinePrecision], N[(z - N[(x * -0.5), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.5 \lor \neg \left(y \leq 0.0072\right):\\
\;\;\;\;z + x \cdot y\\
\mathbf{else}:\\
\;\;\;\;z - x \cdot -0.5\\
\end{array}
\end{array}
if y < -0.5 or 0.0071999999999999998 < y Initial program 100.0%
+-commutative100.0%
remove-double-neg100.0%
distribute-neg-in100.0%
distribute-frac-neg100.0%
distribute-rgt-neg-out100.0%
unsub-neg100.0%
*-commutative100.0%
cancel-sign-sub-inv100.0%
neg-mul-1100.0%
*-commutative100.0%
associate-/l*100.0%
distribute-lft-out--100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around inf 99.0%
mul-1-neg99.0%
distribute-rgt-neg-out99.0%
Simplified99.0%
*-commutative99.0%
cancel-sign-sub99.0%
*-commutative99.0%
+-commutative99.0%
Applied egg-rr99.0%
if -0.5 < y < 0.0071999999999999998Initial program 100.0%
+-commutative100.0%
remove-double-neg100.0%
distribute-neg-in100.0%
distribute-frac-neg100.0%
distribute-rgt-neg-out100.0%
unsub-neg100.0%
*-commutative100.0%
cancel-sign-sub-inv100.0%
neg-mul-1100.0%
*-commutative100.0%
associate-/l*100.0%
distribute-lft-out--100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around 0 99.3%
*-commutative99.3%
Simplified99.3%
Final simplification99.1%
(FPCore (x y z) :precision binary64 (if (<= z -1.8e+93) z (if (<= z 3.4e+141) (* x (+ y 0.5)) z)))
double code(double x, double y, double z) {
double tmp;
if (z <= -1.8e+93) {
tmp = z;
} else if (z <= 3.4e+141) {
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 (z <= (-1.8d+93)) then
tmp = z
else if (z <= 3.4d+141) 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 (z <= -1.8e+93) {
tmp = z;
} else if (z <= 3.4e+141) {
tmp = x * (y + 0.5);
} else {
tmp = z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -1.8e+93: tmp = z elif z <= 3.4e+141: tmp = x * (y + 0.5) else: tmp = z return tmp
function code(x, y, z) tmp = 0.0 if (z <= -1.8e+93) tmp = z; elseif (z <= 3.4e+141) 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 (z <= -1.8e+93) tmp = z; elseif (z <= 3.4e+141) tmp = x * (y + 0.5); else tmp = z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -1.8e+93], z, If[LessEqual[z, 3.4e+141], N[(x * N[(y + 0.5), $MachinePrecision]), $MachinePrecision], z]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.8 \cdot 10^{+93}:\\
\;\;\;\;z\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{+141}:\\
\;\;\;\;x \cdot \left(y + 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;z\\
\end{array}
\end{array}
if z < -1.8e93 or 3.3999999999999998e141 < z Initial program 100.0%
+-commutative100.0%
remove-double-neg100.0%
distribute-neg-in100.0%
distribute-frac-neg100.0%
distribute-rgt-neg-out100.0%
unsub-neg100.0%
*-commutative100.0%
cancel-sign-sub-inv100.0%
neg-mul-1100.0%
*-commutative100.0%
associate-/l*100.0%
distribute-lft-out--100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around inf 62.1%
distribute-lft-in62.1%
metadata-eval62.1%
neg-mul-162.1%
sub-neg62.1%
Simplified62.1%
Taylor expanded in x around 0 79.4%
if -1.8e93 < z < 3.3999999999999998e141Initial program 100.0%
+-commutative100.0%
remove-double-neg100.0%
distribute-neg-in100.0%
distribute-frac-neg100.0%
distribute-rgt-neg-out100.0%
unsub-neg100.0%
*-commutative100.0%
cancel-sign-sub-inv100.0%
neg-mul-1100.0%
*-commutative100.0%
associate-/l*100.0%
distribute-lft-out--100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around 0 80.3%
+-commutative80.3%
Simplified80.3%
Final simplification80.0%
(FPCore (x y z) :precision binary64 (if (or (<= x -2.35e+27) (not (<= x 3.8e-52))) (* x 0.5) z))
double code(double x, double y, double z) {
double tmp;
if ((x <= -2.35e+27) || !(x <= 3.8e-52)) {
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 ((x <= (-2.35d+27)) .or. (.not. (x <= 3.8d-52))) 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 ((x <= -2.35e+27) || !(x <= 3.8e-52)) {
tmp = x * 0.5;
} else {
tmp = z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -2.35e+27) or not (x <= 3.8e-52): tmp = x * 0.5 else: tmp = z return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -2.35e+27) || !(x <= 3.8e-52)) tmp = Float64(x * 0.5); else tmp = z; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -2.35e+27) || ~((x <= 3.8e-52))) tmp = x * 0.5; else tmp = z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -2.35e+27], N[Not[LessEqual[x, 3.8e-52]], $MachinePrecision]], N[(x * 0.5), $MachinePrecision], z]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.35 \cdot 10^{+27} \lor \neg \left(x \leq 3.8 \cdot 10^{-52}\right):\\
\;\;\;\;x \cdot 0.5\\
\mathbf{else}:\\
\;\;\;\;z\\
\end{array}
\end{array}
if x < -2.34999999999999988e27 or 3.8000000000000003e-52 < x Initial program 100.0%
+-commutative100.0%
remove-double-neg100.0%
distribute-neg-in100.0%
distribute-frac-neg100.0%
distribute-rgt-neg-out100.0%
unsub-neg100.0%
*-commutative100.0%
cancel-sign-sub-inv100.0%
neg-mul-1100.0%
*-commutative100.0%
associate-/l*100.0%
distribute-lft-out--100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around 0 88.9%
+-commutative88.9%
Simplified88.9%
Taylor expanded in y around 0 43.9%
*-commutative43.9%
Simplified43.9%
if -2.34999999999999988e27 < x < 3.8000000000000003e-52Initial program 100.0%
+-commutative100.0%
remove-double-neg100.0%
distribute-neg-in100.0%
distribute-frac-neg100.0%
distribute-rgt-neg-out100.0%
unsub-neg100.0%
*-commutative100.0%
cancel-sign-sub-inv100.0%
neg-mul-1100.0%
*-commutative100.0%
associate-/l*100.0%
distribute-lft-out--100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around inf 70.5%
distribute-lft-in70.5%
metadata-eval70.5%
neg-mul-170.5%
sub-neg70.5%
Simplified70.5%
Taylor expanded in x around 0 70.6%
Final simplification56.2%
(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-neg-in100.0%
distribute-frac-neg100.0%
distribute-rgt-neg-out100.0%
unsub-neg100.0%
*-commutative100.0%
cancel-sign-sub-inv100.0%
neg-mul-1100.0%
*-commutative100.0%
associate-/l*100.0%
distribute-lft-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-neg-in100.0%
distribute-frac-neg100.0%
distribute-rgt-neg-out100.0%
unsub-neg100.0%
*-commutative100.0%
cancel-sign-sub-inv100.0%
neg-mul-1100.0%
*-commutative100.0%
associate-/l*100.0%
distribute-lft-out--100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around inf 86.4%
distribute-lft-in86.4%
metadata-eval86.4%
neg-mul-186.4%
sub-neg86.4%
Simplified86.4%
Taylor expanded in x around 0 38.9%
Final simplification38.9%
herbie shell --seed 2024076
(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))