Informática Asociada ia doc & examples Index Examples List

Documentation jit ia\Math\Math Documentation Function examples Index Examples List

class ia\Math\Math


Index Documentation Function examples Index Examples List

ia\Math\Math


Examples by function ia\Math\Math Documentation Function examples Index Examples List

ia\Math\Math

Disclaimer: Auto generated file. Please help us setting parameters to useful values and extending the examples.

  • Math::factorial(int $number) : int
    /**
         * Math::factorial()
         *
         * @param int \$number
         * @return int
         */
    1. Math::factorial(3); -> 6
  • Math::getPercentageChange(float $oldNumber, float $newNumber) : float
    /**
         * Percengage Increase, where 1.0 = 100%
         *
         * @param float \$oldNumber
         * @param float \$newNumber
         * @return float Percentaje it changes 100, 110 = 0.1
         */
    1. Math::getPercentageChange(100.00, 116.00); -> 0.16
  • Math::Quartile(array $array, float $Quartile) :
    /**
         * Math::Quartile()
         *
         * @param array \$array
         * @param float \$Quartile
         * @return
         */
    1. Math::Quartile(['a' => '1', 'b' => '2', 'c' => 3], 2.7172); -> 

      Warning: Undefined array key 5 in /lamp/www/iaLib/inc_ia/Math/src/Math.php on line 80
  • Math::median(array $array) : mixed
    /**
         * Math::median()
         *
         * @param array \$array
         * @return mixed
         */
    1. Math::median(['a' => '1', 'b' => '2', 'c' => 3]); -> 
      2
  • Math::average(array $array) : float
    /**
         * Math::average()
         *
         * @param array \$array
         * @return float
         */
    1. Math::average(['a' => '1', 'b' => '2', 'c' => 3]); -> 2
  • Math::gcd(int $a, int $b) : int
    /**
         * Gratest common divisor
         *
         * @param int \$a
         * @param int \$b
         * @return int
         */
    1. Math::gcd(3, 3); -> 3
  • Math::lcm(int $a, int $b) : int
    /**
         * least common multiplier
         *
         * @param int \$a
         * @param int \$b
         * @return int
         */
    1. Math::lcm(3, 3); -> 3
  • Math::primeFactors(int $n) : array
    /**
         * Prime factors
         *
         * @param int \$n
         * @return array of primes
         */
    1. Math::primeFactors(3); -> 
      Array
      (
          [0] => 3
      )
      
  • Math::primesFirst() : array
    /**
         * An array with prime number from 2 to 229
         *
         * @return array
         */
    1. Math::primesFirst(); -> 
      Array
      (
          [0] => 2
          [1] => 3
          [2] => 5
          [3] => 7
          [4] => 11
          [5] => 13
          [6] => 17
          [7] => 19
          [8] => 23
          [9] => 29
          [10] => 31
          [11] => 37
          [12] => 41
          [13] => 43
          [14] => 47
          [15] => 53
          [16] => 59
          [17] => 61
          [18] => 67
          [19] => 71
          [20] => 73
          [21] => 79
          [22] => 83
          [23] => 89
          [24] => 97
          [25] => 101
          [26] => 103
          [27] => 107
          [28] => 109
          [29] => 113
          [30] => 127
          [31] => 131
          [32] => 137
          [33] => 139
          [34] => 149
          [35] => 151
          [36] => 157
          [37] => 163
          [38] => 167
          [39] => 173
          [40] => 179
          [41] => 181
          [42] => 191
          [43] => 193
          [44] => 197
          [45] => 199
          [46] => 211
          [47] => 223
          [48] => 227
          [49] => 229
      )
      

End: ia\Math\Math Documentation Function examples Index Examples List