Round off parameter
Round off parameter
(OP)
Hi,
I need to round off the weight in pounds for one decimal place. I have created external parameter (KGS) for weight in kg. In my case, it is 1.6 kg. When I create new integer type parameter and provide formula, it is coming as 3. I want 3.5 Lbs. I tried by 1*round(KGS*2.204622). It is coming as 4 only. Kindly give me an idea to round of in one or two decimal places. I checked in net and tried various methods. But, I unable to find the solution. Related links are
http://www.eng-tips.com/viewthread.cfm?qid=160824
http://www.eng-tips.com/viewthread.cfm?qid=305431
Please find the screen shot in the attachment.
When I tried---- 1/10*(round(KGS*2.204622)/1*10), the same value 4 is coming. Kindly tell me, where I am doing mistake.
Suresh
I need to round off the weight in pounds for one decimal place. I have created external parameter (KGS) for weight in kg. In my case, it is 1.6 kg. When I create new integer type parameter and provide formula, it is coming as 3. I want 3.5 Lbs. I tried by 1*round(KGS*2.204622). It is coming as 4 only. Kindly give me an idea to round of in one or two decimal places. I checked in net and tried various methods. But, I unable to find the solution. Related links are
http://www.eng-tips.com/viewthread.cfm?qid=160824
http://www.eng-tips.com/viewthread.cfm?qid=305431
Please find the screen shot in the attachment.
When I tried---- 1/10*(round(KGS*2.204622)/1*10), the same value 4 is coming. Kindly tell me, where I am doing mistake.
Suresh





RE: Round off parameter
integers are integers, you can try all formula you want...
try with real
indocti discant et ament meminisse periti
RE: Round off parameter
Thanks for the reply. i forget the basic nature of integer. As you mentioned, I tried with real parameter and it is working fine and i able to control the decimal places now.
Suresh