Giter Club home page Giter Club logo

toybi's Introduction

toybi

Just a toy project of big int, even without division(now).

Contains a non-trivial allocator(though very memory-consuming),a karatsuba implementation,and a balanced toom-3 implementation. Correctness hasn't been fully tested; but a squaring is performed in the test.cpp with correct output anyway, though the testcase is very weak (due to convenience).

(Yesterday for that testcase running karatsuba is roughly nlogn..)

What to add

FFT multiplication. Higher-order toom-cook&inbalanced splitting. Division by inverse.

Tricks

The substraction routine is very tricky, only being correct under some case(most usable case).

Division by 3 is implemented with inverse element on char[2] field.

updates

Since then I made many commits but no futher work is done for the bigint part..(It this repo just a grocery storage for me?I don't know either.It is better for management and searching than gist and ubuntu pastebin anyway.)

I added a template function library(for computing within compile time), a number theory template library coded in Python(Python is very convenient in multiprecision integer handling,okay I am just petrified of multiprecision division that is a excruciating task for me..), and zemmud, some code for RNGs..(zemmud is not a existing word but it just looks well..). zemmud should be compiled with -std=c++11 because I used variadic template..(And zemmud itself contains a simplified version of CPPMPL so it can be built independently)

toybi's People

Contributors

iamstupid avatar

Watchers

James Cloos 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.