Report this content
We want the Dreams coMmunity to be a safe, diverse and tolerant place for everyone, no matter their age, gender, race, sexual orientation or otherwise. If you believe this content to contradict these principles, you can file a report for our coMmunity teams to investigate.
Note that misuse of the reporting tool will not be tolerated.Item being reported:
merkaba48 Thanks, good that workaround is nothing hard do do. Thanks for the idea with <, this might save one number in the variable ^^
PassTheRizla I'm not experienced in binary, but I tested it with online converters and I get the idea. Though, somehow it seems less efficient than storing raw numbers. I'll show you what I mean below (feel free to correct me if I'm wrong). Also, 4 numbers was just an example, let's say I want to store as many single-digit numbers as I can. Variable caps at 9,999,999, which is 7 digits, but what about 9,999,999.123? I'll test this today.
- So, example numbers I want to store: 25, 26, 27 and 28.
- In binary they'll be 11001, 11010, 11011 and 11100.
- 11001110101101111100 in decimal is 846716. Only 6 digits, success!
But with 63, 63, 63 and 63, it's 111111111111111111111111, and then 16777215. Suddenly, the same number of digits, 8. And it can't even fit in the variable.
The same with 6 one-digit numbers, which still take only 24 bits. 999999 is 100110011001100110011001, and then 10066329. Now it's still 8 digits, but 2 more than originally.
Again, feel free to correct me if I'm doing this wrong :) It would be nice to have a working compressing system.