xref: /csrg-svn/usr.bin/f77/libF77/i_nint.c (revision 47940)
1*47940Sbostic /*-
2*47940Sbostic  * Copyright (c) 1980 The Regents of the University of California.
3*47940Sbostic  * All rights reserved.
422916Skre  *
5*47940Sbostic  * %sccs.include.proprietary.c%
610503Sdlw  */
710503Sdlw 
8*47940Sbostic #ifndef lint
9*47940Sbostic static char sccsid[] = "@(#)i_nint.c	5.2 (Berkeley) 04/12/91";
10*47940Sbostic #endif /* not lint */
11*47940Sbostic 
i_nint(x)1210503Sdlw long int i_nint(x)
1310503Sdlw float *x;
1410503Sdlw {
1510503Sdlw double floor();
1610503Sdlw 
1710503Sdlw return( (*x)>=0 ?
1810503Sdlw 	floor(*x + .5) : -floor(.5 - *x) );
1910503Sdlw }
20