BSD 4_4 release
[unix-history] / usr / src / usr.bin / f77 / libF77 / h_nint.c
CommitLineData
82492b51
KB
1/*-
2 * Copyright (c) 1980 The Regents of the University of California.
3 * All rights reserved.
6bb465b0 4 *
ad787160
C
5 * This module is believed to contain source code proprietary to AT&T.
6 * Use and redistribution is subject to the Berkeley Software License
7 * Agreement and your Software Agreement with AT&T (Western Electric).
e9a58b00
DW
8 */
9
82492b51 10#ifndef lint
ad787160 11static char sccsid[] = "@(#)h_nint.c 5.2 (Berkeley) 4/12/91";
82492b51
KB
12#endif /* not lint */
13
e9a58b00
DW
14short h_nint(x)
15float *x;
16{
17double floor();
18
19return( (*x)>=0 ?
20 floor(*x + .5) : -floor(.5 - *x) );
21}