# Arithnmatic operation in Hitech C

Status
Not open for further replies.

##### Member level 3
Can some one please explain how below expression can be written in C (Prefer Hitech c) ?

Y = 250000/(X^2.93)

regards

#### GSM Man

##### Banned
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);

points: 2

##### Banned
If you have pow() function in Hi Tech C then you can use that also but remember to include math.h file.

Y = (250000) / pow(X,2.93);

points: 2

##### Member level 3
can I get the links/sites where i can learn how mathmatical expression can be used in C.

thks

#### sky_123

##### Advanced Member level 4
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.
This link may help you if you search on Algorithm, and Math.
I didn't download the doc to confirm.

#### GSM Man

##### Banned
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:

http://en.wikipedia.org/wiki/C_mathematical_functions

points: 2