Arithnmatic operation in Hitech C

Status
Not open for further replies.

prasad70

Member level 3
Joined
Mar 24, 2011
Messages
67
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,288
Visit site
Activity points
1,690
Can some one please explain how below expression can be written in C (Prefer Hitech c) ?

Y = 250000/(X^2.93)

regards
 

You can write that in Standard C using any compiler that supports floating point numbers.
Code:
#include <math.h>
.
.
.
double X, Y;

X = 10;
Y = 250000 / pow(X, 2.93);
 
can I get the links/sites where i can learn how mathmatical expression can be used in C.

thks
 

It's got nothing to do with C. The math library is a library supplied with your compiler. Therefore, you need to check the library documentation that your compiler vendor must have supplied to you.
**broken link removed** may help you if you search on Algorithm, and Math.
I didn't download the doc to confirm.
 

The compiler's Math Library contains all of the math functions it supports. It may, or may not, contain all of the functions listed in the Standard C Math Library, so you have to check it's documentation to see which functions it provides. For details on the Standard C Math Library functions check out this Wikipedia entry:

https://en.wikipedia.org/wiki/C_mathematical_functions
 
Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…