Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids. Most
[dragonfly.git] / lib / msun / man / ieee_test.3
1 .\" Copyright (c) 1985, 1991 Regents of the University of California.
2 .\" All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\"    must display the following acknowledgement:
14 .\"     This product includes software developed by the University of
15 .\"     California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\"    may be used to endorse or promote products derived from this software
18 .\"    without specific prior written permission.
19 .\"
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" SUCH DAMAGE.
31 .\"
32 .\"     from: @(#)ieee.3        6.4 (Berkeley) 5/6/91
33 .\" $FreeBSD: src/lib/msun/man/ieee_test.3,v 1.5.2.4 2001/12/17 10:08:36 ru Exp $
34 .\" $DragonFly: src/lib/msun/man/Attic/ieee_test.3,v 1.2 2003/06/17 04:26:52 dillon Exp $
35 .\"
36 .Dd March 10, 1994
37 .Dt IEEE_TEST 3
38 .Os
39 .Sh NAME
40 .Nm logb ,
41 .Nm logbf ,
42 .Nm scalb ,
43 .Nm scalbf ,
44 .Nm significand ,
45 .Nm significandf
46 .Nd IEEE test functions
47 .Sh LIBRARY
48 .Lb libm
49 .Sh SYNOPSIS
50 .In math.h
51 .Ft double
52 .Fn logb "double x"
53 .Ft float
54 .Fn logbf "float x"
55 .Ft double
56 .Fn scalb "double x" "double n"
57 .Ft float
58 .Fn scalbf "float x" "float n"
59 .Ft double
60 .Fn significand "double x"
61 .Ft float
62 .Fn significandf "float x"
63 .Sh DESCRIPTION
64 These functions allow users to test conformance to
65 .St -ieee754 .
66 Their use is not otherwise recommended.
67 .Pp
68 .Fn logb x
69 and
70 .Fn logbf x
71 return
72 .Fa x Ns 's exponent
73 .Fa n ,
74 a signed integer converted to double\-precision floating\-point.
75 .Fn logb \*(Pm\*(If
76 = +\*(If;
77 .Fn logb 0
78 = -\*(If with a division by zero exception.
79 .Pp
80 .Fn scalbn x n
81 and
82 .Fn scalbnf x n
83 return
84 .Fa x Ns \(**(2** Ns Fa n )
85 computed by exponent manipulation.
86 .Pp
87 .Fn significand x
88 and
89 .Fn significandf x
90 return
91 .Fa sig ,
92 where
93 .Fa x
94 :=
95 .Fa sig No \(** 2** Ns Fa n
96 with 1 \(<=
97 .Fa sig
98 < 2.
99 .Fn significand x
100 and
101 .Fn significandf x
102 are not defined when
103 .Fa x
104 is 0, \*(Pm\*(If, or \*(Na.
105 .Sh SEE ALSO
106 .Xr ieee 3 ,
107 .Xr math 3
108 .Sh STANDARDS
109 .St -ieee754