$size_class = $size ? int( log($size) / log(2) ) : -1; # red light on, possible error caused by floating point arithmetic