Average Error: 0.0 → 0.0
Time: 4.0s
Precision: 64
\[\left({2}^{x} - {2}^{2}\right) + 6\]
\[6 + \left({2}^{x} - {2}^{2}\right)\]
\left({2}^{x} - {2}^{2}\right) + 6
6 + \left({2}^{x} - {2}^{2}\right)
double f(double x) {
        double r24760367 = 2.0;
        double r24760368 = x;
        double r24760369 = pow(r24760367, r24760368);
        double r24760370 = pow(r24760367, r24760367);
        double r24760371 = r24760369 - r24760370;
        double r24760372 = 6.0;
        double r24760373 = r24760371 + r24760372;
        return r24760373;
}

double f(double x) {
        double r24760374 = 6.0;
        double r24760375 = 2.0;
        double r24760376 = x;
        double r24760377 = pow(r24760375, r24760376);
        double r24760378 = pow(r24760375, r24760375);
        double r24760379 = r24760377 - r24760378;
        double r24760380 = r24760374 + r24760379;
        return r24760380;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[\left({2}^{x} - {2}^{2}\right) + 6\]
  2. Final simplification0.0

    \[\leadsto 6 + \left({2}^{x} - {2}^{2}\right)\]

Reproduce

herbie shell --seed 1 
(FPCore (x)
  :name "pow(2,x)-pow(2,2)+6"
  (+ (- (pow 2.0 x) (pow 2.0 2.0)) 6.0))