Hi, I changed the license for my code and wrote some junit tests while refactoring.
I think there are many improvements since I originally emailed. I have not had any off list expressions of interest and I wonder if there is yet any other interest in making this available as part of Commons Math? I have added an entry in the wish list and created a JIRA issue (which I am watching) and attached a zip file containing a copy of the src and tests code to it: https://issues.apache.org/jira/browse/MATH-490 The main reason I developed this code was that I needed to raise a BigDecimal to the power of another BigDecimal. Dealing with all the different cases has been a challenge. Although I'm not 100% confident I have handled every case, I'm reasonably happy with this effort. In terms of junit tests: where the expected result was not obvious to me and I could think of no obvious other way to calculate it using the java core code, I have used results returned from my methods to set expected results. This is better than nothing, but developers of this code should be warned that test failures may be a result of original errors rather than as a consequence of changes they have made. I wonder if there are some canonical math compliance test data that I should use... I was thinking that I should document or use some attribution or something to distinguish the different types of test if I got this far. Does anyone have any good advice for me at this stage? Best wishes, Andy http://www.geog.leeds.ac.uk/people/a.turner/ -----Original Message----- From: Andy Turner [mailto:[email protected]] Sent: 16 December 2010 22:29 To: Commons Users List Subject: RE: [Math] BigDecimal to power Can do if the code is wanted... ________________________________________ From: Gary Gregory [[email protected]] Sent: 16 December 2010 18:58 To: Commons Users List Cc: [email protected] Subject: Re: [Math] BigDecimal to power For commons math you'd have to change the license to asl 2. Gary On Dec 16, 2010, at 9:07, "Andy Turner" <[email protected]> wrote: > Hi, > > I've implemented code for calculating a BigDecimal raised to the power of > another BigDecimal and which returns the result rounded to a specified number > of decimal places. It is in the maths package of my Generic library and can > be found via the following URL: > http://www.geog.leeds.ac.uk/people/a.turner/src/andyt/java/generic/ > > There are no third party dependencies. I have not fully tested the code and > already after I released I found a bug which is only updated in subversion > repository. Anyway in general the methods work and should be generally > useful. I looked for code to do this two years ago and although I expect > there are other implementations, I had no luck finding any and this week I > bit the bullet. > > I have posted on a few forums today about this to try to encourage uptake. > > Maybe you have some suggestions about where it goes from here? Maybe it is > something for commons Math? > > Best wishes, > > Andy > http://www.geog.leeds.ac.uk/people/a.turner/ > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
