Board index » cppbuilder » log : Power overflow exp : Power overflow

log : Power overflow exp : Power overflow


2004-12-17 07:16:51 PM
cppbuilder80
Hi,
I being thrown the following message box during run time of my application,
log: Power Overflow
exp: Power Overflow
What are the reason for these overflow error and how to fix them.
thank you,]
Johnson Abraham
 
 

Re:log : Power overflow exp : Power overflow

Johnson Abraham wrote:
Quote
I being thrown the following message box during run time of my application,

log: Power Overflow
exp: Power Overflow

What are the reason for these overflow error and how to fix them.
Probably your code called the functions log() and exp() with
parameters that would cause for a value that can not be hold
in a double.
from math.h
typedef enum
{
DOMAIN = 1, /* argument domain error -- log (-1) */
SING, /* argument singularity -- pow (0,-2)) */
OVERFLOW, /* overflow range error -- exp (1000) */
UNDERFLOW, /* underflow range error -- exp (-1000) */
TLOSS, /* total loss of significance -- sin(10e70) */
PLOSS, /* partial loss of signif. -- not used */
STACKFAULT /* floating point unit stack overflow */
} _mexcep;
double _RTLENTRY _EXPFUNC log (double __x);
double _RTLENTRY _EXPFUNC exp (double __x);
Hans.
 

Re:log : Power overflow exp : Power overflow

Hans Galema wrote:
Quote
Johnson Abraham wrote:

>I being thrown the following message box during run time of my
>application,
>
>log: Power Overflow
>exp: Power Overflow
>
>What are the reason for these overflow error and how to fix them.


Probably your code called the functions log() and exp() with
parameters that would cause for a value that can not be hold
in a double.

from math.h

typedef enum
{
DOMAIN = 1, /* argument domain error -- log (-1) */
SING, /* argument singularity -- pow (0,-2)) */
OVERFLOW, /* overflow range error -- exp (1000) */
UNDERFLOW, /* underflow range error -- exp (-1000) */
TLOSS, /* total loss of significance -- sin(10e70) */
PLOSS, /* partial loss of signif. -- not used */
STACKFAULT /* floating point unit stack overflow */
} _mexcep;

double _RTLENTRY _EXPFUNC log (double __x);
double _RTLENTRY _EXPFUNC exp (double __x);

Hans.
Hi,
Thanks for ur reply,
I tried to catch the overflow exception but that doesnt prevent the
dialog box from appearing. I want to ignore these overflow exception and
continue with the execution of the code. Please can you help me how to
fix this problem.
thank you,
Johnson Abraham
 

{smallsort}