LIB2 / FILE VIEW

USER_MANUAL.md

DOWNLOAD ORIGINAL ↓

# MATHSOFT / generation 1 — User manual

**Library:** `src/lib2/mathsoft/1/`  
**Edition:** 2026-11-18, source/document review (documentation only)  
**Qualification:** Source-exact Math 1.1 r019 generation. Donor owner native build and TEST7 9/9 scoped witness; independent library ABI, broad numeric and cross-target certification pending.

## What this member does

Provide 17 software-defined Math 1.1 functions on nine-byte B9 decimal values, independently of resident PB-2000C MathROM.

## Public interfaces

| Entry point or group | Inputs, outputs and behavior |
|---|---|
| `M11_ADD / M11_SUB / M11_MUL` | Binary nine-byte B9 operations using `M_IN`, `M_A_INB`, `M_OUT`; status in `$0`. |
| `M11_DIV / M11_SQRT / M11_EXP` | Division, square root, exponential; donor-specific B9 input/output buffers. |
| `M11_LGT / M11_LN` | Base-10 / natural logarithm from shared log engine. |
| `M11_SIN / M11_COS / M11_TAN` | Trigonometry from shared trig engine. |
| `M11_SINH / M11_COSH / M11_TANH` | Hyperbolic functions from shared engine. |
| `M11_ASINH / M11_ACOSH / M11_ATANH` | Inverse hyperbolic functions from shared engine. |

## How to integrate

Include selected owner `.inc` file(s), required scratch and B9 dependencies exactly once; establish operands, `CAL M11_*`, examine `$0` (0 success, other codes function-dependent) and take output only on success. Follow `API.md` for complete per-entry owner/dependency matrix.

**Composition sketch (not an independently assembled client):**

```asm
        ; Caller must provide B9_ADD, M_IN, M_A_INB, M_OUT
        CAL     M11_ADD             ; result in M_OUT when $0=0
```

## Environment, dependencies and memory

Caller provides `M_IN`, `M_OUT`, `M_A_INB` nine-byte buffers, B9 helper routines where used, UA14, stack, SX/SY and non-overlapping storage. Scratch modules intentionally alias absolute addresses: operations are not reentrant/nestable. Cursor/keyscan linear adapters are historical test-platform files, not math methods.

## Limits and evidence

T04 `SIN(390°)` exact-byte deviation (~4e-13) remains owner-accepted, not globally waived. Some source comments refer to older workspace paths and do not imply current ABI proof.

**This documentation does not introduce a new build or runtime PASS.** Source equivalence, native assembler parity, emulator execution and physical-machine evidence remain distinct.

## Actual source and further reference

- [This exact member folder in Google Drive](https://drive.google.com/drive/folders/1pLbqjgUUzV8LTgVuyCPJ8qLDbC6zSrI9)
- Source modules: `add.inc`, `sub.inc`, `mul.inc`, `div.inc`, `sqrt.inc`, `exp.inc`, `log_core.inc`, `trig_core.inc`, `hyp_core.inc`, `invhyp_core.inc`, `scalar_scratch.inc`, `trig_scratch.inc`, `hyp_scratch.inc`, `invhyp_scratch.inc`, `cursor_linear.inc`, `keyscan_linear.inc`.
- Further contracts/source notes: API.md, API.json, README.md. These may include dated donor paths or older acceptance statements.
- For a new consumer, pin exact source files and hashes, verify full include closure, inspect register/bank/resource conflicts and test the resulting application on each claimed target.

*Praeteritum ad futurum servamus.*