Uh oh!
There was an error while loading. Please reload this page.
Add BFloat16 - #98643
Conversation
ghost
commented
Feb 19, 2024
Note regarding the This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change. |
ghost
commented
Feb 19, 2024
Tagging subscribers to this area: @dotnet/area-system-numerics Issue DetailsCloses #96295. Delegating all functional members to float, since the upcast is trivial. The only logic is rounding from double.
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
tannergooding
commented
Sep 18, 2025
The changes generally LGTM. However there are still some open comments/feedback that should be addressed (at least getting a response elaborating why it doesn't need to be handled) before this can be merged |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
huoyaoyuan
commented
Sep 20, 2025
I should have addressed all comments, and log rounding concerns with other FP types to #112474. Interaction between For |
tannergooding
commented
Sep 23, 2025
This one is fine to split between them or to put it entirely in
Not sure what you mean? This one should be entirely in Complex/BigInteger due to layering. |
I'm concerned about whether they should take a dependency on The relationship between other types appears to be not included in the original API review. I really suggest to avoid introducing more dependency ship for now. We may add them later. |
tannergooding
commented
Sep 24, 2025
This would rather mainly be due to oversight.
Conversion operators are not usable in generic contexts like that, that is the reason we have
There is no additional "dependency". There is simply that we have a set of types that we ship "in box" and we want them to generally all work between eachother. That is part of the core and fundamental design of generic math. We can always provide a fallback that tries to deal with things generically, but that is expensive and rarely needed in practice since we can trivially and more cheaply just directly handle the known types. |
Is there anything to be added before being ready to merge now? |
Uh oh!
There was an error while loading. Please reload this page.
Do we want to have performance benchmarks for this type, like https://github.com/dotnet/performance/blob/main/src/benchmarks/micro/libraries/System.Runtime/Perf.Half.cs? Opened dotnet/performance#5002 for discussion. |
Closes#96295.
Delegating all functional members to float, since the upcast is trivial. The only logic is rounding from double.
Tests are borrowed from Half.