Informática Asociada ia doc & examples Index Examples List

Documentation jit ia\Math\BcMath Documentation Usage sample Function examples Index Examples List

class ia\Math\BcMath


Index Documentation Usage sample Function examples Index Examples List

ia\Math\BcMath


Usage sample ia\Math\BcMath Documentation Usage sample Function examples Index Examples List

ia\Math\BcMathBcMath
Helper functions for bcMath
On arrays
  • BcMath::bcmulArray(["3.141592","2.7172","18"],2); // pi*e*18
  • BcMath::bcdivArray(["3.141592","2.7172","18"],6); // pi/e/18
  • BcMath::bcaddArray(["3.141592","2.7172","18"],2); // pi+e+18
  • BcMath::bcsubArray(["3.141592","2.7172","18"],2); // pi-e-18
  • BcMath::bcmaxArray(["3.141592","2.7172","18"],2);
  • BcMath::bcminArray(["3.141592","2.7172","18"],2);
  • 153.54
  • 0.064232
  • 23.85
  • -17.58
  • 18.00
  • 2.71

Examples by function ia\Math\BcMath Documentation Usage sample Function examples Index Examples List

ia\Math\BcMath

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

  • BcMath::bcscale( $scale) :
    
                    
    1. BcMath::bcscale(null /* == */); -> 
  • BcMath::bcmulArray(array $arr, int $scale = null) : string
    /**
         * Multiply all elements from the array
         *
         * @param array $arr numbers to multiply
         * @param int $scale number of decimals to use
         * @return string result of multiplying all elements of $arr
         */
    
    1. BcMath::bcmulArray(['a' => '1', 'b' => '2', 'c' => 3]); -> 6.00
  • BcMath::bcdivArray(array $arr, int $scale = null) : string
    /**
         * Divide all elements from the array
         *
         * @param array $arr numbers to divide
         * @param int $scale number of decimals to use
         * @return string result of dividing all elements of $arr ($arr[0]/$arr[1]/...)
         */
    
    1. BcMath::bcdivArray(['a' => '1', 'b' => '2', 'c' => 3]); -> 0.16
  • BcMath::bcaddArray(array $arr, int $scale = null) : string
    /**
         * Add all elements from the array
         *
         * @param array $arr numbers to  add
         * @param int $scale number of decimals to use
         * @return string result of adding all elements of $arr
         */
    
    1. BcMath::bcaddArray(['a' => '1', 'b' => '2', 'c' => 3]); -> 6.00
  • BcMath::bcsubArray(array $arr, int $scale = null) : string
    /**
         * Substract all elements from the array
         *
         * @param array $arr numbers to substract
         * @param int $scale number of decimals to use
         * @return string result of substracting all elements of $arr
         */
    
    1. BcMath::bcsubArray(['a' => '1', 'b' => '2', 'c' => 3]); -> -4.00
  • BcMath::bcmaxArray(array $arr, int $scale = null) : string
    /**
         * Get maximum value  from array
         *
         * @param array $arr numbers to obtain maximum from
         * @param int $scale number of decimals to use
         * @return string maximum value of $arr
         */
    
    1. BcMath::bcmaxArray(['a' => '1', 'b' => '2', 'c' => 3]); -> 3.00
  • BcMath::bcminArray(array $arr, int $scale = null) : string
    /**
         * Get minimum value from array
         *
         * @param array $arr numbers to obtain minimum from
         * @param int $scale number of decimals to use
         * @return string minimum value of $arr
         */
    
    1. BcMath::bcminArray(['a' => '1', 'b' => '2', 'c' => 3]); -> 1.00
  • BcMath::bcformat( $number, $decimals = 2, $dec_point = '.', $thousandsSep = ',') :
    
                    
    1. BcMath::bcformat(null /* == */); -> 
  • BcMath::bcround( $number, $precision = null) :
    
                    
    1. BcMath::bcround(null /* == */); -> 

End: ia\Math\BcMath Documentation Usage sample Function examples Index Examples List