From Jason Turner

[complex.numbers.general]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpkl0qky1l/{from.md → to.md} +30 -0
tmp/tmpkl0qky1l/{from.md → to.md} RENAMED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### General <a id="complex.numbers.general">[[complex.numbers.general]]</a>
2
+
3
+ The header `<complex>` defines a class template, and numerous functions
4
+ for representing and manipulating complex numbers.
5
+
6
+ The effect of instantiating the template `complex` for any type that is
7
+ not a cv-unqualified floating-point type [[basic.fundamental]] is
8
+ unspecified. Specializations of `complex` for cv-unqualified
9
+ floating-point types are trivially-copyable literal types
10
+ [[term.literal.type]].
11
+
12
+ If the result of a function is not mathematically defined or not in the
13
+ range of representable values for its type, the behavior is undefined.
14
+
15
+ If `z` is an lvalue of type cv `complex<T>` then:
16
+
17
+ - the expression `reinterpret_cast<cv T(&)[2]>(z)` is well-formed,
18
+ - `reinterpret_cast<cv T(&)[2]>(z)[0]` designates the real part of `z`,
19
+ and
20
+ - `reinterpret_cast<cv T(&)[2]>(z)[1]` designates the imaginary part of
21
+ `z`.
22
+
23
+ Moreover, if `a` is an expression of type cv `complex<T>*` and the
24
+ expression `a[i]` is well-defined for an integer expression `i`, then:
25
+
26
+ - `reinterpret_cast<cv T*>(a)[2*i]` designates the real part of `a[i]`,
27
+ and
28
+ - `reinterpret_cast<cv T*>(a)[2*i + 1]` designates the imaginary part of
29
+ `a[i]`.
30
+