True if the number has a fractional part and it is not zero
@param double $number
@return bool
427680
public function getIsDecimal( $number = false )
	{
		return	strpos( $number === false ? $this->_value : $number, "." ) !== false &&
				trim( substr( $number === false ? $this->_value : $number, strpos( $number === false ? $this->_value : $number, "." ) + 1 ), "0" );
	}
214465
private function replace(array $number, $fractions = false)
    {
        return $this->zeroTrim($this->target->splitString(strtr(implode('', $this->zeroPad(
            $this->source->canonizeDigits($number),
            $fractions
        )), $this->conversionTable)), $fractions);
    }
48326
function internalNumber( $number )
    {
        if ( preg_match( '/^(['.$this->PositiveSymbol.']|['.$this->NegativeSymbol.'])?([0-9]*|[0-9]{1,3}(['.$this->ThousandsSeparator.'][0-9]{3,3})*)(['.$this->DecimalSymbol.'][0-9]+)?$/', trim( $number ) ) )
        {
            $number = str_replace( ' ', '', $number );
            if ( $this->PositiveSymbol )
                $number = str_replace( $this->PositiveSymbol, '', $number );
            $number = str_replace( $this->NegativeSymbol, '-', $number );
            $number = str_replace( $this->ThousandsSeparator, '', $number );
            $number = str_replace( $this->DecimalSymbol, '.', $number );
        }
        return $number;
    }
166011
public static function isPrime($number): bool
    {
        preg_match('/^1?$|^(11+?)\1+$/', implode(1, array_fill(0, $number, null)), $matches);

        return isset($matches[1]);
    }
117517
public function keep_decimals_new($number, $digit = 2)
    {
        //不是数字
        if (!is_numeric($number)) {
            return false;
        }
        //保留小数位数必须是数组,并且不能小于0
        if (!is_numeric($digit) || $digit < 0) {
            return false;
        }
        $str_len = strlen("{$number}");
        $pos = strrpos($number, '.');
        $pos = $pos === false ? 0 : ++$pos;
        $new_len = $pos + $digit;
        //如果$number长度>=保留小数长度
        if ($str_len >= $new_len) {
            $str = substr($number, 0, $pos + $digit);
        } else {//$number长度<保留小数长度,直接填充0
            $tmp = str_repeat('0', $new_len - $str_len);
            $str = "{$number}{$tmp}";
        }
        //删除右边的小数点"."
        $numberKeep = rtrim($str, '.');
        return $numberKeep;
    }
447439
private function round($number)
    {
        if (null !== $this->precision && null !== $this->roundingMode) {
            // shift number to maintain the correct precision during rounding
            $roundingCoef = pow(10, $this->precision);
            $number *= $roundingCoef;

            switch ($this->roundingMode) {
                case \NumberFormatter::ROUND_CEILING:
                    $number = ceil($number);
                    break;
                case \NumberFormatter::ROUND_FLOOR:
                    $number = floor($number);
                    break;
                case \NumberFormatter::ROUND_UP:
                    $number = $number > 0 ? ceil($number) : floor($number);
                    break;
                case \NumberFormatter::ROUND_DOWN:
                    $number = $number > 0 ? floor($number) : ceil($number);
                    break;
                case \NumberFormatter::ROUND_HALFEVEN:
                    $number = round($number, 0, PHP_ROUND_HALF_EVEN);
                    break;
                case \NumberFormatter::ROUND_HALFUP:
                    $number = round($number, 0, PHP_ROUND_HALF_UP);
                    break;
                case \NumberFormatter::ROUND_HALFDOWN:
                    $number = round($number, 0, PHP_ROUND_HALF_DOWN);
                    break;
            }

            $number /= $roundingCoef;
        }

        return $number;
    }
984997
protected function toWords($number)
    {
        $ret = '';

        if ($number === 0) {
            return $this->zero;
        }

        if ($number < 0) {
            $ret = $this->minus . $this->wordSeparator;
        }

        $numberGroups = $this->splitNumber(abs($number));
        $sizeOfNumberGroups = count($numberGroups);

        foreach ($numberGroups as $i => $numb) {
            $power = $sizeOfNumberGroups - $i;

            if ($numb !== 0) {
                if ($numb !== 1 || $power !== 2) {
                    $ret .= $this->showDigitsGroup(
                        $numb,
                        $i + 1 === $sizeOfNumberGroups || $power > 2
                    ) . $this->wordSeparator;
                }

                $ret .= self::$exponent[($power - 1) * 3];

                if ($power > 2 && $numb > 1) {
                    $ret .= $this->pluralSuffix;
                }

                $ret .= $this->wordSeparator;
            }
        }

        return rtrim($ret, $this->wordSeparator);
    }
1302772
function fractionDigits(number) {
  var splitArr = number.toString().split('.');
  return (splitArr.length > 1) ?
    splitArr[1].length :
    0;
}
856499
private static function parseIntegerPart($number)
    {
        if ('' === $number || '0' === $number) {
            return '0';
        }

        if ('-' === $number) {
            return '-0';
        }

        $nonZero = false;

        for ($position = 0, $characters = strlen($number); $position < $characters; ++$position) {
            $digit = $number[$position];

            if (!isset(static::$numbers[$digit]) && !(0 === $position && '-' === $digit)) {
                throw new \InvalidArgumentException(
                    sprintf('Invalid integer part %1$s. Invalid digit %2$s found', $number, $digit)
                );
            }

            if (false === $nonZero && '0' === $digit) {
                throw new \InvalidArgumentException(
                    'Leading zeros are not allowed'
                );
            }

            $nonZero = true;
        }

        return $number;
    }
100545
public static function floor($number, $precision = 0)
    {
        $decimals = pow(10, $precision);

        return floor($number * $decimals) / $decimals;
    }
875916
public static boolean isDouble(String number) {
        boolean result = false;
        if (number != null) {
            try {
                Double.parseDouble(number);
                result = true;
            } catch (NumberFormatException e) {
            }
        }
        return result;
    }
938534
public static function assertNumberFormat($number)
    {
        if (is_float($number)) {
            throw new \InvalidArgumentException(sprintf('The provided value "%s" must be a string, not a float.', $number));
        }
        if (!is_numeric($number)) {
            throw new \InvalidArgumentException(sprintf('The provided value "%s" is not a numeric value.', $number));
        }
    }
1121055
public function lt($number)
    {
        return (bool) (bccomp($this->number, static::validateInputNumber($number), $this->precision) === -1);
    }
334732
public static function IS_NUMBER($value = NULL) {
		$value		= self::flattenSingleValue($value);

		if (is_string($value)) {
			return False;
		}
		return is_numeric($value);
	}
833855
public function number($number, $decimals = 0)
    {
        if (!$this->localizer) {
            return number_format($number, $decimals);
        }

        return $this->localizer->number($number, $decimals);
    }
852551
private static function parseFractionalPart($number)
    {
        if ('' === $number) {
            return $number;
        }

        for ($position = 0, $characters = strlen($number); $position < $characters; ++$position) {
            $digit = $number[$position];
            if (!isset(static::$numbers[$digit])) {
                throw new \InvalidArgumentException(
                    sprintf('Invalid fractional part %1$s. Invalid digit %2$s found', $number, $digit)
                );
            }
        }

        return $number;
    }
666451
public function equals($number): bool
    {
        if (!($number instanceof Number)) {
            return false;
        }
        
        return $this->number === $number->number;
    }