src/Chippyash/Math/Type/Calculator/Native.php
public function intSqrt(IntType $a)
    {
        $res = $this->rationalSqrt(new RationalType($a, new IntType(1)));
        if ($res->isInteger()) {
            return $res->numerator();
        }

        return $res;
    }
public function intSqrt(IntType $a)
    {
        $res = $this->rationalSqrt(new RationalType($a, new IntType(1)));
        if ($res->isInteger()) {
            return $res->numerator();
        }

        return $res;
    }
public function intSqrt ( IntType $ a ) { $ res = $ this -> rationalSqrt ( new RationalType ( $ a , new IntType ( 1 ) ) ) ; if ( $ res -> isInteger ( ) ) { return $ res -> numerator ( ) ; } return $ res ; }
Integer sqrt
Return IntType for perfect squares, else RationalType

@param IntType $a operand

@return IntType|RationalType result
Integer sqrt Return IntType for perfect squares else RationalType