File: intrinsics_76.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 (16 lines) | stat: -rw-r--r-- 460 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
program intrinsics_76
implicit none

real(8) :: gamma = 1
real(8) :: x(3), xsqrt(3)
gamma = 0.3612163121_8
x = [1._8, 2._8, 3._8]

if( any(abs(exp(-gamma*sqrt(x)) - [0.69682824978102864_8, 0.59999316978514361_8, 0.53491629349743086_8]) > 1e-6) ) error stop
print *, exp(-gamma*sqrt(x))

xsqrt = -gamma*sqrt(x)
if( any(abs(exp(xsqrt) - [0.69682824978102864_8, 0.59999316978514361_8, 0.53491629349743086_8]) > 1e-6) ) error stop
print *, exp(xsqrt)

end program