summaryrefslogtreecommitdiff
path: root/static/v10/man5/math.5
blob: 92ed3a57e3b64fe7d2e1aff15197c70fd542d6bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
.\"#ident	"@(#)ccsman:g5/math	1.2"
'\"macro stdmacro
.ie n \{\
.ds pI \fIpi\fP
.ds sR \fIsquare root of\fP\}
.el \{\
.ds pI \(*p
.ds sR \(sr\}
.nr X
.if \nX=0 .ds x} MATH 5 "630 MTG"  "\&"
.TH \*(x}
.SH NAME
math \- math functions and constants
.SH SYNOPSIS
.B #include <ccs/math.h>
.SH DESCRIPTION
This file contains declarations of all the functions in the
Math Library (described in Section 3M),
as well as various other functions
that return floating-point values.
.P
It defines the structure and constants used by the
.IR matherr (3M)
error-handling mechanisms, including
the following constant used as an
error-return value:
.P
.TP 20
.SM
HUGE
The maximum value of a single-precision floating-point number.
.P
The following mathematical constants are defined for user convenience:
.P
.TP 20
.SM
M_E
The base of natural logarithms
.RI ( e ).
.TP 20
.SM
M_LOG2E
The base-2 logarithm of
.IR e .
.TP 20
.SM
M_LOG10E
The base-10 logarithm of
.IR e .
.TP 20
.SM
M_LN2
The natural logarithm of 2.
.TP 20
.SM
M_LN10
The natural logarithm of 10.
.TP 20
.SM
M_PI
\*(pI, the ratio of the circumference of a circle to its diameter.
.TP 20 
.SM
M_PI_2
\*(pI/2.
.TP 20
.SM
M_PI_4
\*(pI/4.
.TP 20
.SM
M_1_PI
1/\*(pI.
.TP 20
.SM
M_2_PI
2/\*(pI.
.TP 20
.SM
M_2_SQRTPI
.EQ
2 over sqrt pi
.EN
.TP 20
.SM
M_SQRT2
.EQ
sqrt 2
.EN
.TP 20
.SM
M_SQRT1_2
.EQ
sqrt {1 over 2}
.EN
.P
For the definitions of various machine-dependent ``constants,''
see \f2values(5)\f1.
.SH FILES
$DMD/include/ccs/math.h
.SH "SEE ALSO"
matherr(3M),
values(5).
.Ee