Average Error: 0.1 → 0
Time: 41.9s
Precision: 64
\[\left(d1 \cdot \left(\left(\left(\left(\left(d1 \cdot \left(d1 \cdot d1\right)\right) \cdot d1\right) \cdot d1\right) \cdot \left(d1 \cdot d1\right)\right) \cdot d1\right)\right) \cdot d1\]
\[{d1}^{10}\]
\left(d1 \cdot \left(\left(\left(\left(\left(d1 \cdot \left(d1 \cdot d1\right)\right) \cdot d1\right) \cdot d1\right) \cdot \left(d1 \cdot d1\right)\right) \cdot d1\right)\right) \cdot d1
{d1}^{10}
double f(double d1) {
        double r2499092 = d1;
        double r2499093 = r2499092 * r2499092;
        double r2499094 = r2499092 * r2499093;
        double r2499095 = r2499094 * r2499092;
        double r2499096 = r2499095 * r2499092;
        double r2499097 = r2499096 * r2499093;
        double r2499098 = r2499097 * r2499092;
        double r2499099 = r2499092 * r2499098;
        double r2499100 = r2499099 * r2499092;
        return r2499100;
}

double f(double d1) {
        double r2499101 = d1;
        double r2499102 = 10.0;
        double r2499103 = pow(r2499101, r2499102);
        return r2499103;
}

Error

Bits error versus d1

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.1
Target0
Herbie0
\[{d1}^{10}\]

Derivation

  1. Initial program 0.1

    \[\left(d1 \cdot \left(\left(\left(\left(\left(d1 \cdot \left(d1 \cdot d1\right)\right) \cdot d1\right) \cdot d1\right) \cdot \left(d1 \cdot d1\right)\right) \cdot d1\right)\right) \cdot d1\]
  2. Using strategy rm
  3. Applied pow10.1

    \[\leadsto \left(d1 \cdot \left(\left(\left(\left(\left(d1 \cdot \left(d1 \cdot d1\right)\right) \cdot d1\right) \cdot d1\right) \cdot \left(d1 \cdot d1\right)\right) \cdot \color{blue}{{d1}^{1}}\right)\right) \cdot d1\]
  4. Applied pow10.1

    \[\leadsto \left(d1 \cdot \left(\left(\left(\left(\left(d1 \cdot \left(d1 \cdot d1\right)\right) \cdot d1\right) \cdot d1\right) \cdot \left(\color{blue}{{d1}^{1}} \cdot d1\right)\right) \cdot {d1}^{1}\right)\right) \cdot d1\]
  5. Applied pow-plus0.1

    \[\leadsto \left(d1 \cdot \left(\left(\left(\left(\left(d1 \cdot \left(d1 \cdot d1\right)\right) \cdot d1\right) \cdot d1\right) \cdot \color{blue}{{d1}^{\left(1 + 1\right)}}\right) \cdot {d1}^{1}\right)\right) \cdot d1\]
  6. Applied pow10.1

    \[\leadsto \left(d1 \cdot \left(\left(\left(\left(\left(d1 \cdot \left(d1 \cdot \color{blue}{{d1}^{1}}\right)\right) \cdot d1\right) \cdot d1\right) \cdot {d1}^{\left(1 + 1\right)}\right) \cdot {d1}^{1}\right)\right) \cdot d1\]
  7. Applied pow10.1

    \[\leadsto \left(d1 \cdot \left(\left(\left(\left(\left(d1 \cdot \left(\color{blue}{{d1}^{1}} \cdot {d1}^{1}\right)\right) \cdot d1\right) \cdot d1\right) \cdot {d1}^{\left(1 + 1\right)}\right) \cdot {d1}^{1}\right)\right) \cdot d1\]
  8. Applied pow-prod-up0.1

    \[\leadsto \left(d1 \cdot \left(\left(\left(\left(\left(d1 \cdot \color{blue}{{d1}^{\left(1 + 1\right)}}\right) \cdot d1\right) \cdot d1\right) \cdot {d1}^{\left(1 + 1\right)}\right) \cdot {d1}^{1}\right)\right) \cdot d1\]
  9. Applied pow10.1

    \[\leadsto \left(d1 \cdot \left(\left(\left(\left(\left(\color{blue}{{d1}^{1}} \cdot {d1}^{\left(1 + 1\right)}\right) \cdot d1\right) \cdot d1\right) \cdot {d1}^{\left(1 + 1\right)}\right) \cdot {d1}^{1}\right)\right) \cdot d1\]
  10. Applied pow-prod-up0.1

    \[\leadsto \left(d1 \cdot \left(\left(\left(\left(\color{blue}{{d1}^{\left(1 + \left(1 + 1\right)\right)}} \cdot d1\right) \cdot d1\right) \cdot {d1}^{\left(1 + 1\right)}\right) \cdot {d1}^{1}\right)\right) \cdot d1\]
  11. Applied pow-plus0.1

    \[\leadsto \left(d1 \cdot \left(\left(\left(\color{blue}{{d1}^{\left(\left(1 + \left(1 + 1\right)\right) + 1\right)}} \cdot d1\right) \cdot {d1}^{\left(1 + 1\right)}\right) \cdot {d1}^{1}\right)\right) \cdot d1\]
  12. Applied pow-plus0.1

    \[\leadsto \left(d1 \cdot \left(\left(\color{blue}{{d1}^{\left(\left(\left(1 + \left(1 + 1\right)\right) + 1\right) + 1\right)}} \cdot {d1}^{\left(1 + 1\right)}\right) \cdot {d1}^{1}\right)\right) \cdot d1\]
  13. Applied pow-prod-up0.1

    \[\leadsto \left(d1 \cdot \left(\color{blue}{{d1}^{\left(\left(\left(\left(1 + \left(1 + 1\right)\right) + 1\right) + 1\right) + \left(1 + 1\right)\right)}} \cdot {d1}^{1}\right)\right) \cdot d1\]
  14. Applied pow-prod-up0.1

    \[\leadsto \left(d1 \cdot \color{blue}{{d1}^{\left(\left(\left(\left(\left(1 + \left(1 + 1\right)\right) + 1\right) + 1\right) + \left(1 + 1\right)\right) + 1\right)}}\right) \cdot d1\]
  15. Applied pow10.1

    \[\leadsto \left(\color{blue}{{d1}^{1}} \cdot {d1}^{\left(\left(\left(\left(\left(1 + \left(1 + 1\right)\right) + 1\right) + 1\right) + \left(1 + 1\right)\right) + 1\right)}\right) \cdot d1\]
  16. Applied pow-prod-up0.0

    \[\leadsto \color{blue}{{d1}^{\left(1 + \left(\left(\left(\left(\left(1 + \left(1 + 1\right)\right) + 1\right) + 1\right) + \left(1 + 1\right)\right) + 1\right)\right)}} \cdot d1\]
  17. Applied pow-plus0

    \[\leadsto \color{blue}{{d1}^{\left(\left(1 + \left(\left(\left(\left(\left(1 + \left(1 + 1\right)\right) + 1\right) + 1\right) + \left(1 + 1\right)\right) + 1\right)\right) + 1\right)}}\]
  18. Simplified0

    \[\leadsto {d1}^{\color{blue}{10}}\]
  19. Final simplification0

    \[\leadsto {d1}^{10}\]

Reproduce

herbie shell --seed 2019130 
(FPCore (d1)
  :name "FastMath test5"

  :herbie-target
  (pow d1 10)

  (* (* d1 (* (* (* (* (* d1 (* d1 d1)) d1) d1) (* d1 d1)) d1)) d1))