I am getting the error
BIGINT UNSIGNED value is out of range in \'(1301980250 -
mydb.news_articles.date)\'
The problem was caused by unsigned integer overflow as suggested by wallyk. It can be solved by
SELECT *, ((1 / log((date - 1301980250) * -1)) * 175) as weight FROM news_articles ORDER BY weight; (This one worked for me)
`NO_UNSIGNED_SUBTRACTION (haven't checked this)