- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using ifc on linux suse8.2 in my code, i get the following error while calculating log of a number (I checked, its non-zero). I am using the -r8 option while compiling. DOes anyone encounter similar problems or knows a solution? I tried a small test program with the log function and it works fine.
Program received signal SIGFPE, Arithmetic exception.
0x400edf1c in __ieee754_log () from /lib/libm.so.6
Program received signal SIGFPE, Arithmetic exception.
0x400edf1c in __ieee754_log () from /lib/libm.so.6
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am also getting another similar error as shown below. It seems that the math library is not able to return a value of common sin, log etc functions in double precision. Does anyone know more about this?
Program received signal SIGFPE, Arithmetic exception.
0x0820bef0 in __libm_sin80 ()
Program received signal SIGFPE, Arithmetic exception.
0x0820bef0 in __libm_sin80 ()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Without a sample program, it's hard to be too helpful. Can you post or attach a short program that demonstrates the problem?
Steve
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here is a portion of the sample program. It exits at the line where it tries to calculate the sine. (and would do the same for cos as well as log, further down in the program). I have checked the values of the variables in prev lines (rps, pi2,thetr, eom etc) to make sure that they arent NaN or zero..and they arent.
if(ncyc.gt.0)then
zpold=zpistn
endif
eom=rps*pi2
thetr=eom*t+atdc*pio180
hrs=0.5*stroke*sin(thetr)
sqr=sqrt(conrod**2-hrs**2)
del=0.5*stroke*(1.0-cos(thetr))+conrod-sqr
zpistn=stroke-del+zpbot
wpistn=-hrs*(1.0+0.5*stroke*cos(thetr)/sqr)*eom
if(ncyc.gt.0) wpistn=(zpistn-zpold)*rdt
dtwp=dt*wpistn
crank=atdc+rps*t*360.0
if(ncyc.gt.0)then
zpold=zpistn
endif
eom=rps*pi2
thetr=eom*t+atdc*pio180
hrs=0.5*stroke*sin(thetr)
sqr=sqrt(conrod**2-hrs**2)
del=0.5*stroke*(1.0-cos(thetr))+conrod-sqr
zpistn=stroke-del+zpbot
wpistn=-hrs*(1.0+0.5*stroke*cos(thetr)/sqr)*eom
if(ncyc.gt.0) wpistn=(zpistn-zpold)*rdt
dtwp=dt*wpistn
crank=atdc+rps*t*360.0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here is a portion of the sample program. It exits at the line where it tries to calculate the sine. (and would do the same for cos as well as log, further down in the program). I have checked the values of the variables in prev lines (rps, pi2,thetr, eom etc) to make sure that they arent NaN or zero..and they arent.
if(ncyc.gt.0)then
zpold=zpistn
endif
eom=rps*pi2
thetr=eom*t+atdc*pio180
hrs=0.5*stroke*sin(thetr)
sqr=sqrt(conrod**2-hrs**2)
del=0.5*stroke*(1.0-cos(thetr))+conrod-sqr
zpistn=stroke-del+zpbot
wpistn=-hrs*(1.0+0.5*stroke*cos(thetr)/sqr)*eom
if(ncyc.gt.0) wpistn=(zpistn-zpold)*rdt
dtwp=dt*wpistn
crank=atdc+rps*t*360.0
if(ncyc.gt.0)then
zpold=zpistn
endif
eom=rps*pi2
thetr=eom*t+atdc*pio180
hrs=0.5*stroke*sin(thetr)
sqr=sqrt(conrod**2-hrs**2)
del=0.5*stroke*(1.0-cos(thetr))+conrod-sqr
zpistn=stroke-del+zpbot
wpistn=-hrs*(1.0+0.5*stroke*cos(thetr)/sqr)*eom
if(ncyc.gt.0) wpistn=(zpistn-zpold)*rdt
dtwp=dt*wpistn
crank=atdc+rps*t*360.0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I havent been succesful in resolving this problem. Has any one encoutered something smilar?

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page