gocalc

command module
v0.0.0-...-504bf40 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 29, 2025 License: MIT Imports: 9 Imported by: 0

README

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

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL