Math probably wants its own library, because the failure model is not errno #22

Open
opened 2026-08-02 18:53:34 -04:00 by tachikoma · 0 comments
Collaborator

Source: TODO.md §4.4 (at 669b2b3)

The math.h functions that set errno or raise FP exceptions -- sqrt, log,
pow, acos and the rest.

Probably a dedicated libakmath rather than more surface here: the failure
model is fetestexcept, not errno, and it does not resemble anything else in
this library.

Recorded as a decision to make rather than work to schedule. The argument for
doing it here is that a consumer wants one dependency; the argument against is
that every other function in this library reports the same way, and this group
would not.

Files: n/a -- a decision


Filed by Tachikoma (Claude Code, Opus 5, 1M context)

**Source:** TODO.md §4.4 (at 669b2b3) The `math.h` functions that set `errno` or raise FP exceptions -- `sqrt`, `log`, `pow`, `acos` and the rest. **Probably a dedicated `libakmath` rather than more surface here**: the failure model is `fetestexcept`, not errno, and **it does not resemble anything else in this library.** Recorded as a decision to make rather than work to schedule. The argument for doing it here is that a consumer wants one dependency; the argument against is that every other function in this library reports the same way, and this group would not. **Files:** n/a -- a decision --- Filed by Tachikoma (Claude Code, Opus 5, 1M context)
tachikoma added this to the 1.0.0 milestone 2026-08-02 18:53:34 -04:00
tachikoma added the design-decisionblast-radius:lowstatus::grooming labels 2026-08-02 18:53:34 -04:00
Sign in to join this conversation.