News for hackers. Stuff that matters.
Re:Fifteen Most Famous Transcendental Numbers by teraflop on Wednesday December 31, 2025 @08:24PM (#46450303)
Careful -- that statement is half true.

It's true that no matter what symbolic representation format you choose (binary or otherwise) it will never be able to encode all irrational numbers, because there are uncountably many of them.

But it's certainly false that computers can only represent rational numbers. Sure, there are certain conventional formats that can only represent rational numbers (e.g. IEEE-754 floating point) but it's easy to come up with other formats that can represent irrationals as well. For instance, the Unicode string "√5" is representable as 4 UTF-8 bytes and unambiguously denotes a particular irrational.

Re:Fifteen Most Famous Transcendental Numbers by andrewflnr on Wednesday December 31, 2025 @08:48PM (#46450462)
I was careful. :)

> representable in a finite number of digits or bits

Implying a digit-based representation.

Re:Fifteen Most Famous Transcendental Numbers by jamster02 on Thursday January 01, 2026 @12:24AM (#46451538)
> the Unicode string "√5" is representable as 4 UTF-8 bytes

As the other person pointed out, this is representing an irrational number unambiguously in a finite number of bits (8 bits in a byte). I fail to see how your original statement was careful :)

> representable in a finite number of digits or bits

Re:Fifteen Most Famous Transcendental Numbers by dullcrisp on Thursday January 01, 2026 @03:12AM (#46452221)
I don’t think those bits unambiguously represent the square root of five. Usually they represent either 3800603189 or -494364107.
Re:Fifteen Most Famous Transcendental Numbers by bsaul on Thursday January 01, 2026 @07:11AM (#46453489)
Isn't "unambiguous representation" impossible in practice anyway ? Any representation is relative to a formal system.

I can define sqrt(5) in a hard-coded table on a maths program using a few bytes, as well as all the rules for manipulating it in order to end up with correct results.

Re:Fifteen Most Famous Transcendental Numbers by dullcrisp on Thursday January 01, 2026 @08:07AM (#46453796)
Well yeah but if we’re being pedantic anyway then “render these bits in UTF-8 in a standard font and ask a human what number it makes them think of” is about as far from an unambiguous numerical representation as you could get.

Of course if you know that you want the square root of five a priori then you can store it in zero bits in the representation where everything represents the square root of five.

Re:Fifteen Most Famous Transcendental Numbers by cozzyd on Wednesday December 31, 2025 @08:35PM (#46450381)
Or use pieee-754 which is the same as iee-754 but everything is mimtipled by pi.
Re:Fifteen Most Famous Transcendental Numbers by electroglyph on Wednesday December 31, 2025 @09:26PM (#46450674)
i really wanted "mimtipled" to be a word =)
Re:Fifteen Most Famous Transcendental Numbers by cozzyd on Wednesday December 31, 2025 @10:19PM (#46450985)
I guess my phone thinks it might be since it didn't correct it :)