Average Error: 30.0 → 30.0
Time: 2.4s
Precision: binary64
\[1 - {\left(\frac{h0 - 1}{h}\right)}^{n0}\]
\[1 - {\left(\frac{h0 - 1}{h}\right)}^{n0}\]
1 - {\left(\frac{h0 - 1}{h}\right)}^{n0}
1 - {\left(\frac{h0 - 1}{h}\right)}^{n0}
double code(double h0, double h, double n0) {
	return ((double) (1.0 - ((double) pow(((double) (((double) (h0 - 1.0)) / h)), n0))));
}
double code(double h0, double h, double n0) {
	return ((double) (1.0 - ((double) pow(((double) (((double) (h0 - 1.0)) / h)), n0))));
}

Error

Bits error versus h0

Bits error versus h

Bits error versus n0

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 30.0

    \[1 - {\left(\frac{h0 - 1}{h}\right)}^{n0}\]
  2. Final simplification30.0

    \[\leadsto 1 - {\left(\frac{h0 - 1}{h}\right)}^{n0}\]

Reproduce

herbie shell --seed 2020153 
(FPCore (h0 h n0)
  :name "(- 1 (pow (/ (- h0 1) h) n0))"
  :precision binary64
  (- 1.0 (pow (/ (- h0 1.0) h) n0)))