Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

fe2o3-rpnx-core

release Rust License

The RPN / XRPN calculator engine that powers RPNx (the terminal calculator) and the RPNx Android app. One engine, two frontends, identical results. Part of the Fe₂O₃ suite.

Pure logic, no I/O: an HP-41CX-style stack (X/Y/Z/T + Last X), the full math / trig / log / stats / base / HMS / polar command set, number formatting faithful to desktop XRPN, and a FOCAL program runner (labels, GTO/XEQ/GSB/RTN, ISG/DSE, conditionals, PROMPT). Every entry point takes a CalcState and returns new state, so it drops straight into any UI.

use rpnx_core::{new_state, key_digit, key_enter, execute, display};

let s = new_state();
let s = key_digit(s, "3".into());
let s = key_enter(s);
let s = key_digit(s, "4".into());
let s = execute(s, "add".into()).state;   // Y=3, X=4, "+" -> 7
assert_eq!(display(s).x, "7,0000");

Features

  • uniffi (off by default) — exposes the UniFFI surface the RPNx Android app's Kotlin shell binds to. Desktop frontends link the engine directly and leave it off.

License

Unlicense — public domain.

About

RPN / XRPN calculator engine (HP-41 stack, command set, FOCAL runner) shared by the rpnx TUI and the RPNx phone app. Part of the Fe2O3 suite.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages