<commit_before>#ifndef RTAPI_MATH_H
#define RTAPI_MATH_H

#include <float.h>  /* DBL_MAX and other FP goodies */

#if defined(RTAPI) && !defined(SIM)
extern double sin(double);
extern double cos(double);
extern double tan(double);
extern double sqrt(double);
extern double fabs(double);
extern double atan(double);
extern double atan2(double, double);
extern double asin(double);
extern double acos(double);
extern double pow(double, double);

extern double round(double);
extern double ceil(double);
extern double floor(double);

#define frexp(p,q) __builtin_frexp((p),(q))
#define isinf(x) __builtin_isinf((x))
#define isnan(x) __builtin_isnan((x))
#define signbit(x) __builtin_signbit((x))

#define M_PIl		3.1415926535897932384626433832795029L  /* pi */
#ifndef M_PI
#define M_PI		3.1415926535897932384626433832795029   /* pi */
#endif

#ifndef __GNUC_PREREQ
/* Convenience macro to test the versions of glibc and gcc. */
/*  taken from include/features.h */
#if defined __GNUC__ && defined __GNUC_MINOR__
# define __GNUC_PREREQ(maj, min) \
	((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
#else
# define __GNUC_PREREQ(maj, min) 0
#endif
#endif /* __GNUC_PREREQ */


#ifdef __i386__
#include "rtapi_math_i386.h"
#endif

#else
#include <math.h>
#endif

#endif<commit_msg>rtapi_math: implement isinf for pre-gcc4.4 systems<commit_after>#ifndef RTAPI_MATH_H
#define RTAPI_MATH_H

#include <float.h>  /* DBL_MAX and other FP goodies */

#if defined(RTAPI) && !defined(SIM)
extern double sin(double);
extern double cos(double);
extern double tan(double);
extern double sqrt(double);
extern double fabs(double);
extern double atan(double);
extern double atan2(double, double);
extern double asin(double);
extern double acos(double);
extern double pow(double, double);

extern double round(double);
extern double ceil(double);
extern double floor(double);

#define frexp(p,q) __builtin_frexp((p),(q))
#define isnan(x) __builtin_isnan((x))
#define signbit(x) __builtin_signbit((x))

#define M_PIl		3.1415926535897932384626433832795029L  /* pi */
#ifndef M_PI
#define M_PI		3.1415926535897932384626433832795029   /* pi */
#endif

#ifndef __GNUC_PREREQ
/* Convenience macro to test the versions of glibc and gcc. */
/*  taken from include/features.h */
#if defined __GNUC__ && defined __GNUC_MINOR__
# define __GNUC_PREREQ(maj, min) \
	((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
#else
# define __GNUC_PREREQ(maj, min) 0
#endif
#endif /* __GNUC_PREREQ */

#if __GNUC_PREREQ(4,4)
#define isinf(x) __builtin_isinf((x))
#else
#define isinf(x) ({ double v=((x)); !isnan(v) && isnan(v-v); })
#endif

#ifdef __i386__
#include "rtapi_math_i386.h"
#endif

#else
#include <math.h>
#endif

#endif
{'fraction_non_alphanumeric': 0.13695090439276486, 'fraction_numerical': 0.06201550387596899, 'mean_word_length': 5.913265306122449, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3673972', 'n_tokens_mistral': 1193, 'n_tokens_neox': 1049, 'n_words': 264}