BBP

Crates.ioBBP
lib.rsBBP
version0.0.0
sourcesrc
created_at2023-12-21 10:08:56.905906
updated_at2023-12-21 10:08:56.905906
descriptionCalculate π using the extended BBP formula
homepage
repositoryhttps://github.com/oovm/FastBBP
max_upload_size
id1076656
size11,618
SasakiSaki (oovm)

documentation

https://docs.rs/BBP

README

Usage

Display Pi in Base16 from 0

# use BBP::PiViewerBase16;
println!("{:x}", PiViewerBase16::new(0, 120))
0  │ 02 04 03 0f  06 0a 08 08  08 05 0a 03  00 08 0d 03  
16 │ 01 03 01 09  08 0a 02 0e  00 03 07 00  07 03 04 04  
32 │ 0a 04 00 09  03 08 02 02  02 09 09 0f  03 01 0d 00  
48 │ 00 08 02 0e  0f 0a 09 08  0e 0c 04 0e  06 0c 08 09  
64 │ 04 05 02 08  02 01 0e 06  03 08 0d 00  01 03 07 07  
80 │ 0b 0e 05 04  06 06 0c 0f  03 04 0e 09  00 0c 06 0c  
96 │ 0c 00 0a 0c  02 09 0b 07  0c 09 07 0c  05 00 0d 0d  
112│ 03 0f 08 04  0d 05 0b 05  
# use BBP::PiViewerBase16;
println!("{}", PiViewerBase16::new(0, 120))
0  │  2  4  3 15  6 10  8  8  8  5 
10 │ 10  3  0  8 13  3  1  3  1  9 
20 │  8 10  2 14  0  3  7  0  7  3 
30 │  4  4 10  4  0  9  3  8  2  2 
40 │  2  9  9 15  3  1 13  0  0  8 
50 │  2 14 15 10  9  8 14 12  4 14 
60 │  6 12  8  9  4  5  2  8  2  1 
70 │ 14  6  3  8 13  0  1  3  7  7 
80 │ 11 14  5  4  6  6 12 15  3  4 
90 │ 14  9  0 12  6 12 12  0 10 12 
100│  2  9 11  7 12  9  7 12  5  0 
110│ 13 13  3 15  8  4 13  5 11  5
Commit count: 17

cargo fmt