Public repository: timo / feel

Reader

An interpreter of FEEL, written in Rust, with integrations for PostgreSQL, WASM, Lua, and Python.

docs: extend ADR-15 with sqrt/exp/log/even/odd

public

docs: extend ADR-15 with sqrt/exp/log/even/odd

Add the five functions to the implemented enumeration (with their domain
rules) and record the non-terminating-result tolerance bump (1e-9 -> 1e-8)
for exp/log.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Changesetfa69f1cb14e8517ad6707d404d42412cd2371fad
Author (claimed)Timo Stolz <timo.stolz@gmail.com>,
Parentsdc9275235e5a
Children
Pushlog
by timo via ssh

modified DECISIONS.md +7 −1

@@ -259,13 +259,19 @@
259259
   conversion `string`/`number`; string `substring`/`contains`/`replace`/`split`/
260260
   `matches`; list `count`/`min`/`max`/`sum`/`mean`/`product`/`median`/`stddev`/
261261
   `mode`/`all`/`any`/`append`/`concatenate`/`union`/`remove`/`reverse`/`flatten`/
262
-  `sublist`; numeric `decimal`/`floor`/`ceiling`/`abs`/`modulo`.
262
+  `sublist`; numeric `decimal`/`floor`/`ceiling`/`abs`/`modulo`/`sqrt`/`exp`/`log`/
263
+  `even`/`odd`. (`even`/`odd` reject non-integers, `sqrt` negatives, and `log`
264
+  non-positive arguments as domain errors.)
263265
   - **Error policy (ADR-14):** wrong arity / wrong type / domain error / unknown
264266
     name → *error-null*; spec-legitimate empty/absent results (`sum([]) = null`,
265267
     `min([]) = null`, `mode([]) = []`, `count([]) = 0`) → *value-null*. The N=0
266268
     vararg form (`all()`, `mode()`) is `null`, distinct from the empty-list arg.
267269
   - **Varargs:** aggregates accept either one list argument or a list of scalars
268270
     (`sum([1,2,3])` == `sum(1,2,3)`); a single list arg is unwrapped (`coerce_list`).
271
+  - **Non-terminating results (`decimal-vs-f64` deviation):** `exp`/`log` return
272
+    irrationals the TCK rounds to a fixed number of decimal places (8 → up to 5e-9
273
+    of truncation error), so the numeric comparison tolerance was widened from
274
+    1e-9 to 1e-8 to absorb that alongside the decimal128→f64 rounding.
269275
   - **Regex (`regex-xpath-dialect` deviation):** `replace`/`split`/`matches` use
270276
     Rust's `regex` crate, whose dialect differs from the spec's normative
271277
     XQuery/XPath 2.0 F&O regex. A minimal translation (`$N` → `${N}` in the