OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.dg/] [gamma_1.f90] - Blame information for rev 302

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 302 jeremybenn
! { dg-do run }
2
!
3
! Test the vendor intrinsic (d)gamma, lgamma and algama/dlgama
4
! gamma is also part of the Fortran 2008 draft; lgamma is called
5
! log_gamma in the Fortran 2008 draft.
6
!
7
! PR fortran/32980
8
!
9
program gamma_test
10
implicit none
11
intrinsic :: gamma, lgamma, log_gamma
12
integer, parameter :: sp = kind(1.0)
13
integer, parameter :: dp = kind(1.0d0)
14
 
15
real(sp) :: rsp
16
real(dp) :: rdp
17
 
18
if (abs(gamma(1.0_sp)  - 1.0_sp) > tiny(1.0_sp)) call abort()
19
if (abs(gamma(1.0_dp)  - 1.0_dp) > tiny(1.0_dp)) call abort()
20
if (abs(dgamma(1.0_dp) - 1.0_dp) > tiny(1.0_dp)) call abort()
21
 
22
if (abs(lgamma(1.0_sp)) > tiny(1.0_sp)) call abort()
23
if (abs(lgamma(1.0_dp)) > tiny(1.0_dp)) call abort()
24
if (abs(log_gamma(1.0_sp)) > tiny(1.0_sp)) call abort()
25
if (abs(log_gamma(1.0_dp)) > tiny(1.0_dp)) call abort()
26
if (abs(algama(1.0_sp)) > tiny(1.0_sp)) call abort()
27
if (abs(dlgama(1.0_dp)) > tiny(1.0_dp)) call abort()
28
end program gamma_test
29
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.