From cebbee8008337c0b054de419318f6cc78c86000f Mon Sep 17 00:00:00 2001 From: Christian Parpart Date: Mon, 5 Oct 2026 07:03:13 +0200 Subject: [PATCH] chore(release): prepare 0.4.0 The version test pins the number literally, so it moves with the header and project(VERSION). Signed-off-by: Christian Parpart --- CHANGELOG.md | 13 ++++++++++++- CMakeLists.txt | 2 +- README.md | 3 ++- docs/index.md | 1 + include/formula-cpp/version.hpp | 4 ++-- test/runtime_tests.cpp | 4 ++-- 6 files changed, 20 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b563f76..71d2ace 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,16 @@ change is recorded here. ## [Unreleased] +## [0.4.0] - 2026-10-05 + +The fourth release. Exact numbers hold 128 bits: `Rational` stores a new `formula::Int128`, so realistic laboratory +statistics that overflowed 64 bits now answer, and `rounded_ln`, `rounded_log10` and `rounded_exp` take every +argument a `Rational` holds. Every value a trace, a rendered formula, `number_text` or `std::format` writes now names +the unit its number is in: a computed value borrows its operand's unit or shows its coherent unit's spelling, a unit +with no symbol is named by its size, and an inverse unit reads `kg^-1`. `explain` of a series is refused in the +library's words. Some changes break code written for 0.3.0, among them a dimensionless unit with a scale and no +symbol, which no longer compiles; each is listed under Changed. + ### Added - **`formula::Int128`** (`int128.hpp`), a signed 128-bit integer with one API on every compiler: the compiler's own @@ -751,7 +761,8 @@ are one type; `docs/quantities.md` sets out what each spelling costs. for 205.5 g, and so were a curve over it and a value read off that curve. Each now reads in the series' unit, `411/2 g`, when that unit has a symbol and no offset. -[Unreleased]: https://github.com/LASTRADA-Software/formula-cpp/compare/v0.3.0...HEAD +[Unreleased]: https://github.com/LASTRADA-Software/formula-cpp/compare/v0.4.0...HEAD +[0.4.0]: https://github.com/LASTRADA-Software/formula-cpp/releases/tag/v0.4.0 [0.3.0]: https://github.com/LASTRADA-Software/formula-cpp/releases/tag/v0.3.0 [0.2.0]: https://github.com/LASTRADA-Software/formula-cpp/releases/tag/v0.2.0 [0.1.0]: https://github.com/LASTRADA-Software/formula-cpp/releases/tag/v0.1.0 diff --git a/CMakeLists.txt b/CMakeLists.txt index e481afe..88d7ae2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 3.23) # silently becomes 0.0.0 and every find_package(formula-cpp 0.1.0) then fails # with an error the git tag does not explain. project(formula-cpp - VERSION 0.3.0 + VERSION 0.4.0 DESCRIPTION "Declarative, traceable, self-documenting formulas for C++23" HOMEPAGE_URL "https://github.com/LASTRADA-Software/formula-cpp" LANGUAGES CXX) diff --git a/README.md b/README.md index b87fce1..ba9f0aa 100644 --- a/README.md +++ b/README.md @@ -319,7 +319,7 @@ Each guide has a matching runnable program under `examples/`. ## Status -0.3.0 is the latest release ([CHANGELOG](CHANGELOG.md)). Usable for what is listed as shipped, +0.4.0 is the latest release ([CHANGELOG](CHANGELOG.md)). Usable for what is listed as shipped, and still growing. The public API may change until 1.0. | Area | State | @@ -346,6 +346,7 @@ and still growing. The public API may change until 1.0. | Decimals in traces, rendered formulas and `std::format` | shipped | | Calculations: definitions, dependency graph, incremental worksheets | shipped | | Short spellings: exact decimal literals, bound formulas, `number_of`, `trace_of`, `std::format` of results | shipped | +| 128-bit exact numbers, and a unit named on every value a trace or formula writes | shipped | ## Requirements diff --git a/docs/index.md b/docs/index.md index e9deb5a..c5884a6 100644 --- a/docs/index.md +++ b/docs/index.md @@ -134,5 +134,6 @@ Usable for what is listed as shipped, and still growing. The public API may chan | Decimals in traces, rendered formulas and `std::format` | shipped | | Calculations: definitions, dependency graph, incremental worksheets | shipped | | Short spellings: exact decimal literals, bound formulas, `number_of`, `trace_of`, `std::format` of results | shipped | +| 128-bit exact numbers, and a unit named on every value a trace or formula writes | shipped | Apache-2.0. Source at [github.com/LASTRADA-Software/formula-cpp](https://github.com/LASTRADA-Software/formula-cpp). diff --git a/include/formula-cpp/version.hpp b/include/formula-cpp/version.hpp index a80225e..4062ec0 100644 --- a/include/formula-cpp/version.hpp +++ b/include/formula-cpp/version.hpp @@ -10,8 +10,8 @@ /// The major version -- bumped for a breaking change. #define FORMULA_VERSION_MAJOR 0 /// The minor version -- bumped for a compatible feature addition. -#define FORMULA_VERSION_MINOR 3 +#define FORMULA_VERSION_MINOR 4 /// The patch version -- bumped for a compatible fix. #define FORMULA_VERSION_PATCH 0 /// The full version, as a string literal. -#define FORMULA_VERSION_STRING "0.3.0" +#define FORMULA_VERSION_STRING "0.4.0" diff --git a/test/runtime_tests.cpp b/test/runtime_tests.cpp index 6d96a50..bcfa1a4 100644 --- a/test/runtime_tests.cpp +++ b/test/runtime_tests.cpp @@ -10,9 +10,9 @@ TEST_CASE("version macros agree with each other", "[version]") { CHECK(FORMULA_VERSION_MAJOR == 0); - CHECK(FORMULA_VERSION_MINOR == 3); + CHECK(FORMULA_VERSION_MINOR == 4); CHECK(FORMULA_VERSION_PATCH == 0); - CHECK(std::string_view { FORMULA_VERSION_STRING } == "0.3.0"); + CHECK(std::string_view { FORMULA_VERSION_STRING } == "0.4.0"); } TEST_CASE("quantity types survive a translation unit boundary", "[linkage]")