calc82: Devlog #11 6/09/2026
calc82: because calculators are for everyone
This devlog follows the addition of a few final features to my calculator, and then my worst nightmare, frontend UI š§
š New functionality summary
- Prime factorisation using Pollardās rho algorithm
- Engineering notation button
- Degree/minute/second output button
- CSS styling!! + menu bar buttons
- Fixed some input quirks
- Dark and light mode (based on system default) with manual toggle
š Pollards rho algorithm for prime factorisation
Prime factorisation or integer factorisation is the decomposition of a positive integer into a product of integers.
The simplest way to implement this is trial division, which is straightforward but has O(ān) time complexity. I thought this would be too slow, so I decided to implement Pollardās rho algorithm. This has a nicer complexity of O(āp) where p is the smallest prime factor of the number.
However, further observation showed that that the Casio calculator probably doesnāt do this - for numbers without easy factors, it just doesnāt bother. Despite this, Iāve already implemented the algorithm, so Iām not going to remove functionality for the sake of exactly replicating the calculatorās behaviour.
šØ CSS and styling
My goal with the styling was to make the calculator as similar across browsers as possible. I bundled the Inter font (best font) into the program and removed browser-specific button styling.
Implementing the CSS styling was mostly painless. I opted for a simple design with a menubar that adapts to horizontal or vertical depending on the windowās aspect ratio for the web app functionality. Additionally the css uses the system theme to automatically choose light or dark mode.
š Next steps
This project is nearly finished - should only be one or two devlogs left until I ship. Hereās what I have left to do:
Development
- Keybind show and edit
- Brief manual for each calculator function
- Info menubar button with author & project information, and disclaimers:
- that I am not affiliated with casio
- that the calculator is in a beta state and not guaranteed to be correct for all inputs
- Fullscreen button for mobile devices
Preparation for shipping
-
Webpack or similar
-
Choose a license and publicise repo
-
Write a readme
-
Host on github pages (?)
-
Hope that I did enough to not receive legal action from casio š
Thanks for reading :)
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.