What is the difference between equality and equivalence?

后端 未结 9 766
难免孤独
难免孤独 2020-12-13 07:08

I\'ve read a few instances in reading mathematics and computer science that use the equivalence symbol , (basically an \'=\' with three lines)

9条回答
  •  别那么骄傲
    2020-12-13 07:23

    I take your question to be about math notation rather than programming. The triple equal sign you refer to can be written in HTML or \equiv in LaTeX.

    a ≡ b most commonly means "a is defined to be b" or "let a be equal to b".

    So 2+2=4 but φ ≡ (1+sqrt(5))/2.

    Here's a handy equivalence table:

    Mathematicians      Computer scientists
    --------------      -------------------
          =                      ==
          ≡                      =
    

    (The other answers about equivalence relations are correct too but I don't think those are as common. There's also a ≡ b (mod m) which is pronounced "a is congruent to b, mod m" and in programmer parlance would be expressed as mod(a,m) == mod(b,m). In other words, a and b are equal after mod'ing by m.)

提交回复
热议问题