Average Error: 0.1 → 0.1
Time: 9.0s
Precision: binary64
\[\left(x \cdot \log y - z\right) - y \]
\[\begin{array}{l} t_0 := \log \left(\sqrt[3]{y}\right)\\ \left(\mathsf{fma}\left(x, t_0 \cdot 2, x \cdot t_0\right) - z\right) - y \end{array} \]
(FPCore (x y z) :precision binary64 (- (- (* x (log y)) z) y))
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (log (cbrt y)))) (- (- (fma x (* t_0 2.0) (* x t_0)) z) y)))
double code(double x, double y, double z) {
	return ((x * log(y)) - z) - y;
}
double code(double x, double y, double z) {
	double t_0 = log(cbrt(y));
	return (fma(x, (t_0 * 2.0), (x * t_0)) - z) - y;
}
function code(x, y, z)
	return Float64(Float64(Float64(x * log(y)) - z) - y)
end
function code(x, y, z)
	t_0 = log(cbrt(y))
	return Float64(Float64(fma(x, Float64(t_0 * 2.0), Float64(x * t_0)) - z) - y)
end
code[x_, y_, z_] := N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision] - y), $MachinePrecision]
code[x_, y_, z_] := Block[{t$95$0 = N[Log[N[Power[y, 1/3], $MachinePrecision]], $MachinePrecision]}, N[(N[(N[(x * N[(t$95$0 * 2.0), $MachinePrecision] + N[(x * t$95$0), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision] - y), $MachinePrecision]]
\left(x \cdot \log y - z\right) - y
\begin{array}{l}
t_0 := \log \left(\sqrt[3]{y}\right)\\
\left(\mathsf{fma}\left(x, t_0 \cdot 2, x \cdot t_0\right) - z\right) - y
\end{array}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Derivation

  1. Initial program 0.1

    \[\left(x \cdot \log y - z\right) - y \]
  2. Applied add-cube-cbrt_binary640.1

    \[\leadsto \left(x \cdot \log \color{blue}{\left(\left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot \sqrt[3]{y}\right)} - z\right) - y \]
  3. Applied log-prod_binary640.1

    \[\leadsto \left(x \cdot \color{blue}{\left(\log \left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) + \log \left(\sqrt[3]{y}\right)\right)} - z\right) - y \]
  4. Applied distribute-rgt-in_binary640.1

    \[\leadsto \left(\color{blue}{\left(\log \left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot x + \log \left(\sqrt[3]{y}\right) \cdot x\right)} - z\right) - y \]
  5. Simplified0.1

    \[\leadsto \left(\left(\color{blue}{x \cdot \left(\log \left(\sqrt[3]{y}\right) \cdot 2\right)} + \log \left(\sqrt[3]{y}\right) \cdot x\right) - z\right) - y \]
  6. Simplified0.1

    \[\leadsto \left(\left(x \cdot \left(\log \left(\sqrt[3]{y}\right) \cdot 2\right) + \color{blue}{x \cdot \log \left(\sqrt[3]{y}\right)}\right) - z\right) - y \]
  7. Applied fma-def_binary640.1

    \[\leadsto \left(\color{blue}{\mathsf{fma}\left(x, \log \left(\sqrt[3]{y}\right) \cdot 2, x \cdot \log \left(\sqrt[3]{y}\right)\right)} - z\right) - y \]
  8. Final simplification0.1

    \[\leadsto \left(\mathsf{fma}\left(x, \log \left(\sqrt[3]{y}\right) \cdot 2, x \cdot \log \left(\sqrt[3]{y}\right)\right) - z\right) - y \]

Reproduce

herbie shell --seed 2022130 
(FPCore (x y z)
  :name "Statistics.Distribution.Poisson:$clogProbability from math-functions-0.1.5.2"
  :precision binary64
  (- (- (* x (log y)) z) y))