0 = 44-44
1 = 44/44
2 = 4-(4+4)/4
3 = (4+4+4)/4
4 = 4+4*(4-4)
5 = (4+4*4)/4
6 = 4+(4+4)/4
7 = 44/4-4
8 = 4+4+4-4
9 = 4+4+4/4
10 = (44-4)/4
cargo run # This prints ordinary four-fours
cargo run 9999 # This prints four-nines
cargo run 44444 # This prints five-fours (Uses VERY large memory)
cargo run --features with-rayon # parallelize calculations with rayon
cargo run --release # Release build
You can calculate four-fours from browser. (Currently it does not support with-rayon
feature. To use rayon in wasm, see rayon-wasm.md.)
wasm-pack build
cd js
npm i
npm start