calculateCliffd function

calculateCliffd