You are browsing as a guest. Sign up (or log in) to start making projects!

8h 35m 31s logged

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 :)

0
20

Comments 0

No comments yet. Be the first!