|
From: Dirk E. <ed...@de...> - 2002-01-10 13:31:33
|
On Thu, Jan 10, 2002 at 12:09:24PM +0000, Luigi Ballabio wrote: > > >On Tue, Jan 08, 2002 at 04:36:28PM +0100, Ferdinando Ametrano wrote: > >> Another key issue would be to solve the problems we have on some > >platforms, > >> as Dirk pointed out. I know Luigi is working on that: Luigi please report > > Ok, I just committed some changes which make QuantLib-Python compile and > pass all tests on alpha. I hope this will fix the problems on other Excellent news, and thank you! > platforms as well. Probably/hopefully. I guess it is worth trying. I guess I should grab a tarball out of CVS... Is that against stock QL or do I need a new QL too > Dirk: while a couple of bugs were ours only, one seems to be related with > some C or C++ library. If you have any idea of who's the maintainer of the > corresponding package, you might want to get in touch with him and report. > The bug can be reproduced on flatline.tdyc.com as follows: > > ballabio@flatline:~$ python > Python 2.1.1+ (#1, Jan 9 2002, 03:47:01) > [GCC 2.95.4 (Debian prerelease)] on linux2 > Type "copyright", "credits" or "license" for more information. > >>> import math > >>> math.exp(-700) > 9.8596765437597708e-305 > >>> math.exp(-750) > 0.0 > >>> math.exp(-720) > Floating point exception > ballabio@flatline:~$ > > i.e., there is a range of numbers around -720 which causes exp() to abort. > Also, the same was happening in a calculation inside libQuantLib, so that > the problem might be not in Python but rather in some math C or C++ library > which both QuantLib and Python link to. I'm suspect that this leads down to glibc where code like exp() ultimately resides. I think we should report this to debian-alpha and/or debian-python. What do you think? > I fixed the problem in our code by filtering the call to exp() and just > returning 0 if the exponent is below -700 or so, but it might be advisable > to report the thing if you have any idea who to report to. Hack alert :) Dirk -- Good judgment comes from experience; experience comes from bad judgment. -- F. Brooks |