[Cin] Floating point numbers between 0 and 1.0

Andrew Randrianasulu randrianasulu at gmail.com
Tue Nov 7 22:28:08 CET 2023


https://stackoverflow.com/questions/17949796/how-many-unique-values-are-there-between-0-and-1-of-a-standard-float


ppl here come up with this number:

1,065,353,215.

so ... even between 0.0f and 1.0f there is quite a number of ... numbers.

Still, out of range numbers useful in photo work like here

https://ninedegreesbelow.com/photography/gimp-tone-map-with-levels.html

found via bugzilla bug filled for gimp:

https://bugzilla.gnome.org/show_bug.cgi?id=737925

"*Bug 737925* <https://bugzilla.gnome.org/show_bug.cgi?id=737925> - Some
filters / operations provide float values superior to 1.0"

on CinGG plugins I found only exactly one instance of clamp line as Andrea
suggested:


 grep "CLAMP(output, 0, 1.0)" -r plugins
plugins/histogram/histogram.C:          CLAMP(output, 0, 1.0);
                       plugins/histogram/histogram.C:  CLAMP(output, 0,
1.0);

and nothing more.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cinelerra-gg.org/pipermail/cin/attachments/20231108/be9f2516/attachment.htm>


More information about the Cin mailing list