Commit Graph

2781 Commits

Author SHA1 Message Date
Sebastian Bazley fa0d87fd62 Remove reflection tests as they are in FastMathStrictComparisonTest
Enable fail if not all StrictMath methods have been implemented

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1062902 13f79535-47bb-0310-9956-ffa450edef68
2011-01-24 18:07:48 +00:00
Sebastian Bazley 6e9f0c1dbb Check all FastMath methods against StrictMath results
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1062893 13f79535-47bb-0310-9956-ffa450edef68
2011-01-24 17:33:33 +00:00
Sebastian Bazley 4bab713521 MATH-477 FastMath Javadoc should show which methods actually use java.lang.Math internally
Also fixed round(int) to use local FastMath method

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1062764 13f79535-47bb-0310-9956-ffa450edef68
2011-01-24 13:19:52 +00:00
Gilles Sadowski ecfd29007c Splitted the single "testPerformance" method into several ones (one test case
per mathematical function) for easier comparison. Added a third benchmark
(that calls "Math" methods).


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1062761 13f79535-47bb-0310-9956-ffa450edef68
2011-01-24 12:59:58 +00:00
Sebastian Bazley 97e89cdd7a MATH-493 FastMath min and max fail with (Infinity,-Infinity) and (0,0, -0.0)
Fixing (0,0, -0.0) by using code from Harmony.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1062758 13f79535-47bb-0310-9956-ffa450edef68
2011-01-24 12:47:23 +00:00
Gilles Sadowski 946995ac16 MATH-500
Temporarily moved "ConvergingAlgorithm" and "ConvergingAlgorithmImpl" to
package "analysis.integration". See MATH-501.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1062707 13f79535-47bb-0310-9956-ffa450edef68
2011-01-24 09:48:39 +00:00
Luc Maisonobe d86b785b6d added FastMath.hypot
JIRA: MATH-478

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1062559 13f79535-47bb-0310-9956-ffa450edef68
2011-01-23 22:37:50 +00:00
Luc Maisonobe 87c0126a33 javadoc
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1062552 13f79535-47bb-0310-9956-ffa450edef68
2011-01-23 22:26:22 +00:00
Luc Maisonobe f26739a789 added FastMath.scalb(double, int) and FastMath.scalb(float, int)
deprecated MathUtils.scalb(double, int)
JIRA: MATH-498

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1062550 13f79535-47bb-0310-9956-ffa450edef68
2011-01-23 22:22:08 +00:00
Sebastian Bazley febcb077e7 Split testPerformance() into new class
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1062456 13f79535-47bb-0310-9956-ffa450edef68
2011-01-23 15:44:32 +00:00
Sebastian Bazley de4aff2319 Update nextAfter Javadoc
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1062406 13f79535-47bb-0310-9956-ffa450edef68
2011-01-23 12:20:41 +00:00
Sebastian Bazley 2cd834df74 Add another change
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1062402 13f79535-47bb-0310-9956-ffa450edef68
2011-01-23 12:11:33 +00:00
Luc Maisonobe 4e017170f5 fixed nextAfter implementations for handling of some special values
fixed the signature of the float version, as the spec is to have a double second argument
moved the existing tests that were used in the former implementation in MathUtils,
fixing them also as two of them were not compliant with the spec for equal numbers
Jira: MATH-478

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1062387 13f79535-47bb-0310-9956-ffa450edef68
2011-01-23 11:06:24 +00:00
Luc Maisonobe f806576392 added getExponent methods to FastMath
JIRA: MATH-497

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1062368 13f79535-47bb-0310-9956-ffa450edef68
2011-01-23 10:28:44 +00:00
Luc Maisonobe 3e82d9f1a3 announced bugs fixed by sebb
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1062363 13f79535-47bb-0310-9956-ffa450edef68
2011-01-23 10:24:34 +00:00
Luc Maisonobe 8252860a27 javadoc
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1062359 13f79535-47bb-0310-9956-ffa450edef68
2011-01-23 10:16:49 +00:00
Sebastian Bazley 0d4c8d4a70 MATH-496 Create FastMath copySign methods
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1062303 13f79535-47bb-0310-9956-ffa450edef68
2011-01-23 00:57:29 +00:00
Sebastian Bazley 9923564810 Should only test against public methods.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1062301 13f79535-47bb-0310-9956-ffa450edef68
2011-01-23 00:52:34 +00:00
Sebastian Bazley 6967590b83 Javadoc tweak
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1062260 13f79535-47bb-0310-9956-ffa450edef68
2011-01-22 20:28:37 +00:00
Sebastian Bazley 7c2a4fa579 Simplify code by using doubleHighPart
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1062257 13f79535-47bb-0310-9956-ffa450edef68
2011-01-22 20:26:11 +00:00
Sebastian Bazley c6e0669a73 Update changes
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1062256 13f79535-47bb-0310-9956-ffa450edef68
2011-01-22 20:23:37 +00:00
Sebastian Bazley 093d8d914a MATH-494 FastMath atan2 does not agree with StrictMath for special cases
Add doubleHighPart() method to better handle splitting high absolute values
Add getSign() utility method

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1062253 13f79535-47bb-0310-9956-ffa450edef68
2011-01-22 20:19:40 +00:00
Sebastian Bazley 3729cef21a Tidy up debug output
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1062187 13f79535-47bb-0310-9956-ffa450edef68
2011-01-22 16:22:06 +00:00
Sebastian Bazley b0bd0cdc9c MATH-494 Allow for sufficiently close numbers but still detect +/- 0 difference
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1062089 13f79535-47bb-0310-9956-ffa450edef68
2011-01-22 01:44:57 +00:00
Sebastian Bazley e4caa054a0 MATH-493 FastMath min and max fail with (Infinity,-Infinity)
(still to fix zero case)

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1062040 13f79535-47bb-0310-9956-ffa450edef68
2011-01-21 21:46:13 +00:00
Sebastian Bazley 517855fe74 Correct list of unique methods
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1062007 13f79535-47bb-0310-9956-ffa450edef68
2011-01-21 20:24:37 +00:00
Sebastian Bazley 2c88aa94c1 MATH-478 FastMath is not an exact replacement for StrictMath
Add missing methods - TODO implement our own versions
Document which methods are additional to StrictMath

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1061996 13f79535-47bb-0310-9956-ffa450edef68
2011-01-21 20:04:57 +00:00
Sebastian Bazley 7d763283f8 Make Special test methods generic
Add tests for two parameters
Add checks for missing or extra methods

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1061991 13f79535-47bb-0310-9956-ffa450edef68
2011-01-21 20:01:10 +00:00
Gilles Sadowski 082f76bd53 MATH-492
Forgot to add a reference in the "changes.xml" file.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1061867 13f79535-47bb-0310-9956-ffa450edef68
2011-01-21 15:56:07 +00:00
Gilles Sadowski 3ea6733ee8 MATH-492
Removed class "MaxIterationsExceededException". Replaced last occurrence by
"MaxCountExceedeException".


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1061850 13f79535-47bb-0310-9956-ffa450edef68
2011-01-21 15:38:21 +00:00
Gilles Sadowski 32c2303288 MATH-491
Replaced old (checked) "DimensionMismatchException" by its unchecked
equivalent in package "exception".


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1061839 13f79535-47bb-0310-9956-ffa450edef68
2011-01-21 15:12:55 +00:00
Gilles Sadowski a49d42bdf7 Trailing spaces.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1061812 13f79535-47bb-0310-9956-ffa450edef68
2011-01-21 14:08:18 +00:00
Gilles Sadowski a28aac9aa8 MATH-488
Removed occurrences of "MathException" in multidimensional interpolator.
Replaced "DimensionMismatchException" by its unchecked equivalent (MATH-491).
[I forgot to make those changes as part of MATH-458.]
Fixed Javadoc.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1061790 13f79535-47bb-0310-9956-ffa450edef68
2011-01-21 12:51:03 +00:00
Sebastian Bazley c9f2d87527 Bugs have been fixed; fail in future
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1061630 13f79535-47bb-0310-9956-ffa450edef68
2011-01-21 04:38:45 +00:00
Sebastian Bazley 6babdfb3a8 Typo in constant name
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1061628 13f79535-47bb-0310-9956-ffa450edef68
2011-01-21 04:36:58 +00:00
Sebastian Bazley 031654a93c MATH-476 FastMath code contains 'magic' numbers
Extracted 2^52 value as a constant

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1061625 13f79535-47bb-0310-9956-ffa450edef68
2011-01-21 04:34:55 +00:00
Sebastian Bazley d4005bbd6e MATH-476 FastMath code contains 'magic' numbers
Extracted "splitter" value as a constant

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1061621 13f79535-47bb-0310-9956-ffa450edef68
2011-01-21 04:03:03 +00:00
Sebastian Bazley 64a0eee333 MATH-489 FastMath acos fails when input abs value is less than about 5.7851920321187236E-300 - returns NaN
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1061611 13f79535-47bb-0310-9956-ffa450edef68
2011-01-21 03:30:21 +00:00
Sebastian Bazley 81ba9842e5 MATH-489 Fix overflows in acos calculation
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1061609 13f79535-47bb-0310-9956-ffa450edef68
2011-01-21 03:24:14 +00:00
Sebastian Bazley 0e90dd494b Javadoc
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1061605 13f79535-47bb-0310-9956-ffa450edef68
2011-01-21 02:54:33 +00:00
Sebastian Bazley 9b08855c24 Fix up double nextAfter special cases; add float test
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1061602 13f79535-47bb-0310-9956-ffa450edef68
2011-01-21 02:45:52 +00:00
Sebastian Bazley 795e041074 Only check public methods
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1061599 13f79535-47bb-0310-9956-ffa450edef68
2011-01-21 02:28:44 +00:00
Luc Maisonobe 5ac5c98b80 improved javadoc on infinite values for nextAfter
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1061555 13f79535-47bb-0310-9956-ffa450edef68
2011-01-20 22:38:35 +00:00
Luc Maisonobe 9f30f38980 fixed behavior of nextAfter(double, double) for infinity,
added nextAfter(float, float) and nextUp(float)
JIRA: MATH-478

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1061551 13f79535-47bb-0310-9956-ffa450edef68
2011-01-20 22:33:56 +00:00
Luc Maisonobe fef497d841 limit visibility of event states list to AbstractIntegrator class only
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1061527 13f79535-47bb-0310-9956-ffa450edef68
2011-01-20 21:31:54 +00:00
Luc Maisonobe 73a8e5d165 separate discrete event detection from adaptive step size handling in ODE solvers,
thus improving robustness, maintainability and speed
JIRA: MATH-484


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1061508 13f79535-47bb-0310-9956-ffa450edef68
2011-01-20 20:57:11 +00:00
Luc Maisonobe 168139c161 added MathInternalError
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1061498 13f79535-47bb-0310-9956-ffa450edef68
2011-01-20 20:32:54 +00:00
Sebastian Bazley 05d16ea5e0 Rearrange DOUBLE_SPECIAL_VALUES in decreasing absolute value to help catch first failure
Add MathUtils.EPSILON and SAFE_MIN as other likely break points

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1061322 13f79535-47bb-0310-9956-ffa450edef68
2011-01-20 14:45:12 +00:00
Sebastian Bazley a0c8e5c701 Javadoc clarification for signum
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1061096 13f79535-47bb-0310-9956-ffa450edef68
2011-01-20 01:28:59 +00:00
Sebastian Bazley 0a9d609f98 Update changes with recent fixes
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1060980 13f79535-47bb-0310-9956-ffa450edef68
2011-01-19 20:42:40 +00:00