LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

One of these things (is not like the others)

Anyone else had trouble with the new U64 datatype?

Chris_Mitchell
Product Development Engineer
Certified LabVIEW Architect

0 Kudos
Message 1 of 6
(3,425 Views)
What kind of trouble are you having?
0 Kudos
Message 2 of 6
(3,419 Views)
Lets try this again....
 
The VI that demonstrates the problem should be attached...

Chris_Mitchell
Product Development Engineer
Certified LabVIEW Architect

0 Kudos
Message 3 of 6
(3,395 Views)

hi there

same thing with LV 7.1 and SGL, DBL or EXT - precision inputs. seems to be a limitation due to the algorithm used for calculation of sin(x).

Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
0 Kudos
Message 4 of 6
(3,379 Views)
I agree, this has nothing to do with U64. It is just a bug in the sine function that returns the input number if the input is larger than a certain (very big) threshold. The value of the U64 can reach this threshold, while it exceeds the range of U32 and below.
 
As a workaround, you could use "quotient and remainder" and divide by 2*Pi, then feed the remainder to the sine function. In any case, it probably does not make much sense, because the sine function is a DBL function and you'll run out of meningful digits at 1e15. A periodic function such as Sine will not make much sense if the minimal increment jumps many periods. All you see is randomness.
 
Still, I agree that there is a bug. Sine should probably return zero and not some value outside +/-1 for huge inputs. 😮
0 Kudos
Message 5 of 6
(3,366 Views)

So in LV a circle DOES have a begining and an end Smiley Surprised

And I was so looking forward to that next Big Bang Smiley Sad

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 6 of 6
(3,351 Views)