Repository Public MIT
1<div align="center">23<img src="docs/brand/logo.svg" alt="ORIX Calc logo" width="560">45<br><br>67<img src="docs/brand/icon.png" alt="ORIX Calc icon" width="112" height="112">89# ORIX Calc1011**One Calculator. Infinite Possibilities.**1213Standard · Scientific · Financial · Graph · Math · Statistics · Convert · Workspace —<br>14eight environments on one exact calculation engine, fully on device, for iPhone and iPad.1516**Author: [Simon-Pierre Boucher](https://www.spboucher.ai)**17181920-6366F1?style=for-the-badge)21222324-FA7343?style=flat-square&logo=swift&logoColor=white)252627282930313233343536373839404142[](https://git.spboucher.ai/orix-calc/commits)43[](https://git.spboucher.ai/orix-calc/commits)44[](https://git.spboucher.ai/orix-calc/insights)45[](https://git.spboucher.ai/orix-calc)46[](https://git.spboucher.ai/orix-calc/insights)47[](https://git.spboucher.ai/orix-calc)48[](https://git.spboucher.ai/orix-calc/branches)49[](https://git.spboucher.ai/orix-calc/tags)50[](https://git.spboucher.ai/orix-calc)51525354555657585960616263646566%20uploaded-22C55E?style=flat-square)676869</div>7071> Every badge above states something that can be checked in this repository: counts are taken from `git ls-files`, test72> totals from `Scripts/test-all.sh`, versions from `project.yml` and the package manifests. Release and TestFlight status is73> tracked in [`RELEASE-REPORT.md`](RELEASE-REPORT.md).7475---7677## Table of contents78791. [Product overview](#1-product-overview) · 2. [ORIX philosophy](#2-orix-philosophy) · 3. [Application preview](#3-application-preview)804. [Standard](#4-standard-calculator) · 5. [Scientific](#5-scientific-calculator) · 6. [Financial](#6-financial-calculator) · 7. [Graph](#7-graphing-calculator) · 8. [Math](#8-advanced-mathematics) · 9. [Statistics](#9-statistics) · 10. [Convert](#10-unit-conversion) · 11. [Workspace](#11-workspace)8112. [Signature features](#12-signature-features) · 13. [Numerical architecture](#13-numerical-architecture) · 14. [Precision strategy](#14-precision-strategy) · 15. [Technology stack](#15-technology-stack) · 16. [Project structure](#16-project-structure)8217. [Installation](#17-installation) · 18. [Build instructions](#18-build-instructions) · 19. [Testing](#19-testing) · 20. [Mathematical validation](#20-mathematical-validation) · 21. [Performance](#21-performance)8322. [Privacy](#22-privacy) · 23. [Accessibility](#23-accessibility) · 24. [Localization](#24-localization) · 25. [Roadmap](#25-roadmap) · 26. [Release status](#26-release-status) · 27. [Known limitations](#27-known-limitations) · 28. [ORIX ecosystem](#28-orix-ecosystem) · 29. [License](#29-license) · [Author](#author)8485---8687## 1. Product overview8889ORIX Calc replaces a drawer of calculators with one native app. Typing `25 × 4` is as direct as on the built-in calculator;90the same engine also solves a Canadian mortgage, finds every IRR of an irregular cash flow, plots `tan x` without drawing91lines through its asymptotes, integrates `x·eˣ` symbolically, runs a t-test, converts 331 units exactly, and keeps a92notebook whose results update when you move a slider.9394| | |95|---|---|96| **Platforms** | iPhone and iPad, iOS / iPadOS 26.0 or later |97| **Language / UI** | Swift 6 (strict concurrency), SwiftUI |98| **Architecture** | 9 engine packages with no UI code, 7 feature packages, 1 design-system package, a thin app target |99| **Network** | None required. One optional, user-initiated download of ECB currency reference rates |100| **Accounts** | None |101| **Status** | Pre-release: feature-complete, all automated tests passing, build 1.0.0 (1) uploaded to TestFlight on 2026-11-20 |102103### What makes it different104105| Typical calculator app | ORIX Calc |106|---|---|107| `0.1 + 0.2 = 0.30000000000000004`, or rounded so you cannot tell | Decimals are exact fractions: `0.3`, labelled **exact** |108| One IRR, even when several exist | Every IRR is listed, with the reason no single rate exists |109| Mortgages assume monthly compounding | Canadian semi-annual compounding or US monthly, chosen explicitly |110| A vertical line where `1/x` has a pole | Curves are never joined across a discontinuity |111| A numerical value presented as "the answer" | Each result says **Exact**, **Symbolic**, **Numerical ≈** or **Not supported** |112| A decorative "verified" tick | A badge that appears only when checks ran, and lists them |113114## 2. ORIX philosophy1151161. **Correct before pretty.** A result that cannot be computed reliably is an error message, never a plausible number.1172. **Say what was computed.** Exactness, method, assumptions and conventions are always visible or one tap away.1183. **Local first.** No account, no cloud, no analytics, no advertising. Your calculations stay on your device.1194. **One engine.** Eight environments share one parser, one arithmetic, one history and one set of variables.1205. **Native.** SwiftUI, SwiftData, Swift Charts, Accelerate, Vision, App Intents — and two small, pinned dependencies.1216. **Tested like a library.** Every engine is a Swift package tested from the command line against independent references.122123## 3. Application preview124125All images are screenshots of the running app, captured by [`Scripts/screenshots.sh`](Scripts/screenshots.sh).126Nothing is composited or mocked.127128<div align="center">129<table>130<tr>131<td align="center"><img src="docs/screenshots/standard.png" alt="Standard calculator" width="200"><br><sub><b>Standard</b></sub></td>132<td align="center"><img src="docs/screenshots/scientific.png" alt="Scientific calculator" width="200"><br><sub><b>Scientific</b></sub></td>133<td align="center"><img src="docs/screenshots/financial.png" alt="Financial calculator, time value of money" width="200"><br><sub><b>Financial</b></sub></td>134<td align="center"><img src="docs/screenshots/graph.png" alt="Graphing calculator" width="200"><br><sub><b>Graph</b></sub></td>135</tr>136<tr>137<td align="center"><img src="docs/screenshots/math.png" alt="Math environment" width="200"><br><sub><b>Math</b></sub></td>138<td align="center"><img src="docs/screenshots/statistics.png" alt="Statistics environment" width="200"><br><sub><b>Statistics</b></sub></td>139<td align="center"><img src="docs/screenshots/convert.png" alt="Unit converter" width="200"><br><sub><b>Convert</b></sub></td>140<td align="center"><img src="docs/screenshots/workspace.png" alt="Workspace notebook" width="200"><br><sub><b>Workspace</b></sub></td>141</tr>142</table>143144<img src="docs/screenshots/ipad-split-workspace.png" alt="iPad: companion calculator beside the workspace" width="720"><br>145<sub><b>iPad — the companion calculator beside a reactive workspace</b></sub>146147<br><br>148149<table>150<tr>151<td align="center"><img src="docs/screenshots/ipad-graph.png" alt="iPad graph" width="235"><br><sub><b>iPad · Graph</b></sub></td>152<td align="center"><img src="docs/screenshots/ipad-financial.png" alt="iPad bonds" width="235"><br><sub><b>iPad · Bonds</b></sub></td>153<td align="center"><img src="docs/screenshots/ipad-convert.png" alt="iPad converter" width="235"><br><sub><b>iPad · Convert</b></sub></td>154</tr>155</table>156</div>157158## 4. Standard calculator159160- Large keys, live preview while typing, parentheses, `±`, `%`, backspace, **C** (entry) and **AC** (all), undo / redo.161- Memory (`MC`, `MR`, `M+`, `M−`), optional memory row; store any result as a named variable.162- Swipe across the display to delete; tap the expression to type it with the system keyboard; long-press the display for163 Quick Actions (copy, copy full precision, paste expression, save to workspace, graph, convert, explain, export).164- Hardware keyboard: digits, operators, Return, Escape, ⌘Z, ⌘C, ⌘V.165- Locale-aware decimal and grouping separators; automatic, fixed, scientific and engineering notation; significant digits166 or fixed decimals; exact fractions. Display rounding **never** changes the stored value.167168**Percent key** — the documented default: `A + B%` adds B % of A.169170| Input | Result | | Input | Result |171|---|---|---|---|---|172| `200 + 10%` | 220 | | `200 × 10%` | 20 |173| `200 − 10%` | 180 | | `100 + 5% + 5%` | 110.25 |174175A strict mode (`B%` is always `B ÷ 100`) is in Settings. Full table: [conventions](docs/mathematics/financial-conventions.md).176177## 5. Scientific calculator178179- Powers, roots, logarithms in any base, exponentials, factorials, permutations, combinations, modulo, rounding functions.180- Trigonometric, inverse, hyperbolic and inverse hyperbolic functions in **degrees, radians or gradians** (always shown).181- **Exact special angles**: `sin 30° = 0.5`, `cos 90° = 0`, `tan 45° = 1`; `tan 90°` is a domain error, not `1.6·10¹⁶`.182- **Complex numbers** (rectangular and polar), vectors, matrices: determinant, inverse, rank, RREF, linear systems,183 eigenvalues (LAPACK). Exact entries give exact results.184- Numerical derivative, integral, sum, product, root finding: `integral(exp(-x^2), x, -inf, inf)`.185- User variables and functions (`f(x) = x² + 1`), a searchable catalogue of functions, and CODATA 2022 physical constants.186- **Algebraic or RPN entry** on the same engine (X Y Z T stack, ENTER, x⇄y, R↓, DROP).187188```text1892^100 = 1267650600228229401496703205376 exact1901/3 + 1/6 = 0.5 exact191100! = 9.33262154439×10¹⁵⁷ exact (158 digits kept)192det([1,1/2,1/3; 1/2,1/3,1/4; 1/3,1/4,1/5]) × 2160 = 1 exact193(1 + 2i)(3 − i) = 5 + 5i194sqrt(-4) → domain error in real mode, 2i in complex mode195```196197## 6. Financial calculator198199| Section | What it computes |200|---|---|201| **TVM** | N, I/Y, PV, PMT, FV with P/Y, C/Y and BGN / END; solve for any variable; financial keypad with **CPT**, or a form |202| **Cash flows** | NPV, NFV, IRR (unique / multiple / none), MIRR, payback, discounted payback, profitability index, NPV profile |203| **Loans & mortgages** | Monthly, semi-monthly, biweekly, weekly and accelerated payments; Canadian fixed (semi-annual), Canadian variable, US and custom compounding; amortization schedule with CSV export; prepayments; rate changes; refinancing break-even; affordability |204| **Bonds** | Price ↔ yield, yield to call, current yield, accrued interest, clean / dirty price, Macaulay and modified duration, convexity, bump-and-reprice effective measures; five day-count conventions |205| **Investment** | CAGR, holding-period, annualized, arithmetic vs geometric, real return, money-weighted (dated flows), time-weighted, annuities, perpetuities, growing annuities and perpetuities |206| **Options** | Black–Scholes–Merton with dividend yield, Greeks, implied volatility, put–call parity, CRR binomial tree (European and American), strategy payoff with break-evens |207| **Sensitivity Studio** | NPV vs rate, bond price vs yield, payment vs rate, option value vs volatility or spot, FV vs time |208209```text210Mortgage 300 000 at 5 % over 25 years, monthly payments211 Canada, fixed rate (compounded semi-annually) 1 744.81212 United States (compounded monthly) 1 753.77213214Cash flows −1000, +2300, −1320215 IRR: two rates, 10 % and 20 % — no single IRR exists, both are reported216217Black–Scholes–Merton S = 42, K = 40, r = 10 %, σ = 20 %, T = 0.5218 call 4.7594 put 0.8086219```220221Engine design: [financial-engine.md](docs/architecture/financial-engine.md) · conventions: [financial-conventions.md](docs/mathematics/financial-conventions.md).222223## 7. Graphing calculator224225- Explicit `y = f(x)` and `x = g(y)`, parametric, polar, implicit curves, inequalities, scatter data with a least-squares line.226- Pan, pinch zoom, reset, auto-fit (robust to poles), equal aspect, numeric window, π-multiple ticks.227- **Live Variables**: every free parameter gets a slider, with optional animation.228- Trace with snapping, coordinate inspection, roots, extrema, intersections, tangent lines, derivative curves, definite229 integrals with shaded regions, area between curves, arc length, inflection points, tables of values.230- **3D surfaces** `z = f(x, y)` with an orbit camera, height gradient, wireframe, contour lines and a probe.231- PNG export of the graph and CSV export of sampled data.232233**A graph must not misrepresent a function.** Each curve is a set of separate polylines; the sampler classifies poles,234jumps, removable singularities and undefined intervals and never bridges them. A function that oscillates faster than the235screen can show (`sin(1000x)`) is drawn as a band with a notice, not as a misleading smooth wave. Pixel tests assert that236no vertical stroke is drawn at the poles of `1/x` and `tan x` or at the jumps of `floor(x)`. Graphs use radians by default,237independently of the calculator's angle mode.238239Details: [graph-engine.md](docs/architecture/graph-engine.md).240241## 8. Advanced mathematics242243Ten tools, each showing the input and the result in two-dimensional notation (stacked fractions, exponents, radicals,244integrals, matrices) with a spoken description for VoiceOver:245246| Tool | Scope |247|---|---|248| **Solve** | Polynomial, isolation, substitutions; multiplicities, complex roots, extraneous roots struck out; numerical search on an interval |249| **Derivative** | Any order, partial derivatives, gradient, with the rules applied |250| **Integral** | Rule engine (table, substitution, parts, partial fractions, trig reduction); every antiderivative is re-differentiated and checked before it is shown; definite integrals exact or numerical |251| **Limit** | Two-sided and one-sided, ±∞, L'Hôpital, numerical extrapolation; "does not exist" with both sides |252| **Series** | Taylor / Maclaurin with exact coefficients; closed-form sums |253| **Simplify** | Simplify, expand, factor over ℚ; polynomial division, GCD, roots |254| **System** | Linear systems solved exactly (unique / none / infinitely many); small nonlinear systems numerically |255| **Optimize** | Critical points and global extrema on an interval; multivariate numerical optimisation |256| **ODE** | RK4 and adaptive Dormand–Prince, trajectories, phase portraits, step statistics |257| **Matrix** | Determinant, inverse, rank, RREF, products, powers, `A·x = b`, eigenvalues, exact where possible |258259Every result carries a kind: **Exact**, **Symbolic**, **Numerical ≈** (with its error estimate or residual),260**Not supported** (with the reason) or **Did not converge**. `∫ e^(−x²) dx` is reported as having no elementary261antiderivative; its definite integral is returned as a labelled numerical value.262263## 9. Statistics264265- **Data**: paste or type datasets (up to 8 columns), frequencies, named datasets; mean, median, modes, sample and266 population variance, quartiles with a choice of nine quantile methods, skewness, kurtosis, covariance, Pearson and267 Spearman correlation; histogram, box plot, scatter.268- **Distributions**: Normal, Student t, χ², F, Binomial, Poisson, Exponential, Uniform, Gamma, Beta and more — density,269 cumulative, interval probability, quantile, with the shaded area equal to the number shown; seeded random samples.270- **Inference**: confidence intervals and tests (z, t, paired, proportions, χ² goodness of fit and independence, one-way271 ANOVA, F, correlation) from data or summary statistics. Decisions are worded "reject" / "fail to reject".272- **Regression**: simple, polynomial, exponential, logarithmic, power and multiple regression with diagnostics273 (leverage, studentized residuals, Cook's distance, Durbin–Watson, VIF, AIC / BIC).274- **Simulation**: Monte Carlo on your own expression with random inputs, scenario tables, sampling distributions,275 bootstrap confidence intervals — all with a visible, reproducible seed.276- 32 statistical functions (`normcdf`, `tinv`, `binompdf`…) are available in every other environment.277278## 10. Unit conversion279280- **331 units in 33 categories**, with exact rational factors: `1 mi = 1.609344 km` exactly, `12 in = 30.48 cm` exactly.281 Each result shows `=` or `≈` with the reason (exact, involves π, approximate constant).282- Temperature readings and temperature differences, reciprocal units (fuel economy), binary and decimal data prefixes.283- **Interest-rate conventions**: nominal with any compounding, effective, continuous, periodic, discount.284- **Currency** — offline by default: manual rates, or ECB reference rates downloaded only when you tap *Update rates*.285 Source, date and age are always displayed; a rate is never described as live.286287## 11. Workspace288289A calculation notebook with a dependency graph.290291```text292Investment = 100000293DiscountRate = 0.08 ← live parameter (slider)294CashFlow1 = 25000295CashFlow2 = 30000296CashFlow3 = 40000297NPV = -Investment + CashFlow1/(1+DiscountRate) + CashFlow2/(1+DiscountRate)^2 + CashFlow3/(1+DiscountRate)^3298 → −19 378.397602 (recalculated as the slider moves)299```300301- Formula cells, live parameters, tables, graph cells drawn by the real graph renderer, notes; templates.302- Only the cells that depend on a change are recalculated; **circular references are detected** and reported with their303 path (`a → b → c → a`); a cell that depends on a failed cell says which one.304- Undo / redo, auto-save, inspector with dependencies, explanation and verification of each cell.305- Export to **PDF, CSV, plain text, Markdown, LaTeX, PNG** and the native **`.orixcalc`** file (checksummed; a damaged306 file is detected and its readable content recovered). Exports include the assumptions the numbers depend on.307308Design: [workspace.md](docs/architecture/workspace.md).309310## 12. Signature features311312| Feature | What it is | Status |313|---|---|---|314| **ORIX Live Variables** | Sliders that drive graph parameters and workspace cells; dependents update as you drag | Implemented |315| **ORIX Explain** | Formula, inputs, substitutions, intermediate values, result, assumptions — recorded by the algorithm that computed the result, never generated prose | Implemented in every engine |316| **ORIX Verified Results** | Domain, overflow, loss of significance, residuals, convergence, cross-checks. The badge renders only when a report contains executed checks | Implemented |317| **ORIX Classic Modes** | Algebraic entry, RPN, financial keypad (CPT), scientific keypad, graphing keyboard — one engine | Implemented |318| **ORIX Quick Actions** | Copy, save to workspace, graph, convert, explain, use in calculator, export — on every result | Implemented |319| **ORIX Math Camera** | Reads printed, single-line expressions with on-device Vision text recognition; the reading is always shown for review and never evaluated automatically | **Beta** — see [Known limitations](#27-known-limitations) |320321## 13. Numerical architecture322323```mermaid324flowchart TD325 subgraph App["App target"]326 Shell["Adaptive shell · history · settings · intents"]327 end328 subgraph Features["Feature packages (SwiftUI)"]329 FCalc["Calculator<br/>Standard · Scientific"]330 FFin["Financial"]331 FGraph["Graph"]332 FMath["Math"]333 FStat["Statistics"]334 FConv["Convert"]335 FWork["Workspace"]336 end337 UI["ORIXUI — design system · shared session · SwiftData store"]338 subgraph Engines["Engine packages — no UI code"]339 Expr["ORIXExpression<br/>values · parser · evaluator"]340 Fin["ORIXFinancial"]341 Graph["ORIXGraph"]342 Sym["ORIXSymbolic"]343 Stat["ORIXStatistics"]344 Units["ORIXUnits"]345 Work["ORIXWorkspace"]346 Cam["ORIXMathCamera"]347 end348 Num["ORIXNumerics — Explanation · VerificationReport · root finding · quadrature"]349 Shell --> Features --> UI350 FCalc --> Expr351 FFin --> Fin352 FGraph --> Graph353 FMath --> Sym354 FStat --> Stat355 FConv --> Units356 FWork --> Work357 UI --> Expr358 Graph --> Expr359 Sym --> Expr360 Work --> Expr361 Expr --> Num362 Fin --> Num363 Stat --> Num364```365366**Expression pipeline**367368```mermaid369flowchart LR370 Text["Input text"] --> Lexer --> Parser --> AST["Expr tree"]371 AST --> Eval["Evaluator (typed values)"] --> Value --> Formatter372 Eval --> Steps["Explain steps"]373 Eval --> Notes["Verification notes"]374 AST --> Compile["Compiled Double closures"] --> Sampler["Graph sampler · quadrature · root finding"]375 AST --> Printer["Readable text · ASCII · LaTeX"]376```377378The parser is a hand-written recursive-descent parser: text becomes a tree and nothing else. There is no dynamic code379execution anywhere in the product.380381**Numerical type system**382383```mermaid384flowchart LR385 I["integer<br/>arbitrary precision"] --> R["rational<br/>exact fraction"] --> D["real<br/>IEEE-754 double"] --> C["complex"]386 V["vector"] --- M["matrix"]387 Q["quantity with unit<br/>(ORIXUnits)"]388 S["symbolic expression<br/>(ORIXSymbolic)"]389 CF["cash-flow series<br/>(ORIXFinancial)"]390```391392More diagrams: [financial engine](docs/architecture/financial-engine.md) ·393[graph rendering](docs/architecture/graph-engine.md) · [workspace dependency graph](docs/architecture/workspace.md) ·394[local persistence](docs/architecture/overview.md#local-persistence).395396## 14. Precision strategy397398| Kind of calculation | Representation |399|---|---|400| Whole numbers | Arbitrary-precision integers |401| Decimals and fractions | Exact rationals (a decimal literal is an exact fraction) |402| Transcendental functions | IEEE-754 double precision, labelled "≈ floating point" |403| Complex numbers | `Complex<Double>`, principal branches |404| Linear algebra | Exact Gauss–Jordan for exact entries; pivoted elimination and LAPACK for doubles, with residual checks |405| Money schedules | Each amount rounded to the cent in exact decimal arithmetic |406| Unit conversion | Exact rational factors, 38-digit decimal results |407408Stated limits: exact fractions up to 8192 bits (then double precision **with a precision note**); exact integers up to409about 1.2 million digits; exact factorials up to 50000!; transcendental functions are not arbitrary precision.410NaN and unexpected infinities become errors where they arise. Full text: [precision.md](docs/architecture/precision.md).411412## 15. Technology stack413414| Layer | Technology | Version | Role |415|---|---|---|---|416| Language | Swift | 6 language mode, tools 6.2 | Strict concurrency in every target |417| UI | SwiftUI | iOS 26 SDK | All screens; `Canvas` for graphs and typeset math |418| Persistence | SwiftData | iOS 26 SDK | History, variables, functions, workspaces, saved models (versioned schema) |419| Charts | Swift Charts | iOS 26 SDK | Financial, statistical and ODE charts |420| Linear algebra | Accelerate (LAPACK `dgeev`) | system | Eigenvalues |421| Recognition | Vision | system | Math Camera text recognition |422| System integration | App Intents, Share Sheet, Files (`.orixcalc`), `fileImporter` / `fileExporter` | system | Siri Shortcuts, export, import |423| Integrity | CryptoKit (SHA-256) | system | Workspace file checksums |424| Big integers | [BigInt](https://github.com/attaswift/BigInt) | 5.7.0 (pinned) | Exact integers and rationals — MIT |425| Complex numbers | [Swift Numerics](https://github.com/apple/swift-numerics) | 1.1.1 (pinned) | `Complex<Double>` and elementary functions — Apache 2.0 |426| Project generation | XcodeGen | — | `project.yml` → `ORIXCalc.xcodeproj` (not committed) |427428No analytics, advertising, crash-reporting or networking SDK.429430## 16. Project structure431432```text433ORIXCalc/434├── App/ app target: entry point, adaptive shell, history, settings, intents, Math Camera, assets435├── Packages/436│ ├── ORIXNumerics/ Explanation, VerificationReport, root finding, quadrature, differentiation437│ ├── ORIXExpression/ typed values, exact arithmetic, parser, evaluator, formatter, printer, RPN438│ ├── ORIXFinancial/ TVM, cash flows, loans, bonds, investments, options, sensitivity439│ ├── ORIXStatistics/ special functions, descriptive, distributions, inference, regression, simulation440│ ├── ORIXUnits/ unit catalogue, exact conversion, rate conventions, currency model441│ ├── ORIXSymbolic/ simplify, polynomials, calculus, solving, limits, series, optimisation, ODEs442│ ├── ORIXGraph/ samplers, discontinuity detection, analysis, implicit curves, 3D meshes443│ ├── ORIXWorkspace/ document model, dependency graph, recalculation, exports, .orixcalc444│ ├── ORIXMathCamera/ Vision recognition and normalisation445│ ├── ORIXUI/ design tokens, components, AppModel, SwiftData store446│ └── ORIXFeature{Calculator,Financial,Graph,Math,Statistics,Convert,Workspace}/447├── Tests/ app unit tests448├── UITests/ XCUITests (arithmetic, environments, persistence, accessibility audit)449├── Benchmarks/ command-line performance harness450├── Scripts/ generate, test-all, screenshots, release, secret-scan, asc451├── docs/ architecture, design, mathematics, development, release, research, screenshots452├── project.yml XcodeGen project definition453└── RELEASE-REPORT.md454```455456## 17. Installation457458ORIX Calc is not on the App Store yet. Build 1.0.0 (1) is on TestFlight (see [Release status](#26-release-status));459otherwise the app is built from source.460461Requirements: a Mac with Xcode 27 or later (iOS 26 SDK), [XcodeGen](https://github.com/yonaskolb/XcodeGen)462(`brew install xcodegen`), and network access the first time to fetch the two pinned Swift packages.463464## 18. Build instructions465466```bash467git clone https://git.spboucher.ai/orix-calc.git ORIXCalc468cd ORIXCalc469Scripts/generate.sh # writes ORIXCalc.xcodeproj470open ORIXCalc.xcodeproj # scheme "ORIXCalc", any iOS 26 simulator471# or from the command line:472xcodebuild -project ORIXCalc.xcodeproj -scheme ORIXCalc \473 -destination 'platform=iOS Simulator,name=ORIXCalc iPhone' -derivedDataPath build/DerivedData build474```475476Launch arguments (used by the UI tests and the screenshot script): `-ORIXMode <environment>`, `-ORIXSection <id>`,477`-ORIXDemo 1`, `-ORIXInMemory 1`, `-ORIXAppearance light|dark`, `-ORIXExpression "<text>"`, `-ORIXCompanion 1`.478Details: [setup.md](docs/development/setup.md).479480## 19. Testing481482```bash483Scripts/test-all.sh # everything; summary in build/test-summary.txt484Scripts/test-all.sh engines # engine packages, swift test on macOS485Scripts/test-all.sh features # feature packages on the iOS simulator486Scripts/test-all.sh app # app unit tests + XCUITests487```488489| Suite | Where it runs | Tests |490|---|---|--:|491| ORIXNumerics | macOS | 12 |492| ORIXExpression | macOS | 37 |493| ORIXWorkspace | macOS | 11 |494| ORIXFinancial | macOS | 67 |495| ORIXStatistics | macOS | 85 |496| ORIXUnits | macOS | 60 |497| ORIXSymbolic | macOS | 58 |498| ORIXGraph | macOS | 117 |499| ORIXMathCamera | macOS | 3 |500| ORIXFeatureCalculator | iOS simulator | 11 |501| ORIXFeatureFinancial | iOS simulator | 35 |502| ORIXFeatureConvert | iOS simulator | 46 |503| ORIXFeatureGraph | iOS simulator | 71 |504| ORIXFeatureMath | iOS simulator | 48 |505| ORIXFeatureStatistics | iOS simulator | 66 |506| ORIXFeatureWorkspace | iOS simulator | 46 |507| App unit tests | iOS simulator | 5 |508| UI tests (XCUITest) | iOS simulator | 8 |509| **Total** | | **786** |510511A test is one test function; many are table-driven over hundreds or thousands of reference cases. The result of the latest512full run is recorded in [`RELEASE-REPORT.md`](RELEASE-REPORT.md). No code-coverage figure is published because none was513measured. Strategy: [testing.md](docs/development/testing.md).514515## 20. Mathematical validation516517A successful build proves nothing about correctness, so each engine is checked against references produced outside it.518519| Domain | Reference | Scale |520|---|---|---|521| Special functions and distributions | mpmath at 50 digits | 5 343 + 10 164 cases; worst relative error 4.5·10⁻¹³ and 6.5·10⁻¹⁴ |522| Inference and regression | SciPy, statsmodels, NumPy; 60-digit solve for the Longley data | agreement to 10⁻¹⁰ |523| Financial | mpmath, `decimal`, NumPy, SciPy scripts; textbook cases | 108 reference cases |524| Units | Python `fractions.Fraction` from the definitions | 841 conversions, 590 exact to the last digit |525| Symbolic | SymPy and mpmath, compared semantically at random points | 83 derivatives, 88 integrals, 37 limits, 20 series… |526| Graph | Analytic locations of discontinuities; dense resampling between vertices | every function of the test corpus |527| Expression engine | Identities, known exact values, NumPy for eigenvalues | — |528529Scripts and their outputs are committed beside each engine (`Packages/*/Reference/`). What is **not** independently530validated is stated just as plainly — see [reference-tests.md](docs/mathematics/reference-tests.md) and531[numerical-methods.md](docs/mathematics/numerical-methods.md).532533## 21. Performance534535Measured with [`Benchmarks/`](Benchmarks) in release mode on the development Mac (Apple M5 Max); these are engine timings,536not device timings.537538| Operation | Median |539|---|--:|540| Parse and evaluate `25 × 4` | 34 µs |541| `100!` exact | 49 µs |542| Mortgage payment | 16 µs |543| 300-payment amortization schedule, cent-exact | 1.6 ms |544| American put, 1 000-step binomial tree | 0.5 ms |545| Sample `tan x` across 1200 px with discontinuity detection | 0.5 ms |546| Multiple regression, 10 000 rows × 3 predictors, with diagnostics | 1.5 ms |547| Move a slider on a 14-cell NPV workspace | 1.6 ms |548| 50 × 50 floating-point determinant | 11 ms |549| Monte Carlo, 1 000 000 trials | 0.35 s |550551Full table, method and the optimisations made from profiling: [performance.md](docs/development/performance.md).552Cold launch, memory and battery on physical devices have **not** been measured.553554## 22. Privacy555556| | |557|---|---|558| Account or sign-in | None |559| Data collected | None (`PrivacyInfo.xcprivacy`: no tracking, no collected data types) |560| Analytics, advertising, crash-reporting SDKs | None |561| Calculations | On device |562| Network | One optional request, only when you tap *Update rates*: the public ECB reference-rate file. No identifier is sent |563| Storage | History, variables, functions, workspaces and saved models in a local SwiftData store; preferences in UserDefaults |564| Your control | Export and import a JSON backup; export workspaces as files; clear the history; delete any variable or workspace |565| Camera | Only when you open Math Camera; images are processed on device and not stored |566567More: [privacy.md](docs/privacy.md).568569## 23. Accessibility570571- Native SwiftUI controls with VoiceOver labels, values and hints; mathematical expressions are read in words.572- Dynamic Type across forms and results; at accessibility sizes labels move above values instead of truncating.573 Calculator keys are sized by the keypad grid and expose the system **Large Content Viewer** instead.574- Light and Dark appearances from adaptive tokens; readable foregrounds on tinted controls; no meaning by colour alone.575- Reduce Motion respected; haptics optional.576- An automated accessibility audit (Dynamic Type, element descriptions, hit regions) runs in the UI tests.577578What was and was not verified: [accessibility.md](docs/accessibility.md).579580## 24. Localization581582| | Status |583|---|---|584| Number formatting | Follows the device region (decimal and grouping separators, including decimal-comma input) |585| Interface language | English in version 1.0 |586| App Store listing | Prepared in English (Canada) and French (Canada) — [app-store.md](docs/release/app-store.md) |587| French interface | Planned (see Roadmap) |588589## 25. Roadmap590591| Item | Notes |592|---|---|593| French (Canada) interface | String catalogue for the app and feature packages |594| Layered Icon Composer icon | Version 1.0 ships the bitmap icon in default, dark and tinted appearances |595| Home Screen widget, Spotlight indexing of workspaces | Not in 1.0 |596| Apple Pencil input, multi-window workspaces | Not in 1.0 |597| Shared `ORIXDesign` package with ORIX Scan | Values are aligned today; packages are not shared yet |598| Arbitrary-precision transcendental functions | Would lift the double-precision limit |599| Quantities with units inside expressions | Units live in Convert today |600| Graphs embedded in PDF exports | Graph cells are described in text in the PDF |601602## 26. Release status603604| Stage | State |605|---|---|606| Implementation | Eight environments and six signature features implemented (Math Camera as Beta) |607| Automated tests | 786 tests; latest result in [`RELEASE-REPORT.md`](RELEASE-REPORT.md) |608| Physical-device testing | **Not done** — no device was connected during development |609| Signed Release archive | See [`RELEASE-REPORT.md`](RELEASE-REPORT.md) |610| App Store Connect record | Created 2026-11-20 — "ORIX Calc", Apple ID 6837544681, SKU `orixcalc-ios-001` |611| TestFlight | Build 1.0.0 (1) **uploaded** 2026-11-20; processing state and tester availability in [`RELEASE-REPORT.md`](RELEASE-REPORT.md) |612| App Store submission | Not requested |613614Procedure: [testflight.md](docs/release/testflight.md) · checklist: [checklist.md](docs/release/checklist.md).615616## 27. Known limitations617618- **Never run on a physical device.** Everything was verified in the iOS 26.5 simulator. Camera capture, haptics, Siri619 invocation, performance and battery need a device pass.620- **Math Camera is Beta.** On rendered images of 90 printed, single-line expressions in three fonts, the top reading621 evaluated to the right value in 92 % of cases. It was not validated on photographs. Raised exponents, stacked fractions,622 radicals and handwriting are not read reliably. Results are always shown for review.623- **Transcendental functions are double precision** (15–16 significant digits). Exact arithmetic is arbitrary precision.624- **Symbolic scope is bounded.** Non-elementary integrals, irreducible cubic and quartic roots in closed form, inequalities625 and symbolic-coefficient systems are reported as not supported (with a numerical value where one exists). Symbolic626 calculus on trigonometric input requires radians; the Math screen offers a per-calculation override.627- **Graphing**: features narrower than a pixel between two samples can be missed; implicit curves are limited by a 2-pixel628 grid and flag themselves when unreliable; analysis tools work on explicit `y = f(x)` curves.629- **Financial**: regular coupons only for bonds; loan schedules follow one stated rounding policy and can differ from a630 lender's statement by a cent; no third-party library (such as QuantLib) was used as a cross-check.631- **Workspace**: a sheet of hundreds of cells that each compound an exact fraction recalculates slowly (about a second for632 500 such cells), because the exact values have thousands of bits. Graph cells are not drawn in PDF or PNG exports.633- **Expressions are limited to 1000 terms** per sum or product chain.634- **Interface in English only**; engine-generated explanation text uses "." as decimal separator.635- **Not an approved examination calculator**, and not financial advice.636- Several interactive paths (drag and drop, some share sheets, hardware-keyboard shortcuts inside feature screens) are637 covered by model tests but were not exercised by hand. The complete list is in [`RELEASE-REPORT.md`](RELEASE-REPORT.md).638639## 28. ORIX ecosystem640641ORIX is a family of premium Apple utilities that share a visual language: **the ring, opened by one gesture**.642643| App | The ring is opened by | Role | State |644|---|---|---|---|645| **ORIX Calc** | An equals sign — the answer | Universal calculator | This repository |646| **ORIX Scan** | An optical beam — capture | Document scanner | In development |647648Both apps use the same neutral palette, typography rules and voice ([brand guidelines](docs/design/brand-guidelines.md),649[design system](docs/design/design-system.md), [icon design](docs/design/icon-design.md)).650651## 29. License652653All rights reserved © 2026 Simon-Pierre Boucher. The source is published for reading; no licence to reuse it is granted. See [`LICENSE`](LICENSE) for the notices of654the two open-source components (BigInt, MIT; Swift Numerics, Apache 2.0).655656## Author657658<div align="center">659<img src="docs/brand/icon.png" width="64" height="64" alt=""><br>660<b>Simon-Pierre Boucher</b> — design, development, operation<br>661<a href="https://www.spboucher.ai">www.spboucher.ai</a> · <a href="https://git.spboucher.ai">git.spboucher.ai</a> · contact@spboucher.ai662</div>663