modified some ugly math bit in exact expressions