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

Comparing ray/src/common/calfunc.c (file contents):
Revision 1.7 by greg, Fri Jun 28 09:31:59 1991 UTC vs.
Revision 1.9 by greg, Fri Aug 2 14:11:17 1991 UTC

# Line 382 | Line 382 | register VARDEF  *vp;
382      errno = 0;
383      d = (*vp->lib->f)(vp->lib->fname);
384   #ifdef  IEEE
385 <    if (!finite(d))
386 <        errno = EDOM;
385 >    if (errno == 0)
386 >        if (isnan(d))
387 >            errno = EDOM;
388 >        else if (isinf(d))
389 >            errno = ERANGE;
390   #endif
391      if (errno) {
392          wputs(fname);
393 <        wputs(": bad call\n");
393 >        if (errno == EDOM)
394 >                wputs(": domain error\n");
395 >        else if (errno == ERANGE)
396 >                wputs(": range error\n");
397 >        else
398 >                wputs(": error in call\n");
399          return(0.0);
400      }
401      errno = lasterrno;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines