The expression ceilf( (float) *metadata_max_bits * nbands / 5 ) was converted to double precision because of issues with -funsafe-math-optimizations,
where an imprecision of the division in combination with the ceilf()-operator could actually produce different results (+1) for *metadata_max_bits.
Alternative ways to address this:
1) Pick up the corresponding code from the BASOP codebase
2) An expression which takes care of small imprecisions of the division, e.g., ceilf( ( (float) *metadata_max_bits * nbands / 5 ) - 0.1f )
(minimum non-zero fractional part for X / 5 is 0.2 - substract half of this, to compensate for imprecisions; the ceilf() should still return the correct integer)
For reasons of code-readability, the variant with double precision was chosen.