Skip to content

Commit aefec14

Browse files
authored
Update type promotion rules for complex dtypes (#491)
* Update type promotion rules for complex dtypes - Add a table with promotion rules - Update type promotion lattice diagram Closes gh-477 Closes gh-478 * Update floating-point type promotion table to include complex dtypes * Update type promotion lattice diagram - mixed float/complex * Remove image that is no longer used
1 parent 6d88b3f commit aefec14

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

spec/API_specification/type_promotion.rst

+16-7
Original file line numberDiff line numberDiff line change
@@ -89,18 +89,27 @@ Mixed unsigned and signed integer type promotion table
8989
Floating-point type promotion table
9090
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9191

92-
+--------+----+----+
93-
| | f4 | f8 |
94-
+========+====+====+
95-
| **f4** | f4 | f8 |
96-
+--------+----+----+
97-
| **f8** | f8 | f8 |
98-
+--------+----+----+
92+
+---------+-----+-----+-----+-----+
93+
| | f4 | f8 | c8 | c16 |
94+
+=========+=====+=====+=====+=====+
95+
| **f4** | f4 | f8 | c8 | c16 |
96+
+---------+-----+-----+-----+-----+
97+
| **f8** | f8 | f8 | c16 | c16 |
98+
+---------+-----+-----+-----+-----+
99+
| **c8** | c8 | c16 | c8 | c16 |
100+
+---------+-----+-----+-----+-----+
101+
| **c16** | c16 | c16 | c16 | c16 |
102+
+---------+-----+-----+-----+-----+
99103

100104
where
101105

102106
- **f4**: single-precision (32-bit) floating-point number (i.e., ``float32``)
103107
- **f8**: double-precision (64-bit) floating-point number (i.e., ``float64``)
108+
- **c8**: single-precision complex floating-point number (i.e., ``complex64``)
109+
composed of two single-precision (32-bit) floating-point numbers
110+
- **c16**: double-precision complex floating-point number (i.e., ``complex128``)
111+
composed of two double-precision (64-bit) floating-point numbers
112+
104113

105114
Notes
106115
~~~~~
-10.2 KB
Binary file not shown.
-25.4 KB
Loading

0 commit comments

Comments
 (0)