61 Commits

Author SHA1 Message Date
jos
e10dd5bce5 Refactored x && x.isBigNumber === true into type.isBigNumber(x) 2017-08-12 11:54:53 +02:00
jos
bbfa7d51df Fixed #484, #555: inaccuracy of math.sinh. Also using ES6 Math functions when available 2016-04-03 13:47:57 +02:00
jos
15aca5e4d0 Changed casing of the values of config options number and matrix to match the actual name of the classes. 2016-03-04 19:41:54 +01:00
jos
e075ed776e Refactored all trigonometric functions to using decimal.js. Still awaiting decimal.js v5.0.5 for a bug fix. 2016-02-21 12:55:45 +01:00
jos
73cb353260 Refactored bignumber implementations of acos, acosh, asinh, atan, atan2, atanh, cosh, sinh, tanh, cbrt 2016-02-14 22:23:18 +01:00
jos
c558cf496e Fixed all broken unit tests 2016-02-14 21:51:37 +01:00
jos
fc5cefde5a Fixed two unit tests failing on node v0.10 and v0.12 2016-02-13 14:12:12 +01:00
Eric
34f991949d Added support for complex units 2015-11-28 20:09:22 +00:00
jos
b5d3547914 Extended trigo, logical, relational functions with support for Units with BigNumber/Fraction value. (Many failing unit tests!) 2015-11-28 11:35:52 +01:00
jos
667139f439 Fixed a bug in functions sin and cos, which gave wrong results for BigNumber integer values around multiples of tau (i.e. sin(bignumber(7))). 2015-10-09 09:32:05 +02:00
jos
0eb9b5b119 Implemented a new configuration option predictable, which can be set to true in order to ensure predictable function output types. 2015-05-23 21:00:08 +02:00
rjbaucells
586b93bcf3 atan2 updates 2015-05-03 23:39:06 -04:00
rjbaucells
fa24a92b24 atan2 updates - partial 2015-05-03 23:36:05 -04:00
jos
6e96d5a808 Merge branch 'develop' into v2
Conflicts:
	HISTORY.md
	bower.json
	component.json
	dist/math.js
	dist/math.map
	dist/math.min.js
	lib/function/arithmetic/abs.js
	lib/function/probability/gamma.js
	lib/version.js
	package.json
2015-04-22 21:43:56 +02:00
Max Bruckner
8ad525b66e util/latex: get rid of many unnecessary curly braces 2015-04-19 11:08:00 +02:00
jos
349e9845e8 Merge branch 'develop' into v2_merge
Conflicts:
	HISTORY.md
	bower.json
	component.json
	dist/math.js
	dist/math.map
	dist/math.min.js
	docs/reference/units.md
	lib/version.js
	package.json
	test/function/construction/chain.test.js
	test/function/matrix/det.test.js
	test/function/matrix/transpose.test.js
	test/function/utils/import.test.js
2015-04-13 21:42:43 +02:00
Max Bruckner
7adf0ebc53 LaTeX tests for functions 2015-04-05 14:29:10 +02:00
jos
f70cad6346 Refactored acot, acsc, asec, atan, atan2, cot, csc, sec, sin, tan to typed-functions 2015-03-22 13:44:43 +01:00
jos
dd9954b995 Refactored acos, acosh, acoth, acsch, asech, asin, asinh, atanh, cos, cosh, coth, csch, sech, sinh, tanh to typed-functions. 2015-03-11 09:51:25 +01:00
Favian Contreras
b761e4e94f Adjusted strange behavior of created pi constructors (i.e. replacing them). 2015-03-01 21:59:44 -08:00
Favian Contreras
1fb2ab8f74 Added BigNumber functionality for atan2, with tests. 2015-03-01 03:35:19 -08:00
Favian Contreras
4067586d7d Now numbers from BigNumber trig calls use the default constructor rather than create a new one each time. Now all trig functions can have arguments with higher precisions. 2015-02-26 12:31:38 -08:00
Favian Contreras
9d4b74241c Updated inverse hyperbolic functions to return complex values when appropriate. Updated the test cases as well. 2015-02-24 03:37:42 -08:00
Favian Contreras
7f9b8e177f Added test cases for new methods. Also, escaped parenthesis in error message, now it works. Updated atan test case to reflect the new behavior (see #173). 2015-02-24 01:58:24 -08:00
Favian Contreras
ac460ec1a5 Added test cases, and updated the functions (recirpocal BigNumber calcs were previously done improperly as were the complex number computation). 2015-02-16 02:24:30 -08:00
Favian Contreras
ed2137a66e Added hyperbolic inverse functions although they are untested. Implemented and tested the reciprocal trigonometric BigNumber functions (hyperbolic has been done as well, but not normal inverse). 2015-02-15 15:25:00 -08:00
Favian Contreras
aa4717a82d Replaced BigNumber comparisons with string comparison for the high precision acos and asin test cases, in an attempt to fix those test cases. 2015-02-09 01:56:13 -08:00
Favian Contreras
38650ba475 Slight tweeks and refactoring of the functions. Updated test cases to ensure args were not tampered with (even for functions whose precision is inherited via the number which will be changed in the future). 2015-02-09 01:33:29 -08:00
Favian Contreras
2de088cb0d Tested the functions. Made changes to the functions accordingly. Now puts more digits of pi into cosine to get the 'correct' values. 2015-02-08 18:42:18 -08:00
Favian Contreras
1b51822677 Updated tests, and slight update to the way I reduced the arguments. 2015-02-04 04:57:29 -08:00
Favian Contreras
27dc595557 Organized bignumber.js by function type. Improved speed of sin, and tried to complete cosine but that is slightly broken (gets last digit wrong sometimes). 2015-02-03 05:54:04 -08:00
Favian Contreras
35d92bde1d Cleaned up test cases by removing string comparisons on NaN and 0 equality for bignumbers. Also, now ensuring that sin returns with correct precision. 2015-01-12 13:04:03 -08:00
Favian Contreras
676e69409b Fixed bug of not reducing into pi range when negative, and using less guard digits. Now more thorough tests. 2015-01-04 10:25:03 -08:00
Favian Contreras
e8d8e79976 Initial BigNumber sin support. Tests added as well. 2015-01-01 23:32:15 -08:00
Pavel Panchekha
e51bb94d56 Fix the test case so it passes on all hardware.
The fix is to test that the imaginary part is nonzero,
not that it is exactly 1e-100.
In some software / hardware combos,
it seems to return 1.0000000000000001e-100.
2014-12-14 00:42:45 -08:00
Pavel Panchekha
c3a7410a9a Add tests for calling sin and cos on very small inputs. 2014-12-12 12:14:28 -08:00
jos
da306e26ed Implemented support for null in all functions (see #205) 2014-08-09 16:27:11 +02:00
jos
8a12c8e9bc Fixed #200: A new instanceof of math.js must now be created as math.create([options]) instead of math([options]) 2014-08-03 21:42:12 +02:00
Rogelio J. Baucells
2b71d880a4 trigonometry hyperbolic functions 2014-04-18 19:01:00 -04:00
josdejong
97cbb0093f Moved errors to their own namespace and folder 2014-04-11 18:02:29 +02:00
josdejong
492d7f4c4f Moved ArgumentsError from lib/type/ to lib/util/ 2014-04-06 21:25:46 +02:00
josdejong
eca2326802 More unit tests 2014-03-01 21:35:55 +01:00
josdejong
b3812362fd Implemented bignumber downgrading for all not-supported functions 2013-11-23 14:14:44 +01:00
josdejong
d2e55a0132 Math.js must be instantiated now, static calls are no longer supported 2013-10-26 15:00:06 +02:00
josdejong
c8a289a08c Removed unnecessary .js suffix in module require statements 2013-10-20 14:01:31 +02:00
josdejong
2dc6ac6cdf Implemented support for booleans in all relevant functions 2013-09-02 21:36:52 +02:00
josdejong
7f58398053 Completed missing descriptions in tests 2013-08-19 21:07:45 +02:00
Sebastien Piquemal
6174eb00d7 refactored test/function/statistics and test/function/trigonometry to mocha 2013-08-17 13:42:40 +04:00
josdejong
e704c79e17 Removed the feature to automatically convert a complex
value with an imaginary part equal to zero to a number (see #59)
2013-08-14 14:41:35 +02:00
Sebastien Piquemal
a6b4ad7526 fixed tests 2013-08-14 15:43:32 +04:00