Jump to content

Rounding


Cloedu

Recommended Posts

Hello,

i have found unexpexted rounding effects with the function "Round to nearest integer"

Input 0.5

output 0

Input 1.5

output 2

Input 2.5

Output 2

Input 3.5

Output 3

Labview is alwas rounding to a even integer.... but why?

What is the sense of these implementation of auf Rounding alghorithm?

Thanx

Claude

Link to comment

QUOTE (Cloedu @ Aug 25 2008, 12:00 PM)

Labview is alwas rounding to a even integer.... but why?
Hi,

as far as I remember this had to do with statistics,

assume you have a big pile of points and they all get rounded up when ending on .5,

you end up with a higher average,

with this statistical rounding, the average would not change that much.

I hope this helps a bit

edit: Ton was a bit quicker in typing as me...

Link to comment

QUOTE (Cloedu @ Aug 25 2008, 06:00 AM)

Hello,

Labview is alwas rounding to a even integer.... but why?

What is the sense of these implementation of auf Rounding alghorithm?

Thanx

Claude

LabVIEW follows IEEE standard

round up the odd whole numbers ending with .5,

round down even numbers ending with .5.

From message by

Lew Drake

Process Automation Corporation, and the info LabVIEW mailing list, 4/12/07.

This method accumulates less error over time, it is statistically defensible. If you look around on line you will find detailed explanations, no problem.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.