i have so many protocols to represent the most common fractions perfectly without needing more than just ONE bit. They even work with positive and negative infinity!
The trick is to first negotiate the protocol youre using.
Can you explain how this works exactly? Do you mean you have like a “third type” or “fraction”: 3 and you just store 00 for 0/3, 01 for 1/3, 10 for 2/3, 11 for 3/3? If it’s an object, struct, or class type to store the context, then it’s not a primative and has a lot of overhead for arithmetic and I don’t see how you could possibly even do simple things like 1/3 + 2/6
i have so many protocols to represent the most common fractions perfectly without needing more than just ONE bit. They even work with positive and negative infinity!
The trick is to first negotiate the protocol youre using.
protocol schema 1/2
1 bit, little endian
if one: value is exactly 1/2
If zero: value is NOT one half
Schema 1/3
if one: value is 1/3
I’ve managed to create a compression algorithm that reduces files down to a single bit. I call it “is this file ‘loss.png’?”.
It’s guaranteed 100% lossless with any input!
Reminds me of MetaGolfScript.
Can you explain how this works exactly? Do you mean you have like a “third type” or “fraction”: 3 and you just store 00 for 0/3, 01 for 1/3, 10 for 2/3, 11 for 3/3? If it’s an object, struct, or class type to store the context, then it’s not a primative and has a lot of overhead for arithmetic and I don’t see how you could possibly even do simple things like 1/3 + 2/6
is_half = True is_third = True