Average Error: 0.1 → 0.1
Time: 19.8s
Precision: 64
\[0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right)\]
\[0.954929658551372 \cdot x - \left(x \cdot x\right) \cdot \left(x \cdot 0.12900613773279798\right)\]
0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right)
0.954929658551372 \cdot x - \left(x \cdot x\right) \cdot \left(x \cdot 0.12900613773279798\right)
double f(double x) {
        double r689006 = 0.954929658551372;
        double r689007 = x;
        double r689008 = r689006 * r689007;
        double r689009 = 0.12900613773279798;
        double r689010 = r689007 * r689007;
        double r689011 = r689010 * r689007;
        double r689012 = r689009 * r689011;
        double r689013 = r689008 - r689012;
        return r689013;
}

double f(double x) {
        double r689014 = 0.954929658551372;
        double r689015 = x;
        double r689016 = r689014 * r689015;
        double r689017 = r689015 * r689015;
        double r689018 = 0.12900613773279798;
        double r689019 = r689015 * r689018;
        double r689020 = r689017 * r689019;
        double r689021 = r689016 - r689020;
        return r689021;
}

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 -inf 0.1

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

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

    \[\leadsto 0.954929658551372 \cdot x - \left(x \cdot x\right) \cdot \left(x \cdot 0.12900613773279798\right)\]

Reproduce

herbie shell --seed 2019132 +o rules:numerics
(FPCore (x)
  :name "Rosa's Benchmark"
  (- (* 0.954929658551372 x) (* 0.12900613773279798 (* (* x x) x))))