-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcalculator.hpp
More file actions
36 lines (33 loc) · 1.2 KB
/
calculator.hpp
File metadata and controls
36 lines (33 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/**
* @file calculator.hpp
* @brief A comprehensive calculator implementation under C++17/20
* @date 2024-09-24
* @author Max Qian
* @copyright Copyright (C) 2023-2024 Max Qian <lightapt.com>
*
* This file contains the implementation of a full-featured calculator that can
* evaluate mathematical expressions. It supports:
* - Basic arithmetic: +, -, *, /, %
* - Power operations: ^ or **
* - Comparison operators: >, <, >=, <=, ==, !=
* - Logical operators: &&, ||, !
* - Conditional expressions: condition ? true_value : false_value
* - Variable definition and usage
* - Built-in math functions: sin, cos, tan, sqrt, abs, log, ln, exp
* - Math constants: pi, e, phi, tau
* - User-defined functions: f(x) = x^2 + 2*x + 1
* - Complex number support
* - Symbolic differentiation
* - Bitwise operations for integer types
* - REPL with history support
*/
#ifndef CALCULATOR_HPP
#define CALCULATOR_HPP
// Include all calculator modules
#include "include/calculator/error.hpp"
#include "include/calculator/token.hpp"
#include "include/calculator/ast.hpp"
#include "include/calculator/parser.hpp"
#include "include/calculator/complex_parser.hpp"
#include "include/calculator/repl.hpp"
#endif // CALCULATOR_HPP