Results 1 to 6 of 6

Thread: trigonometric calculations

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2001
    Posts
    3

    Unhappy trigonometric calculations

    how to use vb to calculate sine, cosine and tangent?

  2. #2
    PowerPoster beachbum's Avatar
    Join Date
    Jul 2001
    Location
    Wollongong, NSW, Australia
    Posts
    2,274
    You wont believe how hard it is!!

    Sin() Cos() and Tan() functions.

    regards
    Stuart
    Stuart Laidlaw
    Brightspark Financial Software
    http://www.gstsmartbook.com

  3. #3

    Thread Starter
    New Member
    Join Date
    Nov 2001
    Posts
    3
    How do you use the Sin() Cos() and Tan() functions?

  4. #4
    Fanatic Member
    Join Date
    Sep 2000
    Location
    UK.
    Posts
    728

    Smile Info.

    All from MSDN:

    Sin
    Returns a Double specifying the sine of an angle.

    Syntax

    Sin(number)

    The required numberargument is aDouble or any validnumeric expression that expresses an angle in radians.

    Remarks

    The Sin function takes an angle and returns the ratio of two sides of a right triangle. The ratio is the length of the side opposite the angle divided by the length of the hypotenuse.

    The result lies in the range -1 to 1.

    To convert degrees to radians, multiply degrees bypi/180. To convert radians to degrees, multiply radians by 180/pi.
    Cos
    Returns a Double specifying the cosine of an angle.

    Syntax

    Cos(number)

    The required numberargument is aDouble or any validnumeric expression that expresses an angle in radians.

    Remarks

    The Cos function takes an angle and returns the ratio of two sides of a right triangle. The ratio is the length of the side adjacent to the angle divided by the length of the hypotenuse.

    The result lies in the range -1 to 1.

    To convert degrees to radians, multiply degrees bypi/180. To convert radians to degrees, multiply radians by 180/pi.
    Tan
    Returns a Double specifying the tangent of an angle.

    Syntax

    Tan(number)

    The required numberargument is aDouble or any validnumeric expression that expresses an angle in radians.

    Remarks

    Tan takes an angle and returns the ratio of two sides of a right triangle. The ratio is the length of the side opposite the angle divided by the length of the side adjacent to the angle.

    To convert degrees to radians, multiply degrees bypi/180. To convert radians to degrees, multiply radians by 180/pi.
    Digital-X-Treme
    Contact me on MSN Messenger: [email protected]

    [VBCODE]Debug.Print Round(((1097) - ((55 ^ 5 + 311 ^ 3 - 11 ^ 3) _
    / (68 ^ 5))) ^ (1 / 7), 13)[/VBCODE]

  5. #5

    Thread Starter
    New Member
    Join Date
    Nov 2001
    Posts
    3
    What about inverse tan, sine and cosine functions?

  6. #6
    PowerPoster beachbum's Avatar
    Join Date
    Jul 2001
    Location
    Wollongong, NSW, Australia
    Posts
    2,274
    well here goes MSDN again.. maybe look at the help files on ur CD
    regards
    Stuart

    Atn Function
    Returns aDouble specifying the arctangent of a number.

    Syntax
    Atn(number)

    The required numberargument is a Double or any validnumeric expression.

    Remarks
    The Atn function takes the ratio of two sides of a right triangle (number) and returns the corresponding angle in radians. The ratio is the length of the side opposite the angle divided by the length of the side adjacent to the angle.

    The range of the result is -pi/2 to pi/2 radians.

    To convert degrees to radians, multiply degrees by pi/180. To convert radians to degrees, multiply radians by 180/pi.

    Note Atn is the inverse trigonometric function of Tan, which takes an angle as its argument and returns the ratio of two sides of a right triangle. Do not confuse Atn with the cotangent, which is the simple inverse of a tangent (1/tangent).



    Derived Math Functions
    The following is a list of nonintrinsic math functions that can be derived from the intrinsic math functions:

    Function Derived equivalents
    Secant Sec(X) = 1 / Cos(X)
    Cosecant Cosec(X) = 1 / Sin(X)
    Cotangent Cotan(X) = 1 / Tan(X)
    Inverse Sine Arcsin(X) = Atn(X / Sqr(-X * X + 1))
    Inverse Cosine Arccos(X) = Atn(-X / Sqr(-X * X + 1)) + 2 * Atn(1)
    Inverse Secant Arcsec(X) = Atn(X / Sqr(X * X – 1)) + Sgn((X) – 1) * (2 * Atn(1))
    Inverse Cosecant Arccosec(X) = Atn(X / Sqr(X * X - 1)) + (Sgn(X) – 1) * (2 * Atn(1))
    Inverse Cotangent Arccotan(X) = Atn(X) + 2 * Atn(1)
    Hyperbolic Sine HSin(X) = (Exp(X) – Exp(-X)) / 2
    Hyperbolic Cosine HCos(X) = (Exp(X) + Exp(-X)) / 2
    Hyperbolic Tangent HTan(X) = (Exp(X) – Exp(-X)) / (Exp(X) + Exp(-X))
    Hyperbolic Secant HSec(X) = 2 / (Exp(X) + Exp(-X))
    Hyperbolic Cosecant HCosec(X) = 2 / (Exp(X) – Exp(-X))
    Hyperbolic Cotangent HCotan(X) = (Exp(X) + Exp(-X)) / (Exp(X) – Exp(-X))
    Inverse Hyperbolic Sine HArcsin(X) = Log(X + Sqr(X * X + 1))
    Inverse Hyperbolic Cosine HArccos(X) = Log(X + Sqr(X * X – 1))
    Inverse Hyperbolic Tangent HArctan(X) = Log((1 + X) / (1 – X)) / 2
    Inverse Hyperbolic Secant HArcsec(X) = Log((Sqr(-X * X + 1) + 1) / X)
    Inverse Hyperbolic Cosecant HArccosec(X) = Log((Sgn(X) * Sqr(X * X + 1) + 1) / X)
    Inverse Hyperbolic Cotangent HArccotan(X) = Log((X + 1) / (X – 1)) / 2
    Logarithm to base N LogN(X) = Log(X) / Log(N)
    Stuart Laidlaw
    Brightspark Financial Software
    http://www.gstsmartbook.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width