171 if (histo_cells_target <= 0 || histo_ndims <= 0)
174 if (!(edge_ratio > 0.0) || !isfinite(edge_ratio))
177 scaled = (double)histo_cells_target * (
double)histo_ndims * edge_ratio;
178 if (!(scaled > 0.0) || !isfinite(scaled))
181 axis_cells = pow(scaled, 1.0 / (
double)histo_ndims);
182 if (!(axis_cells > 0.0) || !isfinite(axis_cells))
185 if (axis_cells >= (
double)INT_MAX)
188 if (axis_cells <= 1.0)
191 return (
int)axis_cells;