GithubHelp home page GithubHelp logo

buerstenmacher / hyperprecision Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 66 KB

dynamic size arithmetic types

C++ 100.00%
integer multiprecision large-numbers floating-point math bignumber logarithmic-number-system

hyperprecision's Introduction

this repository declares and defines two unlimited dynamic integer types and one unlimited floatingpoint type with user defined precision

  1.  rom::uintxx_t   an unsigned integer with dynamic and possibly unlimited size
    
  2.  rom::intxx_t    an signed integer with dynamic and possibly unlimited size
    
  3.  rom::floatxx_t<size_t nr>  (nr defines the number of significant bits of this type)
    

--> download all files into one dirctory

--> compile: g++ example.cpp -o example -std=c++11 -Wno-psabi -Weffc++ -Wall -pedantic -pthread -Os

--> run: ./example //you will see a short demo

example output might be:

nano@nano-desktop:/media/raid/cppwd/hyperprecision$ sudo g++ example.cpp -o example -std=c++11 -Wno-psabi -Weffc++ -Wall -pedantic -pthread -O3 && ./example

e^(0.001) is: +1.0010005001667083e+0

e^(0.01) is: +1.0100501670841680e+0

e^(0.1) is: +1.1051709180756476e+0

e^(1) is: +2.7182818284590452e+0

e^(10) is: +2.2026465794806716e+4

e^(100) is: +2.6881171418161354e+43

e^(1000) is: +1.9700711140170469e+434

e^(10000) is: +8.8068182256629209e+4342

e^(100000) is: +2.8066633604261221e+43429

e^(1000000) is: +3.0332153968020654e+434294

e^(10000000) is: +6.5922325346179653e+4342944

e^(100000000) is: +1.5499767466477715e+43429448

(2^3217- 1) is a mersenne prime number

it is: +259117086013202627776246767922441530941818887553125427303974923161874019266586362086201209516800483406550695241733194177441689509238807017410377709597512042313066624082916353517952311186154862265604547691127595848775610568757931191017711408826252153849035830401185072116424747461823031471398340229288074545677907941037288235820705892351068433882986888616658650280927692080339605869308790500409503709875902119018371991620994002568935113136548829739112656797303241986517250116412703509705427773477972349821676443446668383119322540099648994051790241624056519054483690809616061625743042361721863339415852426431208737266591962061753535748892894599629195183082621860853400937932839420261866586142503251450773096274235376822938649407127700846077124211823080804139298087057504713825264571448379371125032081826126566649084251699453951887789613650248405739378594599444335231188280123660406262468609212150349937584782292237144339628858485938215738821232393687046160677362909315071

e is: +2.71828182845904523536028747135266249775724709369995957496696762772407663035354759457138217852516642742746639193200305992181741359e+0

pi is: +3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651328230664709384460e+0

ln(e^(1.0)) is: +9.9999999999999999e-1

ln(e^(10.0)) is: +.9999999999999999e+1

ln(e^(100.0)) is: +.9999999999999999e+2

ln(e^(1000.0)) is: +.9999999999999999e+3

ln(e^(10000.0)) is: +.9999999999999999e+4

ln(e^(100000.0)) is: +.9999999999999999e+5

ln(e^(1000000.0)) is: +.9999999999999999e+6

ln(ln(ln(e^(e^(e^(7.0)))))) is: +6.9999999999999999e+0 Try this calculation on any other calculator!!!

arcsin(sin(0.8))is: +7.99999999999999999999999999999999e-1

arccos(cos(0.8))is: +7.99999999999999999999999999999999e-1

cos(20)*cos(20) + sin(20)*sin(20) is:

+1.00e-0 [8bit Float]

+1.0000e+0 [16bit Float]

+1.00e-0 [8bit Float]

+1.0000e+0 [16bit Float]

+10.00000000e-1 [32bit Float]

+1.0000000000000000e+0 [64bit Float]

Googol is 10^100 = +9.99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999e+99

Googolplex is 10^Googol = +9.99999999999999999999999999999999999999999999999999507381353612355094557172415952656787848926056280794561504251052007996099194936e+9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999

Square root of Googolplex is: = +9.99999999999999999999999999999999999999999999999999753690676806177547278586207976328393924463028140397250417984179904556418802957e+4999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999

hyperprecision's People

Contributors

buerstenmacher avatar

Watchers

 avatar  avatar

hyperprecision's Issues

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.