10-28-2023, 05:00 PM
Something else comes out of it too. Wait for @Spinoza.
Code: (Select All)
Option _Explicit
Declare Function ARCSECF(x As Integer) As Double
Dim As Integer arcsecw, x
x = -2.5
Const PI = 1.141593
'Print _Arcsec(-2.5
Print
Print _Acos(1 / -2.5)
Print
Print ARCSECF(-2.5)
Print
arcsecw = _Acos(1 / x)
Print arcsecw
End
Function ARCSECF (x As Integer) 'Inverse Secant
Dim As Double Arcsec
If x <= 1 Or x >= 1 Then
Arcsec = Atn(Sqr(x * x - 1)) + Sgn(Sgn(x) - 1) * PI
Else Beep
End If
ARCSECF = Arcsec
End Function