|
| |||||||||
| Tags: c language, function, library, pow, sin, sqrt |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| 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
| ||||
| ||||
| 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.
__________________ Grand Theft Auto 4 PC Video Game |
|
#3
| |||
| |||
| 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
| ||||
| ||||
| 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
| ||||
| ||||
| 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; } |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "C : Implementation of sin(),pow(),sqrt()" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| network implementation | jonnitwo | Networking & Security | 1 | 17-03-2011 12:37 AM |
| What is the sqrt() : C++ | Garrick | Software Development | 4 | 09-03-2010 05:06 PM |
| C : Implementation of ctime() | Gavyn | Software Development | 4 | 01-02-2010 04:21 PM |
| Implementation of vsprintf() : C | Gaelic | Software Development | 4 | 28-01-2010 11:28 AM |
| Implementation of mysql | Aloke | Software Development | 5 | 23-01-2010 01:26 AM |