Skip to content

Fix OverflowError when displaying Stats objects

Vicentini Filippo requested to merge github/fork/femtobit/stats-display into v3.0

Created by: femtobit

This PR resolves issue #459 (closed).

The OverflowError occurred for Stats with infinite error_of_mean, as the formula for computing the output precision overflows in that case. Now, this case is treated in the same way as NaN. Arguably, the precision of a quantity with infinite error is zero, but just displaying the value with some default precision seems acceptable to me.

Merge request reports