Skip to content

louis-langholtz/realnumb

Repository files navigation

realnumb

A constexpr enhanced, real numbers, C++ library with support for fixed point types satisfying the LiteralType named requirement.

Why?

Why yet another fixed-point data type and math library?

Reasons:

  • For a constexpr enhanced fixed-point type.
  • For constexpr enhanced cmath functions at least for the fixed-point type.
  • For that fixed-point type to satisfy the LiteralType named requirement.
  • To get this code out from another project it had been in (PlayRho), and in to its own project.
  • Having a project whose consumption by another project of mine could be more readily tested.

Caveats

This is experimental code that's a work in progress.

Usage

Component

To use this within your own project...

CMake FetchContent Usage

Add the following to your CMake configuration where you replace your_target with your project's target name:

include(FetchContent)
FetchContent_Declare(
    realnumb
    GIT_REPOSITORY https://github.com/louis-langholtz/realnumb
    GIT_TAG main # Hash or tag or branch name
)
FetchContent_MakeAvailable(realnumb)
target_link_libraries(your_target realnumb)

Stand Alone

Like for development...

Via CMake

Configure and build:

cmake -S realnumb -B realnumb_build -DREALNUMB_BUILD_UNITTEST=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DREALNUMB_INSTALL=ON
cmake --build realnumb_build --config Release

Then, for a local install:

cmake --install realnumb_build --prefix realnumb_install

Related

About

A real numbers library with support for fixed point types.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published