04-22-2016 08:36 AM
@crossrulz wrote:All of those are way better than your stupid CLD shirt.
Jeff, you may need this.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
04-22-2016 10:39 AM
Can't follow you lol
04-22-2016 11:01 AM
@feriel0209 wrote:Can't follow you lol
Someone just got burned.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
04-22-2016 11:58 AM
There's a lot of good stuff there. This reminded me that I've had this VI sitting on my hard drive since forever, which takes a slightly different short-circuit approach. The performance looks promising, but I haven't done a whole lot of benchmarking or testing, and haven't actually used it in production code.
The basic idea is to leverage the equality operator to get the Inf/NaN/-0 behaviors, and short-circuit whenever the two quantities are equal. Then check that the exponents differ by no more than one and bail if not. Finally, compute the ULP threshold from the exponent and do the comparison. Other tunings may work better, depending on what your data looks like.
One caveat is that it doesn't allow any tolerance when comparing to zero. That could be handled with some extra logic if desired, but since that situation is ambiguous it might be better handled externally anyway. Let me know what other situations I missed.
04-22-2016 12:57 PM
@JLewis wrote:There's a lot of good stuff there. This reminded me that I've had this VI sitting on my hard drive since forever,
Interesting implementation, but I feel the version Altenbach did here probably is faster since it doesn't deal with any floating point math.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
04-22-2016 01:08 PM
Floating-point math itself isn't all that slow--the problem is avoiding the one super-slow operation that dominates. In the other VI, it's the Type Cast (counterintuitive, I know). In my case, I suspected the Mantissa/Exponent primitive. Some very quick and dirty benchmarks showed about a 4x improvement for the full path (and more for the short-circuit cases).
Jim
04-22-2016 03:59 PM - edited 04-22-2016 04:06 PM
@Hooovahh wrote:
@crossrulz wrote:All of those are way better than your stupid CLD shirt.Jeff, you may need this.
Warning OT RE: Who needs a link like that? Trust me! crossrulz has had better clothing supplied than what he admits too! But, I hope he does not wear them on the weekends! If he really wanted to dress nice:
He would have a nice shirt!
Now if I could get a "Hoodie"...I'd be dressed well all week
04-22-2016 06:17 PM
Jeff·Þ·Bohrer wrote: Trust me! crossrulz has had better clothing supplied than what he admits too!
Let's just say there is a reason my then newborn put a giant pee stain on it
04-26-2016 01:10 PM
04-26-2016 02:00 PM