Average Error: 0.3 → 0.3
Time: 5.3s
Precision: binary64
\[x \cdot \log x \]
\[\mathsf{fma}\left(\log \left({\left(\sqrt[3]{x}\right)}^{1.6666666666666667} \cdot \sqrt[3]{{x}^{0.3333333333333333}}\right), x, x \cdot \log \left(\sqrt[3]{x}\right)\right) \]
x \cdot \log x
\mathsf{fma}\left(\log \left({\left(\sqrt[3]{x}\right)}^{1.6666666666666667} \cdot \sqrt[3]{{x}^{0.3333333333333333}}\right), x, x \cdot \log \left(\sqrt[3]{x}\right)\right)
(FPCore (x) :precision binary64 (* x (log x)))
(FPCore (x)
 :precision binary64
 (fma
  (log (* (pow (cbrt x) 1.6666666666666667) (cbrt (pow x 0.3333333333333333))))
  x
  (* x (log (cbrt x)))))
double code(double x) {
	return x * log(x);
}
double code(double x) {
	return fma(log(pow(cbrt(x), 1.6666666666666667) * cbrt(pow(x, 0.3333333333333333))), x, (x * log(cbrt(x))));
}

Error

Bits error versus x

Derivation

  1. Initial program 0.3

    \[x \cdot \log x \]
  2. Applied add-cube-cbrt_binary640.3

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

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

    \[\leadsto \color{blue}{\log \left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot x + \log \left(\sqrt[3]{x}\right) \cdot x} \]
  5. Applied fma-def_binary640.3

    \[\leadsto \color{blue}{\mathsf{fma}\left(\log \left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right), x, \log \left(\sqrt[3]{x}\right) \cdot x\right)} \]
  6. Taylor expanded in x around 0 0.3

    \[\leadsto \mathsf{fma}\left(\log \left(\sqrt[3]{x} \cdot \color{blue}{{x}^{0.3333333333333333}}\right), x, \log \left(\sqrt[3]{x}\right) \cdot x\right) \]
  7. Applied add-cube-cbrt_binary640.3

    \[\leadsto \mathsf{fma}\left(\log \left(\sqrt[3]{x} \cdot \color{blue}{\left(\left(\sqrt[3]{{x}^{0.3333333333333333}} \cdot \sqrt[3]{{x}^{0.3333333333333333}}\right) \cdot \sqrt[3]{{x}^{0.3333333333333333}}\right)}\right), x, \log \left(\sqrt[3]{x}\right) \cdot x\right) \]
  8. Applied associate-*r*_binary640.3

    \[\leadsto \mathsf{fma}\left(\log \color{blue}{\left(\left(\sqrt[3]{x} \cdot \left(\sqrt[3]{{x}^{0.3333333333333333}} \cdot \sqrt[3]{{x}^{0.3333333333333333}}\right)\right) \cdot \sqrt[3]{{x}^{0.3333333333333333}}\right)}, x, \log \left(\sqrt[3]{x}\right) \cdot x\right) \]
  9. Simplified0.3

    \[\leadsto \mathsf{fma}\left(\log \left(\color{blue}{{\left(\sqrt[3]{x}\right)}^{1.6666666666666667}} \cdot \sqrt[3]{{x}^{0.3333333333333333}}\right), x, \log \left(\sqrt[3]{x}\right) \cdot x\right) \]
  10. Final simplification0.3

    \[\leadsto \mathsf{fma}\left(\log \left({\left(\sqrt[3]{x}\right)}^{1.6666666666666667} \cdot \sqrt[3]{{x}^{0.3333333333333333}}\right), x, x \cdot \log \left(\sqrt[3]{x}\right)\right) \]

Reproduce

herbie shell --seed 2022081 
(FPCore (x)
  :name "Statistics.Distribution.Binomial:directEntropy from math-functions-0.1.5.2"
  :precision binary64
  (* x (log x)))