|
-
Jan 23rd, 2002, 01:55 PM
#1
Thread Starter
New Member
Trig Question -> acos in C++ = what in VB
What does the acos function in C++ become when using VB? Thanks 
Willy
-
Jan 23rd, 2002, 02:10 PM
#2
Hyperactive Member
There is no built in acos function (only atn)
see this for acos function
http://www.vbforums.com/showthread.p...ht=arcCosine+a
-
Jan 23rd, 2002, 02:13 PM
#3
Hyperactive Member
Basically ...
Arccos(X) = Atn(-X / Sqr(-X * X + 1)) + 2 * Atn(1)
-
Jan 23rd, 2002, 06:57 PM
#4
Frenzied Member
Unless inverse cosine is explicitly requested by some text book problem, it is almost always possible to determine an angle via direct use of the VB Atn function, without the messy formula recommended by the VB documention for inverse cosine.
Live long & prosper.
The Dinosaur from prehistoric era prior to computers.
Eschew obfuscation!
If a billion people believe a foolish idea, it is still a foolish idea!
VB.net 2010 Express
64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.
-
Jan 23rd, 2002, 07:43 PM
#5
transcendental analytic
They would result in those provided in the VB documentation anyway But I see the point, somtimes you could simplify the expression
never put these static expressions in vb code, evaluate them since the compiler wont
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Jan 23rd, 2002, 08:28 PM
#6
Frenzied Member
I was referring to direct use of the inverse tangent rather than using a formula for inverse sine or cosine.
In real world engineering and scientific problems, you are almost always working with triangles or Cartesian coordinates.- When working with triangles, the sine of an angle is the ratio of the opposite side and the hypotenuse, while cosine sine is the ratio of the adjacent side and the hypotenuse. The tangent is the ratio of the opposite and adjacent sides. If you know the sides of the triangle, you can always use inverse tangent to determine angles, making it unnecessary to use inverse sine or cosine.
- When working with Cartesian coordinates and a point (X, Y), the tangent is Y/X. Inverse tangent of (Y/X) can be used instead of inverse cosine [ X / Sqr(X^2 + Y^2) ].
I have dealt with a lot of real world problems and have always been able to use inverse tangent directly, except for some problems assigned by a professor.
Live long & prosper.
The Dinosaur from prehistoric era prior to computers.
Eschew obfuscation!
If a billion people believe a foolish idea, it is still a foolish idea!
VB.net 2010 Express
64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.
-
Jan 23rd, 2002, 09:29 PM
#7
transcendental analytic
I haven't found myself using other than arcus tangent either, especially for euler tranformation. However there's are real world problems like in electronics where you'd use arccos to convert between efficciency factor and phase (which are essentially representing the same thing, but so does polar and cartesian coodinates) I guess there's more than plenty of practical uses, otherways why would there exist such a function on my calculator
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
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
|