]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/man/man3/Q_QABS.3
bhnd(9): Fix a few mandoc related issues
[FreeBSD/FreeBSD.git] / share / man / man3 / Q_QABS.3
1 .\"
2 .\" Copyright (c) 2018 Netflix, Inc.
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 .\"    without modification, immediately at the beginning of the file.
11 .\" 2. The name of the author may not be used to endorse or promote products
12 .\"    derived from this software without specific prior written permission.
13 .\"
14 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
18 .\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 .\" SUCH DAMAGE.
25 .\"
26 .\" $FreeBSD$
27 .\"
28 .Dd July 8, 2018
29 .Dt Q_QABS 3
30 .Os
31 .Sh NAME
32 .Nm Q_QABS ,
33 .Nm Q_Q2S ,
34 .Nm Q_Q2F
35 .Nd fixed-point math functions which operate on a single Q number
36 .Sh SYNOPSIS
37 .In sys/qmath.h
38 .Ft QTYPE
39 .Fn Q_QABS "QTYPE q"
40 .Ft double
41 .Fn Q_Q2D "QTYPE q"
42 .Ft float
43 .Fn Q_Q2F "QTYPE q"
44 .Sh DESCRIPTION
45 The
46 .Fn Q_QABS
47 function returns an absolute value representation of
48 .Fa q .
49 .Pp
50 The
51 .Fn Q_Q2D
52 and
53 .Fn Q_Q2F
54 functions return the double and float representations of
55 .Fa q
56 respectively.
57 .Pp
58 All of those functions operate on
59 the following data types:
60 .Vt s8q_t ,
61 .Vt u8q_t ,
62 .Vt s16q_t ,
63 .Vt u16q_t ,
64 .Vt s32q_t ,
65 .Vt u32q_t ,
66 .Vt s64q_t ,
67 and
68 .Vt u64q_t ,
69 which are referred to generically as
70 .Fa QTYPE .
71 .Pp
72 For more details, see
73 .Xr qmath 3 .
74 .Sh RETURN VALUES
75 .Fn Q_QABS
76 function returns a QTYPE that is identical to that of
77 .Fa q .
78 .Pp
79 The
80 .Fn Q_Q2D
81 and
82 .Fn Q_Q2F
83 functions return the double and float representations of
84 .Fa q
85 respectively.
86 .Sh SEE ALSO
87 .Xr errno 2 ,
88 .Xr qmath 3 ,
89 .Xr stdint 7
90 .Sh HISTORY
91 The
92 .Xr qmath 3
93 functions first appeared in
94 .Fx 13.0 .
95 .Sh AUTHORS
96 .An -nosplit
97 The
98 .Xr qmath 3
99 functions and this manual page were written by
100 .An Lawrence Stewart Aq Mt lstewart@FreeBSD.org
101 and sponsored by Netflix, Inc.