Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
nf_utilities.h
Go to the documentation of this file.
1/*
2# <<BEGIN-copyright>>
3# <<END-copyright>>
4*/
5
6#ifndef nf_utilities_h_included
7#define nf_utilities_h_included
8
9#include <stdio.h>
10#include <stdint.h>
11#include <string.h>
12#include <stdarg.h>
13
14#define NUMERICALFUNCTIONS_SVN_VERSION 110+
15
16#define nf_floatToShortestString_trimZeros ( 1 << 0 )
17#define nf_floatToShortestString_keepPeriod ( 1 << 1 )
18#define nf_floatToShortestString_includeSign ( 1 << 2 )
19
20#if defined __cplusplus
21 extern "C" {
22 namespace GIDI {
23#endif
24
31
32/*
33* Functions in nf_utilities.c
34*/
35double nfu_getNAN( void );
36int nfu_isNAN( double d );
37double nfu_getInfinity( double sign );
38const char *nfu_statusMessage( nfu_status status );
39void nfu_setMemoryDebugMode( int mode );
40void *nfu_malloc( size_t size );
41void *nfu_calloc( size_t size, size_t n );
42void *nfu_realloc( size_t size, void *old );
43void *nfu_free( void *p );
44void nfu_printMsg( char *fmt, ... );
45void nfu_printErrorMsg( char *fmt, ... );
46
47/*
48* Functions in nf_stringToDoubles.c
49*/
50nfu_status nfu_stringToListOfDoubles( char const *str, int64_t *numberConverted, double **doublePtr, char **endCharacter );
51char *nf_floatToShortestString( double value, int significantDigits, int favorEFormBy, int flags );
52
53#if defined __cplusplus
54 }
55 }
56#endif
57
58#endif /* End of nf_utilities_h_included. */
void nfu_printErrorMsg(char *fmt,...)
int nfu_isNAN(double d)
Definition: nf_utilities.cc:61
nfu_status_e
Definition: nf_utilities.h:25
@ nfu_unsupportedInterpolation
Definition: nf_utilities.h:28
@ nfu_domainsNotMutual
Definition: nf_utilities.h:28
@ nfu_XNotAscending
Definition: nf_utilities.h:26
@ nfu_invalidInterpolation
Definition: nf_utilities.h:27
@ nfu_Okay
Definition: nf_utilities.h:25
@ nfu_badSelf
Definition: nf_utilities.h:27
@ nfu_oddNumberOfValues
Definition: nf_utilities.h:30
@ nfu_mallocError
Definition: nf_utilities.h:25
@ nfu_insufficientMemory
Definition: nf_utilities.h:25
@ nfu_badNorm
Definition: nf_utilities.h:29
@ nfu_badIntegrationInput
Definition: nf_utilities.h:29
@ nfu_XOutsideDomain
Definition: nf_utilities.h:26
@ nfu_badIndex
Definition: nf_utilities.h:26
@ nfu_failedToConverge
Definition: nf_utilities.h:30
@ nfu_tooFewPoints
Definition: nf_utilities.h:28
@ nfu_unsupportedInterpolationConversion
Definition: nf_utilities.h:27
@ nfu_badInput
Definition: nf_utilities.h:29
@ nfu_badIndexForX
Definition: nf_utilities.h:26
@ nfu_empty
Definition: nf_utilities.h:28
@ nfu_divByZero
Definition: nf_utilities.h:27
@ nfu_otherInterpolation
Definition: nf_utilities.h:29
void nfu_setMemoryDebugMode(int mode)
enum nfu_status_e nfu_status
void * nfu_free(void *p)
void nfu_printMsg(char *fmt,...)
void * nfu_realloc(size_t size, void *old)
void * nfu_calloc(size_t size, size_t n)
double nfu_getInfinity(double sign)
Definition: nf_utilities.cc:68
nfu_status nfu_stringToListOfDoubles(char const *str, int64_t *numberConverted, double **doublePtr, char **endCharacter)
void * nfu_malloc(size_t size)
const char * nfu_statusMessage(nfu_status status)
Definition: nf_utilities.cc:76
double nfu_getNAN(void)
Definition: nf_utilities.cc:54
char * nf_floatToShortestString(double value, int significantDigits, int favorEFormBy, int flags)