Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

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
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
 

GSM Man

Banned
Joined
Apr 15, 2009
Messages
671
Helped
168
Reputation
338
Reaction score
94
Trophy points
1,308
Location
New Jersey, USA
Activity points
0
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);
 

prasad70

Member level 3
Joined
Mar 24, 2011
Messages
67
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,288
Activity points
1,690
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
Joined
Feb 26, 2011
Messages
1,170
Helped
279
Reputation
566
Reaction score
273
Trophy points
1,363
Activity points
9,599
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
Joined
Apr 15, 2009
Messages
671
Helped
168
Reputation
338
Reaction score
94
Trophy points
1,308
Location
New Jersey, USA
Activity points
0
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
 

prasad70

Member level 3
Joined
Mar 24, 2011
Messages
67
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,288
Activity points
1,690
Thank you so much for yours comment.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top