{"id":15719393,"url":"https://github.com/louis-langholtz/realnumb","last_synced_at":"2025-05-13T02:30:08.167Z","repository":{"id":201076761,"uuid":"706901872","full_name":"louis-langholtz/realnumb","owner":"louis-langholtz","description":"A real numbers library with support for fixed point types.","archived":false,"fork":false,"pushed_at":"2023-12-09T17:33:11.000Z","size":89,"stargazers_count":3,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-01T06:02:06.674Z","etag":null,"topics":["cpp17","fixed-point","math-library"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/louis-langholtz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-18T20:56:50.000Z","updated_at":"2024-06-03T21:03:52.000Z","dependencies_parsed_at":"2024-10-24T15:28:44.749Z","dependency_job_id":"db3e82c8-9662-401f-979b-b5de82e93d1c","html_url":"https://github.com/louis-langholtz/realnumb","commit_stats":null,"previous_names":["louis-langholtz/realnumb"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/louis-langholtz%2Frealnumb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/louis-langholtz%2Frealnumb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/louis-langholtz%2Frealnumb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/louis-langholtz%2Frealnumb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/louis-langholtz","download_url":"https://codeload.github.com/louis-langholtz/realnumb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253859245,"owners_count":21975071,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp17","fixed-point","math-library"],"created_at":"2024-10-03T21:55:39.672Z","updated_at":"2025-05-13T02:30:08.127Z","avatar_url":"https://github.com/louis-langholtz.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# realnumb\n\nA `constexpr` enhanced, real numbers, C++ library with support for fixed point types satisfying the [LiteralType](https://en.cppreference.com/w/cpp/named_req/LiteralType) named requirement.\n\n## Why?\n\nWhy yet another fixed-point data type and math library?\n\nReasons:\n\n- For a `constexpr` enhanced fixed-point type.\n- For `constexpr` enhanced `cmath` functions at least for the fixed-point type.\n- For that fixed-point type to satisfy the `LiteralType` named requirement.\n- To get this code out from another project it had been in ([PlayRho](https://github.com/louis-langholtz/PlayRho)), and in to its own project.\n- Having a project whose consumption by another project of mine could be more readily tested.\n\n## Caveats\n\nThis is experimental code that's a work in progress.\n\n## Usage\n\n### Component\n\nTo use this within your own project...\n\n#### CMake FetchContent Usage\n\nAdd the following to your CMake configuration where you replace `your_target` with your project's target name:\n\n```cmake\ninclude(FetchContent)\nFetchContent_Declare(\n    realnumb\n    GIT_REPOSITORY https://github.com/louis-langholtz/realnumb\n    GIT_TAG main # Hash or tag or branch name\n)\nFetchContent_MakeAvailable(realnumb)\ntarget_link_libraries(your_target realnumb)\n```\n\n### Stand Alone\n\nLike for development...\n\n#### Via CMake\n\nConfigure and build:\n\n```sh\ncmake -S realnumb -B realnumb_build -DREALNUMB_BUILD_UNITTEST=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DREALNUMB_INSTALL=ON\ncmake --build realnumb_build --config Release\n```\n\nThen, for a local install:\n\n```sh\ncmake --install realnumb_build --prefix realnumb_install\n```\n\n## Related\n\n- [Fixed point arithmetic on WikiPedia](https://en.wikipedia.org/wiki/Fixed-point_arithmetic).\n- [PlayRho](https://github.com/louis-langholtz/PlayRho) issue [No external fixed-point implementation supported](https://github.com/louis-langholtz/PlayRho/issues/295).\n- [Compositional Numeric Library](https://github.com/johnmcfarlane/cnl), a C++ library of fixed-precision numeric classes.\n- [libfixmath archived at code.google.com](https://code.google.com/archive/p/libfixmath/) and [libfixmath at github](https://github.com/PetteriAimonen/libfixmath). Neither of these appear to have `constexpr` support, nor support for anything but [Q16.16](https://en.wikipedia.org/wiki/Q_(number_format)) format, nor active maintenance.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flouis-langholtz%2Frealnumb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flouis-langholtz%2Frealnumb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flouis-langholtz%2Frealnumb/lists"}