以下定义的C#替换是什么?
#define IS_FINITE(x) (0x7FF0 != (*((unsigned short*)(&x) + 3) & 0x7FF0))
Run Code Online (Sandbox Code Playgroud)
也许double.IsInfinity(x) == false还是double.IsNegativeInfinity(x) == false?
谢谢.
Dan*_*rod 10
!double.IsInfinity(x) && !double.IsNaN(x)
Run Code Online (Sandbox Code Playgroud)
参考文献:
http://pubs.opengroup.org/onlinepubs/009604499/functions/isfinite.html
http://msdn.microsoft.com/en-us/library/system.double.isinfinity.aspx
HTTP:// MSDN. microsoft.com/en-us/library/system.double.isnan.aspx