(int x)
| 312 | } |
| 313 | |
| 314 | private static int sqrtFloor(int x) { |
| 315 | // There is no loss of precision in converting an int to a double, according to |
| 316 | // http://java.sun.com/docs/books/jls/third_edition/html/conversions.html#5.1.2 |
| 317 | return (int) Math.sqrt(x); |
| 318 | } |
| 319 | |
| 320 | /** |
| 321 | * Returns the result of dividing {@code p} by {@code q}, rounding using the specified |