Average Error: 0.1 → 0.1
Time: 13.1s
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 r502022 = 0.954929658551372;
        double r502023 = x;
        double r502024 = r502022 * r502023;
        double r502025 = 0.12900613773279798;
        double r502026 = r502023 * r502023;
        double r502027 = r502026 * r502023;
        double r502028 = r502025 * r502027;
        double r502029 = r502024 - r502028;
        return r502029;
}

double f(double x) {
        double r502030 = 0.954929658551372;
        double r502031 = x;
        double r502032 = r502030 * r502031;
        double r502033 = r502031 * r502031;
        double r502034 = 0.12900613773279798;
        double r502035 = r502031 * r502034;
        double r502036 = r502033 * r502035;
        double r502037 = r502032 - r502036;
        return r502037;
}

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. Using strategy rm
  3. Applied add-sqr-sqrt0.1

    \[\leadsto 0.954929658551372 \cdot x - \color{blue}{\left(\sqrt{0.12900613773279798} \cdot \sqrt{0.12900613773279798}\right)} \cdot \left(\left(x \cdot x\right) \cdot x\right)\]
  4. Applied associate-*l*0.2

    \[\leadsto 0.954929658551372 \cdot x - \color{blue}{\sqrt{0.12900613773279798} \cdot \left(\sqrt{0.12900613773279798} \cdot \left(\left(x \cdot x\right) \cdot x\right)\right)}\]
  5. Taylor expanded around -inf 0.1

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

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

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

Reproduce

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