fixed optimization error

This commit is contained in:
2023-06-12 17:47:00 +02:00
parent 11d0f3c17b
commit 00ff537f29

View File

@@ -65,7 +65,7 @@ void spigot() { //https://craftofcoding.wordpress.com/tag/spigot-algorithm/
q = x / (2*i-1); q = x / (2*i-1);
} }
a[0] = q % 10; a[0] = q % 10;
q = (q >> 1) + (q >> 2) + (q >> 3); // Divide q by 10 using bit shifting q = q / 10;
if (q == 9) if (q == 9)
nines = nines + 1; nines = nines + 1;
else if (q == 10) { else if (q == 10) {