They sound similar and have a potential common origina, but they are very different and cannot be used interchangeably.
'Precedent' and 'precedence' are homophones that used to be synonyms, but have taken on their own specific meanings. Read on to learn how to tell them apart.