Linked Questions

3 votes
0 answers
342 views

Let's say if I want a double-precision real, what is the correct way to set the precision of the variable? But not just limited to double precision. I am trying to teach myself Fortran. I have been ...
AR.walker's user avatar
0 votes
0 answers
170 views

I'm using silverfrost 95 to coding fortran. I want to calculate large numbers for example 5^5432854 but it errors "integer overflow", I tried kind 8 but it errors "error 600 - The KIND ...
0 votes
0 answers
53 views

I'm having problems to understand what's going on with my fortran subroutine (2003 standard) to read netCDF-4 data. The compiler I'm using is gfortran. I have to read a 32-bit integer from a netCDF ...
0 votes
0 answers
40 views

I have a large old code I am cleaning up and updating. Comparing my new version to the old version I have noticed that the final result, given as a double precision float, is never precisely the same, ...
56 votes
6 answers
80k views

I am having trouble understanding Fortran 90's kind parameter. As far as I can tell, it does not determine the precision (i.e., float or double) of a variable, nor does it determine the type of a ...
user avatar
37 votes
3 answers
82k views

The manual of a program written in Fortran 90 says, "All real variables and parameters are specified in 64-bit precision (i.e. real*8)." According to Wikipedia, single precision corresponds to 32-bit ...
Andrew's user avatar
  • 1,529
13 votes
2 answers
53k views

Fortran is completely new for me, can anybody help me to solve the follwing problem? I want to find out all the integer kind numbers and the largest and the smallest value for each kind number on my ...
echo's user avatar
  • 179
19 votes
1 answer
7k views

When declaring variables is there a difference when using a double colon? real(8) :: a real(8) b Both of these apparently do the same thing. Is there any difference between these besides style? I ...
Exascale's user avatar
  • 973
5 votes
2 answers
3k views

While working on a simple programming exercise, I produced a while loop (DO loop in Fortran) that was meant to exit when a real variable had reached a precise value. I noticed that due to the ...
4 votes
3 answers
10k views

I'm trying to work with large numbers (~10^14), and I need to be able to store them and iterate over loops of that length, i.e. n=SOME_BIG_NUMBER do i=n,1,-1 I've tried the usual star notation, kind=...
Samizdis's user avatar
  • 1,681
2 votes
4 answers
11k views

I've been trying to use Fortran for my research project, with the GNU Fortran compiler (gfortran), latest version, but I've been encountering some problems in the way it processes real numbers. If ...
4 votes
2 answers
2k views

I am new to Fortran and I am trying on the common block. My code is simple program main implicit double precision (p) real * 8 :: x, y common /yvalue/ y x = 3d0 y = 3d0 print *...
zyy's user avatar
  • 1,654
3 votes
3 answers
4k views

I am new in Fortran. So I need help. I'm using gfortran on SUSE to compile my code and receive the following error: 200 IF ( ID .EQ. 4HEOT ) GO TO 20 1 Error: Operands of logical ...
Khan's user avatar
  • 41
2 votes
4 answers
4k views

I am linking some fortran code (f90) from matlab using mex and I am having matlab freeze occasionally. In the past, I had freezing happening due to mismatch between data types (say integer*4 vs ...
W7GVR's user avatar
  • 2,020
3 votes
3 answers
521 views

I would like to convert upper triangle part of the matrix to the vector. For example I have the following matrix (4x4 for simplicity): 1 2 3 4 5 6 7 8 9 10 11 ...

15 30 50 per page
1
2 3 4 5 6