Results 1 to 5 of 5

Thread: C : Implementation of sin(),pow(),sqrt()

  1. #1
    Join Date
    Dec 2009
    Posts
    27

    C : Implementation of sin(),pow(),sqrt()

    I am the student of the Bachelor of science in Information Technology. I have know about the C language. I find the problem while coding to find the sin, power and square root of the given number in the C program. I want to know how can I find sin, square root and power of the using the standard library functions. I also want know how can I implement these functions in my C program. Thus, Anyone knows about the these functions ? Please, Help me!!

  2. #2
    Join Date
    Oct 2005
    Posts
    2,393

    C : Implementation of sin(),pow(),sqrt()

    I think the sin() function, pow() function and sqrt() function are the functions of the header files that are contained in in the library files. To use sin() function, pow() function and sqrt() function in the program you need to import the math.h files from the library. This could be possible by defining the # include<math.h> at the start of the C program. After defining, you could be able to use these functions from library. I hope it will help's you.

  3. #3
    Join Date
    May 2008
    Posts
    2,012

    Re: C : Implementation of sin(),pow(),sqrt()

    Yes, I know about sin() function, pow()function and sqrt() functions. The math.h file is a header file basically designed for most of the mathematical operations, in the C programming language. The sin() function, pow()function and sqrt() functions are contained in the math.h header file. Most of the functions involve the use of floating point numbers. These sin() function, pow()function and sqrt() functions can be used to return the angle, float or long doubles, etc.

  4. #4
    Join Date
    Apr 2008
    Posts
    2,005

    Implementation of sin(),pow(),sqrt()

    According to my knowledge, The sin() function can be used to return the sin angle of the given arc, for e.g. sin(e) can returns the sine of e.
    The pow() function can be used to return the power of the given number, for e.g. pow(3,2) can returns 8.
    The sqrt() function can be used to return the square root of the given number, for e.g. sqrt(4) can returns 2.

  5. #5
    Join Date
    May 2008
    Posts
    2,297

    Program

    #include <stdio.h>
    #include <math.h>
    int main(void)
    {
    double y = 0.31415926;
    double rs = sin(y);
    printf(" The sine of %f is %f \n", y, rs);
    printf(" pow(3, 2) = %f \n ", pow(3, 2));
    printf(" The square root of %f is %lf\n", y, rs);
    return 0;
    }

Similar Threads

  1. What is the sqrt() : C++
    By Garrick in forum Software Development
    Replies: 4
    Last Post: 09-03-2010, 05:06 PM
  2. Implementation of mkfifo() : C
    By Garett in forum Software Development
    Replies: 4
    Last Post: 02-02-2010, 07:27 PM
  3. C : Implementation of ctime()
    By Gavyn in forum Software Development
    Replies: 4
    Last Post: 01-02-2010, 04:21 PM
  4. Implementation of vsprintf() : C
    By Gaelic in forum Software Development
    Replies: 4
    Last Post: 28-01-2010, 11:28 AM
  5. Implementation of mysql
    By Aloke in forum Software Development
    Replies: 5
    Last Post: 23-01-2010, 01:26 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,548,248.40945 seconds with 17 queries