is there any way...???

Status
Not open for further replies.

dolphin1

Newbie level 4
Joined
Feb 19, 2005
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,329
i want using some number floating point
but in the end of the my routine i want convert this(floating) code to integer but i cant find any way please write for me a few line code
thanx to every body...


const int R=384;
int Rx //Rx is variable reading from port
float z,t
main(void){
read by y from RA1;
z=y/x;
if(z<1){t=1-z;x=x+x*t;} //add(or subtruct) tolerance to R(esistance)
if(z>1){t=z-1;x=x-x*t;}
 

Hi,
do specify the input range and output width required. In general you may have to do nothing other changing the definitions of the variables but in some cases you may have to take inti account the saturation and other issues.
brmadhukar
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…