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

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Alternatives

Alternative 1
Error0.1
Cost320
\[x \cdot \left(x \cdot x\right)\]
Alternative 2
Error31.0
Cost64
\[0\]
Alternative 3
Error61.9
Cost64
\[1\]

Error

Time

Derivation

  1. Initial program 0.1

    \[\left(x \cdot x\right) \cdot x\]
  2. Using strategy rm
  3. Applied *-un-lft-identity_binary64_62160.1

    \[\leadsto \color{blue}{1 \cdot \left(\left(x \cdot x\right) \cdot x\right)}\]
  4. Using strategy rm
  5. Applied *-un-lft-identity_binary64_62160.1

    \[\leadsto 1 \cdot \color{blue}{\left(1 \cdot \left(\left(x \cdot x\right) \cdot x\right)\right)}\]
  6. Using strategy rm
  7. Applied *-un-lft-identity_binary64_62160.1

    \[\leadsto 1 \cdot \left(1 \cdot \color{blue}{\left(1 \cdot \left(\left(x \cdot x\right) \cdot x\right)\right)}\right)\]
  8. Using strategy rm
  9. Applied pow3_binary64_62990

    \[\leadsto 1 \cdot \left(1 \cdot \left(1 \cdot \color{blue}{{x}^{3}}\right)\right)\]
  10. Simplified0

    \[\leadsto \color{blue}{{x}^{3}}\]
  11. Final simplification0

    \[\leadsto {x}^{3}\]

Reproduce

herbie shell --seed 2021040 
(FPCore (x)
  :name "Diagrams.Segment:$catParam from diagrams-lib-1.3.0.3, C"
  :precision binary64
  (* (* x x) x))