If your seeing a variable show as a NaN double check that it's really is being *used* within the shader.
If your seeing a variable show as 0.000000000 check that it's going to be accessed within your shader, i.e. it may be in an 'if' that won't be entered?
The compiler could be optimizing those variables out. Assuming this is the issue you've described?