Vendor/phpspreadsheet/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering.php
public static function IMSQRT($complexNumber)
    {
        $complexNumber = Functions::flattenSingleValue($complexNumber);

        $parsedComplex = self::parseComplex($complexNumber);

        $theta = self::IMARGUMENT($complexNumber);
        if ($theta === Functions::DIV0()) {
            return '0';
        }

        $d1 = cos($theta / 2);
        $d2 = sin($theta / 2);
        $r = sqrt(sqrt(($parsedComplex['real'] * $parsedComplex['real']) + ($parsedComplex['imaginary'] * $parsedComplex['imaginary'])));

        if ($parsedComplex['suffix'] == '') {
            return self::COMPLEX($d1 * $r, $d2 * $r);
        }

        return self::COMPLEX($d1 * $r, $d2 * $r, $parsedComplex['suffix']);
    }
public static function IMSQRT($complexNumber)
    {
        $complexNumber = Functions::flattenSingleValue($complexNumber);

        $parsedComplex = self::parseComplex($complexNumber);

        $theta = self::IMARGUMENT($complexNumber);
        if ($theta === Functions::DIV0()) {
            return '0';
        }

        $d1 = cos($theta / 2);
        $d2 = sin($theta / 2);
        $r = sqrt(sqrt(($parsedComplex['real'] * $parsedComplex['real']) + ($parsedComplex['imaginary'] * $parsedComplex['imaginary'])));

        if ($parsedComplex['suffix'] == '') {
            return self::COMPLEX($d1 * $r, $d2 * $r);
        }

        return self::COMPLEX($d1 * $r, $d2 * $r, $parsedComplex['suffix']);
    }
public static function IMSQRT ( $ complexNumber ) { $ complexNumber = Functions :: flattenSingleValue ( $ complexNumber ) ; $ parsedComplex = self :: parseComplex ( $ complexNumber ) ; $ theta = self :: IMARGUMENT ( $ complexNumber ) ; if ( $ theta === Functions :: DIV0 ( ) ) { return '0' ; } $ d1 = cos ( $ theta / 2 ) ; $ d2 = sin ( $ theta / 2 ) ; $ r = sqrt ( sqrt ( ( $ parsedComplex [ 'real' ] * $ parsedComplex [ 'real' ] ) + ( $ parsedComplex [ 'imaginary' ] * $ parsedComplex [ 'imaginary' ] ) ) ) ; if ( $ parsedComplex [ 'suffix' ] == '' ) { return self :: COMPLEX ( $ d1 * $ r , $ d2 * $ r ) ; } return self :: COMPLEX ( $ d1 * $ r , $ d2 * $ r , $ parsedComplex [ 'suffix' ] ) ; }
IMSQRT.

Returns the square root of a complex number in x + yi or x + yj text format.

Excel Function:
IMSQRT(complexNumber)

@param string $complexNumber the complex number for which you want the square root

@return string
IMSQRT .