The hidden calculations that determine whether you will cry