Lines Matching refs:base

699 	double num, base = 0;  in PHP_FUNCTION()  local
704 Z_PARAM_DOUBLE(base) in PHP_FUNCTION()
712 if (base == 2.0) { in PHP_FUNCTION()
717 if (base == 10.0) { in PHP_FUNCTION()
721 if (base == 1.0) { in PHP_FUNCTION()
725 if (base <= 0.0) { in PHP_FUNCTION()
730 RETURN_DOUBLE(log(num) / log(base)); in PHP_FUNCTION()
814 PHPAPI zend_long _php_math_basetolong(zval *arg, int base) in _php_math_basetolong() argument
820 if (Z_TYPE_P(arg) != IS_STRING || base < 2 || base > 36) { in _php_math_basetolong()
832 : base; in _php_math_basetolong()
834 if (digit >= base) { in _php_math_basetolong()
839 num = num * base + digit; in _php_math_basetolong()
858 PHPAPI int _php_math_basetozval(zval *arg, int base, zval *ret) in _php_math_basetozval() argument
868 if (Z_TYPE_P(arg) != IS_STRING || base < 2 || base > 36) { in _php_math_basetozval()
874 cutoff = ZEND_LONG_MAX / base; in _php_math_basetozval()
875 cutlim = ZEND_LONG_MAX % base; in _php_math_basetozval()
890 if (c >= base) in _php_math_basetozval()
896 num = num * base + c; in _php_math_basetozval()
904 fnum = fnum * base + c; in _php_math_basetozval()
922 PHPAPI zend_string * _php_math_longtobase(zval *arg, int base) in _php_math_longtobase() argument
929 if (Z_TYPE_P(arg) != IS_LONG || base < 2 || base > 36) { in _php_math_longtobase()
939 *--ptr = digits[value % base]; in _php_math_longtobase()
940 value /= base; in _php_math_longtobase()
952 PHPAPI zend_string * _php_math_zvaltobase(zval *arg, int base) in _php_math_zvaltobase() argument
956 if ((Z_TYPE_P(arg) != IS_LONG && Z_TYPE_P(arg) != IS_DOUBLE) || base < 2 || base > 36) { in _php_math_zvaltobase()
975 *--ptr = digits[(int) fmod(fvalue, base)]; in _php_math_zvaltobase()
976 fvalue /= base; in _php_math_zvaltobase()
982 return _php_math_longtobase(arg, base); in _php_math_zvaltobase()