Trying to write an encoder and decoder that has to use this formula. Basically after all is said and done, the formula encodes any number between 25 and 2294E6 into an int between 0 and 254. However there is an extreme loss of value when decoding it with the reversed formula. I was seeing if there was a way to account for the loss somehow. Oh and for some more info, I can only store it as an int.
Asked
Active
Viewed 52 times
0
-
3Any encoding that maps X different values to a total number smaller than X is not reversible by definition. – OH GOD SPIDERS Aug 18 '21 at 12:55
-
Do not include links to images, but instead insert directly images. This is a reference site, so we want to be able to view the image also in future (and also we do not open random links). Note: if you use log, probably the order of magnitude is the most important thing, so "extreme loss" is not so extreme. See e.g. the colour encoding we are using, or floating point numbers: on absolute numbers loss may be very high, but usually not so bad (and in fact we use it as default method) – Giacomo Catenazzi Aug 18 '21 at 13:07