OSDN Git Service

(split) Convert release and draft pages to UTF-8.
[linuxjm/LDP_man-pages.git] / release / man3 / modf.3
1 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
2 .\"
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
6 .\"
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
11 .\"
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein.  The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
18 .\" professionally.
19 .\"
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
22 .\"
23 .\" References consulted:
24 .\"     Linux libc source code
25 .\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
26 .\"     386BSD man pages
27 .\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
28 .\" Modified 2002-07-27 by Walter Harms
29 .\"     (walter.harms@informatik.uni-oldenburg.de)
30 .\"
31 .\" Japanese Version Copyright (c) 1997 YOSHINO Takashi
32 .\"       all rights reserved.
33 .\" Translated Tue Feb 17 11:01:38 JST 1998
34 .\"       by YOSHINO Takashi <yoshino@civil.jcn.nihon-u.ac.jp>
35 .\" Updated Sun Sep 14 JST 2003 by Kentaro Shirakata <argrath@ub32.org>
36 .\" Updated 2008-09-16, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
37 .\"
38 .TH MODF 3  2010-09-20 ""  "Linux Programmer's Manual"
39 .SH 名前
40 modf, modff, modfl \- 浮動小数点実数から、符号付き整数と小数部分を取り出す関数
41 .SH 書式
42 .nf
43 .B #include <math.h>
44 .sp
45 .BI "double modf(double " x ", double *" iptr );
46 .br
47 .BI "float modff(float " x ", float *" iptr );
48 .br
49 .BI "long double modfl(long double " x ", long double *" iptr );
50 .fi
51 \fI\-lm\fP でリンクする。
52 .sp
53 .in -4n
54 glibc 向けの機能検査マクロの要件
55 .RB ( feature_test_macros (7)
56 参照):
57 .in
58 .sp
59 .ad l
60 .BR modf (),
61 .BR modfl ():
62 .RS 4
63 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
64 _POSIX_C_SOURCE\ >=\ 200112L;
65 .br
66 or
67 .I cc\ -std=c99
68 .RE
69 .ad
70 .SH 説明
71 .BR modf ()
72 関数は、引数 \fIx\fP を整数部分と小数部分に分割する。
73 このとき、ふたつの値はともに \fIx\fP と同じ符号を持つ。
74 整数部分は \fIiptr\fP が指す場所に格納される。
75 .SH 返り値
76 .BR modf ()
77 関数は \fIx\fP の小数部分を返す。
78
79 .I x
80 が NaN の場合、NaN が返され、
81 .IR *iptr
82 に NaN が設定される。
83
84 .I x
85 が正の無限大 (負の無限大) の場合、
86 +0 (\-0) が返され、
87 .IR *iptr
88 に正の無限大 (負の無限大) が設定される。
89 .SH エラー
90 エラーは発生しない。
91 .SH 準拠
92 C99, POSIX.1-2001.
93 .I double
94 版の関数は SVr4, 4.3BSD, C89 にも準拠している。
95 .SH 関連項目
96 .BR frexp (3),
97 .BR ldexp (3)