comparison liboctave/lgamma.c @ 1243:668dc3c012b5

[project @ 1995-04-11 00:30:31 by jwe]
author jwe
date Tue, 11 Apr 1995 00:37:34 +0000
parents 5972ef4972cc
children fa24599e3d2c
comparison
equal deleted inserted replaced
1242:5fb4ee02da70 1243:668dc3c012b5
19 Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 19 Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
20 20
21 */ 21 */
22 22
23 #ifdef HAVE_CONFIG_H 23 #ifdef HAVE_CONFIG_H
24 #include "config.h" 24 #include <config.h>
25 #endif 25 #endif
26 26
27 #ifndef HAVE_LGAMMA 27 #ifndef HAVE_LGAMMA
28 28
29 #include "f77-uscore.h" 29 #include "f77-uscore.h"
31 /* If the system doesn't have lgamma, assume that it doesn't have 31 /* If the system doesn't have lgamma, assume that it doesn't have
32 signgam either */ 32 signgam either */
33 33
34 int signgam; 34 int signgam;
35 35
36 extern int F77_FCN (dlgams) (double*, double*, double*); 36 extern int F77_FCN (dlgams) (const double&, double&, double&);
37 37
38 double 38 double
39 lgamma (double x) 39 lgamma (double x)
40 { 40 {
41 double result; 41 double result;
42 double sgngam; 42 double sgngam;
43 43
44 F77_FCN (dlgams) (&x, &result, &sgngam); 44 F77_FCN (dlgams) (x, result, sgngam);
45 45
46 signgam = (int) sgngam; 46 signgam = (int) sgngam;
47 47
48 return result; 48 return result;
49 } 49 }