~ubuntu-branches/debian/sid/gsl/sid

« back to all changes in this revision

Viewing changes to sys/infnan.c

  • Committer: Bazaar Package Importer
  • Author(s): Dirk Eddelbuettel
  • Date: 2008-12-16 06:17:55 UTC
  • mfrom: (1.3.2 upstream) (3.1.15 jaunty)
  • Revision ID: james.westby@ubuntu.com-20081216061755-9la7p0qwrhopk8pl
Tags: 1.12+dfsg-1
* New upstream version released today

* doc/*: As before, removed the 'non-free' documentation to create a 
  source package that complies with Debian's interpretation of what is free. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
#include <ieeefp.h>
25
25
#endif
26
26
 
27
 
double gsl_nan (void);
28
 
double gsl_posinf (void);
29
 
double gsl_neginf (void);
30
 
double gsl_fdiv (const double x, const double y);
 
27
#include <gsl/gsl_sys.h>
31
28
 
32
29
double gsl_nan (void)
33
30
{
118
115
int
119
116
gsl_isinf (const double x)
120
117
{
121
 
    return isinf(x);
 
118
  /* isinf(3): In glibc 2.01 and earlier, isinf() returns a
 
119
     non-zero value (actually: 1) if x is an infinity (positive or
 
120
     negative).  (This is all that C99 requires.) */
 
121
 
 
122
  if (isinf(x)) 
 
123
    {
 
124
      return (x > 0) ? 1 : -1;
 
125
    } 
 
126
  else 
 
127
    {
 
128
      return 0;
 
129
    }
122
130
}
123
131
# else
124
132