LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Eval Formula Node rounding bug?

Solved!
Go to solution

@GerdW wrote:

 

Btw.:

Why do you want to use ParseFormula including "int(x)" function?

 

 


Ahh- it's because the formula is coming from a file...

If it was just "on the diagram", then the Round-To-Nearest primitive does exactly what I need.. 😉

0 Kudos
Message 11 of 15
(614 Views)

@Yamaeda wrote:

I'm fairly sure int(x) in most languages gets the integer part of a number (thus rounding down), same as doing a Modulo 1 (quotient and remainder).


Yup, maybe in most languages- but as the Help page points out- 😆

 

Note  Formula Node and Expression Node functions might not return the same value as functions with the same name in Microsoft Excel, the MATLAB® software, or other text-based math environments.
tomlawton_0-1692359727468.png

 

Message 12 of 15
(613 Views)

@Yamaeda wrote:

... same as doing a Modulo 1 (quotient and remainder).


This behavior is what I, too, would expect for languages related to C: Truncating the decimal part, i.e. rounding towards 0.

 

As a side note: I wanted to check what the LabVIEW manual says about that, but the formatting of that page is (still) broken and unreadable.

Message 13 of 15
(610 Views)

For question 3: 

  • How the hell do you contact Support these days to report bugs..?!

 

you can contact NI support by going to the NI web page and under the "Support" menu on the top you'll find an "Open a service request" option in the bottom left of the menu you get.

 

This is also documented here: Open a Service Request Case Using the NI Service Request Manager (SRM)

 

I believe you need to have standard service active to use the "Request Technical Support" option, but the "Report a Bug" should work for anyone.

It's a bit clunky while loading but it does the job.

0 Kudos
Message 14 of 15
(577 Views)

Ahh.. It's a known bug... I wonder how old..?!

 

This case was reported in the past, the number of the bug559197: The Eval Formula Node VI truncates the value instead of round it when using the int(x) function.
0 Kudos
Message 15 of 15
(517 Views)