1 |
.\" $MidnightBSD$ |
2 |
.\" Copyright (c) 1985, 1991 Regents of the University of California. |
3 |
.\" All rights reserved. |
4 |
.\" |
5 |
.\" Redistribution and use in source and binary forms, with or without |
6 |
.\" modification, are permitted provided that the following conditions |
7 |
.\" are met: |
8 |
.\" 1. Redistributions of source code must retain the above copyright |
9 |
.\" notice, this list of conditions and the following disclaimer. |
10 |
.\" 2. Redistributions in binary form must reproduce the above copyright |
11 |
.\" notice, this list of conditions and the following disclaimer in the |
12 |
.\" documentation and/or other materials provided with the distribution. |
13 |
.\" 4. Neither the name of the University nor the names of its contributors |
14 |
.\" may be used to endorse or promote products derived from this software |
15 |
.\" without specific prior written permission. |
16 |
.\" |
17 |
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
18 |
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
19 |
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
20 |
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
21 |
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
22 |
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
23 |
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
24 |
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
25 |
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
26 |
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
27 |
.\" SUCH DAMAGE. |
28 |
.\" |
29 |
.\" from: @(#)ieee.3 6.4 (Berkeley) 5/6/91 |
30 |
.\" $FreeBSD: stable/10/lib/msun/man/ieee_test.3 165906 2007-01-09 01:02:06Z imp $ |
31 |
.\" |
32 |
.Dd November 6, 2005 |
33 |
.Dt IEEE_TEST 3 |
34 |
.Os |
35 |
.Sh NAME |
36 |
.Nm scalb , |
37 |
.Nm scalbf , |
38 |
.Nm significand , |
39 |
.Nm significandf |
40 |
.Nd IEEE test functions |
41 |
.Sh LIBRARY |
42 |
.Lb libm |
43 |
.Sh SYNOPSIS |
44 |
.In math.h |
45 |
.Ft double |
46 |
.Fn scalb "double x" "double n" |
47 |
.Ft float |
48 |
.Fn scalbf "float x" "float n" |
49 |
.Ft double |
50 |
.Fn significand "double x" |
51 |
.Ft float |
52 |
.Fn significandf "float x" |
53 |
.Sh DESCRIPTION |
54 |
These functions allow users to test conformance to |
55 |
.St -ieee754 . |
56 |
Their use is not otherwise recommended. |
57 |
.Pp |
58 |
.Fn scalb x n |
59 |
and |
60 |
.Fn scalbf x n |
61 |
return |
62 |
.Fa x Ns \(**(2** Ns Fa n ) |
63 |
computed by exponent manipulation. |
64 |
If |
65 |
.Fa n |
66 |
is not an integer, \*(Pm\*(If, or an \*(Na, the result is unspecified. |
67 |
.Pp |
68 |
.Fn significand x |
69 |
and |
70 |
.Fn significandf x |
71 |
return |
72 |
.Fa sig , |
73 |
where |
74 |
.Fa x |
75 |
:= |
76 |
.Fa sig No \(** 2** Ns Fa n |
77 |
with 1 \(<= |
78 |
.Fa sig |
79 |
< 2. |
80 |
.Fn significand x |
81 |
and |
82 |
.Fn significandf x |
83 |
are not defined when |
84 |
.Fa x |
85 |
is 0, \*(Pm\*(If, or \*(Na. |
86 |
.Sh SEE ALSO |
87 |
.Xr ieee 3 , |
88 |
.Xr math 3 |
89 |
.Sh STANDARDS |
90 |
.St -ieee754 |