Sine Rule calculation.

This is a discussion on Sine Rule calculation. within the C++ Programming forums, part of the General Programming Boards category; Hmm, bit stuck on the Sine rule in C. This is my statement to work out Sin A of the ...

  1. #1
    Registered User
    Join Date
    Aug 2009
    Posts
    31

    Sine Rule calculation.

    Hmm, bit stuck on the Sine rule in C.

    This is my statement to work out Sin A of the sine rule ;

    Code:
    SinA1 = ((Sina * sin(SinB * PI /180)) / Sinb) ;
    Now I need to inverse sine that statement, but I can't work out how to do it.

    I tried ;
    Code:
    SinA1 = asin(((Sina * sin(SinB * PI /180)) / Sinb)) * PI / 180) ;
    But it miserably failed.

    Any help?

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    And by miserably failed you mean what, exactly? (Notice that having variables called SinB and Sinb is just a bad idea, not to mention the fact that one of them appears to not be a sin at all, but an angle, while the other one appears to not be a sin at all, but a side.)

  3. #3
    Registered User
    Join Date
    Aug 2009
    Posts
    31
    As in it gave me a wrong answer, variables are named like that as they refer to the part of the program it is used in. Ie I know that A is an angle, and a is a side.

  4. #4
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    So you should probably do your * PI / 180 in an appropriate place, then. (As in after you have an angle, not before.)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Sine approximation Help
    By What111 in forum C Programming
    Replies: 8
    Last Post: 11-04-2007, 05:22 PM
  2. Help with calculation and loop
    By Betty in forum C Programming
    Replies: 7
    Last Post: 04-10-2006, 05:37 AM
  3. Trigonometry Sin rule calculation problem
    By Harry in forum C++ Programming
    Replies: 3
    Last Post: 02-06-2006, 11:14 AM
  4. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 03:00 PM
  5. Need help with an Algebra calculation
    By Unregistered in forum C Programming
    Replies: 2
    Last Post: 02-08-2002, 09:18 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21