math utilities used by features and to evaluate results