بنقرة واحدة
rpn-stack-logic
Guidelines on implementing an RPN LIFO stack architecture utilizing React state and Math.js BigNumbers
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Guidelines on implementing an RPN LIFO stack architecture utilizing React state and Math.js BigNumbers
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Playbook for adding a new HP calculator model faceplate to hellocalc — verified key data, derived keyboard geometry, family archetypes, MachineUnit/nameplate/topbar wiring, hotkeys, unit + e2e guards, and the hard-won layout traps (lcm subgrids, aspectClass overrides, cascade rules, trademark-safe branding).
Workflow for bridging Nerdamer symbolic CAS outputs into beautiful React KaTeX renders
Reference on properly scaffolding the specific UI/UX constraints on a Next.js Shadcn layout.
| name | rpn-stack-logic |
| description | Guidelines on implementing an RPN LIFO stack architecture utilizing React state and Math.js BigNumbers |
When building an RPN (Reverse Polish Notation) mode, you must manage a Last-In, First-Out (LIFO) stack representing the user's operands.
Maintain the stack as an array of numerical strings or math.js BigNumber objects in React State.
const [stack, setStack] = useState<math.BigNumber[]>([]);
const [currentInput, setCurrentInput] = useState<string>("");
When the user commits a number:
Operators trigger stack mutations:
math.js evaluate engine. Push the result back on top.For dimensional analysis (e.g., converting cm to inches in RPN), ensure the type stored in the stack resolves safely between math.Unit and standard scalar big numbers.