Re: Looking for a 'general porpouse' RCT



On 25 Mai, 17:33, SG <s.gesem...@xxxxxxxxx> wrote:
On 25 Mai, 16:32, Thomas Richter wrote:

A neat hack might be to first represent the floats as ints, compute
on them, and then convert back. For example, you can cast the floats
to ints (which is approximately a logarithmic map), then compute on
the ints, then cast back. *This* will be lossless.

It's simply not possible to approximate linear mappings in a
reversible way with this approach. [...]

....or any approach for that matter.

The question is: Should the original poster care about rounding
errors? For values of R,G,B between [0,1] and IEEE 754 single
precision floats the rounding errors for a round trip conversion are
almost certainly below 10^(-6).

To clarify: I meant the absolute errors, not relative errors.

Cheers!
SG
.



Relevant Pages

  • Re: Looking for a general porpouse RCT
    ... you can cast the floats ... the ints, then cast back. ... precision floats the rounding errors for a round trip conversion are ...
    (comp.compression)
  • Re: Looking for a general porpouse RCT
    ... you can cast the floats ... the ints, then cast back. ... precision floats the rounding errors for a round trip conversion are ...
    (comp.compression)
  • Re: Looking for a general porpouse RCT
    ... you can cast the floats ... to ints (which is approximately a logarithmic map), ... the ints, then cast back. ...
    (comp.compression)
  • Re: Looking for a general porpouse RCT
    ... you can cast the floats ... to ints (which is approximately a logarithmic map), ... the ints, then cast back. ... It's simply not possible to approximate linear mappings in a ...
    (comp.compression)
  • Re: RAD vs. performance
    ... Which is ok because ints and floats have different semantics anyway. ... largely dynamic typing, and prototype-oo integrated fairly deeply into the ...
    (comp.lang.misc)