real function rumach () C***BEGIN PROLOGUE RUMACH C***PURPOSE Compute the unit roundoff of the machine. C***CATEGORY R1 C***TYPE SINGLE PRECISION (RUMACH-S, DUMACH-D) C***KEYWORDS MACHINE CONSTANTS C***AUTHOR Hindmarsh, Alan C., (LLNL) C***DESCRIPTION C *Usage: c real a, rumach c a = rumach() C C *Function Return Values: c a : the unit roundoff of the machine. C C *Description: C The unit roundoff is defined as the smallest positive machine C number u such that 1.0 + u .ne. 1.0. This is computed by RUMACH C in a machine-independent manner. C C***REFERENCES (NONE) C***ROUTINES CALLED (NONE) C***REVISION HISTORY (YYMMDD) C 930216 DATE WRITTEN C 930818 Added SLATEC-format prologue. (FNF) C***END PROLOGUE RUMACH C C*Internal Notes: C----------------------------------------------------------------------- C Subroutines/functions called by RUMACH.. None C----------------------------------------------------------------------- C**End C real u, comp c***first executable statement rumach u = 1.0e0 10 u = u*0.5e0 comp = 1.0e0 + u if (comp .ne. 1.0e0) go to 10 rumach = u*2.0e0 return c----------------------- end of function rumach ------------------------ end