Equivalent to IsFinite ()

What is a C # replacement for the following definitions?

#define IS_FINITE(x) (0x7FF0 != (*((unsigned short*)(&x) + 3) & 0x7FF0)) 

Maybe double.IsInfinity(x) == false or double.IsNegativeInfinity(x) == false ?

Thanks.

+6
source share

Source: https://habr.com/ru/post/912501/


All Articles