Skip to content

MariaMozgunova/uint1024_t

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MIT License LinkedIn

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. License
  5. Contact
  6. Acknowledgments

About The Project

This project is the implementation of uint1024_t, which is a custom data type for arbitrary-precision arithmetic. The current implementation stores uint1024_t as an array of uint8_t. It puts two decimal digits in each array cell.

The following functions are accessible:

  • uint1024_t from_uint(unsigned int x) - generate uint1024_t from unsigned int
  • uint1024_t add_op(uint1024_t *x, uint1024_t *y) - add two numbers x and y
  • uint1024_t subtr_op(uint1024_t *x, uint1024_t *y) - subtruct y from x
  • uint1024_t mult_op(uint1024_t *x, uint1024_t *y) - multiply x and y (implemented as the most straightforward algorithms used for multiplying numbers by hand (as taught in primary school))
  • void printf_value(uint1024_t *x) - output value of x to standard output
  • void scanf_value(uint1024_t *x) - read value of x from standard input

(back to top)

Getting Started

To use this uint1024_t implementation, follow the simple steps below.

Installation

  1. Clone the repo git clone https://github.com/MariaMozgunova/uint1024_t.git
  2. Include uint1024_t implementation into your code #include "uint1024_t/utils.c"

(back to top)

Usage

See uint1024_t.c for examples of usage.

(back to top)

License

Distributed under the MIT License. See LICENSE for more information.

(back to top)

Contact

Maria Mozgunova - Twitter - @MariaMozgunova - mariiamozgunova@gmail.com

Project Link: https://github.com/MariaMozgunova/uint1024_t

(back to top)

Acknowledgments

(back to top)

About

Сustom data type for arbitrary-precision arithmetic

Topics

Resources

License

Stars

Watchers

Forks