File: intrinsics_202.f90

package info (click to toggle)
lfortran 0.45.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 46,332 kB
  • sloc: cpp: 137,068; f90: 51,260; python: 6,444; ansic: 4,277; yacc: 2,285; fortran: 806; sh: 524; makefile: 30; javascript: 15
file content (14 lines) | stat: -rw-r--r-- 459 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
program intrinsics_202
    integer, parameter :: dp = kind(0.d0)
    real(dp), parameter :: A(*) = [1._dp, 2._dp, 3._dp]
    real(dp), parameter :: B(*) = A
    real(dp), parameter :: C(*) = sin(A)

    print *, B
    if (any(A /= B)) error stop

    print *, C
    if (abs(C(1) - 8.41470984807896505e-01) > 1e-5) error stop
    if (abs(C(2) - 9.09297426825681727e-01) > 1e-5) error stop
    if (abs(C(3) - 0.14112000805986721) > 1e-5) error stop
end program