CppCon 2017: CNL: A Compositional Numeric Library--John McFarlane
Have you registered for CppCon 2018 in September? Registration is open now.
While we wait for this year’s event, we’re featuring videos of some of the 100+ talks from CppCon 2017 for you to enjoy. Here is today’s feature:
CNL: A Compositional Numeric Library
by John McFarlane
Summary of the talk:
CNL is a numerics library born out of efforts to standardize fixed-point arithmetic.
It provides number types which increase precision, enforce correctness and maintain efficiency.
And by designing these types with composability in mind, the library aims to do for integers what the STL does for pointers.This introductory talk will show potential users how they can benefit from using CNL in a wide variety of applications. Firstly, the individual components will be illustrated using straightforward examples. Then we'll see how these components slot together to produce powerful new types. Finally I'll detail the steps necessary to adapt existing types to work within the CNL framework.
Along the way, I hope to share some of the insights I've gained while learning about literal types including: why you shouldn't mess with `int` if you want zero-cost abstractions; how C++ is getting better at supporting new number types and my hopes for the forthcoming Numeric TS.