Random and expensive relay behavior

So NaN means not a number.

Have you thought of writing the values to a file so you can determine what you are sending which might make it easier to work out where they are coming from?