Average Error: 0.1 → 0
Time: 5.9s
Precision: 64
\[\left(\left(d1 \cdot d1\right) \cdot d1\right) \cdot d1\]
\[{d1}^{4}\]
\left(\left(d1 \cdot d1\right) \cdot d1\right) \cdot d1
{d1}^{4}
double f(double d1) {
        double r5701156 = d1;
        double r5701157 = r5701156 * r5701156;
        double r5701158 = r5701157 * r5701156;
        double r5701159 = r5701158 * r5701156;
        return r5701159;
}

double f(double d1) {
        double r5701160 = d1;
        double r5701161 = 4.0;
        double r5701162 = pow(r5701160, r5701161);
        return r5701162;
}

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}^{4}\]

Derivation

  1. Initial program 0.1

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

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

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

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

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

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

    \[\leadsto {d1}^{\color{blue}{4}}\]
  9. Final simplification0

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

Reproduce

herbie shell --seed 2019129 
(FPCore (d1)
  :name "FastMath repmul"

  :herbie-target
  (pow d1 4)

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