HPGCC3 Documentation 3.0 R003

decContext.h File Reference

#include <stdint.h>
#include <stdio.h>
#include <signal.h>

Go to the source code of this file.

Data Structures

struct  decContext

Defines

#define DECCNAME   "decContext"
#define DECCFULLNAME   "Decimal Context Descriptor"
#define DECCAUTHOR   "Mike Cowlishaw"
#define DECEXTFLAG   1
#define DECSUBSET   0
#define DEC_ROUND_DEFAULT   DEC_ROUND_HALF_EVEN;
#define DEC_MAX_DIGITS   999999999
#define DEC_MIN_DIGITS   1
#define DEC_MAX_EMAX   999999999
#define DEC_MIN_EMAX   0
#define DEC_MAX_EMIN   0
#define DEC_MIN_EMIN   -999999999
#define DEC_MAX_MATH   999999
#define DEC_ClassString_SN   "sNaN"
#define DEC_ClassString_QN   "NaN"
#define DEC_ClassString_NI   "-Infinity"
#define DEC_ClassString_NN   "-Normal"
#define DEC_ClassString_NS   "-Subnormal"
#define DEC_ClassString_NZ   "-Zero"
#define DEC_ClassString_PZ   "+Zero"
#define DEC_ClassString_PS   "+Subnormal"
#define DEC_ClassString_PN   "+Normal"
#define DEC_ClassString_PI   "+Infinity"
#define DEC_ClassString_UN   "Invalid"
#define DEC_Conversion_syntax   0x00000001
#define DEC_Division_by_zero   0x00000002
#define DEC_Division_impossible   0x00000004
#define DEC_Division_undefined   0x00000008
#define DEC_Insufficient_storage   0x00000010
#define DEC_Inexact   0x00000020
#define DEC_Invalid_context   0x00000040
#define DEC_Invalid_operation   0x00000080
#define DEC_Overflow   0x00000200
#define DEC_Clamped   0x00000400
#define DEC_Rounded   0x00000800
#define DEC_Subnormal   0x00001000
#define DEC_Underflow   0x00002000
#define DEC_IEEE_854_Division_by_zero   (DEC_Division_by_zero)
#define DEC_IEEE_854_Inexact   (DEC_Inexact)
#define DEC_IEEE_854_Invalid_operation
#define DEC_IEEE_854_Overflow   (DEC_Overflow)
#define DEC_IEEE_854_Underflow   (DEC_Underflow)
#define DEC_Errors
#define DEC_NaNs   DEC_IEEE_854_Invalid_operation
#define DEC_Information   (DEC_Clamped | DEC_Rounded | DEC_Inexact)
#define DEC_Condition_CS   "Conversion syntax"
#define DEC_Condition_DZ   "Division by zero"
#define DEC_Condition_DI   "Division impossible"
#define DEC_Condition_DU   "Division undefined"
#define DEC_Condition_IE   "Inexact"
#define DEC_Condition_IS   "Insufficient storage"
#define DEC_Condition_IC   "Invalid context"
#define DEC_Condition_IO   "Invalid operation"
#define DEC_Condition_OV   "Overflow"
#define DEC_Condition_PA   "Clamped"
#define DEC_Condition_RO   "Rounded"
#define DEC_Condition_SU   "Subnormal"
#define DEC_Condition_UN   "Underflow"
#define DEC_Condition_ZE   "No status"
#define DEC_Condition_MU   "Multiple status"
#define DEC_Condition_Length   21
#define DEC_INIT_BASE   0
#define DEC_INIT_DECIMAL32   32
#define DEC_INIT_DECIMAL64   64
#define DEC_INIT_DECIMAL128   128
#define DEC_INIT_DECSINGLE   DEC_INIT_DECIMAL32
#define DEC_INIT_DECDOUBLE   DEC_INIT_DECIMAL64
#define DEC_INIT_DECQUAD   DEC_INIT_DECIMAL128

Enumerations

enum  rounding {
  DEC_ROUND_CEILING, DEC_ROUND_UP, DEC_ROUND_HALF_UP, DEC_ROUND_HALF_EVEN,
  DEC_ROUND_HALF_DOWN, DEC_ROUND_DOWN, DEC_ROUND_FLOOR, DEC_ROUND_05UP,
  DEC_ROUND_MAX
}
enum  decClass {
  DEC_CLASS_SNAN, DEC_CLASS_QNAN, DEC_CLASS_NEG_INF, DEC_CLASS_NEG_NORMAL,
  DEC_CLASS_NEG_SUBNORMAL, DEC_CLASS_NEG_ZERO, DEC_CLASS_POS_ZERO, DEC_CLASS_POS_SUBNORMAL,
  DEC_CLASS_POS_NORMAL, DEC_CLASS_POS_INF
}

Functions

decContextdecContextClearStatus (decContext *, uint32_t)
decContextdecContextDefault (decContext *, int32_t)
enum rounding decContextGetRounding (decContext *)
uint32_t decContextGetStatus (decContext *)
decContextdecContextRestoreStatus (decContext *, uint32_t, uint32_t)
uint32_t decContextSaveStatus (decContext *, uint32_t)
decContextdecContextSetRounding (decContext *, enum rounding)
decContextdecContextSetStatus (decContext *, uint32_t)
decContextdecContextSetStatusFromString (decContext *, const char *)
decContextdecContextSetStatusFromStringQuiet (decContext *, const char *)
decContextdecContextSetStatusQuiet (decContext *, uint32_t)
const char * decContextStatusToString (const decContext *)
uint32_t decContextTestSavedStatus (uint32_t, uint32_t)
uint32_t decContextTestStatus (decContext *, uint32_t)
decContextdecContextZeroStatus (decContext *)

Define Documentation

#define DEC_Clamped   0x00000400

Definition at line 138 of file decContext.h.

#define DEC_ClassString_NI   "-Infinity"

Definition at line 112 of file decContext.h.

#define DEC_ClassString_NN   "-Normal"

Definition at line 113 of file decContext.h.

#define DEC_ClassString_NS   "-Subnormal"

Definition at line 114 of file decContext.h.

#define DEC_ClassString_NZ   "-Zero"

Definition at line 115 of file decContext.h.

#define DEC_ClassString_PI   "+Infinity"

Definition at line 119 of file decContext.h.

#define DEC_ClassString_PN   "+Normal"

Definition at line 118 of file decContext.h.

#define DEC_ClassString_PS   "+Subnormal"

Definition at line 117 of file decContext.h.

#define DEC_ClassString_PZ   "+Zero"

Definition at line 116 of file decContext.h.

#define DEC_ClassString_QN   "NaN"

Definition at line 111 of file decContext.h.

#define DEC_ClassString_SN   "sNaN"

Definition at line 110 of file decContext.h.

#define DEC_ClassString_UN   "Invalid"

Definition at line 120 of file decContext.h.

#define DEC_Condition_CS   "Conversion syntax"

Definition at line 196 of file decContext.h.

#define DEC_Condition_DI   "Division impossible"

Definition at line 198 of file decContext.h.

#define DEC_Condition_DU   "Division undefined"

Definition at line 199 of file decContext.h.

#define DEC_Condition_DZ   "Division by zero"

Definition at line 197 of file decContext.h.

#define DEC_Condition_IC   "Invalid context"

Definition at line 202 of file decContext.h.

#define DEC_Condition_IE   "Inexact"

Definition at line 200 of file decContext.h.

#define DEC_Condition_IO   "Invalid operation"

Definition at line 203 of file decContext.h.

#define DEC_Condition_IS   "Insufficient storage"

Definition at line 201 of file decContext.h.

#define DEC_Condition_Length   21

Definition at line 214 of file decContext.h.

#define DEC_Condition_MU   "Multiple status"

Definition at line 213 of file decContext.h.

#define DEC_Condition_OV   "Overflow"

Definition at line 207 of file decContext.h.

#define DEC_Condition_PA   "Clamped"

Definition at line 208 of file decContext.h.

#define DEC_Condition_RO   "Rounded"

Definition at line 209 of file decContext.h.

#define DEC_Condition_SU   "Subnormal"

Definition at line 210 of file decContext.h.

#define DEC_Condition_UN   "Underflow"

Definition at line 211 of file decContext.h.

#define DEC_Condition_ZE   "No status"

Definition at line 212 of file decContext.h.

#define DEC_Conversion_syntax   0x00000001

Definition at line 126 of file decContext.h.

#define DEC_Division_by_zero   0x00000002

Definition at line 127 of file decContext.h.

#define DEC_Division_impossible   0x00000004

Definition at line 128 of file decContext.h.

#define DEC_Division_undefined   0x00000008

Definition at line 129 of file decContext.h.

#define DEC_IEEE_854_Division_by_zero   (DEC_Division_by_zero)

Definition at line 165 of file decContext.h.

#define DEC_IEEE_854_Inexact   (DEC_Inexact)

Definition at line 169 of file decContext.h.

#define DEC_IEEE_854_Invalid_operation
#define DEC_IEEE_854_Overflow   (DEC_Overflow)

Definition at line 177 of file decContext.h.

#define DEC_IEEE_854_Underflow   (DEC_Underflow)

Definition at line 178 of file decContext.h.

#define DEC_Inexact   0x00000020

Definition at line 131 of file decContext.h.

#define DEC_Information   (DEC_Clamped | DEC_Rounded | DEC_Inexact)

Definition at line 192 of file decContext.h.

#define DEC_INIT_BASE   0

Definition at line 218 of file decContext.h.

#define DEC_INIT_DECDOUBLE   DEC_INIT_DECIMAL64

Definition at line 224 of file decContext.h.

#define DEC_INIT_DECIMAL128   128

Definition at line 221 of file decContext.h.

#define DEC_INIT_DECIMAL32   32

Definition at line 219 of file decContext.h.

#define DEC_INIT_DECIMAL64   64

Definition at line 220 of file decContext.h.

#define DEC_INIT_DECQUAD   DEC_INIT_DECIMAL128

Definition at line 225 of file decContext.h.

#define DEC_INIT_DECSINGLE   DEC_INIT_DECIMAL32

Definition at line 223 of file decContext.h.

#define DEC_Insufficient_storage   0x00000010

Definition at line 130 of file decContext.h.

#define DEC_Invalid_context   0x00000040

Definition at line 132 of file decContext.h.

#define DEC_Invalid_operation   0x00000080

Definition at line 133 of file decContext.h.

#define DEC_MAX_DIGITS   999999999

Definition at line 86 of file decContext.h.

#define DEC_MAX_EMAX   999999999

Definition at line 88 of file decContext.h.

#define DEC_MAX_EMIN   0

Definition at line 90 of file decContext.h.

#define DEC_MAX_MATH   999999

Definition at line 92 of file decContext.h.

#define DEC_MIN_DIGITS   1

Definition at line 87 of file decContext.h.

#define DEC_MIN_EMAX   0

Definition at line 89 of file decContext.h.

#define DEC_MIN_EMIN   -999999999

Definition at line 91 of file decContext.h.

#define DEC_NaNs   DEC_IEEE_854_Invalid_operation

Definition at line 185 of file decContext.h.

#define DEC_Overflow   0x00000200

Definition at line 137 of file decContext.h.

#define DEC_ROUND_DEFAULT   DEC_ROUND_HALF_EVEN;

Definition at line 70 of file decContext.h.

#define DEC_Rounded   0x00000800

Definition at line 139 of file decContext.h.

#define DEC_Subnormal   0x00001000

Definition at line 140 of file decContext.h.

#define DEC_Underflow   0x00002000

Definition at line 141 of file decContext.h.

#define DECCAUTHOR   "Mike Cowlishaw"

Definition at line 42 of file decContext.h.

#define DECCFULLNAME   "Decimal Context Descriptor"

Definition at line 41 of file decContext.h.

#define DECCNAME   "decContext"

Definition at line 40 of file decContext.h.

#define DECEXTFLAG   1

Definition at line 53 of file decContext.h.

#define DECSUBSET   0

Definition at line 56 of file decContext.h.


Enumeration Type Documentation

enum decClass
Enumerator:
DEC_CLASS_SNAN 
DEC_CLASS_QNAN 
DEC_CLASS_NEG_INF 
DEC_CLASS_NEG_NORMAL 
DEC_CLASS_NEG_SUBNORMAL 
DEC_CLASS_NEG_ZERO 
DEC_CLASS_POS_ZERO 
DEC_CLASS_POS_SUBNORMAL 
DEC_CLASS_POS_NORMAL 
DEC_CLASS_POS_INF 

Definition at line 97 of file decContext.h.

enum rounding
Enumerator:
DEC_ROUND_CEILING 
DEC_ROUND_UP 
DEC_ROUND_HALF_UP 
DEC_ROUND_HALF_EVEN 
DEC_ROUND_HALF_DOWN 
DEC_ROUND_DOWN 
DEC_ROUND_FLOOR 
DEC_ROUND_05UP 
DEC_ROUND_MAX 

Definition at line 59 of file decContext.h.


Function Documentation

decContext* decContextClearStatus ( decContext ,
uint32_t   
)
decContext* decContextDefault ( decContext ,
int32_t   
)
enum rounding decContextGetRounding ( decContext )
uint32_t decContextGetStatus ( decContext )
decContext* decContextRestoreStatus ( decContext ,
uint32_t  ,
uint32_t   
)
uint32_t decContextSaveStatus ( decContext ,
uint32_t   
)
decContext* decContextSetRounding ( decContext ,
enum  rounding 
)
decContext* decContextSetStatus ( decContext ,
uint32_t   
)
decContext* decContextSetStatusFromString ( decContext ,
const char *   
)
decContext* decContextSetStatusFromStringQuiet ( decContext ,
const char *   
)
decContext* decContextSetStatusQuiet ( decContext ,
uint32_t   
)
const char* decContextStatusToString ( const decContext )
uint32_t decContextTestSavedStatus ( uint32_t  ,
uint32_t   
)
uint32_t decContextTestStatus ( decContext ,
uint32_t   
)
decContext* decContextZeroStatus ( decContext )