02-04-2010 03:43 PM
Try this:
- Create a while loop
- Wire in a double, 0.
- Make this value a shift register
- Inside the while loop, continously add .1
- Also, wire the shifted value to a "Equals?" comparison
- Wire this to stop the while loop when the shift register equals 1
I've attempted this a few times and LabVIEW will never show the values as equal once the shift register reaches 1.0.
02-04-2010 03:46 PM
02-04-2010 03:54 PM
Seriously?
If you're not going to contribute in a productive manner, why waste your time?
02-04-2010 03:56 PM - edited 02-04-2010 03:58 PM
02-04-2010 03:58 PM - edited 02-04-2010 03:58 PM
smercurio's delivery may have been abrupt, but his message was accurate. This question has been asked countless times on the NI Forums regarding LabVIEW (I imagine a search for DBL equal would yield a fair number of results), and has been undoubtedly asked on forums for other programming languages, too. When comparing DBL values, you have to do so with some sort of epsilon (error) taken into account, as DBLs are rarely "equal" as far as computers are concerned.
02-04-2010 03:59 PM - edited 02-04-2010 04:01 PM
dre99gsx wrote:Seriously?
If you're not going to contribute in a productive manner, why waste your time?
Your attitude is ridiculous.
That is the answer. There is nothing more that can be said that can help you.
I think you should quick wasting our time and your time by starting to look for another line of work. Perhaps something where your cheerful personality can be an asset.
02-04-2010 03:59 PM
If you are talking about something like I have did, it works fine to me:
02-04-2010 04:01 PM
Giedrius.S wrote:If you are talking about something like I have did, it works fine to me:
![]()
won't always work i believe
02-04-2010 04:03 PM
02-04-2010 04:05 PM - edited 02-04-2010 04:05 PM
Giedrius.S wrote:If you are talking about something like I have did, it works fine to me:
![]()
Read the threads, integers are fine, there is an exact binary representation (except for 1 perhaps ) , try something like 0.1.