Check out our General Code Repository Files. Also, before posting here, check to see if your post doesn't fit into another subforum by category.
Tags |
(This content has not been tagged yet)
|
![]() |
Aug 25 2008, 10:00 AM
Post
#1
|
|||
|
Enough LAVA to be dangerous Member Posts: 4 Joined: 10-October 05 Member No.: 3193 Using LabVIEW Since:2002 LV:8.2.1 ,7.0 ,7.1.1
|
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 -------------------- Cloedu
|
||
|
|
|||
| Ad |
Aug 25 2008, 10:00 AM
Post
#
|
||
|
|
|
||
|
|
|||
Aug 25 2008, 10:40 AM
Post
#2
|
|||
![]() CCT It Premium Member ![]() Posts: 1337 Joined: 13-June 05 From: Woerden, Netherlands Member No.: 2399 Using LabVIEW Since:2001 LV:8.5.1 ,6.1 ,8.2.1
My Blog
My Gallery
|
--------------------
|
||
|
|
|||
Aug 25 2008, 10:43 AM
Post
#3
|
|||
|
More Active Member Posts: 48 Joined: 27-May 05 Member No.: 2311 Using LabVIEW Since:1999 LV:8.5.1 ,8.0.1 ,7.1
|
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... This post has been edited by tnt: Aug 25 2008, 10:44 AM
|
||
|
|
|||
Aug 25 2008, 11:44 AM
Post
#4
|
|||
![]() Very Active Premium Member ![]() Posts: 218 Joined: 1-January 08 From: Perth, Australia Member No.: 10325 Using LabVIEW Since:2006 LV:8.5.1 ,8.6 ,.
|
i have found unexpexted rounding effects with the function "Round to nearest integer" Thats how I was taught in school. -------------------- all day...
|
||
|
|
|||
Aug 25 2008, 01:39 PM
Post
#5
|
|||
![]() Very Active Premium Member ![]() Posts: 217 Joined: 31-January 03 From: Wilson NC USA Member No.: 48 Using LabVIEW Since:2001 LV:8.5 ,. ,.
|
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. -------------------- Michael E. Ross
Senior Design Engineer Standard Motor Products, Inc. 2717 Commerce Road Wilson, NC 27893 mross@smpcorp.com 252.234.5821
|
||
|
|
|||
Aug 25 2008, 05:45 PM
Post
#6
|
|||
![]() Extwemely Active Premium Member ![]() Posts: 1632 Joined: 23-January 05 From: Here Member No.: 1431 Using LabVIEW Since:2003 LV:8.6 ,7.0 ,.
|
If you want to implement common rounding, you can do this by adding 0.5 and then rounding down. Here's an example.
-------------------- More than meets the eye...
|
||
|
|
|||
![]() ![]() |
| Time is now: 1st December 2008 - 09:34 PM |