Remix.run Logo
teraflop 5 hours ago

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.

andrewflnr 4 hours ago | parent | next [-]

I was careful. :)

> representable in a finite number of digits or bits

Implying a digit-based representation.

jamster02 43 minutes ago | parent [-]

> 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

cozzyd 5 hours ago | parent | prev [-]

Or use pieee-754 which is the same as iee-754 but everything is mimtipled by pi.

electroglyph 4 hours ago | parent [-]

i really wanted "mimtipled" to be a word =)

cozzyd 3 hours ago | parent [-]

I guess my phone thinks it might be since it didn't correct it :)