A precision-focused Android calculator with dual portrait/landscape layouts (basic & scientific) and arbitrary-precision arithmetic using BigDecimal. Written entirely in Kotlin.
- build:
make build - install:
make install - launch:
make launch- build, install and launch app
- JDK 17 or higher
- Android SDK 21+ (minimum API level)
- Android build tools 35+
- Open the project in Android Studio
- Click Run or press Shift + F10 to build and launch on an emulator or device
Scientific Calculator
| Light |
|---|
![]() |
| Dark |
|---|
![]() |
- BigDecimal precision arithmetic — uses EvalEx for exact decimal calculations (no floating-point rounding errors)
- Reverse Polish Notation (RPN) evaluation for reliable expression parsing
- Dual-mode UI — basic four-function calculator in portrait, full scientific calculator in landscape
- Modern Android stack — Kotlin, AndroidX, Material Design compatible
- Unit tested — includes parameterized JUnit tests for calculation validation
The app uses a single-Activity design. MainActivity is a thin UI layer that wires button clicks to CalculatorEngine and renders its state; all calculation logic and state live in CalculatorEngine, which delegates expression evaluation to EvalEx.
- CalculatorEngine (
app/src/main/java/com/example/calculator_v01/CalculatorEngine.kt) — state machine for calculator input/eval, EvalEx integration - MainActivity (
app/src/main/java/com/example/calculator_v01/MainActivity.kt) — button handlers and rendering only, no calc logic - Layouts —
activity_main.xml(portrait) andlayout-land/activity_main.xml(landscape) - Tests —
CalculatorEngineTest.kt(state behavior) andCalculatorEvalTest.kt(parameterized arithmetic evaluation)
| Property | Value |
|---|---|
| Gradle | 8.7+ |
| AGP (Android Gradle Plugin) | 8.5+ |
| Kotlin | 2.0.0 |
| Compile SDK | 35 |
| Min SDK | 21 |
| Target SDK | 35 |
| Java/Kotlin JVM | 17 |
- EvalEx — expression evaluation library with BigDecimal precision
- Android Developers — comprehensive Android documentation



