print negative sign as ~ instead of - to match semantics