P
Parachute
Using Borland Builder 6, I get numerical overflow when running a small
programme without CodeGuard ("exp: OVERFLOW error"). The programme does
not give any error messages when CodeGuard is activated during the run.
The equation that causes overflow uses the exp-function, but given and
resulting values are not very large (and are written in
double-variables anyway). So why does it seem as if there were not
enough space in the buffer? And why doesn't the problem occur, when the
same programme is run with an activated CodeGuard?
The equation looks like this (except int delta_t: all variables
double):
new_amount = old_amount * ( 1 - ( A * exp(K1* delta_t) + (1-A) *
exp(K2* delta_t) ) );
programme without CodeGuard ("exp: OVERFLOW error"). The programme does
not give any error messages when CodeGuard is activated during the run.
The equation that causes overflow uses the exp-function, but given and
resulting values are not very large (and are written in
double-variables anyway). So why does it seem as if there were not
enough space in the buffer? And why doesn't the problem occur, when the
same programme is run with an activated CodeGuard?
The equation looks like this (except int delta_t: all variables
double):
new_amount = old_amount * ( 1 - ( A * exp(K1* delta_t) + (1-A) *
exp(K2* delta_t) ) );