Re: [q-lang-users] Q 7.2 RC2
Brought to you by:
agraef
From: John C. <co...@cc...> - 2006-06-25 15:21:04
|
Albert Graef scripsit: > John, it would be nice if you (and everyone else who cares about the > numeric stuff) could once again apply a bit of torture to the > float/rational/complex arithmetic to see if everything now works as you > proposed and we discussed. ;-) There have been quite a few changes, so > I'd really appreciate your feedback. I've tested some corner cases against RC3; I never did test RC2. 1) Comparisons against nan still return false (per IEEE) rather than failing, which we had agreed is more Q-ish. 2) 3/0 and 3%0 both return the normal form 3/0. Since / is now supposed to always return inexacts, I think these should return inf and 3%0 respectively. 3) Making sure that those really were normal forms made me aware of just how useful it would be to be able to turn off unparsing and then turn it on again easily. I had to use my Chicken interface to make sure I wasn't being fooled. An interpreter command would make sense. 4) You had said earlier that you would provide unparsing rules for dict and the other container types. 5) Nan is returning true for isratval and isintval, when it should return false; by convention, a NaN is real but not rational. 6) When % is called on floats, the result is a float. Ideally, 2.5%1 should return 5%2, though I don't insist that the best possible fraction should be returned, just some reasonable fraction. This may be best done in C, where you can call useful functions like frexp(). 7) This brings up the issue of coercions from exact to inexact (easy, just need a special case for complex numbers) and for inexact to exact. These should be in the library somewhere. -- There are three kinds of people in the world: John Cowan those who can count, co...@cc... and those who can't. |