ocaml: phase 6 Float module: sqrt/sin/cos/pow/floor/ceil/round/pi (+6 tests, 378 total)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 24s

Wraps host SX math primitives via _float_* builtins. Float.pi is a
Float literal in the OCaml-side module.
This commit is contained in:
2026-05-08 13:58:52 +00:00
parent ee002f2e02
commit 986b15c0e5
4 changed files with 43 additions and 1 deletions

View File

@@ -266,7 +266,8 @@ SX CEK evaluator (both JS and OCaml hosts)
_(Pending: escaped.)_
- [~] `Int`: `to_string`, `of_string`, `abs`, `max`, `min`.
_(Pending: arithmetic helpers, min_int/max_int.)_
- [~] `Float`: `to_string`. _(Pending: of_string, arithmetic helpers.)_
- [~] `Float`: `to_string`, `sqrt`, `sin`, `cos`, `pow`, `floor`,
`ceil`, `round`, `pi`. _(Pending: of_string.)_
- [~] `Printf`: stub `sprintf`/`printf`. _(Real format-string
interpretation pending.)_
- [ ] `String`: `length`, `get`, `sub`, `concat`, `split_on_char`, `trim`,
@@ -373,6 +374,9 @@ the "mother tongue" closure: OCaml → SX → OCaml. This means:
_Newest first._
- 2026-05-08 Phase 6 — Float module: sqrt/sin/cos/pow/floor/ceil/round
+ pi constant (+6 tests, 378 total). Wraps host SX math primitives
via `_float_*` builtins.
- 2026-05-08 Phase 1+5+6 — Float arithmetic (`+.` `-.` `*.` `/.`)
(+5 tests, 372 total). Tokenizer recognises the dotted operators.
Parser table places them at int's level (7 / 8). Eval routes them