OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [graphite/] [id-18.f90] - Blame information for rev 774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
MODULE spherical_harmonics
2
  INTEGER, PARAMETER :: dp = SELECTED_REAL_KIND ( 14, 200 )
3
CONTAINS
4
  FUNCTION dlegendre (x, l, m) RESULT (dplm)
5
  SELECT CASE ( l )
6
  CASE ( 0 )
7
    dplm = 0.0_dp
8
  CASE ( 1 )
9
    dplm = 1.0_dp
10
  CASE DEFAULT
11
    IF ( mm > 0 ) THEN
12
      dpmm = -m
13
      DO im = 1, mm
14
        dpmm = -dpmm
15
      END DO
16
      IF ( l == mm + 1 ) THEN
17
        DO il = mm + 2, l
18
          dpll = dpmm
19
        END DO
20
        dplm = dpll
21
      END IF
22
    END IF
23
  END SELECT
24
  END FUNCTION dlegendre
25
END MODULE spherical_harmonics
26
! { dg-final { cleanup-modules "spherical_harmonics" } }

powered by: WebSVN 2.1.0

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