03-22-2019 01:50 PM - edited 03-22-2019 02:00 PM
So I've been troubleshooting this for a while now and I've run out of ideas. For some reason select values don't find a match and I cannot figure out why. I have attached all the files needed to run the program. I would do images but I figure this might be easier. I also have an image of the results. First column is before rounding, second is after rounding and third is if a match was found it returns the index of the array we are matching against.
03-22-2019 03:11 PM
The third column isn't returning the index of the array, it's returning the value at that index. Basically, columns 2 and 3 will be the same if there was a match, and it will be zero if there isn't a match. If Index Array receives an Index of -1, it'll return a 0, which your code appears to be doing.
I'm not quite sure what the problem is here, can you elaborate? If you want the third column to be the Index of the match, not the value matched, remove the Index Array function.
03-22-2019 04:30 PM
@BertMcMahan wrote:I'm not quite sure what the problem is here, can you elaborate? If you want the third column to be the Index of the match, not the value matched, remove the Index Array function.
I agree with that. Should be easy to fix. 😉
(Some extra comments: There is no reason to have the "round to even" in a separate loop, this can easily be done in the second loop, eliminating the first loop. Not sure why you have all these representation mismatches (SGL vs. DBL). I have the gut feeling that more simplifications are possible)