GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - AnthonyMLau/Micro-Pi: A small program to calculate pi to millions of digits

BranchesTags
Open more actions menu

Latest commit

 

History

10 Commits
10 Commits

Folders and files

NameName
Last commit message
Last commit date
x64/Debug
x64/Debug
 
 
README.md
README.md
 
 
simpleCUFFT.cu
simpleCUFFT.cu
 
 
simpleCUFFT_vs2019.sln
simpleCUFFT_vs2019.sln
 
 
simpleCUFFT_vs2019.vcxproj
simpleCUFFT_vs2019.vcxproj
 
 
simpleCUFFT_vs2019.vcxproj.user
simpleCUFFT_vs2019.vcxproj.user
 
 

Repository files navigation

Micro-Pi

A small program that aims to calculate millions of digits of pi using the Chudnovsky algorithm: image

Binary splitting is used to speed up the calculation of the sum of these rational terms.

Normally multiplication of n-digit integers takes O(n^2) time, however using algorithms different algorithms, the time complexity can be significantly reduced. Some algorithms include Karatsuba multiplication = 0( n^~1.59 ) and FFT multiplication which can be as low as O( n log(n) ).

CUDA supports FFT, so FFT, inverse FFT, and pointwise multiplication are implemented on the GPU.

Note: This a fun project not designed for absolute speed & optimization. It is several orders of magnitude slower than y-cruncher.

TODO

  • CUDA supports 32-bit multiplication - use base 4294967295 (unsigned 32 bit int) instead of base 10

Useful links & references:

  • Theory and time complexity: http://www.cecm.sfu.ca/organics/papers/borwein/paper/html/node11.html
  • More theory and time complexity: http://numbers.computation.free.fr/Constants/Algorithms/fft.html
  • Basic algorithm in python: https://www.craig-wood.com/nick/articles/pi-chudnovsky/
  • CUDA accelerated Multiple Precision Arithmetic library: https://github.com/NVlabs/CGBN
  • CUDA FFT accelerated integer multiplication: https://github.com/Alexhaoge/FFT-MPI-OpenMP-CUDA
  • Karatsuba multiplication: https://pythonandr.com/2015/10/13/karatsuba-multiplication-algorithm-python-code/
  • Mini-Pi (basic version of y-cruncher): https://github.com/Mysticial/Mini-Pi

About

A small program to calculate pi to millions of digits

Resources

Readme
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.