Commit | Line | Data |
---|---|---|
e40ae46c CL |
1 | .\" Copyright (c) 1991 The Regents of the University of California. |
2 | .\" All rights reserved. | |
3 | .\" | |
043368e6 KB |
4 | .\" This code is derived from software contributed to Berkeley by |
5 | .\" the American National Standards Committee X3, on Information | |
6 | .\" Processing Systems. | |
7 | .\" | |
e40ae46c CL |
8 | .\" %sccs.include.redist.man% |
9 | .\" | |
043368e6 | 10 | .\" @(#)modf.3 5.2 (Berkeley) %G% |
e40ae46c CL |
11 | .\" |
12 | .Dd | |
13 | .Dt MODF 3 | |
14 | .Os | |
15 | .Sh NAME | |
16 | .Nm modf | |
17 | .Nd extract signed integral and fractional values from floating-point number | |
18 | .Sh SYNOPSIS | |
19 | .Fd #include <math.h> | |
20 | .Ft double | |
21 | .Fn modf "double value" "double *iptr" | |
22 | .Sh DESCRIPTION | |
23 | The | |
24 | .Fn modf | |
25 | function breaks the argument | |
26 | .Fa value | |
27 | into integral and fractional parts, each of which has the | |
28 | same sign as the argument. | |
29 | It stores the integral part as a | |
30 | .Em double | |
31 | in the object pointed to by | |
32 | .Fa iptr . | |
33 | .Sh RETURN VALUES | |
34 | The | |
35 | .Fn modf | |
36 | function returns the signed fractional part of | |
37 | .Fa value . | |
38 | .Sh SEE ALSO | |
39 | .Xr frexp 3 , | |
40 | .Xr ldexp 3 , | |
41 | .Xr math 3 | |
42 | .Sh STANDARDS | |
43 | The | |
44 | .Fn modf | |
45 | function conforms to | |
46 | .St -ansiC . |