r/CATIA • • 16d ago

Catia V5 catia v5 drafting - rounding error

anyone here ever experienced catia's drafting rounding error?

example:

1.6250 gets rounded to 1.62

this is incorrect, it should be 1.63

5 Upvotes

7 comments sorted by

1

u/Ape_of_Leisure 15d ago

The mathematical function round() uses round half to even.
You can manipulate a little bit your number to work that feature so it returns a round up value.

1

u/nady_ice 15d ago

what do you mean manipulate?

1

u/Samo_Dimitrije 15d ago

The general maths convention is to round to an even digit, so 1.6250 → 1.62, but 1.6350 → 1.64.

Is there some other rule I'm missing by which it should be 1.63?

2

u/nady_ice 15d ago

i was always taught that digits 5-9, round up..see example below

so 1.625 = 1.63
and 1.624 = 1.62

this issue (in catia drafting) was documented as a problem several years ago, and the fix was to just fake the dimension.

https://www.ibm.com/support/pages/apar/HD96458

is that an option? yes, but faking a dimension is really just a workaround

do i believe that a better solution exists? also yes.

3

u/13D00 15d ago

There’s two different standards for rounding, and this is one of them. Look up Banker's Rounding.

1

u/nady_ice 15d ago

thanks for this reply. i think this may be what catia uses (who knows) because it's kind of a mixed bag of 1.63 and 1.62...random.

it makes things difficult for detail-oriented folks.

2

u/Samo_Dimitrije 15d ago

It's not just what Catia uses, it's what floating point arithmetic is based on.

Default round functions are round to even and if you wants something else you have to implement other functions.

Have you considered why you actually want 1.6250 to round to 1.63? If it was measuring the depth of a pocket for example we could imagine the measurement being -1.6250 would you want it to round to -1.63. In other words do you want to round towards infinity, or away from zero? What direction is infinity then?

Rounding to even, or as others said 'bankers rounding' is also known as convergent rounding. This is because it doesn't have positive or negative bias and does not have a bias towards or away from zero. The bias could lead to your measurements 'swelling' from the actual ones. And then you're fighting yourself with both tollerance and nominal measurements.