]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/modf.3
All pages: Remove the 5th argument to .TH
[thirdparty/man-pages.git] / man3 / modf.3
1 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
2 .\"
3 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
4 .\"
5 .\" References consulted:
6 .\" Linux libc source code
7 .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
8 .\" 386BSD man pages
9 .\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
10 .\" Modified 2002-07-27 by Walter Harms
11 .\" (walter.harms@informatik.uni-oldenburg.de)
12 .\"
13 .TH MODF 3 2021-03-22 "Linux man-pages (unreleased)"
14 .SH NAME
15 modf, modff, modfl \- extract signed integral and fractional values from
16 floating-point number
17 .SH LIBRARY
18 Math library
19 .RI ( libm ", " \-lm )
20 .SH SYNOPSIS
21 .nf
22 .B #include <math.h>
23 .PP
24 .BI "double modf(double " x ", double *" iptr );
25 .BI "float modff(float " x ", float *" iptr );
26 .BI "long double modfl(long double " x ", long double *" iptr );
27 .fi
28 .PP
29 .RS -4
30 Feature Test Macro Requirements for glibc (see
31 .BR feature_test_macros (7)):
32 .RE
33 .PP
34 .BR modff (),
35 .BR modfl ():
36 .nf
37 _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
38 || /* Since glibc 2.19: */ _DEFAULT_SOURCE
39 || /* Glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
40 .fi
41 .SH DESCRIPTION
42 These functions break the argument
43 .I x
44 into an integral
45 part and a fractional part, each of which has the same sign as
46 .IR x .
47 The integral part is stored in the location pointed to by
48 .IR iptr .
49 .SH RETURN VALUE
50 These functions return the fractional part of
51 .IR x .
52 .PP
53 If
54 .I x
55 is a NaN, a NaN is returned, and
56 .I *iptr
57 is set to a NaN.
58 .PP
59 If
60 .I x
61 is positive infinity (negative infinity), +0 (\-0) is returned, and
62 .I *iptr
63 is set to positive infinity (negative infinity).
64 .SH ERRORS
65 No errors occur.
66 .SH ATTRIBUTES
67 For an explanation of the terms used in this section, see
68 .BR attributes (7).
69 .ad l
70 .nh
71 .TS
72 allbox;
73 lbx lb lb
74 l l l.
75 Interface Attribute Value
76 T{
77 .BR modf (),
78 .BR modff (),
79 .BR modfl ()
80 T} Thread safety MT-Safe
81 .TE
82 .hy
83 .ad
84 .sp 1
85 .SH STANDARDS
86 C99, POSIX.1-2001, POSIX.1-2008.
87 .PP
88 The variant returning
89 .I double
90 also conforms to
91 SVr4, 4.3BSD, C89.
92 .SH SEE ALSO
93 .BR frexp (3),
94 .BR ldexp (3)