Max double value or NAN as a sentinel value?
This is a matter of personal preference. I like NAN because it is almost
always obvious it cannot be a valid value.

You can test for the value being NAN with
isnan().