Skip to content

sh1ngekyo/BigIntegerExample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Big Integer Example

BigInt implementation ported from old C code

Operations

  • Addition
  • Subtraction
  • Multiplication
  • Division
  • Modulo

Usage:

Initialize:

var number = new BigInt(1234);

Or

BigInt number = 1234;

Same with strings:

BigInt number = "-123456789";

Add:

var result = new BigInteger("123456789") + 123456L;
result += "999999";

Sub:

var result = new BigInteger("123456789") - 123456L;
result -= "999999";

Mul:

var result = new BigInteger("123456789") * 123456L;
result *= "999999";

Div:

var result = new BigInteger("123456789") / 123456L;
result /= "2";

Mod:

var result = new BigInteger("123456789") % 123456L;
result %= "2";

CompareTo:

var result = new BigInteger("123456789").CompareTo("12345676");

About

BigInt implementation ported from old C code

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy