Average Error: 0.1 → 0.2
Time: 18.8s
Precision: 64
\[0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right)\]
\[\left(0.954929658551372 - \sqrt{\left(x \cdot 0.12900613773279798\right) \cdot x} \cdot \sqrt{\left(x \cdot 0.12900613773279798\right) \cdot x}\right) \cdot x\]
0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right)
\left(0.954929658551372 - \sqrt{\left(x \cdot 0.12900613773279798\right) \cdot x} \cdot \sqrt{\left(x \cdot 0.12900613773279798\right) \cdot x}\right) \cdot x
double f(double x) {
        double r527944 = 0.954929658551372;
        double r527945 = x;
        double r527946 = r527944 * r527945;
        double r527947 = 0.12900613773279798;
        double r527948 = r527945 * r527945;
        double r527949 = r527948 * r527945;
        double r527950 = r527947 * r527949;
        double r527951 = r527946 - r527950;
        return r527951;
}

double f(double x) {
        double r527952 = 0.954929658551372;
        double r527953 = x;
        double r527954 = 0.12900613773279798;
        double r527955 = r527953 * r527954;
        double r527956 = r527955 * r527953;
        double r527957 = sqrt(r527956);
        double r527958 = r527957 * r527957;
        double r527959 = r527952 - r527958;
        double r527960 = r527959 * r527953;
        return r527960;
}

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. Simplified0.1

    \[\leadsto \color{blue}{x \cdot \left(0.954929658551372 - \left(0.12900613773279798 \cdot x\right) \cdot x\right)}\]
  3. Using strategy rm
  4. Applied add-sqr-sqrt0.2

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

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

Reproduce

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