/**************************************************************************/
/*                                                                        */
/*                                 Sources                                */
/*                                from  the                               */
/*                           XSC SOFTWARE PACKAGE                         */
/*                                                                        */
/*                Copyright (c) 1997 University of Karlsruhe              */
/*                     Institute for Appl. Mathematics                    */
/*                                                                        */
/* This program is free software for non-commercial use. For details, see */
/* the file LICENSE.XSC, distributed with this software package.          */
/*                                                                        */
/* This program is distributed WITHOUT ANY WARRANTY. For details, see the */
/* file LICENSE.XSC, distributed with this software package.              */
/*                                                                        */
/**************************************************************************/

/* RCS $Id: d_defs.h,v 1.3 1997/09/25 16:43:04 ae59 Exp $ */
/*
$Log: d_defs.h,v $
 * Revision 1.3  1997/09/25  16:43:04  ae59
 * Copyright-message
 *
 * Revision 1.2  1994/11/15  11:05:09  ae59
 * increment A_LENGTH in case of DEC_ARITh
 *
 * Revision 1.1  1994/01/27  13:22:02  ae59
 * Put under RCS control
 *
 */
/****************************************************************/
/*                                                              */
/*      Filename        : d_defs.h                              */
/*                                                              */
/*      Date            : 1990-10-08                            */
/*      1990-10-08 : A_MZERO, A_PZERO defined                   */
/****************************************************************/

/*    Offset to 'a_btyp' array holding position of first        */
/*    non-zero 'a_btyp'-digit.                                  */
#define A_BEGIN                 0

/*    Offset to 'a_btyp' array holding position of last         */
/*    non-zero 'a_btyp'-digit.                                  */
#define A_END                   1

/*    Offset to 'a_btyp' array holding sign.                    */
#define A_SIGN                  2

/*    Offset to 'a_btyp' array holding status.                  */
#define A_STATUS                3

/*    Offset to 'a_btyp' array holding guard digits.            */
#define A_LOWNAN                4

/*    Offset to 'a_btyp' array holding guard digits.            */
#define A_START                 5

/*    Status information : dotprecision is temporary result.    */
#define A_TEMPORARY             ((a_btyp)0x00000001)

/*    Status information : reserved for special temporaries.    */
/*    (Mask introduced for purposes in CSC-Project)             */
#define A_OWNTEMPORARY          ((a_btyp)0x00000002)

/*    Status information : value is +infinity.                  */
#define A_PINFINITY             ((a_btyp)0x00000004)

/*    Status information : value is -infinity.                  */
#define A_MINFINITY             ((a_btyp)0x00000008)

/*    Status information : value is a quiet NaN.                */
#define A_QUIETNAN              ((a_btyp)0x00000010)

/*    Status information : value is not a sum of -zero          */
#define A_MZERO                 ((a_btyp)0x00000020)

/*    Status information : value is not a sum of +zero          */
#define A_PZERO                 ((a_btyp)0x00000040)

/*    Number of guard digits (bits).                            */
#define A_GUARD_BITS            64

/*    Number of bits used for fractional part.                  */
#define A_F_BITS                (-2*EXPO_MIN+2*MANTL-2)

/*    Number of bits used for integer part.                     */
#define A_I_BITS                (A_GUARD_BITS+2*EXPO_MAX+1)

/*    Number of 'a_btyp' values used for fraction part.         */
#define A_F_LENGTH              (A_F_BITS/B_LENGTH+1)

/*    Number of 'a_btyp' values used for integer part.          */
#define A_I_LENGTH              (A_I_BITS/B_LENGTH+1)

/*    Number of 'a_btyp' values used for dotprecision value.    */
#ifndef DEC_ARITH
#define A_LENGTH                (A_I_LENGTH+A_F_LENGTH+A_START)
#else
#define A_LENGTH                (A_I_LENGTH+A_F_LENGTH+A_START+1)
#endif

/*    Offset to least significant 'a_btyp'-digit of integer     */
/*    part.                                                     */
#define A_D_P                   (A_START+A_I_LENGTH-1)

/*    Offset to least significant 'a_btyp' digit of integer     */
/*    part if dotprecision is interpreted as character array.   */
#define B_D_P                   (A_D_P*sizeof(a_btyp))

/*    Number of characters which can be stored in a             */
/*    dotprecision value.                                       */
#define BUFFERSIZE              (A_LENGTH*sizeof(a_btyp))

/*    Value of not allocated dotprecision variable.             */
#define NO_DOTPRECISION         ((dotprecision)NULL)
