Error description
Today, I'm getting a objective-c player, and I've got a play time. Nan, which appears as Nan after the video has finished playing, is the abbreviation for not a number. NaN is used to handle error conditions in calculations, such as 0.0 divided by 0.0 or the square root of a negative number. As can be seen from the table above, for single-precision floating-point numbers, NaN is expressed as an exponent of Emax + 1 = 128 (exponential field is all 1), and the Mantissa field is not equal to zero floating-point number. The IEEE standard does not require a specific mantissa field, so NaN is not actually one, but a family. Different implementations can freely select the value of the Mantissa field to express NaN, such as a constant Float.nan in Java can be expressed as a floating-point number of 01111111110000000000000000000000, where the first bit of the Mantissa field is 1 and the remainder is 0 (regardless of the hidden one) , but this depends on the hardware architecture of the system. Java even allows programmers to construct their own NaN values (via the Float.intbitstofloat () method) with a specific bit pattern. For example, a programmer can use a specific bit pattern in this custom NaN value to express certain diagnostic information. How to handle Nan errors. use isNaN (X) in OC to judge the X.isnan in Swift to determine the book address: HTTP://WWW.JIANSHU.COM/P/30E10475B4AA