|
Lines 4-20
Link Here
|
| 4 |
*/ |
4 |
*/ |
| 5 |
|
5 |
|
| 6 |
#include <stdlib.h> |
6 |
#include <stdlib.h> |
|
|
7 |
#include <float.h> |
| 7 |
#include <cmath> |
8 |
#include <cmath> |
| 8 |
|
9 |
|
| 9 |
#include "nf_utilities.h" |
10 |
#include "nf_utilities.h" |
| 10 |
|
11 |
|
| 11 |
#ifdef WIN32 |
|
|
| 12 |
#include <float.h> |
| 13 |
#define isfinite _finite |
| 14 |
#else |
| 15 |
#define isfinite std::isfinite |
| 16 |
#endif |
| 17 |
|
| 18 |
#if defined __cplusplus |
12 |
#if defined __cplusplus |
| 19 |
namespace GIDI { |
13 |
namespace GIDI { |
| 20 |
using namespace GIDI; |
14 |
using namespace GIDI; |
|
Lines 71-77
char *nf_floatToShortestString( double value, int significantDigits, int favorEF
Link Here
|
| 71 |
|
65 |
|
| 72 |
if( flags & nf_floatToShortestString_includeSign ) sign = "+"; |
66 |
if( flags & nf_floatToShortestString_includeSign ) sign = "+"; |
| 73 |
|
67 |
|
| 74 |
if( !isfinite( value ) ) { |
68 |
if( !std::isfinite( value ) ) { |
| 75 |
snprintf( Fmt, sizeof Fmt, "%%%sf", sign ); |
69 |
snprintf( Fmt, sizeof Fmt, "%%%sf", sign ); |
| 76 |
snprintf( Str_e, sizeof Str_e, Fmt, value ); |
70 |
snprintf( Str_e, sizeof Str_e, Fmt, value ); |
| 77 |
return( strdup( Str_e ) ); |
71 |
return( strdup( Str_e ) ); |
| 78 |
- |
|
|
| 79 |
Windows compiler... |
72 |
Windows compiler... |
| 80 |
-- |
|
|
| 81 |
examples/extended/electromagnetic/TestEm7/History | 14 ++++++++++---- |
73 |
examples/extended/electromagnetic/TestEm7/History | 14 ++++++++++---- |
| 82 |
.../electromagnetic/TestEm7/include/c2_function.hh | 6 ++---- |
74 |
.../electromagnetic/TestEm7/include/c2_function.hh | 6 ++---- |
| 83 |
2 files changed, 12 insertions(+), 8 deletions(-) |
75 |
2 files changed, 12 insertions(+), 8 deletions(-) |