Generic Math in .NET 7
summary
Generic Math in .NET 7 introduces a concrete claim and a working toolset: dozens of new numeric interfaces applied to primitives that let one write a single generic algorithm instead of many overloads. It adds 30+ interfaces and static abstract interface members, new operator forms like create checked and checked/unchecked operator overloads, and new types such as n128 and Half. Library refactors (LINQ average/sum) remove duplicated code — removed ~830 lines — and runtime work keeps startup fast.
AI-written summary · about
chapters (12)
- 0:00Introduction
- 1:25What is generic math
- 2:53Live demo: standard deviation
- 9:20Implementing standard deviation
- 11:47Midpoint calculation
- 15:02Custom numeric types
- 18:15API design
- 27:10Language features
- 32:07Checked operators
- 36:01Preview features
- 37:47Runtime refactoring
- 40:18Summary
related talks
27mN Ways to Do Machine Learning on .NET
01h 00m“CNL: A Compositional Numeric Library”
55mPaths to Support Additional Numeric Types on the Java Platform
51mPaths to New Numeric Types On the Java Platform
49mA Hands on Tutorial to Generic Programming in Haskell (Part 2)
40mHidden GEMMs: How Optimized Math Libraries Work
18mScientific Swift
43mThinking Functionally with C#
