Dealing with negative weights but tests still throw a SIGFPE error.