Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

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

Parameters Accuracy

  • Thread starter Thread starter hasan_t_almasri
  • Start date Start date
H

hasan_t_almasri

Guest
Dear All,

I am faced with the following problem,

I am trying to build up a BOM Table. let us say that i
got a Real Number Parameter called A = 200.16 . Now, this
value is rounded in the BOM to be A=200.2

now, when i ask Pro E to multiply A*2 the answer it gives
is 400.32 and it is rounded to 400.3, instead of 400.4 as
i want it to be shown in the BOM.

My Question is, is there any way other that Ceil and
Floor to round numbers to what ever digits i need?
Because i want to round up the 200.16 to 200.2 before i
multiply it by 2

i am using Pro E Wildfire 4

I appreciate any help from any one :)

Have a nice day people
 
I thought that there was a function int -- surprised to not find one.
Nonetheless ceil does work using something like this, assuming that you
want the figures to agree to 1dp.

A=ceil(d10*10)

B=A*2/10
 
Thanks ken,

Yes its strange that there is no function for that. i can
think of a complicated method using IF just to use Ceil if
it is equal or greater than .5 and floor when it is less
than .5
 
A simple way to round numbers is this:

A = floor(d10 + .5)

If d10 is closer to the higher number, adding .5 will put
it over and floor will round down to the higher number.
If it's closer to the lower, adding .5 will not put it
over and floor will round down to the original number.

If you want to go to 1 decimal, multiply my 10 and then
divide by 10, like this:

A = (floor((d10*10) + .5))/10
 
Dough,,

Thanks a lot. Very smart!!! and it worked :)
 

Part and Inventory Search

Sponsor

Back
Top