Change distance computation to use e if dominant.