Results 1 to 7 of 7

Thread: sin-1

  1. #1

    Thread Starter
    Member
    Join Date
    May 2002
    Location
    Merry Olde England
    Posts
    57

    sin-1

    you can easily do SIN, COS and TAN functions in vb,

    but how do you do inverse sin or sin-1 ?

    ex. sin(30) = 0.5

    and sin-1(0.5) = 30

  2. #2
    PowerPoster
    Join Date
    Nov 2002
    Location
    Manila
    Posts
    7,629
    By going through the trouble of searching for Arcsin in MSDN (I'm surprised you didn't since you'll hardly break sweat ), I found this.

    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 E1)) + Sgn((X) E1) * (2 * Atn(1))
    Inverse Cosecant Arccosec(X) = Atn(X / Sqr(X * X - 1)) + (Sgn(X) E1) * (2 * Atn(1))
    Inverse Cotangent Arccotan(X) = Atn(X) + 2 * Atn(1)
    Hyperbolic Sine HSin(X) = (Exp(X) EExp(-X)) / 2
    Hyperbolic Cosine HCos(X) = (Exp(X) + Exp(-X)) / 2
    Hyperbolic Tangent HTan(X) = (Exp(X) EExp(-X)) / (Exp(X) + Exp(-X))
    Hyperbolic Secant HSec(X) = 2 / (Exp(X) + Exp(-X))
    Hyperbolic Cosecant HCosec(X) = 2 / (Exp(X) EExp(-X))
    Hyperbolic Cotangent HCotan(X) = (Exp(X) + Exp(-X)) / (Exp(X) EExp(-X))
    Inverse Hyperbolic Sine HArcsin(X) = Log(X + Sqr(X * X + 1))
    Inverse Hyperbolic Cosine HArccos(X) = Log(X + Sqr(X * X E1))
    Inverse Hyperbolic Tangent HArctan(X) = Log((1 + X) / (1 EX)) / 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 E1)) / 2
    Logarithm to base N LogN(X) = Log(X) / Log(N)
    Last edited by leinad31; May 5th, 2003 at 03:42 PM.

  3. #3

    Thread Starter
    Member
    Join Date
    May 2002
    Location
    Merry Olde England
    Posts
    57

    ...right

    thanks, I guess that sin-1 is:

    Inverse Cosine Arccos(X) = Atn(-X / Sqr(-X * X + 1)) + 2 * Atn(1)

    wotever the hell that is.

    I would have thought that sin-1 would have been included into vb, especially as it is a function cn on most decent calculators.

  4. #4
    PowerPoster
    Join Date
    Nov 2002
    Location
    Manila
    Posts
    7,629
    Nope, i'ts this:

    Inverse Sine Arcsin(X) = Atn(X / Sqr(-X * X + 1))

    Probably because it can be derived from the other functions and because it is hardly used. If VB was a program geared for mathematical calculations then we can expect functions for sumations, derivatives, probabilities, combinations, infix/postfix, etc.

  5. #5
    Fanatic Member sql_lall's Avatar
    Join Date
    Jul 2002
    Location
    Up Above (i.e. AUS)
    Posts
    571
    If this thread is still used, i was just wondering, what is "E1" supposed to be??

    As in: Sqr(X * X E1))

    thanks for the list anyway.
    sql_lall

  6. #6
    Frenzied Member KayJay's Avatar
    Join Date
    Jul 2001
    Location
    Chennai
    Posts
    1,849
    Must be a copy paste error
    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)

  7. #7
    PowerPoster
    Join Date
    Nov 2002
    Location
    Manila
    Posts
    7,629
    Its a copy paste error. Look up "derived math functions" in MSDN.

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