indmax, fixed method for computing exp