[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

On Tuesday 28 June 2016 16:12, Gregory Ewing wrote: > Rustom Mody wrote: >> I said that for the Haskell list [0..] >> >> [0..] ++ [-1] == [0..] >> >> He said (in effect) yes that -1 would not be detectable but its still there! > > The code to generate it is there, but it will never > be executed, so the compiler is entitled to optimise > it away. :-) > > He may have a point though. There are avenues of > mathematics where people think about objects such > as "all the natural numbers, followed by -42", and > consider that to be something different from just > "all the natural numbers". > > So, a mathematician would probably say they're not > equal. A scientist would say they may or may not be > equal, but the difference is not testable. > > An engineer would say "Lessee, 0, 1, 2, 3, 4, 5, > 6, 7... yep, they're equal to within measurement > error." And a programmer would write a script to compare the two, and then go to Stackoverflow asking for help to optimize it because it takes too long to complete. Relevant: https://blogs.msdn.microsoft.com/oldnewthing/20131029-00/?p=2803 -- Steve

- Prev by Date:
**Can math.atan2 return INF?** - Next by Date:
**Assignment Versus Equality** - Previous by thread:
**Can math.atan2 return INF?** - Next by thread:
**Can math.atan2 return INF?** - Index(es):