DEV Community

Appynox
Appynox

Posted on

Building a 403-Function Casio fx-991ES PLUS Scientific Calculator in Pure JavaScript & PWA

If you have ever taken high school or university physics, engineering, or calculus, you have almost certainly held a Casio fx-991ES PLUS scientific calculator. Its two-line Natural Textbook Display (V.P.A.M.), multi-mode engine, and tactile layout have made it a staple in classrooms and exam halls worldwide.

However, most online "scientific" calculators available today are deceptively basic. They give you standard arithmetic, basic trigonometry, and logarithms, but fall completely flat when you need:

  • Numerical definite integration and derivatives
  • $3 \times 3$ Matrix determinants and inversions
  • Complex number arithmetic in polar ($r\angle\theta$) and rectangular ($a+bi$) forms
  • Statistical regressions (linear, quadratic, exponential, logarithmic)
  • Base-N conversions with bitwise logic (BIN, OCT, DEC, HEX)
  • Polynomial & simultaneous linear equation solvers

To bridge this gap without paywalls or forced app installs, we built WideMath Scientific Calculator Online—a full-featured, zero-dependency browser recreation of the fx-991ES PLUS workflow that runs entirely on client-side web standards.


🛠️ Architecture & Engineering Highlights

1. Two-Dimensional Natural Textbook Display

A core challenge of recreating the fx-991ES PLUS is rendering mathematical expressions naturally: fractions stacked vertically, arbitrary $n$-th roots with indices, and definite integrals with upper and lower limit boxes.

Rather than pulling in heavy external math rendering dependencies that inflate load times, WideMath uses a modular HTML/CSS layout engine paired with math.js for safe tokenization and evaluation without eval().

2. Multi-Mode State Machine

The calculator operates across 10 discrete calculation modes:

  • COMP: General scientific calculations with automatic bracket completion
  • CMPLX: Rectangular ($a+bi$) and polar ($r\angle\theta$) calculations
  • STAT: 1-variable and 2-variable regression analysis
  • BASE-N: Integer conversions with AND, OR, XOR, XNOR, and NOT bitwise operators
  • EQN: 2-to-3 variable linear systems, quadratics ($ax^2+bx+c=0$), and cubics
  • MATRIX: Matrix storage ($A, B, C$) with determinants, transpositions, and matrix inversion
  • VECTOR: Vector storage and dot/cross product calculations
  • TABLE: Function value tables across customizable ranges and step intervals

3. Shift / Alpha Key Modifiers with Dynamic Illumination

To preserve the intuitive hardware feeling, pressing the SHIFT (yellow) or ALPHA (red) key dynamically dims unavailable buttons and illuminates only the keys that have corresponding functions in that mode.

4. Zero-Install Progressive Web App (PWA)

By implementing a standalone manifest.json and service worker caching strategy, the entire calculator can be added to any smartphone or desktop home screen and operated completely offline.


🚀 Try It Live

You can test and use the calculator for free with zero sign-up required:
👉 Launch WideMath Scientific Calculator

Let us know what mathematical features or modes you'd like to see next!

Top comments (0)