MPU6050 Gyro value going back to initial value irrespective of Angle

jremington:
In other words, bit combinations representing an invalid floating point number.

I should have quoted more from the source...

  if (isnan(number)) return print("nan");
  if (isinf(number)) return print("inf");
  if (number > 4294967040.0) return print ("ovf");  // constant determined empirically
  if (number <-4294967040.0) return print ("ovf");  // constant determined empirically

NAN is a specific value. It's not invalid. It is the result of dividing zero by zero. It has some odd properties - it's not greater than or less than any other floating-point number. It is equal to any other NAN.