The calculator package

[Tags:gpl, program, test]

A calculator repl that processes mathematical expressions. Does basic arithmetic, and provides pre-defined basic mathematical functions.

Provides binding functionality for variables and functions, and plotting support for functions with arbitrary number of arguments.


[Skip to Readme]

Properties

Versions 0.1.2.2, 0.1.2.3, 0.1.3.0, 0.1.4.0, 0.1.4.1, 0.1.4.2, 0.1.5.0, 0.1.5.1, 0.1.5.2, 0.1.5.4, 0.2.0.0, 0.2.0.1, 0.2.0.2, 0.2.0.3, 0.2.2.0, 0.2.2.1, 0.3.0.0, 0.3.0.1, 0.3.0.2, 0.3.1.0, 0.3.1.1, 0.4.0.0, 0.4.0.1, 0.4.0.2, 0.4.1.0, 0.4.1.1, 0.4.1.2 (info)
Dependencies base (>=4.6 && <5.0), containers, gtk, haskeline, hmatrix, parsec, plot-gtk-ui, transformers [details]
License GPL-2
Author Sumit Sahrawat
Maintainer sumit.sahrawat.apm13@iitbhu.ac.in
Stability Unknown
Category Math
Home page https://github.com/sumitsahrawat/calculator
Source repository head: git clone https://github.com/sumitsahrawat/calculator.git
Uploaded Mon Oct 10 20:31:33 UTC 2016 by sumitsahrawat
Distributions NixOS:0.4.1.2
Downloads 3075 total (12 in the last 30 days)
Votes
1 []
Status Docs not available [build log]
Last success reported on 2016-11-04 [all 4 reports]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees

Readme for calculator

Readme for calculator-0.4.1.2

Calculator

Build Status

A feature rich calculator repl.

Features

  • Arithmetic
  • Standard mathematical functions
  • Variable bindings
  • Function bindings
    • Single argument functions
    • Multiple argument functions
  • Plotting
    • Static plots (no animation)
    • Dynamic plots (for multiple argument functions)

Installation

Linux users

From hackage:

stack install gtk2hs-buildtools
PATH="$HOME/.local/bin:$PATH" stack install calculator

From the repo:

stack install gtk2hs-buildtools # From a directory with no stack.yaml
cd /path/to/calculator/repo
PATH="$HOME/.local/bin:$PATH" stack install

Windows users

This should work, assuming the PATH variable is set correctly:

cmd> stack install gtk2hs-buildtools
cmd> stack install calculator

Implementation

  • Written in haskell
  • Parsing done using parsec
  • Repl built using haskeline
  • Colored output using ANSI color codes

Usage

Use :? to view usage instructions.

Thanks

  • Thanks to husky for color output.