Definining function calc-percent()

It was not defined.