xref: /original-bsd/lib/libc/gen/modf.3 (revision ba762ddc)
1.\" Copyright (c) 1991 The Regents of the University of California.
2.\" All rights reserved.
3.\"
4.\" %sccs.include.redist.man%
5.\"
6.\"     @(#)modf.3	5.1 (Berkeley) 05/02/91
7.\"
8.Dd
9.Dt MODF 3
10.Os
11.Sh NAME
12.Nm modf
13.Nd extract signed integral and fractional values from floating-point number
14.Sh SYNOPSIS
15.Fd #include <math.h>
16.Ft double
17.Fn modf "double value" "double *iptr"
18.Sh DESCRIPTION
19The
20.Fn modf
21function breaks the argument
22.Fa value
23into integral and fractional parts, each of which has the
24same sign as the argument.
25It stores the integral part as a
26.Em double
27in the object pointed to by
28.Fa iptr .
29.Sh RETURN VALUES
30The
31.Fn modf
32function returns the signed fractional part of
33.Fa value .
34.Sh SEE ALSO
35.Xr frexp 3 ,
36.Xr ldexp 3 ,
37.Xr math 3
38.Sh STANDARDS
39The
40.Fn modf
41function conforms to
42.St -ansiC .
43