src/BigFloat.php
public static function isEven($value, $scale = null)
    {
        if (!static::is($value)) {
            throw new \InvalidArgumentException(
                "The \$value parameter must be of type float (or string representing a big float)."
            );
        }

        return static::equals(static::mod($value, 2.0, $scale), 0.0, $scale);
    }
public static function isEven($value, $scale = null)
    {
        if (!static::is($value)) {
            throw new \InvalidArgumentException(
                "The \$value parameter must be of type float (or string representing a big float)."
            );
        }

        return static::equals(static::mod($value, 2.0, $scale), 0.0, $scale);
    }
public static function isEven ( $ value , $ scale = null ) { if ( ! static :: is ( $ value ) ) { throw new \ InvalidArgumentException ( "The \$value parameter must be of type float (or string representing a big float)." ) ; } return static :: equals ( static :: mod ( $ value , 2.0 , $ scale ) , 0.0 , $ scale ) ; }
Tests if the given value is even.

@param float|string $value The value to test.
@param null|int     $scale  The scale to use for BCMath functions.
If null is given the value set by {@link bcscale()} is used.

@throws \InvalidArgumentException
@return bool Returns true if the given value is even, false otherwise.
Tests if the given value is even .