// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. /*============================================================================ ** ** Source: test1.c ** ** Purpose: Checks that _finite correctly classifies all types ** of floating point numbers (NaN, -Infinity, Infinity, ** finite nonzero, unnormalized, 0, and -0) ** **==========================================================================*/ #include /* The IEEE double precision floating point standard looks like this: S EEEEEEEEEEE FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 0 1 11 12 63 S is the sign bit. The E bits are the exponent, and the 52 F bits are the fraction. These represent a value, V. If E=2047 and F is nonzero, then V=NaN ("Not a number") If E=2047 and F is zero and S is 1, then V=-Infinity If E=2047 and F is zero and S is 0, then V=Infinity If 0