Fix math in nextDouble.