
31 Aug
2010
31 Aug
'10
2:23 p.m.
Luke Palmer wrote:
I have a description of the design pattern you need, appropriately named: http://lukepalmer.wordpress.com/2009/03/24/certificate-design-pattern/
Mmm, I like that. There are two small problems: * In my web browser, some of the code snippets get the right-hand edge chopped off. * Double-precision floating-point arithmetic is inexact, so half your code won't actually work in the real world. (But obviously, it's only supposed to be an example for illustration purposes.) With regard to the second, does anybody know of anything on Hackage for testing whether two values are "approximately equal"? It must be a common programming problem, and it's more tricky than you think to solve it well.