calcium

Version, currently master branch1 version
  • master branchlatestOct 21, 2019

github.com/adoxography/calcium

No description declared in shard.yml.

0 stars
1 dependent
License: MIT

Installation

# Add this to your shard.yml
dependencies:
  calcium:
    github: adoxography/calcium
    branch: master

master is a branch, not a release, so this tracks it rather than pinning a version.

Then run:

shards install

shard.yml

Crystal
0.30.1
License
MIT
Author
adoxography
Target
  • calcium from src/cli.cr
Executable
  • calcium

Dependencies

Development Dependencies

  • ameba~> 0.10.1github: crystal-ameba/amebadev

README

calcium

Build Status

calcium implements a basic command line calculator.

Installation

  1. Ensure that crystal is installed on your system.
  2. Clone the repository.
  3. To compile the binary, run make from the project root. It will be compiled to bin/calcium.

Usage

The calcium executable accepts a single equation (as a string) as an argument.

Without precompiling

crystal src/cli.cr '1+1'

With precompiling

bin/calcium '1+1'

Capabilities

  • Basic arithmetic operators (+, -, *, /)
  • Complex expressions (Parentheses, order of operations)
  • Unary negation
  • Factorial (!)
  • Exponentiation (^)
  • Functions (sin, cos, tan, abs, min, max)

Testing

crystal spec tests the crystal library. spec/test.sh all tests the command line interface.

Contributors