Average Error: 0.1 → 0
Time: 1.2m
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 r54426666 = d1;
        double r54426667 = r54426666 * r54426666;
        double r54426668 = r54426666 * r54426667;
        double r54426669 = r54426668 * r54426666;
        double r54426670 = r54426669 * r54426666;
        double r54426671 = r54426670 * r54426667;
        double r54426672 = r54426671 * r54426666;
        double r54426673 = r54426666 * r54426672;
        double r54426674 = r54426673 * r54426666;
        return r54426674;
}

double f(double d1) {
        double r54426675 = d1;
        double r54426676 = 10.0;
        double r54426677 = pow(r54426675, r54426676);
        return r54426677;
}

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(\color{blue}{{d1}^{1}} \cdot d1\right)\right) \cdot d1\right)\right) \cdot d1\]
  4. 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\right)\right) \cdot d1\]
  5. Applied cube-unmult0.1

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

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

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

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

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

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

    \[\leadsto \color{blue}{{d1}^{\left(1 + \left(\left(\left(\left(3 + 1\right) + 1\right) + \left(1 + 1\right)\right) + 1\right)\right)}} \cdot d1\]
  12. Simplified0.0

    \[\leadsto {d1}^{\color{blue}{9}} \cdot d1\]
  13. Taylor expanded around -inf 0

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

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

Reproduce

herbie shell --seed 2019128 +o rules:numerics
(FPCore (d1)
  :name "FastMath test5"

  :herbie-target
  (pow d1 10)

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