Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:59:31

0001 /*
0002 # <<BEGIN-copyright>>
0003 # <<END-copyright>>
0004 */
0005 
0006 #ifndef nf_utilities_h_included
0007 #define nf_utilities_h_included
0008 
0009 #include <stdio.h>
0010 #include <stdint.h>
0011 #include <string.h>
0012 #include <stdarg.h>
0013 
0014 #define NUMERICALFUNCTIONS_SVN_VERSION 110+
0015 
0016 #define nf_floatToShortestString_trimZeros   ( 1 << 0 )
0017 #define nf_floatToShortestString_keepPeriod  ( 1 << 1 )
0018 #define nf_floatToShortestString_includeSign ( 1 << 2 )
0019 
0020 #if defined __cplusplus
0021     extern "C" {
0022     namespace GIDI {
0023 #endif
0024 
0025 typedef enum nfu_status_e {         nfu_Okay,           nfu_mallocError,            nfu_insufficientMemory,     
0026     nfu_badIndex,                   nfu_XNotAscending,  nfu_badIndexForX,           nfu_XOutsideDomain,             
0027     nfu_invalidInterpolation,       nfu_badSelf,        nfu_divByZero,              nfu_unsupportedInterpolationConversion, 
0028     nfu_unsupportedInterpolation,   nfu_empty,          nfu_tooFewPoints,           nfu_domainsNotMutual,                   
0029     nfu_badInput,                   nfu_badNorm,        nfu_badIntegrationInput,    nfu_otherInterpolation,
0030     nfu_failedToConverge,           nfu_oddNumberOfValues } nfu_status;
0031 
0032 /*
0033 * Functions in nf_utilities.c
0034 */
0035 double nfu_getNAN( void );
0036 int nfu_isNAN( double d );
0037 double nfu_getInfinity( double sign );
0038 const char *nfu_statusMessage( nfu_status status );
0039 void nfu_setMemoryDebugMode( int mode );
0040 void *nfu_malloc( size_t size );
0041 void *nfu_calloc( size_t size, size_t n );
0042 void *nfu_realloc( size_t size, void *old );
0043 void *nfu_free( void *p );
0044 void nfu_printMsg( char *fmt, ... );
0045 void nfu_printErrorMsg( char *fmt, ... );
0046 
0047 /*
0048 * Functions in nf_stringToDoubles.c
0049 */
0050 nfu_status nfu_stringToListOfDoubles( char const *str, int64_t *numberConverted, double **doublePtr, char **endCharacter );
0051 char *nf_floatToShortestString( double value, int significantDigits, int favorEFormBy, int flags );
0052 
0053 #if defined __cplusplus
0054     }
0055     }
0056 #endif
0057 
0058 #endif          /* End of nf_utilities_h_included. */