File: intrinsics_67.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 (31 lines) | stat: -rw-r--r-- 1,186 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
program intrinsics_67
    double precision :: x
    x = 1.0D0
    print *, dcosh(x)
    print *, dsinh(x)
    print *, dcosh(1.2D0)
    print *, dsinh(1.2D0)
    print *, dtanh(x)
    print *, dtanh(1.2D0)

    if (abs(dcosh(x) - 1.5430806348152437D0) > 1d-14) error stop
    if (abs(dsinh(x) - 1.1752011936438014D0) > 1d-14) error stop
    if (abs(dcosh(1.2D0) - 1.8106555673243747D0) > 1d-14) error stop
    if (abs(dsinh(1.2D0) - 1.5094613554121725D0) > 1d-12) error stop
    if (abs(dtanh(x) - 0.76159415595576485D0) > 1d-14) error stop
    if (abs(dtanh(1.2D0) - 0.83365460701215521D0) > 1d-14) error stop

    x = 4.2D0
    print *, dcosh(x)
    print *, dsinh(x)
    print *, dcosh(4.2D0)
    print *, dsinh(4.2D0)
    print *, dtanh(x)
    print *, dtanh(4.2D0)
    if (abs(dcosh(x) - 33.350663308872818D0) > 1d-14) error stop
    if (abs(dsinh(x) - 33.335667732052336D0) > 1d-14) error stop
    if (abs(dcosh(4.2D0) - 33.350663308872818D0) > 1d-14) error stop
    if (abs(dsinh(4.2D0) - 33.335667732052336D0) > 1d-14) error stop
    if (abs(dtanh(x) - 0.99955036645953343D0) > 1d-14) error stop
    if (abs(dtanh(4.2D0) - 0.99955036645953343D0) > 1d-14) error stop
end program