Rounding in Equation
Rounding in Equation
(OP)
Is it possible to round numbers using equations in SW?
When was the last time you drove down the highway without seeing a commercial truck hauling goods?
Download nowINTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS Come Join Us!Are you an
Engineering professional? Join Eng-Tips Forums!
*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail. Posting GuidelinesJobs |
|
RE: Rounding in Equation
Helpful SW websites FAQ559-520
How to get answers to your SW questions FAQ559-1091
RE: Rounding in Equation
If you want to round, for example, to x.xx do the following
rouded result = (int(expression * 100+0.5))/100
The int function is available in equations.
Regards
RE: Rounding in Equation
Best Regards,
Heckler
Sr. Mechanical Engineer
SW2005 SP 5.0 & Pro/E 2001
Dell Precision 370
P4 3.6 GHz, 1GB RAM
XP Pro SP2.0
NVIDIA Quadro FX 1400
o
_`\(,_
(_)/ (_)
"Coming together is a beginning, staying together is progress, and working together is success." - Henry Ford
RE: Rounding in Equation
The only problem about the above expession is that, on some criteria, x.5 should round to x-1 instead of x+1.
But the rounding of x.5 to x+1 it's a general accepted rule in engineering.
Regards