Skip to content

carsonak/infiX_math

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

infiX_math

This project aims to provide basic calculator functionality for numbers of arbitrary length. This is a personal project meant to challenge myself and just to practice C.

The math executable was compiled with gcc version 13.2.0.

Building from source

You can build the program by cloning the project into your own machine and running:

make release

Usage

The executable can be run as a command line tool as follows:

./math <number> '<operator>' <number>

<number> is a decimal number not containing any spaces.

Operator Description
+ Addition
- Subtraction
* Multiplication
// Division
% Modulus

Shell metacharacters such as * should be quoted.

TODO

  • Support for Floating Point numbers.
  • Exponentiation.
  • Support for longer expressions.
  • Parenthesis.
  • Provide proper interfaces for use as library and a command line tool.
  • Allow underscores and commas as thousands separators.
  • Support for hexadecimal numbers.

About

Arbitrary math functions in C

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published