--- Brent Worden <[EMAIL PROTECTED]> wrote:This is a good idea.
[deletia]-----Original Message----- From: Phil Steitz [mailto:[EMAIL PROTECTED] Sent: Friday, June 06, 2003 12:21 PM
* Exponential growth and decay (set up for financial applications) I think this is just going to be a matter of finding the right formulas to add to MathUtils. I don't want to get carried away with financial computations, but some simple, commonly used formulas would be a nice addition to the package. We should also be thinking about other things to add to MathUtils -- religiously adhering to th guiding principles, of course. Al's sign() is an excellent example of the kind of thing that we should be adding, IMHO.
Things that might be added: Average of two numbers comes up a lot.
Do we muddy the class hierarchy by putting such a thing into MathUtils rather than the stat subtree?
Something similar to JUnit's assertEquals(double expected, double actual, double epsilon).
Is JUnit's license (http://www.opensource.org/licenses/ibmpl.php) Apache compatible?
I think that Brent is talking about defining a new function called something like approximatelyEquals() that returned a boolean. The signature, semantics and implementation of this would be different from JUnit.
+1 (especially the part about your time :-)
Simple methods like isPositive, isNegative, etc. can be used to make boolean expressions more human readable.
I'm willing to build those two on top of sign (I'm so generous with my coding time, eh? <g>). Are those two sufficient? sign treats 0 as positive, which may not be desirable.
Some other constants besides E and PI: golden ratio, euler, sqrt(PI), etc.
That would be nice, though we should consider which ones are really needed generally. I personally love the lore of constants, of which there are more than you might imagine (see http://mathworld.wolfram.com/topics/Constants.html).
I've used a default error constant several places. It would be nice to come up with a central location for such values.
Or at least define a consistent interface that could be implemented by whatever needs that.
Al
===== Albert Davidson Chou
Get answers to Mac questions at http://www.Mac-Mgrs.org/ .
__________________________________ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com
--------------------------------------------------------------------- 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]
