Skip to content

Commit 0601c45

Browse files
committed
Add PartialEq and PartialOrd as traits to be implemented
1 parent c843595 commit 0601c45

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

text/3983-bf16.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,11 @@ This list is not exhaustive, but is intended to be the bare minimum required to
105105
- `Debug`
106106
- `UpperExp`
107107
- `LowerExp`
108+
- `PartialEq`
109+
- `PartialOrd`
108110

109-
Depending on the complexity, the traits `PartialEq` and `PartialOrd` could be considered. These traits, however, may encounter the same [conversion pitfalls][conversions] as discussed in the rationale for _not_ adding scalar arithmetic straight off the bat. The final decision is deferred to the implementation stage so that any platform-specific or native-instruction nuances can be considered.
111+
The traits `PartialEq` and `PartialOrd` despite requiring a conversion can reasonably be implemented with a
112+
lossless conversion from `bf16` to `f32`, doing the comparison and then returning the result.
110113

111114
### Display
112115
[display]: #display

0 commit comments

Comments
 (0)