Average Error: 0.1 → 0.1
Time: 2.0s
Precision: binary64
\[0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right) \]
\[x \cdot 0.954929658551372 - 0.12900613773279798 \cdot {x}^{3} \]
0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right)
x \cdot 0.954929658551372 - 0.12900613773279798 \cdot {x}^{3}
(FPCore (x)
 :precision binary64
 (- (* 0.954929658551372 x) (* 0.12900613773279798 (* (* x x) x))))
(FPCore (x)
 :precision binary64
 (- (* x 0.954929658551372) (* 0.12900613773279798 (pow x 3.0))))
double code(double x) {
	return (0.954929658551372 * x) - (0.12900613773279798 * ((x * x) * x));
}
double code(double x) {
	return (x * 0.954929658551372) - (0.12900613773279798 * pow(x, 3.0));
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.1

    \[0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right) \]
  2. Taylor expanded around 0 0.1

    \[\leadsto \color{blue}{0.954929658551372 \cdot x - 0.12900613773279798 \cdot {x}^{3}} \]
  3. Simplified0.1

    \[\leadsto \color{blue}{x \cdot 0.954929658551372 - 0.12900613773279798 \cdot {x}^{3}} \]
  4. Using strategy rm
  5. Applied add-cube-cbrt_binary640.3

    \[\leadsto x \cdot 0.954929658551372 - 0.12900613773279798 \cdot \color{blue}{\left(\left(\sqrt[3]{{x}^{3}} \cdot \sqrt[3]{{x}^{3}}\right) \cdot \sqrt[3]{{x}^{3}}\right)} \]
  6. Applied associate-*r*_binary640.3

    \[\leadsto x \cdot 0.954929658551372 - \color{blue}{\left(0.12900613773279798 \cdot \left(\sqrt[3]{{x}^{3}} \cdot \sqrt[3]{{x}^{3}}\right)\right) \cdot \sqrt[3]{{x}^{3}}} \]
  7. Simplified0.2

    \[\leadsto x \cdot 0.954929658551372 - \color{blue}{\left(0.12900613773279798 \cdot \left(x \cdot x\right)\right)} \cdot \sqrt[3]{{x}^{3}} \]
  8. Using strategy rm
  9. Applied pow1_binary640.2

    \[\leadsto x \cdot 0.954929658551372 - \left(0.12900613773279798 \cdot \left(x \cdot x\right)\right) \cdot \color{blue}{{\left(\sqrt[3]{{x}^{3}}\right)}^{1}} \]
  10. Applied pow1_binary640.2

    \[\leadsto x \cdot 0.954929658551372 - \left(0.12900613773279798 \cdot \left(x \cdot \color{blue}{{x}^{1}}\right)\right) \cdot {\left(\sqrt[3]{{x}^{3}}\right)}^{1} \]
  11. Applied pow1_binary640.2

    \[\leadsto x \cdot 0.954929658551372 - \left(0.12900613773279798 \cdot \left(\color{blue}{{x}^{1}} \cdot {x}^{1}\right)\right) \cdot {\left(\sqrt[3]{{x}^{3}}\right)}^{1} \]
  12. Applied pow-prod-down_binary640.2

    \[\leadsto x \cdot 0.954929658551372 - \left(0.12900613773279798 \cdot \color{blue}{{\left(x \cdot x\right)}^{1}}\right) \cdot {\left(\sqrt[3]{{x}^{3}}\right)}^{1} \]
  13. Applied pow1_binary640.2

    \[\leadsto x \cdot 0.954929658551372 - \left(\color{blue}{{0.12900613773279798}^{1}} \cdot {\left(x \cdot x\right)}^{1}\right) \cdot {\left(\sqrt[3]{{x}^{3}}\right)}^{1} \]
  14. Applied pow-prod-down_binary640.2

    \[\leadsto x \cdot 0.954929658551372 - \color{blue}{{\left(0.12900613773279798 \cdot \left(x \cdot x\right)\right)}^{1}} \cdot {\left(\sqrt[3]{{x}^{3}}\right)}^{1} \]
  15. Applied pow-prod-down_binary640.2

    \[\leadsto x \cdot 0.954929658551372 - \color{blue}{{\left(\left(0.12900613773279798 \cdot \left(x \cdot x\right)\right) \cdot \sqrt[3]{{x}^{3}}\right)}^{1}} \]
  16. Simplified0.1

    \[\leadsto x \cdot 0.954929658551372 - {\color{blue}{\left(0.12900613773279798 \cdot {x}^{3}\right)}}^{1} \]
  17. Final simplification0.1

    \[\leadsto x \cdot 0.954929658551372 - 0.12900613773279798 \cdot {x}^{3} \]

Reproduce

herbie shell --seed 2021205 
(FPCore (x)
  :name "Rosa's Benchmark"
  :precision binary64
  (- (* 0.954929658551372 x) (* 0.12900613773279798 (* (* x x) x))))