PandA-2024.02
euclid.copy.f
Go to the documentation of this file.
1 * euclid.f (FORTRAN 77)
2 * Find greatest common divisor using the Euclidean algorithm
3 
4  FUNCTION ngcd(NA, NB)
5  integer, value :: NA ! input
6  integer, value :: NB ! input
7  ia = na
8  ib = nb
9  1 IF (ib.NE.0) THEN
10  itemp = ia
11  ia = ib
12  ib = mod(itemp, ib)
13  GOTO 1
14  END IF
15  ngcd = ia
16  RETURN
17  END
function ngcd(NA, NB)
Definition: euclid.copy.f:5

Generated on Mon Feb 12 2024 13:02:49 for PandA-2024.02 by doxygen 1.8.13