Init
This commit is contained in:
44
cppdraft/numerics/c.md
Normal file
44
cppdraft/numerics/c.md
Normal file
@@ -0,0 +1,44 @@
|
||||
[numerics.c]
|
||||
|
||||
# 29 Numerics library [[numerics]](./#numerics)
|
||||
|
||||
## 29.11 C compatibility [numerics.c]
|
||||
|
||||
### [29.11.1](#stdckdint.h.syn) Header <stdckdint.h> synopsis [[stdckdint.h.syn]](stdckdint.h.syn)
|
||||
|
||||
[ð](#header:%3cstdckdint.h%3e)
|
||||
|
||||
#define __STDC_VERSION_STDCKDINT_H__ 202311Ltemplate<class type1, class type2, class type3>bool ckd_add(type1* result, type2 a, type3 b);template<class type1, class type2, class type3>bool ckd_sub(type1* result, type2 a, type3 b);template<class type1, class type2, class type3>bool ckd_mul(type1* result, type2 a, type3 b);
|
||||
|
||||
[1](#stdckdint.h.syn-1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L20627)
|
||||
|
||||
See also: ISO/IEC 9899:2024, 7.20
|
||||
|
||||
### [29.11.2](#ckdint) Checked integer operations [[numerics.c.ckdint]](numerics.c.ckdint)
|
||||
|
||||
[ð](#lib:ckd_add)
|
||||
|
||||
`template<class type1, class type2, class type3>
|
||||
bool ckd_add(type1* result, type2 a, type3 b);
|
||||
template<class type1, class type2, class type3>
|
||||
bool ckd_sub(type1* result, type2 a, type3 b);
|
||||
template<class type1, class type2, class type3>
|
||||
bool ckd_mul(type1* result, type2 a, type3 b);
|
||||
`
|
||||
|
||||
[1](#ckdint-1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L20645)
|
||||
|
||||
*Mandates*: Each of the types type1, type2, and type3 is a
|
||||
cv-unqualified signed or unsigned integer type[.](#ckdint-1.sentence-1)
|
||||
|
||||
[2](#ckdint-2)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L20650)
|
||||
|
||||
*Remarks*: Each function template has the same semantics as
|
||||
the corresponding type-generic macro with the same name
|
||||
specified in ISO/IEC 9899:2024, 7.20[.](#ckdint-2.sentence-1)
|
||||
32
cppdraft/numerics/c/ckdint.md
Normal file
32
cppdraft/numerics/c/ckdint.md
Normal file
@@ -0,0 +1,32 @@
|
||||
[numerics.c.ckdint]
|
||||
|
||||
# 29 Numerics library [[numerics]](./#numerics)
|
||||
|
||||
## 29.11 C compatibility [[numerics.c]](numerics.c#ckdint)
|
||||
|
||||
### 29.11.2 Checked integer operations [numerics.c.ckdint]
|
||||
|
||||
[ð](#lib:ckd_add)
|
||||
|
||||
`template<class type1, class type2, class type3>
|
||||
bool ckd_add(type1* result, type2 a, type3 b);
|
||||
template<class type1, class type2, class type3>
|
||||
bool ckd_sub(type1* result, type2 a, type3 b);
|
||||
template<class type1, class type2, class type3>
|
||||
bool ckd_mul(type1* result, type2 a, type3 b);
|
||||
`
|
||||
|
||||
[1](#1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L20645)
|
||||
|
||||
*Mandates*: Each of the types type1, type2, and type3 is a
|
||||
cv-unqualified signed or unsigned integer type[.](#1.sentence-1)
|
||||
|
||||
[2](#2)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L20650)
|
||||
|
||||
*Remarks*: Each function template has the same semantics as
|
||||
the corresponding type-generic macro with the same name
|
||||
specified in ISO/IEC 9899:2024, 7.20[.](#2.sentence-1)
|
||||
29
cppdraft/numerics/defns.md
Normal file
29
cppdraft/numerics/defns.md
Normal file
@@ -0,0 +1,29 @@
|
||||
[numerics.defns]
|
||||
|
||||
# 26 Algorithms library [[algorithms]](./#algorithms)
|
||||
|
||||
## 26.10 Generalized numeric operations [[numeric.ops]](numeric.ops#numerics.defns)
|
||||
|
||||
### 26.10.2 Definitions [numerics.defns]
|
||||
|
||||
[1](#1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L12270)
|
||||
|
||||
Define *GENERALIZED_NONCOMMUTATIVE_SUM*(op, a1, …, aN) as follows:
|
||||
|
||||
- [(1.1)](#1.1)
|
||||
|
||||
a1 when N is 1, otherwise
|
||||
|
||||
- [(1.2)](#1.2)
|
||||
|
||||
op(*GENERALIZED_NONCOMMUTATIVE_SUM*(op, a1, …, aK),
|
||||
op(*GENERALIZED_NONCOMMUTATIVE_SUM*(op, aM, …, aN)) for any K where 1<K+1=Mâ¤N[.](#1.2.sentence-2)
|
||||
|
||||
[2](#2)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L12284)
|
||||
|
||||
Define *GENERALIZED_SUM*(op, a1, …, aN) as*GENERALIZED_NONCOMMUTATIVE_SUM*(op, b1, …, bN),
|
||||
whereb1, …, bN may be any permutation of a1, …, aN[.](#2.sentence-1)
|
||||
37
cppdraft/numerics/general.md
Normal file
37
cppdraft/numerics/general.md
Normal file
@@ -0,0 +1,37 @@
|
||||
[numerics.general]
|
||||
|
||||
# 29 Numerics library [[numerics]](./#numerics)
|
||||
|
||||
## 29.1 General [numerics.general]
|
||||
|
||||
[1](#1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L6)
|
||||
|
||||
This Clause describes components that C++ programs may use to perform
|
||||
seminumerical operations[.](#1.sentence-1)
|
||||
|
||||
[2](#2)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10)
|
||||
|
||||
The following subclauses describe components for
|
||||
complex number types, random number generation,
|
||||
numeric (*n*-at-a-time)
|
||||
arrays, generalized numeric algorithms, and
|
||||
mathematical constants and functions for floating-point types,
|
||||
as summarized in Table [125](#tab:numerics.summary "Table 125: Numerics library summary")[.](#2.sentence-1)
|
||||
|
||||
Table [125](#tab:numerics.summary) — Numerics library summary [[tab:numerics.summary]](./tab:numerics.summary)
|
||||
|
||||
| [ð](#tab:numerics.summary-row-1) | **Subclause** | **Header** |
|
||||
| --- | --- | --- |
|
||||
| [ð](#tab:numerics.summary-row-2)<br>[[numeric.requirements]](numeric.requirements "29.2 Numeric type requirements") | Requirements | |
|
||||
| [ð](#tab:numerics.summary-row-3)<br>[[cfenv]](cfenv "29.3 The floating-point environment") | Floating-point environment | <cfenv> |
|
||||
| [ð](#tab:numerics.summary-row-4)<br>[[complex.numbers]](complex.numbers "29.4 Complex numbers") | Complex numbers | <complex> |
|
||||
| [ð](#tab:numerics.summary-row-5)<br>[[rand]](rand "29.5 Random number generation") | Random number generation | <random> |
|
||||
| [ð](#tab:numerics.summary-row-6)<br>[[numarray]](numarray "29.6 Numeric arrays") | Numeric arrays | <valarray> |
|
||||
| [ð](#tab:numerics.summary-row-7)<br>[[c.math]](c.math "29.7 Mathematical functions for floating-point types") | Mathematical functions for floating-point types | <cmath>, <cstdlib> |
|
||||
| [ð](#tab:numerics.summary-row-8)<br>[[numbers]](numbers "29.8 Numbers") | Numbers | <numbers> |
|
||||
| [ð](#tab:numerics.summary-row-9)<br>[[linalg]](linalg "29.9 Basic linear algebra algorithms") | Linear algebra | <linalg> |
|
||||
| [ð](#tab:numerics.summary-row-10)<br>[[simd]](simd "29.10 Data-parallel types") | Data-parallel types | <simd> |
|
||||
Reference in New Issue
Block a user