ChnFind Fails when Evaluting the Equivalency of Floating Point NumbersPrimary Software: DIAdemPrimary Software Version: 10.2 Primary Software Fixed Version: N/A Secondary Software: DIAdem
Problem: When I use the ChnFind command with an "=" operator in the expression, it fails to evaluate floating point numbers correctly. Find works correctly, but I want to use ChnFind. Solution: When you use the ChnFind command in DIAdem, the complete calculation is done by the VB script engine. In order to check floating point values with the "=" operator, it must be tested against an Epsilon. This Epsilon test range is integrated in the Find function, so in such a formula you can use the "=" operator. With the ChnFind command, the comparison takes place via the script engine, and there is no way to integrate an Epsilon test. This is why the ValEqual function was created. For example, instead of using: i = ChnFind("Ch(""YourChannelName"") = CMax(""YourChannelName"")") Use the following: i = ChnFind("ValEqual(Ch(""YourChannelName""), CMax(""YourChannelName""))") Related Links: Attachments:
Report Date: 08/30/2007 Last Updated: 08/30/2007 Document ID: 4CTI5KSN |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
