fixed mistake when checking max is less than _MASK_31

calculated the fixed shifts in nextDouble and set as constants