fixed sign error in precompute.py