Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand All @@ -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

Expand Down
1 change: 1 addition & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
4 changes: 2 additions & 2 deletions include/formula-cpp/version.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
4 changes: 2 additions & 2 deletions test/runtime_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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]")
Expand Down
Loading