Giter VIP home page Giter VIP logo

rational-library's Introduction

rational.h - C library for fractional numbers

GNU General Public License v3.0


NAME

rational.h


SYNOPSIS

#include "rational.h"


DESCRIPTION

"rational.h" is a C library that provides developers some functions and structs to simplify rational number definitions and declarations by using an automatic denumerator validation function. It contains fractional operation functions for rational expressions.


LIBRARY USAGE

Scientific programming, mathematical analysis, computing, algorithms.


STRUCTURES

1-expression): typedef struct rational {int numerator; int denominator;} rational;

1-description): The main struct for declaring rational expressions.


FUNCTIONS

1-expression): extern void increaseRational(rational *rationalInput);

1-description): Increases the numerator of a rational number by 1.


2-expression): extern void decreaseRational(rational *rationalInput);

2-description): Decreases the numerator of a rational number by 1.


3-expression): extern bool isDenominatorsEqual(rational rationalInput1, rational rationalInput2);

3-description): Checks the denominators and returns true if they are equal, returns false if they are not equal.


4-expression): extern bool isNumeratorsEqual(rational rationalInput1, rational rationalInput2);

4-description): Checks the numerators and returns true if they are equal, returns false if they are not equal.


5-expression): extern bool isRationalsEqual(rational rationalInput1, rational rationalInput2);

5-description): Checks the rational expressions and returns true if they are equal, returns false if they are not equal.


6-expression): extern int getRationalGcd(rational rationalInput);

6-description): Finds the great common divisor of a rational number and returns the gcd value.


7-expression): extern rational multiplyRationals(rational rationalInput1, rational rationalInput2);

7-description): Multiplies two rational numbers and returns the multiplied rational number value.


8-expression): extern rational divideRationals(rational rationalInput1, rational rationalInput2);

8-description): Divides two rational numbers and returns the divided rational number value.


9-expression): extern rational sumRationals(rational rationalInput1, rational rationalInput2);

9-description): Adds two rational numbers and returns the added rational number value.


10-expression): extern rational subtractRationals(rational rationalInput1, rational rationalInput2);

10-description): Subtracts two rational numbers and returns the subtracted rational number value.

rational-library's People

Contributors

mertgunduz avatar

Watchers

 avatar

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.