Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
Data Structures | Enumerations | Functions
INFINITY.cpp File Reference
#include <stdio.h>
#include <string.h>
#include "config.h"
#include "float_defs.h"
Include dependency graph for INFINITY.cpp:

Go to the source code of this file.

Data Structures

union  flt_bits
 
union  dbl_bits
 
union  ldbl_bits
 

Enumerations

enum  endian { big_endian , little_endian }
 

Functions

int main ()
 

Enumeration Type Documentation

◆ endian

enum endian

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 1999-2007 Rogue Wave Software, Inc. IEEE 754 specifies the following formats:

K+1 exponent bits: 1 - 2^K < k < 2^K
N significant bits: -2^N < n < 2^N

+--------—+--—+--—+--—+ | FORMAT |BYTES|K + 1| N| +===========+=====+=====+=====+ | float| 4| 8| 24| +--------—+--—+--—+--—+ | double| 8| 11| 53| +--------—+--—+--—+--—+ |long double|>= 10|>= 15|>= 64| +--------—+--—+--—+--—+ | quad| 16| 15| 113| +--------—+--—+--—+--—+

+--------—+-—+-------------—+----—+----------------—+ |NUMBER TYPE|SIGN|K+1 bit EXPONENT|Nth BIT|N-1 bit SIGNIFICAND| +===========+====+================+=======+===================+ | NaN(s)| ? |binary 111...111| 1 | binary 1xxx...xxx | +--------—+-—+-------------—+----—+----------------—+ | SNaN(s)| ? |binary 111...111| 1 |nonzero 0xxx...xxx | +--------—+-—+-------------—+----—+----------------—+ | INF(s)| +/-|binary 111...111| 1 | 0 | +--------—+-—+-----------— –+----—+----------------—+ | Normals| +/-| k - 1 + 2^K| 1 |n-2^(N-1) < 2^(N-1)| +--------—+-—+-------------—+----—+----------------—+ | Subnormals| +/-| 0| 0 | 0 < n < 2^(N-1)| +--------—+-—+-------------—+----—+----------------—+ | Zeros| +/-| 0| 0 | 0 | +--------—+-—+-------------—+----—+----------------—+

Enumerator
big_endian 
little_endian 

Definition at line 70 of file INFINITY.cpp.

Function Documentation

◆ main()

int main ( void  )

Definition at line 813 of file INFINITY.cpp.