Difference among approximatelyEqual and essentiallyEqual in The art of computer programming

前端 未结 3 1268
南笙
南笙 2021-02-19 19:37

I get this code snippet from some where else. According to the webmaster, the code is picked from The art of computer programming by Knuth

Since I do not have a copy of

3条回答
  •  耶瑟儿~
    2021-02-19 19:45

    The difference is that essential equality implies approximate equality, but not vice versa. So essential equality is stronger than approximate equality.

    Also essential equality is not transitive, but if a is essentially equal to b, and b is essentially equal to c, then a is approximately equal to c (for another value of epsilon).

提交回复
热议问题