|
-
Mar 23rd, 2004, 03:00 PM
#1
Thread Starter
PowerPoster
Arcsin in VB6 [Resolved]
Hi,
There is no built-in function for Arcsin in VB6.
However, the MSDN Help files state that the following will produce the arcsin
Arcsin(X) = Atn(X / Sqr(-X * X + 1))
I cannot believe this formula is correct (probably my misunderstanding of something) as when x = 1 there is a division by zero error.
Can anyone help please.
Last edited by taxes; Mar 24th, 2004 at 07:00 PM.
Taxes
The more I learn about VB.NET the more I like dBaseIII Plus
The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.
-
Mar 24th, 2004, 01:26 AM
#2
When they made VB, they probably just skipped right over those. The Derived Math Functions seem to be an afterthought, and, as such, they don't really work perfectly. As in the other thread, you should probably just use If to make it work properly. If you really felt ambitious, you could look up the actual series and implement that .
The time you enjoy wasting is not wasted time.
Bertrand Russell
<- Remember to rate posts you find helpful.
-
Mar 24th, 2004, 07:00 PM
#3
Thread Starter
PowerPoster
Hi,
If anyone is interested the following is the answer
VB Code:
Z = Sqr(-X * X + 1)
If Abs(Z) <> 0 Then
Tot1 = Atn(X / Z)
Else
Tot1 = pi/ 2
End If
Taxes
The more I learn about VB.NET the more I like dBaseIII Plus
The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|