rjf wrote: > You guys could eliminate one (I suspect major) source of confusion by > not printing the numbers in decimal and reading them back in from > character strings. > > You can read/write exact hexadecimal 64-bit floating-point binary > numbers. > or you can write them out as <sign>X <exact integer, written in any > base you choose> X 2^<exact integer> > without any error or possible confusion. > > There are few people who will claim their numerical library functions > provide correctly rounded > results always. Read about the "table-maker's dilemma". > http://en.wikipedia.org/wiki/Rounding#The_table-maker.27s_dilemma > > The fact that rounding of + and * is done right is irrelevant. > The fact that some computers are doing 80-bit intermediate > calculations vs 64-bit might be relevant. > But then if you want them all to agree, you can knee-cap the 80-bit > machines, so they will be the > same as 64-bit. Java originally required that. > > Instead of flailing around switching Solaris compilers and what-have- > you > why not try figuring out whether the bug is printing or computing, or > even a bug at all. > > RJF
The point you are missing is that we want to compare the output what Sage prints to a human. Comparing the bits of a floating point number would not help as a test suite. If two systems have the same 64 bits to indicate the number, a bug in the code which converts that to ASCII would not be detected. The tests compare ASCII text, not numbers. I would accept for some randomised testing, it might be better to bypaass the binary to ASCII conversion, as it would allow for more tests to be conducted in less time. But not in general would that be a good idea. It's 20+ years since I done any assembly language programming - that was on an 386/387 chip, then later on a VAX - never SPARC. So I'd be at a loss really. (BTW, after programming on a VAX, you realise how limited the x86 series was). Dave -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org