Initial commit

This commit is contained in:
Koree A. Smith
2025-11-08 17:08:16 -06:00
commit dec4abf1fa
4 changed files with 20 additions and 0 deletions

BIN
bbp Executable file

Binary file not shown.

15
bbp.c Normal file
View File

@@ -0,0 +1,15 @@
#include <stdio.h>
#include <string.h>
#include <math.h>
DoBBP(double n)
{
double digitvalue;
double powerthing;
powerthing = pow(1/16, n);
printf("powerthing: %f\n", powerthing);
digitvalue = ((4 / (8 * n + 1)) - (2 / (8 * n + 4)) - (1 / (8 * n + 5)) - (1 / (8 * n + 6)) * powerthing);
printf("Digit of Pi: %f\n", digitvalue);
}

4
main.c Normal file
View File

@@ -0,0 +1,4 @@
void main()
{
DoBBP(3);
}

1
readme.md Normal file
View File

@@ -0,0 +1 @@
#BaileyBorweinPlouffe algorithm - determine value of a specific digit of pi