Rounding Errors!!!

Rounding Errors!!!

jensdragonfly
Contributor Contributor
1,964 Views
8 Replies
Message 1 of 9

Rounding Errors!!!

jensdragonfly
Contributor
Contributor

There is an issue when rounding in Autodesk.  I think that typical standards state that when you 5 and over you round up and 5 and under you round down.  This is the not the case in Civil3D.  The attached image shows that 40.77 Plus 4.02 equals 44.78.  If I was to ask anyone to add those up, you would nit get 44.78, but 44.79.  

 

Apparently a long time ago some one thought it was thet other way around.   

 

 

0 Likes
Replies (8)
Message 2 of 9

troma
Mentor
Mentor

Let's just try an example:

 

40.76724 ≈ 40.77

+4.01737 ≈  +4.02

44.78461 ≈ 44.78

 

Looks perfectly legitamate to me.


Mark Green

Working on Civil 3D in Canada

0 Likes
Message 3 of 9

peterfunkautodesk
Autodesk
Autodesk

troma's response is a great illustration of what is going on. The distance is rounded based on the length of the line and not based on the sum of two rounded station values. Excel works exactly the same way.

 

Regards,

Peter Funk
Sr Product Manager
Civil 3D
Autodesk, Inc.



Peter Funk
Autodesk, Inc.

0 Likes
Message 4 of 9

troma
Mentor
Mentor

For further reading:

https://forums.autodesk.com/t5/autocad-civil-3d-general/rounding-of-values/m-p/4794571#M240764

 

 


Mark Green

Working on Civil 3D in Canada

0 Likes
Message 5 of 9

doni49
Mentor
Mentor

This is why I keep my WORKING files set to show lengths & stations to a precision of 4 decimal places -- it makes it easy to see things like this.  The files that I actually plot from are set to more appropriate precision values.



Don Ireland
Engineering Design Technician




If a reply solves your issue, please remember to click on "Accept as Solution". This will help other users looking to solve a similar issue. Thank you.


Please do not send a PM asking for assistance. That's what the forums are for. This allows everyone to benefit from the question asked and the answers given.

0 Likes
Message 6 of 9

doni49
Mentor
Mentor

P.S. I don't know how many times I've had a corridor "drop to zero" because it extended past the profile.  The corridor might have ended at 102+00.00 and the profile might have too so I was confused.

 

But when I changed the precision, I saw that the profile actually ended at 101+99.9985.  My corridor ended 0.0015 ft beyond the profile.  But because the profile was rounded to two decimal places, I thought it went to 102+00.00

 



Don Ireland
Engineering Design Technician




If a reply solves your issue, please remember to click on "Accept as Solution". This will help other users looking to solve a similar issue. Thank you.


Please do not send a PM asking for assistance. That's what the forums are for. This allows everyone to benefit from the question asked and the answers given.

0 Likes
Message 7 of 9

codee
Advocate
Advocate

2020 and the rounding errors still persist. No adding... just labeling the surface at my survey point wrong. point is 100.005 and C3D labels it as 100.00 

 

Garbage

0 Likes
Message 8 of 9

ChrisRS
Mentor
Mentor

Garbage?  ... Maybe ... Maybe Not. Let's look.

 


@codee wrote:

... just labeling the surface at my survey point wrong. point is 100.005 and C3D labels it as 100.00 

 

Garbage


There are potentially two things going on:

  1. AutoCAD and Civil 3D use the round 5 to Even rule. Typically "round number ending in 5 up" is taught in elementary school. In science (high school and up), accounting, and AutoCAD a less biased method is used. When the least significant digit is exactly 5, round to the neared even number.
    • 100.005 rounds to 100.00   (0 is even)
    • 100.015 rounds to 100.02   (2 is even)
    • 100.025 rounds to 100.02   (2 is even)
    • 100.035 rounds to 100.04   (4 is even)
      etc.
  2. Civil 3D labels (and AutoCAD) round based on the full stored precision of the object being labeled, not the displayed value. 
    • 100.00450001 through 100.00549999 will display as 100.005 and round to 100.00 
    • 100.01450001 through 100.01549999 will display as 100.015 and round to 100.02 
    • 100.02450001 through 100.02549999 will display as 100.025 and round to 100.02 
    • 100.03450001 through 100.03549999 will display as 100.035 and round to 100.04

____________________________________________________________________________

 

What is the actual elevation of your survey point?

 

This is from a survey I received for a surveyor. (I converted LDT points to C3D Cogo points)

          A Line has been created, snapping one end to one particular point.

The elevation of that particular point is 1654.780 (See lower right)

The elevation display precision is controlled by the
          Drawing Settings Elevation Precision setting, in this case: 3. (see lower left)

The elevation of  line endpoint is 1654.77990000. Display of this elevation is controlled by "Units"

 

Rounding is based on the full precision of the point elevation, or surface elevation.

 

image.png

 

Christopher Stevens
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Message 9 of 9

jmayo-EE
Mentor
Mentor

Civil 3D rounds with the half-to-even rule.

 

https://forums.autodesk.com/t5/civil-3d-forum/round-normal/m-p/2644574#M126748

 

https://en.wikipedia.org/wiki/Rounding

 

 

 

John Mayo
PE, CFM, CME


alt="EESignature" width="244" height="22">