Skip to content

Type-erasure for floating point types. Facilitates writing general floating-point code without needing to worry about the exact floating-point type being used.

License

Notifications You must be signed in to change notification settings

NWChemEx/WeaklyTypedFloat

WeaklyTypedFloat (WTF)

This repo is still under heavy development! I am hoping for an alpha release this week.

The goal of WTF is to provide a small domain-specific language (DSL) that can be used to unify interfaces involving floating-point types. Using WTF the user writes their interfaces in terms of "weakly typed" objects like Float and FloatBuffer, and determination of the actual floating-point type is deferred to runtime.

Problem Description

Full description (TODO: Add link to the documentation)

Depending on the standard, C++ already natively has a lot of floating-point types, e.g., float, double, long double, std::complex<float>, and std::complex<double>. This is before considering custom floating-point types, such as those needed for automatic differentiation, or hardware-specific types. When attempting to maintain interfaces with explicit types (such as is required for C-style interfaces) this leads to a combinatorial explosion in the number of interfaces.

About

Type-erasure for floating point types. Facilitates writing general floating-point code without needing to worry about the exact floating-point type being used.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published