File: math_index.rst

package info (click to toggle)
xsimd 13.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,716 kB
  • sloc: cpp: 36,557; sh: 541; makefile: 184; python: 117
file content (172 lines) | stat: -rw-r--r-- 10,623 bytes parent folder | download
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
.. Copyright (c) 2016, Johan Mabille, Sylvain Corlay

   Distributed under the terms of the BSD 3-Clause License.

   The full license is in the file LICENSE, distributed with this software.

.. raw:: html

   <style>
   .rst-content table.docutils {
       width: 100%;
       table-layout: fixed;
   }

   table.docutils .line-block {
       margin-left: 0;
       margin-bottom: 0;
   }

   table.docutils code.literal {
       color: initial;
   }

   code.docutils {
       background: initial;
   }
   </style>


Mathematical functions
======================

Basic functions:

+---------------------------------------+----------------------------------------------------+
| :cpp:func:`abs`                       | absolute value                                     |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`fabs`                      | absolute value of floating point values            |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`fmod`                      | remainder of the floating point division operation |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`remainder`                 | signed remainder of the division operation         |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`min`                       | smaller of two batches                             |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`max`                       | larger of two batches                              |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`fmin`                      | smaller of two batches of floating point values    |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`fmax`                      | larger of two batches of floating point values     |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`fdim`                      | positive difference                                |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`clip`                      | clipping operation                                 |
+---------------------------------------+----------------------------------------------------+

Exponential functions:

+---------------------------------------+----------------------------------------------------+
| :cpp:func:`exp`                       | natural exponential function                       |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`exp2`                      | base 2 exponential function                        |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`exp10`                     | base 10 exponential function                       |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`expm1`                     | natural exponential function, minus one            |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`log`                       | natural logarithm function                         |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`log2`                      | base 2 logarithm function                          |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`log10`                     | base 10 logarithm function                         |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`log1p`                     | natural logarithm of one plus function             |
+---------------------------------------+----------------------------------------------------+

Power functions:

+-----------------------------------------+----------------------------------------------------+
| :cpp:func:`pow`                         | power function                                     |
+-----------------------------------------+----------------------------------------------------+
| :cpp:func:`rsqrt`                       | reciprocal square root function                    |
+-----------------------------------------+----------------------------------------------------+
| :cpp:func:`sqrt`                        | square root function                               |
+-----------------------------------------+----------------------------------------------------+
| :cpp:func:`cbrt`                        | cubic root function                                |
+-----------------------------------------+----------------------------------------------------+
| :cpp:func:`hypot`                       | hypotenuse function                                |
+-----------------------------------------+----------------------------------------------------+

Trigonometric functions:

+---------------------------------------+----------------------------------------------------+
| :cpp:func:`sin`                       | sine function                                      |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`cos`                       | cosine function                                    |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`sincos`                    | sine and cosine function                           |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`tan`                       | tangent function                                   |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`asin`                      | arc sine function                                  |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`acos`                      | arc cosine function                                |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`atan`                      | arc tangent function                               |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`atan2`                     | arc tangent function, determining quadrants        |
+---------------------------------------+----------------------------------------------------+

Hyperbolic functions:

+---------------------------------------+----------------------------------------------------+
| :cpp:func:`sinh`                      | hyperbolic sine function                           |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`cosh`                      | hyperbolic cosine function                         |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`tanh`                      | hyperbolic tangent function                        |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`asinh`                     | inverse hyperbolic sine function                   |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`acosh`                     | inverse hyperbolic cosine function                 |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`atanh`                     | inverse hyperbolic tangent function                |
+---------------------------------------+----------------------------------------------------+

Error functions:

+---------------------------------------+----------------------------------------------------+
| :cpp:func:`erf`                       | error function                                     |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`erfc`                      | complementary error function                       |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`tgamma`                    | gamma function                                     |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`lgamma`                    | natural logarithm of the gamma function            |
+---------------------------------------+----------------------------------------------------+

Nearint operations:

+---------------------------------------+----------------------------------------------------+
| :cpp:func:`ceil`                      | nearest integers not less                          |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`floor`                     | nearest integers not greater                       |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`trunc`                     | nearest integers not greater in magnitude          |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`round`                     | nearest integers, rounding away from zero          |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`nearbyint`                 | nearest integers using current rounding mode       |
+---------------------------------------+----------------------------------------------------+
| :cpp:func:`rint`                      | nearest integers using current rounding mode       |
+---------------------------------------+----------------------------------------------------+


----

.. doxygengroup:: batch_math
   :project: xsimd
   :content-only:

.. doxygengroup:: batch_trigo
   :project: xsimd
   :content-only:

.. doxygengroup:: batch_rounding
   :project: xsimd
   :content-only:

.. doxygengroup:: batch_math_extra
   :project: xsimd
   :content-only: