Skip to content

stefan-brus/dmath

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DMath

Mathematical expression evaluator written in D.

Uses the parser generator Pegged: https://github.com/PhilippeSigaud/Pegged

Usage examples

Evaluate a file containing DMath expressions:

dmath -f math.dmath

Command line interface example:

$ dmath
Welcome to DMath.
Enter expressions, or type 'quit' to quit.
> 1 + 2
3
> 9 * 3 ^ (4 - 2)
81
> var = 4 * 4
16
> func(x) = 2 * x + 3
0
> func(var)
35

About

Mathematical expression evaluator written in D

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages