a user passing a `ws_n` of zero will make this computation throw... there are also that other complicated denominator, which perhaps could be zero? this arithmetic expression is rather hard to read: one has to keep track of operator precedence in lots of places... do its components have any individual meaning? i would break it up in pieces using intermediate variables...