Average Error: 0.0 → 0.0
Time: 2.8s
Precision: binary64
\[{x}^{\left(\frac{1}{n}\right)}\]
\[{x}^{\left(\frac{1}{n}\right)}\]
{x}^{\left(\frac{1}{n}\right)}
{x}^{\left(\frac{1}{n}\right)}
double code(double x, double n) {
	return ((double) pow(x, ((double) (1.0 / n))));
}
double code(double x, double n) {
	return ((double) pow(x, ((double) (1.0 / n))));
}

Error

Bits error versus x

Bits error versus n

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[{x}^{\left(\frac{1}{n}\right)}\]
  2. Final simplification0.0

    \[\leadsto {x}^{\left(\frac{1}{n}\right)}\]

Reproduce

herbie shell --seed 2020152 
(FPCore (x n)
  :name "(pow x (/ 1 n))"
  :precision binary64
  (pow x (/ 1.0 n)))