Average Error: 0.2 → 0.1
Time: 2.6s
Precision: 64
\[0.95492965855137202 \cdot x - 0.129006137732797982 \cdot \left(\left(x \cdot x\right) \cdot x\right)\]
\[x \cdot \left(0.95492965855137202 - 0.129006137732797982 \cdot \left(x \cdot x\right)\right)\]
0.95492965855137202 \cdot x - 0.129006137732797982 \cdot \left(\left(x \cdot x\right) \cdot x\right)
x \cdot \left(0.95492965855137202 - 0.129006137732797982 \cdot \left(x \cdot x\right)\right)
double f(double x) {
        double r25959 = 0.954929658551372;
        double r25960 = x;
        double r25961 = r25959 * r25960;
        double r25962 = 0.12900613773279798;
        double r25963 = r25960 * r25960;
        double r25964 = r25963 * r25960;
        double r25965 = r25962 * r25964;
        double r25966 = r25961 - r25965;
        return r25966;
}

double f(double x) {
        double r25967 = x;
        double r25968 = 0.954929658551372;
        double r25969 = 0.12900613773279798;
        double r25970 = r25967 * r25967;
        double r25971 = r25969 * r25970;
        double r25972 = r25968 - r25971;
        double r25973 = r25967 * r25972;
        return r25973;
}

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. Final simplification0.1

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

Reproduce

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