1 .\" Copyright (C) 2001 Andries Brouwer <aeb@cwi.nl>.
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.
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.
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
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
23 .\" Japanese Version Copyright (c) 2001, 2005 Yuichi SATO
24 .\" all rights reserved.
25 .\" Translated Sun Jul 8 10:40:20 JST 2001
26 .\" by Yuichi SATO <ysato@h4.dion.ne.jp>
27 .\" Updated & Modified Sun Jan 16 08:20:45 JST 2005
28 .\" by Yuichi SATO <ysato444@yahoo.co.jp>
30 .TH TRUNC 3 2008-08-11 "" "Linux Programmer's Manual"
33 .\"O trunc, truncf, truncl \- round to integer, towards zero
34 trunc, truncf, truncl \- 0 ¤Ë¶á¤¤Êý¤ÎÀ°¿ôÃͤ˴ݤá¤ë
40 .BI "double trunc(double " x );
42 .BI "float truncf(float " x );
44 .BI "long double truncl(long double " x );
47 .\"O Link with \fI\-lm\fP.
48 \fI\-lm\fP ¤Ç¥ê¥ó¥¯¤¹¤ë¡£
51 .\"O Feature Test Macro Requirements for glibc (see
52 .\"O .BR feature_test_macros (7)):
53 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
54 .RB ( feature_test_macros (7)
62 _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE; or
67 .\"O These functions round \fIx\fP to the nearest integer
68 .\"O not larger in absolute value.
69 ¤³¤ì¤é¤Î´Ø¿ô¤ÏÀäÂÐÃͤ¬ \fIx\fP ¤è¤ê¾®¤µ¤¤
70 °ìÈֶᤤÀ°¿ôÃÍ¤Ë \fIx\fP ¤ò´Ý¤á¤ë¡£
71 .\"O .SH "RETURN VALUE"
73 .\"O These functions return the rounded integer value.
74 ¤³¤ì¤é¤Î´Ø¿ô¤Ï´Ý¤á¤é¤ì¤¿À°¿ôÃͤòÊÖ¤¹¡£
76 .\"O If \fIx\fP is integral, infinite, or NaN, \fIx\fP itself is returned.
77 \fIx\fP ¤¬À°¿ô¡¢Ìµ¸ÂÂç¡¢NaN ¤Î¾ì¹ç¡¢\fIx\fP ¼«¿È¤¬ÊÖ¤µ¤ì¤ë¡£
84 .\"O These functions first appeared in glibc in version 2.1.
85 ¤³¤ì¤é¤Î´Ø¿ô¤Ï glibc ¥Ð¡¼¥¸¥ç¥ó 2.1 ¤Ç½é¤á¤ÆÅо줷¤¿¡£
86 .\"O .SH "CONFORMING TO"
91 .\"O The integral value returned by these functions may be too large
92 .\"O to store in an integer type
96 .\"O To avoid an overflow, which will produce undefined results,
97 .\"O an application should perform a range check on the returned value
98 .\"O before assigning it to an integer type.
99 ¤³¤ì¤é¤Î´Ø¿ô¤¬ÊÖ¤¹À°¿ôÃͤÏÀ°¿ô·¿
102 ¤Ê¤É) ¤Ë³ÊǼ¤¹¤ë¤Ë¤ÏÂ礲᤮¤ë¤«¤â¤·¤ì¤Ê¤¤¡£
103 ¥ª¡¼¥Ð¡¼¥Õ¥í¡¼¤¬µ¯¤³¤Ã¤¿¾ì¹ç¤Î·ë²Ì¤Ïʬ¤«¤é¤Ê¤¤¤Î¤Ç¡¢
104 ¥ª¡¼¥Ð¡¼¥Õ¥í¡¼¤òÈò¤±¤ë¤¿¤á¡¢¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ç¤ÏÀ°¿ô·¿¤ËÂåÆþ¤¹¤ëÁ°¤Ë
105 ÊÖ¤µ¤ì¤¿ÃͤÎÈϰϳÎǧ¤ò¼Â¹Ô¤¹¤Ù¤¤Ç¤¢¤ë¡£