This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug math/19280] [2.22 Regression] gfortran.dg/bessel_6.f90
- From: "hjl.tools at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Mon, 23 Nov 2015 02:48:54 +0000
- Subject: [Bug math/19280] [2.22 Regression] gfortran.dg/bessel_6.f90
- Auto-submitted: auto-generated
- References: <bug-19280-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=19280
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> ---
Here is the testcase:
---bessel_6.f90---
! { dg-do run { xfail spu-*-* } }
! { dg-add-options ieee }
!
! PR fortran/36158
! PR fortran/33197
!
! XFAILed for SPU targets since we don't have an accurate library
! implementation of the single-precision Bessel functions.
!
! Run-time tests for transformations BESSEL_JN
!
implicit none
real,parameter :: values(*) = [0.0, 0.5, 1.0, 0.9,
1.8,2.0,3.0,4.0,4.25,8.0,34.53, 475.78]
real,parameter :: myeps(size(values)) = epsilon(0.0) &
* [2, 7, 5, 6, 9, 12, 12, 7, 7, 8, 92, 15 ]
! The following is sufficient for me - the values above are a bit
! more tolerant
! * [0, 5, 3, 4, 6, 7, 7, 5, 5, 6, 66, 4 ]
integer,parameter :: mymax(size(values)) = &
[100, 17, 23, 21, 27, 28, 32, 35, 31, 41, 47, 37 ]
integer, parameter :: Nmax = 100
real :: rec(0:Nmax), lib(0:Nmax)
integer :: i
do i = 1, ubound(values,dim=1)
call compare(mymax(i), values(i), myeps(i))
end do
contains
subroutine compare(mymax, X, myeps)
integer :: i, nit, mymax
real X, myeps, myeps2
rec(0:mymax) = BESSEL_JN(0, mymax, X)
lib(0:mymax) = [ (BESSEL_JN(i, X), i=0,mymax) ]
!print *, 'YN for X = ', X, ' -- Epsilon = ',epsilon(x)
do i = 0, mymax
! print '(i2,2e17.9,e12.2,f18.10,2l3)', i, rec(i), lib(i), &
! rec(i)-lib(i), ((rec(i)-lib(i))/rec(i))/epsilon(x), &
! rec(i) == lib(i), abs((rec(i)-lib(i))/rec(i)) < myeps
if (rec(i) == lib(i)) CYCLE
if (abs((rec(i)-lib(i))/rec(i)) > myeps) &
call abort()
end do
end
end
---
--
You are receiving this mail because:
You are on the CC list for the bug.