@@ -88,6 +88,9 @@ |
||
| 88 | 88 | |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | + /** |
|
| 92 | + * @param NumberInterface $p |
|
| 93 | + */ |
|
| 91 | 94 | public static function inverseNormalCDF($p, $precision = 10) |
| 92 | 95 | { |
| 93 | 96 | $pi = Numbers::makePi(); |
@@ -53,7 +53,7 @@ |
||
| 53 | 53 | * WARNING: This function is VERY unoptimized. Be careful of large m values. |
| 54 | 54 | * |
| 55 | 55 | * @param $m |
| 56 | - * @param $n |
|
| 56 | + * @param integer $n |
|
| 57 | 57 | * |
| 58 | 58 | * @return NumberInterface |
| 59 | 59 | */ |
@@ -21,6 +21,10 @@ discard block |
||
| 21 | 21 | |
| 22 | 22 | protected $symbol; |
| 23 | 23 | |
| 24 | + /** |
|
| 25 | + * @param integer $symbol |
|
| 26 | + * @param integer $precision |
|
| 27 | + */ |
|
| 24 | 28 | public function __construct($value, $symbol = Currency::DOLLAR, $precision = null, $base = 10) |
| 25 | 29 | { |
| 26 | 30 | $this->symbol = $symbol; |
@@ -63,7 +67,7 @@ discard block |
||
| 63 | 67 | } |
| 64 | 68 | |
| 65 | 69 | /** |
| 66 | - * @param $value |
|
| 70 | + * @param NumberInterface $value |
|
| 67 | 71 | * |
| 68 | 72 | * @return Currency |
| 69 | 73 | */ |
@@ -10,6 +10,9 @@ |
||
| 10 | 10 | class ImmutableNumber extends Number implements NumberInterface, DecimalInterface |
| 11 | 11 | {
|
| 12 | 12 | |
| 13 | + /** |
|
| 14 | + * @param ImmutableNumber $mod |
|
| 15 | + */ |
|
| 13 | 16 | public function modulo($mod) |
| 14 | 17 | {
|
| 15 | 18 | $oldBase = $this->convertForModification(); |
@@ -178,7 +178,7 @@ |
||
| 178 | 178 | } |
| 179 | 179 | |
| 180 | 180 | /** |
| 181 | - * @param int|float|DecimalInterface $min |
|
| 181 | + * @param integer $min |
|
| 182 | 182 | * @param int|float|DecimalInterface $max |
| 183 | 183 | * @param int $maxIterations |
| 184 | 184 | * |
@@ -163,7 +163,7 @@ |
||
| 163 | 163 | * WARNING: This function is of very limited use with Poisson distributions, and may represent a SIGNIFICANT |
| 164 | 164 | * performance hit for certain values of $min, $max, $lambda, and $maxIterations |
| 165 | 165 | * |
| 166 | - * @param int|float|NumberInterface $min |
|
| 166 | + * @param integer $min |
|
| 167 | 167 | * @param int|float|NumberInterface $max |
| 168 | 168 | * @param int $maxIterations |
| 169 | 169 | * |
@@ -163,7 +163,7 @@ |
||
| 163 | 163 | * WARNING: This function is of very limited use with Poisson distributions, and may represent a SIGNIFICANT |
| 164 | 164 | * performance hit for certain values of $min, $max, $lambda, and $maxIterations |
| 165 | 165 | * |
| 166 | - * @param int|float|NumberInterface $min |
|
| 166 | + * @param integer $min |
|
| 167 | 167 | * @param int|float|NumberInterface $max |
| 168 | 168 | * @param int $maxIterations |
| 169 | 169 | * |
@@ -24,6 +24,10 @@ discard block |
||
| 24 | 24 | */ |
| 25 | 25 | protected $denominator; |
| 26 | 26 | |
| 27 | + /** |
|
| 28 | + * @param ImmutableNumber $numerator |
|
| 29 | + * @param ImmutableNumber $denominator |
|
| 30 | + */ |
|
| 27 | 31 | public function __construct($numerator, $denominator, $base = 10) |
| 28 | 32 | { |
| 29 | 33 | |
@@ -325,6 +329,9 @@ discard block |
||
| 325 | 329 | return $lcm; |
| 326 | 330 | } |
| 327 | 331 | |
| 332 | + /** |
|
| 333 | + * @param integer $base |
|
| 334 | + */ |
|
| 328 | 335 | public function convertToBase($base) |
| 329 | 336 | { |
| 330 | 337 | $converter = new BaseConverter($this->getBase(), $base); |
@@ -52,6 +52,9 @@ discard block |
||
| 52 | 52 | return $this->precision; |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | + /** |
|
| 56 | + * @param NumberInterface $num |
|
| 57 | + */ |
|
| 55 | 58 | public function add($num) |
| 56 | 59 | {
|
| 57 | 60 | if (is_object($num) && method_exists($num, 'asDecimal')) {
|
@@ -113,8 +116,8 @@ discard block |
||
| 113 | 116 | * Note about precision: it uses the smaller of the two precisions (significant figures). |
| 114 | 117 | * |
| 115 | 118 | * @param $num |
| 116 | - * @param $precision |
|
| 117 | - * @return mixed |
|
| 119 | + * @param integer $precision |
|
| 120 | + * @return NumberInterface |
|
| 118 | 121 | */ |
| 119 | 122 | public function divide($num, $precision = null) |
| 120 | 123 | {
|
@@ -421,6 +424,9 @@ discard block |
||
| 421 | 424 | |
| 422 | 425 | } |
| 423 | 426 | |
| 427 | + /** |
|
| 428 | + * @param ImmutableNumber $num |
|
| 429 | + */ |
|
| 424 | 430 | public function getGreatestCommonDivisor($num) |
| 425 | 431 | {
|
| 426 | 432 | /** @var ImmutableNumber $num */ |