ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/frexp.c
(Generate patch)

Comparing ray/src/common/frexp.c (file contents):
Revision 1.3 by greg, Tue Feb 25 02:47:21 2003 UTC vs.
Revision 1.4 by greg, Wed Nov 12 18:06:54 2003 UTC

# Line 1 | Line 1
1   #ifndef lint
2   static const char       RCSid[] = "$Id$";
3   #endif
4 #include "copyright.h"
4  
5 + double
6   frexp(x, ip)            /* call it paranoia, I've seen the lib version */
7 < register double  x;
7 > double  x;
8   int  *ip;
9   {
10          int  neg;
# Line 21 | Line 21 | int  *ip;
21                          x *= 2.0;
22          else
23                  for (i = 0; x >= 1.0; i++)
24 <                        x /= 2.0;
24 >                        x *= 0.5;
25          *ip = i;
26 <        if (neg)
27 <                return(-x);
28 <        else
29 <                return(x);
26 >        return (neg ? -x : x);
27   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines