Skip to content

mabego/gocalc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gocalc

Installation

go install github.com/mabego/gocalc@latest

Usage

REPL

$ gocalc
calc> (2.5 - 1.35) * 2.0
2.3
calc> -sin((-1+2.5)*pi)
1
calc> 180*atan2(log(e), log10(10))/pi
45
calc> help

Commands:

help    - Show this help
clear   - Clear the screen
exit    - Exit the calculator

calc> exit

Command mode

$ gocalc "(2.5 - 1.35) * 2.0"
2.3
$ gocalc "-sin((-1+2.5)*pi)"
1
$ gocalc "180*atan2(log(e), log10(10))/pi"
45

Acknowledgements

This project is a fork of mnogu/go-calculator.

Updates

  • Command mode
  • Prompt autocomplete suggestions
  • Refactor for CLI use only

About

A scientific calculator CLI (Command Line Interface) tool written in Go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Go 100.0%