View | Details | Raw Unified | Return to problem 2582
Collapse All | Expand All

(-)a/source/processes/hadronic/models/lend/History (+6 lines)
Lines 5-10 which **must** added in reverse chronological order (newest at the top). Link Here
5
It must **not** be used as a substitute for writing good git commit messages!
5
It must **not** be used as a substitute for writing good git commit messages!
6
6
7
-------------------------------------------------------------------------------
7
-------------------------------------------------------------------------------
8
9
## 2023-12-18 Gabriele Cosmo (hadr-lend-V11-02-00)
10
- Fixed compilation error on latest Windows VC++ compiler 17.8.3 for use of
11
  std::isfinite() in nf_specialFunctions_h and in nf_floatToShortestString().
12
  Addressing problem report #2582.
13
8
## 2023-11-03 Ben Morgan (hadr-lend-V11-01-02)
14
## 2023-11-03 Ben Morgan (hadr-lend-V11-01-02)
9
- Use "G4" prefixed version of EXPAT/ZLIB CMake variables
15
- Use "G4" prefixed version of EXPAT/ZLIB CMake variables
10
16
(-)a/source/processes/hadronic/models/lend/include/nf_specialFunctions.h (-3 / +2 lines)
Lines 8-19 Link Here
8
8
9
#include <math.h>
9
#include <math.h>
10
#include <float.h>
10
#include <float.h>
11
#include <nf_utilities.h>
11
12
#include "nf_utilities.h"
12
13
13
#ifdef WIN32
14
#ifdef WIN32
14
#define isfinite _finite
15
#define M_PI 3.141592653589793238463
15
#define M_PI 3.141592653589793238463
16
/*#define INFINITY (DBL_MAX+DBL_MAX)*/
17
#endif
16
#endif
18
17
19
#if defined __cplusplus
18
#if defined __cplusplus
(-)a/source/processes/hadronic/models/lend/src/nf_stringToDoubles.cc (-10 / +2 lines)
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(-)
(-)a/examples/extended/electromagnetic/TestEm7/History (-4 / +10 lines)
Lines 1-14 Link Here
1
# Example TestEm7 History
1
# Example TestEm7 History
2
2
3
See `CONTRIBUTING.rst` for details of **required** info/format for each entry,
3
See `CONTRIBUTING.rst` for details of **required** info/format for each entry,
4
which **must** added in reverse chronological order (newest at the top). It must **not**
4
which **must** added in reverse chronological order (newest at the top).
5
be used as a substitute for writing good git commit messages!
5
It must **not** be used as a substitute for writing good git commit messages!
6
6
7
-------------------------------------------------------------------------------
7
8
8
## 2023-04-17 V. Ivanchenko (testem7-V11-01-00)
9
## 2023-12-18 Gabriele Cosmo (testem7-V11-02-00)
10
- Fixed compilation error on latest Windows VC++ compiler 17.8.3 for use of
11
  std::isfinite() and std::isnan() in c2_function.hh.
12
  Addressing problem report #2582.
13
14
## 2023-04-17 Vladimir Ivanchenko (testem7-V11-01-00)
9
- added extra macro for test muon dEdx and Range
15
- added extra macro for test muon dEdx and Range
10
16
11
## 2022-10-18 V. Ivanchenko (testem7-V11-00-01)
17
## 2022-10-18 Vladimir Ivanchenko (testem7-V11-00-01)
12
- Make local EM physics the same as EM physics option3
18
- Make local EM physics the same as EM physics option3
13
  with G4IonParameterizedModel
19
  with G4IonParameterizedModel
14
20
(-)a/examples/extended/electromagnetic/TestEm7/include/c2_function.hh (-5 / +2 lines)
Lines 44-55 Link Here
44
// this came from the msdn website, so it should be right...
44
// this came from the msdn website, so it should be right...
45
#ifdef _MSC_VER
45
#ifdef _MSC_VER
46
#define _USE_MATH_DEFINES
46
#define _USE_MATH_DEFINES
47
#define c2_isnan _isnan
47
#endif
48
#define c2_isfinite _finite
48
49
#else
50
#define c2_isnan std::isnan
49
#define c2_isnan std::isnan
51
#define c2_isfinite std::isfinite
50
#define c2_isfinite std::isfinite
52
#endif
53
51
54
#include <cmath>
52
#include <cmath>
55
#include <vector>
53
#include <vector>
56
- 

Return to problem 2582