if function is in form a/-b, converts to -a/b