03-29-2022 03:14 AM
Hello everyone, I just updated my development environment to LabVIEW 2021, and I immediately noticed my application does not work as expected. I found out that U64 implementation of Expression node function does not work properly (see the snippet below).
03-29-2022 03:24 AM - edited 03-29-2022 03:25 AM
Hi,
@stpmazic wrote:
I found out that U64 implementation of Expression node function does not work properly (see the snippet below).
Can you provide examples of input values and expected/unexpected outputs?
Is it a problem of the U64 datatype or of all those coercion dots in your snippet?
Don't forget the different amount of mantissa bits in the U64 and DBL datatypes in your code!
03-29-2022 04:56 AM
I'm guessing it has something to do with the Economists rounding LV uses (or whatever it's called).
03-29-2022 07:20 AM
@stpmazic wrote:
Hello everyone, I just updated my development environment to LabVIEW 2021, and I immediately noticed my application does not work as expected. I found out that U64 implementation of Expression node function does not work properly (see the snippet below).
You mean it used to work and now it doesn't?
03-29-2022 11:19 AM
Thank you all for your prompt replies. I wanted to attach the entire VI containing proper default values, but for some reason I went for a snippet. Please see the attached VI, everything will be clear.
03-29-2022 11:53 AM
Still not clear on my phone.
The expression node will use "Bankers Rounding" so expect only even values in the U64 out. And the 2 in that is likely signed forcing an insidious coersion.
03-29-2022 12:13 PM
03-29-2022 01:43 PM
Looks like the expression node Coerces to 32bit not entirely unexpected.
03-29-2022 04:24 PM
@JÞB wrote:
Looks like the expression node Coerces to 32bit not entirely unexpected.
Too late to edit.
The expression node predates the introduction of the 64 bit integer datatype. Since it never had an overflow output I can't imagine breaking the backward compatibility by supporting 64 bit inputs.
Coercion dots or a compiler warning would be nice though.
10-21-2022 12:33 PM
We just ran into this. It worked with LV 2018. I just checked LV2022 and it seems broken there too. Is this going to be fixed?