public function sec(int $scale = null): Decimal
    {
        $cos = $this->cos($scale + 2);
        if ($cos->isZero()) {
            throw new \DomainException(
                "The secant of this 'angle' is undefined."
            );
        }

        return DecimalConstants::one()->div($cos)->round($scale);
    }
public function sec(int $scale = null): Decimal
    {
        $cos = $this->cos($scale + 2);
        if ($cos->isZero()) {
            throw new \DomainException(
                "The secant of this 'angle' is undefined."
            );
        }

        return DecimalConstants::one()->div($cos)->round($scale);
    }
public function sec ( int $ scale = null ) : Decimal { $ cos = $ this -> cos ( $ scale + 2 ) ; if ( $ cos -> isZero ( ) ) { throw new \ DomainException ( "The secant of this 'angle' is undefined." ) ; } return DecimalConstants :: one ( ) -> div ( $ cos ) -> round ( $ scale ) ; }
Calculates the secant of this with the highest possible accuracy
Note that accuracy is limited by the accuracy of predefined PI;

@param integer $scale
@return Decimal
Calculates the secant of this with the highest possible accuracy Note that accuracy is limited by the accuracy of predefined PI ;