The R Project SVN R

Rev

Rev 21578 | Rev 34643 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 21578 Rev 22929
Line 1... Line 1...
1
/*
1
/*
2
 *  Mathlib : A C Library of Special Functions
2
 *  Mathlib : A C Library of Special Functions
3
 *  Copyright (C) 1998-2001 Ross Ihaka and the R Development Core team.
3
 *  Copyright (C) 1998-2001 Ross Ihaka and the R Development Core team.
4
 *  Copyright (C) 2002      The R Foundation
4
 *  Copyright (C) 2002-3    The R Foundation
5
 *
5
 *
6
 *  This program is free software; you can redistribute it and/or modify
6
 *  This program is free software; you can redistribute it and/or modify
7
 *  it under the terms of the GNU General Public License as published by
7
 *  it under the terms of the GNU General Public License as published by
8
 *  the Free Software Foundation; either version 2 of the License, or
8
 *  the Free Software Foundation; either version 2 of the License, or
9
 *  (at your option) any later version.
9
 *  (at your option) any later version.
Line 36... Line 36...
36
 
36
 
37
double bessel_k(double x, double alpha, double expo)
37
double bessel_k(double x, double alpha, double expo)
38
{
38
{
39
    long nb, ncalc, ize;
39
    long nb, ncalc, ize;
40
    double *bk;
40
    double *bk;
-
 
41
#ifndef MATHLIB_STANDALONE
41
    char *vmax;
42
    char *vmax;
-
 
43
#endif
42
 
44
 
43
#ifdef IEEE_754
45
#ifdef IEEE_754
44
    /* NaNs propagated correctly */
46
    /* NaNs propagated correctly */
45
    if (ISNAN(x) || ISNAN(alpha)) return x + alpha;
47
    if (ISNAN(x) || ISNAN(alpha)) return x + alpha;
46
#endif
48
#endif