bin/144306: Nasty bug in jn(3)

Steven G. Kargl kargl at
Fri Feb 26 00:20:04 UTC 2010

>Number:         144306
>Category:       bin
>Synopsis:       Nasty bug in jn(3)
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Feb 26 00:20:04 UTC 2010
>Originator:     Steven G. Kargl
>Release:        FreeBSD 9.0-CURRENT amd64
System: FreeBSD 9.0-CURRENT FreeBSD 9.0-CURRENT #0 r204219M: Mon Feb 22 12:41:49 PST 2010 kargl at amd64


troutmask:kargl[466] cat testjn.c 
#include <stdio.h>
#include <math.h>

        double z;
        int n;

        z = 2.4048255576957729;
        for (n = 2; n < 10; n++)
                printf("%d %e\n", n, jn(n,z));
        return (0);
troutmask:kargl[467] cc -o z testjn.c -lm
troutmask:kargl[468] ./z
2 4.317548e-01
3 -inf
4 4.069027e-02
5 -inf
6 3.247664e-03
7 -inf
8 7.495602e-05
9 -inf

The value of a integer order Bessel function with
argument z = 2.4048255576957729 is never -inf.

	See above



More information about the freebsd-bugs mailing list