P
PS
I have a function with a division by a global const variable n defined
in a seperate header file.
How can I handle the case when this variable is null ?
Patrick
// myconstants.h
double const N = 100.;
double const x = 0.; // 1.0
double const n = x*N;
double const c = 3.9;
// file.cpp
double f(double E) {
double y = 0.;
if (n> 0)
y = 73. + std::log(E/c/n); // line 13
return y;
}
file.cpp: In function `double f(double)':
file.cpp:13: warning: division by zero in ``rdiv_expr' not supported by
dump_expr
file.cpp:13: sorry, unimplemented: <expression error> / 0.'
in a seperate header file.
How can I handle the case when this variable is null ?
Patrick
// myconstants.h
double const N = 100.;
double const x = 0.; // 1.0
double const n = x*N;
double const c = 3.9;
// file.cpp
double f(double E) {
double y = 0.;
if (n> 0)
y = 73. + std::log(E/c/n); // line 13
return y;
}
file.cpp: In function `double f(double)':
file.cpp:13: warning: division by zero in ``rdiv_expr' not supported by
dump_expr
file.cpp:13: sorry, unimplemented: <expression error> / 0.'