Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations SSS148 on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rounding in Equation 1

Status
Not open for further replies.

Pachem

Mechanical
May 30, 2002
53
Is it possible to round numbers using equations in SW?
 
Replies continue below

Recommended for you

Look up equations, operators and constants in the Help files of your version of SW.

[cheers]
Helpful SW websites FAQ559-520
How to get answers to your SW questions FAQ559-1091
 
Yes!

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
 
But does the INT function round up or down to the nearest integer. If it's like excel it will round down to the nearest integer which is not a real rounding function. A true rounding function will allow the user to specify at what decimal place the rounding is to take place. I would have to say using the INT function is not a true rounding function.

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




 
The rounding down of the INT function is filtered by the +0.5 factor. The result is always correct.

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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor