projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
BSD 4_3 release
[unix-history]
/
usr
/
src
/
usr.lib
/
libm
/
jn.c
diff --git
a/usr/src/usr.lib/libm/jn.c
b/usr/src/usr.lib/libm/jn.c
index
690d88e
..
27c9be0
100644
(file)
--- a/
usr/src/usr.lib/libm/jn.c
+++ b/
usr/src/usr.lib/libm/jn.c
@@
-1,4
+1,6
@@
-/* @(#)jn.c 4.1 12/25/82 */
+#ifndef lint
+static char sccsid[] = "@(#)jn.c 4.2 (Berkeley) 8/21/85";
+#endif not lint
/*
floating point Bessel's function of
/*
floating point Bessel's function of
@@
-33,9
+35,11
@@
*/
#include <math.h>
*/
#include <math.h>
+#ifdef VAX
#include <errno.h>
#include <errno.h>
-
-int errno;
+#else /* IEEE double */
+static double zero = 0.e0;
+#endif
double
jn(n,x) int n; double x;{
double
jn(n,x) int n; double x;{
@@
-87,8
+91,12
@@
yn(n,x) int n; double x;{
double y0(), y1();
if (x <= 0) {
double y0(), y1();
if (x <= 0) {
- errno = EDOM;
- return(-HUGE);
+#ifdef VAX
+ extern double infnan();
+ return(infnan(EDOM)); /* NaN */
+#else /* IEEE double */
+ return(zero/zero); /* IEEE machines: invalid operation */
+#endif
}
sign = 1;
if(n<0){
}
sign = 1;
if(n<0){