Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
Macros | Enumerations | Functions
FLOAT.cpp File Reference
#include "config.h"
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include "float_defs.h"
Include dependency graph for FLOAT.cpp:

Go to the source code of this file.

Macros

#define LIBC_THROWS()   throw ()
 
#define DO_STRINGIZE(x)   #x
 
#define STRINGIZE(x)   DO_STRINGIZE (x)
 
#define PRINTINT(macro)
 
#define PRINTFLT(macro, fmt, prec, suffix)    print_float (macro, STRINGIZE (macro), #macro, "%.*" fmt "e" suffix, prec)
 
#define LDBL_FMT   "L"
 
#define ERANGE   -1
 

Enumerations

enum  {
  DBL_DIG = 15 , DBL_MANT_DIG = 53 , DBL_MAX_10_EXP = 308 , DBL_MAX_EXP = 1024 ,
  DBL_MIN_10_EXP = -307 , DBL_MIN_EXP = -1021 , FLT_DIG = 6 , FLT_MANT_DIG = 24 ,
  FLT_MAX_10_EXP = 38 , FLT_MAX_EXP = 128 , FLT_MIN_10_EXP = -37 , FLT_MIN_EXP = -125 ,
  FLT_RADIX = 2 , LDBL_DIG = -1 , LDBL_MANT_DIG = -1 , LDBL_MAX_10_EXP = -1 ,
  LDBL_MAX_EXP = -1 , LDBL_MIN_10_EXP = -1 , LDBL_MIN_EXP = -1
}
 

Functions

template<class FloatT >
void print_float (FloatT x, const char *xstr, const char *macro_name, const char *fmt, int prec)
 
int main ()
 

Macro Definition Documentation

◆ DO_STRINGIZE

#define DO_STRINGIZE (   x)    #x

Definition at line 136 of file FLOAT.cpp.

◆ ERANGE

#define ERANGE   -1

◆ LDBL_FMT

#define LDBL_FMT   "L"

◆ LIBC_THROWS

#define LIBC_THROWS ( )    throw ()

Definition at line 69 of file FLOAT.cpp.

◆ PRINTFLT

#define PRINTFLT (   macro,
  fmt,
  prec,
  suffix 
)     print_float (macro, STRINGIZE (macro), #macro, "%.*" fmt "e" suffix, prec)

Definition at line 144 of file FLOAT.cpp.

◆ PRINTINT

#define PRINTINT (   macro)
Value:
if (-1 == (macro)) \
printf ("%s", "//"); \
printf ("#define _RWSTD_%-16s %6d\n", #macro, (macro))

Definition at line 139 of file FLOAT.cpp.

◆ STRINGIZE

#define STRINGIZE (   x)    DO_STRINGIZE (x)

Definition at line 137 of file FLOAT.cpp.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

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.

Enumerator
DBL_DIG 
DBL_MANT_DIG 
DBL_MAX_10_EXP 
DBL_MAX_EXP 
DBL_MIN_10_EXP 
DBL_MIN_EXP 
FLT_DIG 
FLT_MANT_DIG 
FLT_MAX_10_EXP 
FLT_MAX_EXP 
FLT_MIN_10_EXP 
FLT_MIN_EXP 
FLT_RADIX 
LDBL_DIG 
LDBL_MANT_DIG 
LDBL_MAX_10_EXP 
LDBL_MAX_EXP 
LDBL_MIN_10_EXP 
LDBL_MIN_EXP 

Definition at line 32 of file FLOAT.cpp.

Function Documentation

◆ main()

int main ( void  )

Definition at line 148 of file FLOAT.cpp.

◆ print_float()

template<class FloatT >
void print_float ( FloatT  x,
const char *  xstr,
const char *  macro_name,
const char *  fmt,
int  prec 
)

Definition at line 123 of file FLOAT.cpp.