exp

command
v0.0.0-...-4faee56 Latest Latest
Warning

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

Go to latest
Published: May 7, 2016 License: MIT Imports: 10 Imported by: 0

README

exp License

License

The MIT License (MIT)

Install

go get github.com/mkideal/tools/exp

Usage

using exp -h show help information.

exp -h
exp [-e] [-i] [-f FILE] [-D...] [EXPR]

Opts

-e
	show native expression before expression result.
	`exp x -Dx=1`		=> `1`
	`exp -e x -Dx=1`	=> `x: 1`

-i
	read expression from stdin

-f FILE
	read expression from FILE

-D
	define variable. e.g. `-Dx=3` `-Da=1 -Db=2` `-D x=1 -D y=2`

Examples

exp 1+2
exp -e 1+2
exp "1 + 2"
exp x -Dx=2.5
exp "x * y" -Dx=2 -Dy=6
exp "min(x, 4)" -Dx=3
exp "max(x, y, z)" -Dx=2 -Dy=6 -Dz=5
exp "rand() //rand in [0,10000)"
exp 'rand(n)' -Dn=100
exp 'rand(1,to)' -Dto=5
exp 'sum(1,2,3)'
exp 'aver(1,2,3)'
exp x y x+y x-y x*y x/y x%y x^y -Dx=7 -Dy=2
exp -e x y x+y x-y x*y x/y x%y x^y -Dx=7 -Dy=2
exp 'sin(pi)' 'sin(pi/2)'
exp e
exp pi

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