Skip to content

Igorantivirus/mclc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mclc Console Calculator

Русская версия

mclc is a console calculator for complex numbers. It supports basic and advanced functions from the following categories:

  • Arithmetic operations
  • Trigonometric functions
  • Logarithms
  • Powers

Calculations are performed using a custom library and function engine.

Signature

Operators

  • Boolean (returns 0/1): '<', '>', '<=', '>=', '==', '!='
  • Mathematical: '+', '-', '*', '/', '^', '%', 'xor'
  • Ternary: '?:'

Functions

  • With one parameter: sin, cos, tan, asin, acos, atan, sinh, cosh, tanh, sqrt, exp, ln, conj, umag, real, abs
  • With two parameters: pow, atan2
  • Special: log, root

Constants

  • pi, e, phi, i, inf

Examples

  • mclc a=17 "b=sin(pi/2)" "(a>b)?pi:e" -> 3.14159
  • mclc 2+2*2 -> 6
  • mclc --prec 15 pi -> 3.14159265358979
  • mclc --polar "0.5(1+sqrt(3)i)" -> (1|60)
  • mclc --triganam --degree "exp(pi/2*i)" -> 1(cos(90)+i*sin(90))

Technologies

Compilation standard: C++23

Dependencies:

  • MathWorker — a C++ library for parsing and evaluating mathematical expressions (pulled automatically via FetchContent)

Build

  1. Clone the repository

    git clone https://github.com/Igorantivirus/mclc
    cd mclc
  2. Generate CMake

    cmake -B build
  3. Build

    cmake --build build --config Release
  4. Run

    Run the mclc executable from the build folder.

License

MIT License

About

Simple console calculator

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors