Test if float or string float

@param *scalar $number Value to test

@return bool
760878
protected function isSoftFloat($number)
    {
        if (!is_scalar($number) || $number === null) {
            return false;
        }
        
        $number = (string) $number;
        
        return preg_match('/^[-+]?(\d*)?\.\d+$/', $number);
    }
256473
private function isNotNumber($value)
    {
        return is_array($value)
        || (is_object($value) && !method_exists($value, '__toString'))
        || (!is_object($value) && !is_scalar($value) && $value !== null);
    }
1260697
public static function isValid(string $number) : bool
    {
        if (ctype_digit($number)) {
            return self::checksum($number) === 0;
        }

        return false;
    }
1353878
@ArgumentsChecked
	@Throws(IllegalNullArgumentException.class)
	public static float checkFloat(@Nonnull final Number number) {
		Check.notNull(number, "number");
		if (!isInFloatRange(number)) {
			throw new IllegalNumberRangeException(number.toString(), FLOAT_MIN, FLOAT_MAX);
		}

		return number.floatValue();
	}
1257033
private function initFromString($number)
    {
        if (!preg_match("/^(?<sign>[-+])?(?<integerPart>\d+)(?:\.(?<fractionalPart>\d+))?$/", $number, $parts)) {
            throw new \InvalidArgumentException(
                sprintf('"%s" cannot be interpreted as a number', print_r($number, true))
            );
        }

        $this->isNegative = ('-' === $parts['sign']);

        // extract the integer part and remove leading zeroes and plus sign
        $integerPart = ltrim($parts['integerPart'], '0');

        $fractionalPart = '';
        if (array_key_exists('fractionalPart', $parts)) {
            // extract the fractional part and remove trailing zeroes
            $fractionalPart = rtrim($parts['fractionalPart'], '0');
        }

        $this->exponent = strlen($fractionalPart);
        $this->coefficient = $integerPart . $fractionalPart;

        // when coefficient is '0' or a sequence of '0'
        if ('' === $this->coefficient) {
            $this->coefficient = '0';
        }
    }
920072
public static function round($number = false, $decimals = false) {

        if($number) {

            return number_format((float)$number, $decimals);
        }

        return false;
    }
1121020
public function Equals( $number, $scale = false )
	{
		$result = $this->Compare( $number, $scale );
		if ( $result === false ) return false;
		return $result == 0;
	}
48932
protected function renderFloat($number, $decimals = 2, $decPoint = ".", $thousandsSep = ",") {
        if (null === $number) {
            return "";
        }
        return number_format($number, $decimals, $decPoint, $thousandsSep);
    }
1359718
public function convert($value)
    {
        if (!is_scalar($value)) {
            return false;
        }

        if (is_string($value)) {
            return $value;
        }

        if (is_float($value)) {
            return sprintf('float_%.4f', $value);
        }

        $prefix = '';

        if (!is_bool($value)) {
            $prefix = gettype($value) . '_';
        }

        
        return $prefix . var_export($value, true);
    }
556642
public static function isFloat($value)
    {
        if (is_float($value)) {
            return true;
        } elseif (!is_string($value)) {
            return false;
        }

        return preg_match('/^[0-9]+\.[0-9]+$/', $value) > 0;
    }
1110104
private function normalizeNumber($number)
    {
        if (!is_numeric($number)) {
            throw new InvalidArgumentException('Number expected');
        }

        $number = floatval($number);

        if ($number < 0) {
            throw new InvalidArgumentException('The number expected was >= 0');
        }

        return max($number, 1);
    }
117282
public function number($number, $decimals = null)
    {
        return number_format(
            (float) $number,
            $decimals,
            $this->getSymbol(self::DECIMAL_MARK),
            $this->getSymbol(self::THOUSANDS_SEPARATOR)
        );
    }
1121055
public function lt($number)
    {
        return (bool) (bccomp($this->number, static::validateInputNumber($number), $this->precision) === -1);
    }
749675
public static function isFloat($float): bool
    {
        if (!\is_scalar($float)) {
            return false;
        }

        return (string)((float)$float) === (string)$float;
    }
1228280
protected function isValid($value)
    {
        if (is_float($value)) {
            return;
        }
        if (!is_string($value) || strpos($value, '.') === false || preg_match('/^[0-9.e+-]+$/', $value) !== 1) {
            $this->addError('A valid float number is expected.', 1221560288);
        }
    }
348777
public static function parse(string $number) : Decimal
    {
        if (preg_match('/^(\-?)([0-9]+)(?:\.([0-9]+))?$/', $number, $matches) !== 1) {
            throw new \InvalidArgumentException('Invalid number: ' . $number);
        }

        $sign = $matches[1];
        $integral = $matches[2];

        if (isset($matches[3])) {
            $fractional = rtrim($matches[3], '0');
        } else {
            $fractional = '';
        }

        $scale = strlen($fractional);

        $value = $integral . $fractional;
        $value = ltrim($value, '0');

        if ($value === '') {
            $value = '0';
        }

        $value = $sign . $value;

        $intValue = (int) $value;

        if ($value !== (string) $intValue) {
            throw new \InvalidArgumentException('Decimal number out of range for this platform: ' . $value);
        }

        return new Decimal($intValue, $scale);
    }
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;
    }