Gravar-mail: Incorporating spike-rate adaptation into a rate code in mathematical and biological neurons