core: handle special values for numbers