Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use of Trig functions in VB 2010 1

Status
Not open for further replies.

Ken01

Programmer
Aug 8, 2014
62
GB
I have a program which uses the Arcsin and Arccos features of the language.

I have found that if the value to be converted into an angle is 1 or greater then the calculated value
returns as "Nan".
If the value is less than 1 then the angle calculates correctly.

Is this a known problem and are there any solutions.
 
Hi,

The domain of y = arcsin(x) is
LTEgXGxlIHggXGxlIDE=_100.svg
and its range is
LVxmcmFje1xwaX17Mn0gXGxlIHkgXGxlIFxmcmFje1xwaX17Mn0=_100.svg


I had to look this up since it's been a mighty long time since I used these trig functions in my slipstick.

So naturally, values of x greater than 1 or less than -1 will return an error.
 
Hi,

The domain of y = arcsin(x) is
LTEgXGxlIHggXGxlIDE=_100.svg
and its range is
LVxmcmFje1xwaX17Mn0gXGxlIHkgXGxlIFxmcmFje1xwaX17Mn0=_100.svg


I had to look this up since it's been a mighty long time since I used these trig functions in my slipstick.

So naturally, values of x greater than 1 or less than -1 will return an error.
Thank-you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top