[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: floating point exceptions: Linux kernel feature or bug?



Hi,

	Your message about the floating point exception sounds related
to a problem I have.  For me it appears to be an underflow.  Keep me
posted if you find a solution.

Thank you,
aaron

I am running Persistance of Vision ray tracer (povray) compiled on

[amj@testnode branch]$ uname -a
Linux testnode.math.ukans.edu 2.1.96 #2 SMP Thu Apr 16 19:05:54 CDT 1998 alpha unknown
[amj@testnode branch]$ gcc --version
2.7.2.3

This code generates a picture as output using Intel-Linux and IRIX 6.3

[amj@testnode branch]$ gdb ~/bin/povray.debug
(gdb) run +L/home/amj/thesis/povray3/include +Imov +KFF1 +FP
Starting program: /home/amj/bin/povray.debug +L/home/amj/thesis/povray3/include +Imov +KFF1 +FP

 <irrelevant povray output deleted>

Parsing...........

Creating bounding slabs.
Scene contains 1 frame level objects; 0 infinite.

 00:00:00 so far, Rendering frame 1, going to 1.

Rendering...
Program received signal SIGFPE, Arithmetic exception.

0x120045dcc in do_specular (Finish=0x120211ce0, Light_Source_Ray=0x11fffec38, 
    REye=0x11ffff5d8, Layer_Normal=0x11ffff6e0, Colour=0x11ffff758, 
    Light_Colour=0x11ffff5f0, Layer_Pigment_Colour=0x11ffff710)
    at ../lighting.c:1688
1688          Intensity = Finish->Specular * pow(Cos_Angle_Of_Incidence, Finish->Roughness);
(gdb) list 1680
1675
1676      VHalf(Halfway, REye, Light_Source_Ray->Direction);
1677
1678      VLength(Halfway_Length, Halfway);
1679
1680      if (Halfway_Length > 0.0)
1681      {
1682        VDot(Cos_Angle_Of_Incidence, Halfway, Layer_Normal);
1683
1684        Cos_Angle_Of_Incidence /= Halfway_Length;
(gdb) 
1685
1686        if (Cos_Angle_Of_Incidence > 0.0)
1687        {
1688          Intensity = Finish->Specular * pow(Cos_Angle_Of_Incidence, Finish->Roughness);
1689
1690          if (Finish->Metallic > 0.0)
1691          {
1692            /*
1693             * Calculate the reflected color by interpolating between
1694             * the light source color and the surface color according
(gdb) p Halfway_Length
$1 = 0.7136288436493563
(gdb) p Cos_Angle_Of_Incidence
$2 = 0.49138409073828376
(gdb) p Intensity
$3 = 2.3872427115046736e-314
(gdb) 

Don't know the gdb syntax to print values within structure Finish->  

------------------------------------------------------------------------------
End of output while not running inside gdb:
------------------------------------------------------------------------------
Parsing...........

Creating bounding slabs.
Scene contains 1 frame level objects; 0 infinite.

 00:00:01 so far, Rendering frame 1, going to 1.
make: *** [frames] Floating point exception (core dumped)


--
To UNSUBSCRIBE, email to debian-alpha-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Reply to: