11-14-2023 07:38 AM
@RongTime wrote:
I used DBL for the example In testing and actual use, I think there is no problem because I used I32. Thanks for the good point 😄
If you meant "in actual use, I used I32" than I agree there is no problem (in actual use).
Also note that comparing floats for equality is something that is a LabVIEW issue. Every programming language I know off has this problem.
11-14-2023 08:07 AM
wiebe@CARYA wrote:
@RongTime wrote:
I used DBL for the example In testing and actual use, I think there is no problem because I used I32. Thanks for the good point 😄
If you meant "in actual use, I used I32" than I agree there is no problem (in actual use).
Also note that comparing floats for equality is NOT JUST something that is a LabVIEW issue. Every programming language I know off has this problem.
I'm missing a NOT there!
But there are arbitrary precision floating point libraries, but they are very domain specific and extremely resource and CPU intensive to use, as they implement a variable length floating point representation. All main stream CPUs nowadays implement the fixed size IEEE-754 format floating point representation and that is also what all modern programming languages I know off use as their native floating point data type.
11-14-2023 09:12 AM
@RongTime wrote:
Actually, since this is a FOR loop it will stop after 10 iterations, no matter what, and all the blue at the bottom of the loop code is completely redundant. Whatever is wired to N takes precedence.
I agree will all others that your code is highly flawed for what you are trying to do, even if you do I32 for the "points".