diff --git a/README.md b/README.md index dc12901..8e1f14f 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,13 @@ # Calc -Calc is a macOS SwiftUI calculator app with: - -- arbitrary-precision decimal calculations -- mouse-friendly circular controls -- keyboard input -- native copy support for the current display -- parentheses and exponent support -- standard scientific functions and constants -- reusable calculation history -- a custom app icon +Calc is a macOS calculator app with arbitrary-precision decimal math, scientific functions, keyboard input, native copy support, and calculation history. ## Requirements - macOS with Xcode installed - Xcode command line tools available -## Common CLI commands - -Use the helper scripts from the repo root: +## Scripts | Command | What it does | | --- | --- | @@ -31,131 +20,6 @@ Use the helper scripts from the repo root: ## Scientific input -Basic arithmetic uses arbitrary-precision decimal math, so large integers and decimal expressions stay exact instead of falling back to `Double` precision. The display still uses grouped digits for readable values and switches to scientific notation for very large results. - -Supported scientific functions: - -- `sin`, `cos`, `tan` -- `asin`, `acos`, `atan` -- `ln`, `log`, `sqrt` -- `abs`, `exp` -- `pi`, `e` - -Text input supports the same keywords from the keyboard. For example: - -```text -ln(e) -sin(pi/2) -sqrt(16) -log(1000) -``` - -## Build a Release app - -```bash -./build.sh -``` - -## Run a Debug build - -Build and launch the Debug app: - -```bash -./debug.sh -``` - -Build without launching: - -```bash -./debug.sh --build-only -``` - -Run the built binary directly in the terminal: - -```bash -./debug.sh --exec -``` - -## Run tests - -```bash -./test.sh -``` - -## Install the app - -```bash -./install.sh -``` - -Useful install options: - -```bash -./install.sh --system -./install.sh --user -./install.sh --install-dir /custom/path -``` - -## Raw Xcode commands - -If you want to bypass the helper scripts, these are the equivalent commands. The `GIT_CONFIG_*` prefix mirrors the helper scripts so Swift package resolution still works on systems that use `safe.bareRepository=explicit`. - -### Release build - -```bash -GIT_CONFIG_COUNT=1 \ -GIT_CONFIG_KEY_0=safe.bareRepository \ -GIT_CONFIG_VALUE_0=all \ -xcodebuild \ - -project Calc.xcodeproj \ - -scheme Calc \ - -configuration Release \ - -destination 'platform=macOS,arch=arm64' \ - CODE_SIGNING_ALLOWED=NO \ - CODE_SIGNING_REQUIRED=NO \ - build -``` - -### Debug build - -```bash -GIT_CONFIG_COUNT=1 \ -GIT_CONFIG_KEY_0=safe.bareRepository \ -GIT_CONFIG_VALUE_0=all \ -xcodebuild \ - -project Calc.xcodeproj \ - -scheme Calc \ - -configuration Debug \ - -destination 'platform=macOS,arch=arm64' \ - CONFIGURATION_BUILD_DIR="$PWD/.build/Debug" \ - CODE_SIGNING_ALLOWED=NO \ - CODE_SIGNING_REQUIRED=NO \ - build -``` - -Open the built Debug app: - -```bash -open "$PWD/.build/Debug/Calc.app" -``` - -Run the Debug binary directly: - -```bash -"$PWD/.build/Debug/Calc.app/Contents/MacOS/Calc" -``` - -### Tests +Text input supports `sin`, `cos`, `tan`, `asin`, `acos`, `atan`, `ln`, `log`, `log10`, `sqrt`, `abs`, `exp`, `pi`, and `e`. -```bash -GIT_CONFIG_COUNT=1 \ -GIT_CONFIG_KEY_0=safe.bareRepository \ -GIT_CONFIG_VALUE_0=all \ -xcodebuild \ - -project Calc.xcodeproj \ - -scheme Calc \ - -destination 'platform=macOS,arch=arm64' \ - CODE_SIGNING_ALLOWED=NO \ - CODE_SIGNING_REQUIRED=NO \ - test -``` +Basic arithmetic stays exact for large integers and decimal expressions; the display adds grouping separators and switches to scientific notation for very large values.