stedolan / counterexamples

Counterexamples in Type Systems
http://counterexamples.org
372 stars 23 forks source link

Suggestion: add definitional floating point equality #22

Open alercah opened 1 year ago

alercah commented 1 year ago

Both Agda and Idris had unsoundness caused by using IEEE floating point equality as definitional equality, whereby 0.0 == -0.0 despite the two values being different and behaving differently. In particular, 1 / 0.0 = infinity while 1 / -0.0 = -infinity, breaking function congruence.

See idris-lang/Idris-dev#2609 idris-lang/Idris2#601, agda/agda#2169