handle near-math-domain-error scaling