• C++ 92.6%
  • CMake 7.4%
Find a file
2023-12-09 10:31:45 -07:00
.github/workflows Remove CodeQL workflow which does not seem to like header only libraries 2023-10-24 23:51:53 -06:00
build/realnumb.xcodeproj Switches back to Apple toolchain and more 2023-10-28 21:48:18 -06:00
library Adds basic asserts 2023-12-09 10:31:45 -07:00
unittest Various changes... 2023-10-28 18:50:04 -06:00
.clang-tidy Various updates... 2023-10-19 19:27:49 -06:00
.gitignore Updates ignored files 2023-12-09 09:30:29 -07:00
CMakeLists.txt Fixed project name in toplevel CMakeLists.txt file 2023-10-22 09:46:01 -06:00
LICENSE Initial commit 2023-10-18 14:56:51 -06:00
README.md Updates the README.md file 2023-10-24 15:15:28 -06:00

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