calculator: A calculator repl, with variables, functions & Mathematica like dynamic plots.

[ gpl, math, program ] [ Propose Tags ]

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

Provides binding functionality for variables and functions.

Optionally provides plotting support (configure using cabal).


[Skip to Readme]

Flags

Automatic Flags
NameDescriptionDefault
plot-gtk-ui

Use plot-gtk-ui to provide plotting commands

Disabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 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.7 && <4.9), containers (>=0.5.5.1 && <0.6.0.0), gtk (>=0.13.0 && <0.14.0), haskeline (>=0.7.1.0 && <0.7.3.0), parsec (>=3.1.7 && <3.2), plot-gtk-ui (>=0.0.2.0), transformers (>=0.4.2.0) [details]
License GPL-2.0-only
Author Sumit Sahrawat
Maintainer sumit.sahrawat.apm13@itbhu.ac.in
Category Math
Home page https://github.com/sumitsahrawat/calculator
Source repo head: git clone https://github.com/sumitsahrawat/calculator.git
Uploaded by sumitsahrawat at 2015-04-09T07:35:59Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Executables calculator
Downloads 16026 total (62 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
Last success reported on 2015-12-11 [all 8 reports]

Readme for calculator-0.3.1.0

[back to package description]

Calculator

A calculator repl.

Features

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

Installation and plotting support

The plotting support is optional as it requires gtk2hs. It is off by default, and can be turned on using a configuration as shown.

To install without plotting support.

$ cabal install calculator

To install with plotting support.

$ cabal install calculator --flags="plot-gtk-ui"

TODO

Lots and lots of testing.

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.