Code Monkey home page Code Monkey logo

infinite_c_calculator's People

Contributors

theodoreda avatar

Watchers

 avatar

infinite_c_calculator's Issues

Infinite division

Need to do a function to process a division that can contain an infinite number of digits

The function definition:
char *exec_infin_div(char *operation, int ope_idx);

In this function, you have to process the result, and write it inside a dynamically allocated variable, and return it.
Careful about div by 0.
You must not free the received operation.

Is `-` an operator or sign

In the file sources/calculations/expr.c, I need to check if the - found is an actual operator or a sign in:

  • find_next_operator()
  • process_expr() ligne 40

Infinite addition

Need to do a function to process an addition that can contain an infinite number of digits

The function definition:
char *exec_infin_add(char *operation, int ope_idx);

In this function, you have to process the result, and write it inside a dynamically allocated variable, and return it.
You must not free the received operation.

Tests everywhere :o

check_errors:

  • check_allowed_chars()
  • check_parenthesis()
  • check_operators()
  • global expressions with all sort of errors

parenthesis:

  • handle_parenthesis()

expr:

  • find_next_operator()
  • process_expr()

utils:

  • contains()
  • contains_other_than()
  • is_a_number()
  • is_not_a_number()
  • is_in()
  • is_not_in()
  • count_occurence()

Infinite multiplication

Need to do a function to process a multiplication that can contain an infinite number of digits

The function definition:
char *exec_infin_mult(char *operation, int ope_idx);

In this function, you have to process the result, and write it inside a dynamically allocated variable, and return it.

You could call the exec_infin_add() function X times, where X is the lowest number of the operation ?

You must not free the received operation.

Infinite substraction

Need to do a function to process a subtraction that can contain an infinite number of digits

The function definition:
char *exec_infin_min(char *operation, int ope_idx);

In this function, you have to process the result, and write it inside a dynamically allocated variable, and return it.
You must not free the received operation.

Infinite modulo

Need to do a function to process a modulo that can contain an infinite number of digits

The function definition:
char *exec_infin_mod(char *operation, int ope_idx);

In this function, you have to process the result, and write it inside a dynamically allocated variable, and return it.
You must not free the received operation.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.