<commit_before>/*******************************************************************************
*                                                                              *
*      File fp_private.h,                                                      *
*      All pack 4 dependencies for the MathLib elems plus some defines used    *
*      throughout MathLib.                                                     *
*                                                                              *
*      Copyright  1991 Apple Computer, Inc.  All rights reserved.             *
*                                                                              *
*      Written by <NAME>, started on October 1991,                       *
*                                                                              *
*      W A R N I N G:  This routine expects a 64 bit double model.             *
*                                                                              *
*******************************************************************************/

#define      NoException            0

/*******************************************************************************
*                              Values of constants.                            *
*******************************************************************************/

//#define    SgnMask            0x8000
#define      dSgnMask           0x80000000
#define      sSgnMask           0x7FFFFFFF

//#define    ExpMask            0x7FFF
#define      dExpMask           0x7FF00000
#define      sExpMask           0xFF000000

                                          /* according to rounding BIG & SMALL are:  */
#define      BIG               1.1e+300   /* used to deliver  or largest number,   */
#define      SMALL             1.1e-300   /* used to deliver 0 or smallest number.  */
#define      InfExp            0x7FF
#define      dMaxExp           0x7FF00000

#define      MaxExpP1          1024
#define      MaxExp            1023

#define      DenormLimit       -52

//#define    ManMask           0x80000000
#define      dManMask          0x00080000

//#define    IsItDenorm         0x80000000
#define      dIsItDenorm        0x00080000

//#define    xIsItSNaN          0x40000000
#define      dIsItSNaN          0x00080000

#define      dHighMan           0x000FFFFF
#define      dFirstBitSet       0x00080000
#define      BIAS               0x3FF

//#define    GetSign            0x8000
#define      dGetSign           0x80000000
#define      sGetSign           0x80000000

//#define    Infinity(x)       ( x.hex.exponent & ExpMask ) == ExpMask
#define      dInfinity(x)      ( x.hex.high & dExpMask ) == dExpMask
#define      sInfinity(x)      ( ( x.hexsgl << 1 ) & sExpMask ) == sExpMask      

//#define    Exponent(x)       x.hex.exponent & ExpMask
#define      dExponent(x)      x.hex.high & dExpMask
#define      sExponent(x)      ( ( x.hexsgl << 1 ) & sExpMask )

#define      sZero(x)          ( x.hexsgl & sSgnMask ) == 0 
//#define    Sign(x)           ( x.hex.exponent & SgnMask ) == SgnMask

/*******************************************************************************
*                        Types used in the auxiliary functions.                *
*******************************************************************************/

typedef struct                   /*      Hex representation of a double.      */
      {
#if defined(__BIG_ENDIAN__)
      u_int32_t high;
      u_int32_t low;
#else
      u_int32_t low;
      u_int32_t high;
#endif
      } dHexParts;

typedef union
      {
      unsigned char byties[8];
      double dbl;
      } DblInHex;
<commit_msg>Fixup build problem on powerpc<commit_after>/*******************************************************************************
*                                                                              *
*      File fp_private.h,                                                      *
*      All pack 4 dependencies for the MathLib elems plus some defines used    *
*      throughout MathLib.                                                     *
*                                                                              *
*      Copyright  1991 Apple Computer, Inc.  All rights reserved.             *
*                                                                              *
*      Written by <NAME>, started on October 1991,                       *
*                                                                              *
*      W A R N I N G:  This routine expects a 64 bit double model.             *
*                                                                              *
*******************************************************************************/

#define      NoException            0

/*******************************************************************************
*                              Values of constants.                            *
*******************************************************************************/

//#define    SgnMask            0x8000
#define      dSgnMask           0x80000000
#define      sSgnMask           0x7FFFFFFF

//#define    ExpMask            0x7FFF
#define      dExpMask           0x7FF00000
#define      sExpMask           0xFF000000

                                          /* according to rounding BIG & SMALL are:  */
#define      BIG               1.1e+300   /* used to deliver  or largest number,   */
#define      SMALL             1.1e-300   /* used to deliver 0 or smallest number.  */
#define      InfExp            0x7FF
#define      dMaxExp           0x7FF00000

#define      MaxExpP1          1024
#define      MaxExp            1023

#define      DenormLimit       -52

//#define    ManMask           0x80000000
#define      dManMask          0x00080000

//#define    IsItDenorm         0x80000000
#define      dIsItDenorm        0x00080000

//#define    xIsItSNaN          0x40000000
#define      dIsItSNaN          0x00080000

#define      dHighMan           0x000FFFFF
#define      dFirstBitSet       0x00080000
#define      BIAS               0x3FF

//#define    GetSign            0x8000
#define      dGetSign           0x80000000
#define      sGetSign           0x80000000

//#define    Infinity(x)       ( x.hex.exponent & ExpMask ) == ExpMask
#define      dInfinity(x)      ( x.hex.high & dExpMask ) == dExpMask
#define      sInfinity(x)      ( ( x.hexsgl << 1 ) & sExpMask ) == sExpMask      

//#define    Exponent(x)       x.hex.exponent & ExpMask
#define      dExponent(x)      x.hex.high & dExpMask
#define      sExponent(x)      ( ( x.hexsgl << 1 ) & sExpMask )

#define      sZero(x)          ( x.hexsgl & sSgnMask ) == 0 
//#define    Sign(x)           ( x.hex.exponent & SgnMask ) == SgnMask

/*******************************************************************************
*                        Types used in the auxiliary functions.                *
*******************************************************************************/

#include <stdint.h>

typedef struct                   /*      Hex representation of a double.      */
      {
#if defined(__BIG_ENDIAN__)
      uint32_t high;
      uint32_t low;
#else
      uint32_t low;
      uint32_t high;
#endif
      } dHexParts;

typedef union
      {
      unsigned char byties[8];
      double dbl;
      } DblInHex;

{'fraction_non_alphanumeric': 0.1869742198100407, 'fraction_numerical': 0.0485753052917232, 'mean_word_length': 1.2343134283116095, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 14, 'word_list_counts': {'cursed_substrings.json': 42, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4847108', 'n_tokens_mistral': 1997, 'n_tokens_neox': 1690, 'n_words': 446}