Average Error: 0.2 → 0.1
Time: 9.9s
Precision: 64
\[0.95492965855137202 \cdot x - 0.129006137732797982 \cdot \left(\left(x \cdot x\right) \cdot x\right)\]
\[x \cdot \left(0.95492965855137202 - \left(0.129006137732797982 \cdot x\right) \cdot x\right)\]
0.95492965855137202 \cdot x - 0.129006137732797982 \cdot \left(\left(x \cdot x\right) \cdot x\right)
x \cdot \left(0.95492965855137202 - \left(0.129006137732797982 \cdot x\right) \cdot x\right)
double f(double x) {
        double r22030 = 0.954929658551372;
        double r22031 = x;
        double r22032 = r22030 * r22031;
        double r22033 = 0.12900613773279798;
        double r22034 = r22031 * r22031;
        double r22035 = r22034 * r22031;
        double r22036 = r22033 * r22035;
        double r22037 = r22032 - r22036;
        return r22037;
}

double f(double x) {
        double r22038 = x;
        double r22039 = 0.954929658551372;
        double r22040 = 0.12900613773279798;
        double r22041 = r22040 * r22038;
        double r22042 = r22041 * r22038;
        double r22043 = r22039 - r22042;
        double r22044 = r22038 * r22043;
        return r22044;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.2

    \[0.95492965855137202 \cdot x - 0.129006137732797982 \cdot \left(\left(x \cdot x\right) \cdot x\right)\]
  2. Simplified0.1

    \[\leadsto \color{blue}{x \cdot \left(0.95492965855137202 - 0.129006137732797982 \cdot \left(x \cdot x\right)\right)}\]
  3. Using strategy rm
  4. Applied associate-*r*0.1

    \[\leadsto x \cdot \left(0.95492965855137202 - \color{blue}{\left(0.129006137732797982 \cdot x\right) \cdot x}\right)\]
  5. Final simplification0.1

    \[\leadsto x \cdot \left(0.95492965855137202 - \left(0.129006137732797982 \cdot x\right) \cdot x\right)\]

Reproduce

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