On Mon, Mar 9, 2009 at 11:45 AM, Damien Katz <[email protected]> wrote: > > The problem is floating point/text is a really difficult problem. I've > butchered FP text conversion in Lotus Notes myself, it's way more > complicated and subtle then I ever though it could be. While there are > standardized algorithms, the reality is they are so many languages and > libraries that have slight variations it's really hard to know when you got > it right. You may have written a ton of tests and everything passes, but did > you try it with "0.13421143112e-12" Because the bias tables in algorithm X > is slightly different from algorithm Y, and none of your tests detect it. > Yada yada.
I guess I was trying to punt on a canonical format, because of things like this. In my estimation, the format could be less-than-canonical and still capable of being reliably signed, if the signature is willing to put bounds on the precision needed to remain valid. There will be edge cases, but maybe we can discourage them by disallowing E notation, so that all numbers would have to be in plain old int.something format and if the signature wants to treat 0.13421143112e-12 as "0.00" that's it's business. Not perfect, but better than disallowing floats? Chris -- Chris Anderson http://jchris.mfdz.com
