BSRWX/PSM_Kalkulator ? reverse-engineered prompt

Reverse engineered prompt

Build me an Android calculator app in Kotlin with Jetpack Compose and Material 3.

It should look modern, work well on phones and tablets, and automatically adapt when the screen rotates. In portrait, show a simple calculator layout, and in landscape, switch to a wider scientific mode with extra buttons like trig, logs, constants, and parentheses. I want the result display to resize text automatically so long equations still fit nicely, and the whole UI should feel clean in both light and dark mode using the system theme.

Please keep the calculator logic separate from the UI so it’s easy to test. The app should handle things like division by zero, incomplete expressions, decimal commas or dots, and large numbers without crashing. If you need current docs or a library detail, look it up online first.

Also make sure the entered expression and result survive rotation, and include a few local unit tests for the calculator engine.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab