Hacker News new | ask | show | jobs
by megaremote 2659 days ago
Does pi compress? It must if it is only numbers, but only by a half?
4 comments

Trillions of digits of Pi compresses insanely well - to Pi, of course.

The decompression just takes a while.

pi is effectively randomly distributed (I don't know if this is proven) which means it would be effectively impossible to compress is using conventional entropy or dictionary based techniques.

However, there are compact formulas which can generate pi to arbitrary precision, trading off compute time with space. So it;'s effectively compressible, I guess this relates to Kolomogorov complexity in some way.

If it's stored as ASCII/UTF8 text, then it will be compressible because it's just numbers. On the other hand, if they somehow have a number format that spans that many digits then it'll already be perfectly efficient.
Um, sure. But I don't think anybody really cares if pi is compressible because it's ASCII representation of numbers. At best, you'd be getting some constant factor improvement due to the unused bits, but there's nothing specific to pi in that.
If you consider compression to be 'representing information in a way that you can recover with some processing (from less information)', then any programmatic definition of Pi is an enormous compression of the value.
Nobody wants to steel man this question? The cute trivial++ answers are missing OPs point...