如何在Fortran中使用bignum

Mit*_*ops 6 fortran bignum bigint fortran2018

对于一种专为科学计算而设计的语言-甚至是50年前,我惊讶地发现Fortran 2018没有针对bignum或bigInt类型的本机类型以实现任意精度,并且怀疑我做错了什么。这是什么标准流程?

我在想:

program toosmall
  ! compile with:
  ! gfortran -fno-range-check -o toosmall toosmall.f90 

  implicit none

  integer :: base, pow, res

  base = 1000
  pow  = 100000

  res= base**pow

  print *,res

end program toosmall
Run Code Online (Sandbox Code Playgroud)

这产生了

$ ./toosmall 
           0
Run Code Online (Sandbox Code Playgroud)