101 Commits

Author SHA1 Message Date
Jos de Jong
cd99ca5ae7 Merge pull request #289 from BigFav/bigSin
Now numbers from BigNumber trig calls use the default constructor rather...
2015-02-26 21:02:09 +00: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
Jos de Jong
fc645e927e Merge pull request #286 from BigFav/bigSin
acsc, asec, acot, and added Complex returns for expression parser
2015-02-24 19:38:28 +00:00
Favian Contreras
3bd6a56f08 Copy-paste error. Changed precision back properly for BigNumber acsc. 2015-02-24 03:45:30 -08:00
Favian Contreras
c970ac026a Added acsc, asec, and acot. Also fixed some Complex errors of modifying the original input. 2015-02-24 01:52:30 -08:00
jos
70a476c357 Replaced all require('decimal.js') with require('../type/BigNumber'), containing the toJSON and fromJSON methods for BigNumber 2015-02-18 20:41:27 +01:00
Favian Contreras
f296fa2e55 Cleaned up the usage of the variable 'mode' being a Number unnecessarily, it is now a Boolean. Replaced the few constant forumlas with values as well. 2015-02-16 07:55:08 -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
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
efd946a081 Completed code for trig methods. Mostly untested. 2015-02-05 09:40:27 -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
jos
2c059371f4 Merge remote-tracking branch 'origin/develop' into develop 2015-01-12 22:34:20 +01:00
jos
50e258209b Implemented lazy loading constants when using BigNumbers 2015-01-12 22:34:12 +01:00
Favian Contreras
dd2d585180 Cleaned up syntax in bignumber.js, and fixed sin bug that caused it to fail on my local machine. 2015-01-12 13:01:15 -08:00
jos
4d23e08aab Little bit more robust memoize function 2015-01-07 09:47:52 +01:00
jos
60f2370891 Generalized memoize function for multiple arguments 2015-01-06 22:28:20 +01:00
jos
47ca2b8422 Memoize all BigNumber constants 2015-01-06 22:04:56 +01:00
jos
5b1eedef59 Implemented a simple memoize function 2015-01-06 21:47:28 +01:00
Jos de Jong
6e5d07a8c4 Merge pull request #260 from BigFav/bigSin
Big Sin slight update.
2015-01-04 20:29:36 +01: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
Jos de Jong
622d1bd083 Merge pull request #259 from BigFav/bigSin
Initial BigNumber sin support. Tests added as well.
2015-01-04 14:04:32 +01:00
jos
3d84b47658 Fixed #258: missing parentheses in the toTex representation of function permutations. 2015-01-03 10:29:55 +01:00
Favian Contreras
e8d8e79976 Initial BigNumber sin support. Tests added as well. 2015-01-01 23:32:15 -08:00
Favian Contreras
6c21826b4b Prohibit usage of integers. 2014-12-16 02:56:15 -08:00
Favian Contreras
b8b7c92ae1 Moved type specific computation outside of the bignumber library, and made more style touchups. 2014-12-15 16:00:28 -08:00
Favian Contreras
f36fbb3968 Added bitwise functions into the bignumber section of mathjs. Made more test cases as well. Shifts are not fully precise, but other bitwise opts are. 2014-12-15 01:02:41 -08:00
jos
fd586fcbf1 Moved bignumber functions e, pi, tau, phi to util/bignumber.js (see #226) 2014-12-13 14:14:33 +01:00
jos
72a1b03850 Documented expression tree API. Some internal refactoring in nodes. 2014-11-12 22:30:15 +01:00
jos
374759a84e types.type now also recognizes a function 2014-10-19 20:37:27 +02:00
jos
e5d14ca3dd Some refactoring of the FunctionNode 2014-08-16 11:13:24 +02:00
jos
7f6b13a797 Changed the default value of new entries in resized matrices to zero. 2014-08-12 22:35:56 +02:00
jos
16d2e41f59 Improved function unsqueeze 2014-08-03 18:04:57 +02:00
jos
e5ce909524 Reworked the way matrices are resized when dimensions are added/removed 2014-08-03 15:56:39 +02:00
jos
8200955d71 Removed unnecessary names of functions 2014-07-21 22:14:27 +02:00
jos
21b34cfa1a Implemented transforms, moved all one-based to zero-based logic for expressions to transforms. 2014-07-19 21:47:15 +02:00
jos
40986a1325 Using strict mode now in all files (added 'use strict'; on top of every file) 2014-07-18 23:19:14 +02:00
jos
a7151aab1a Whoops removed accidentally pasted code 2014-06-17 21:20:47 +02:00
jos
0bc0dc8b5d Function typeof now recognizes regular expressions as well. 2014-06-17 20:52:37 +02:00
jos
ced18ecfca Implemented functions dotEqual and dotUnequal, renamed functions smallereq to smallerEq and largereq to largerEq (all functions are now camelcase) 2014-06-09 14:07:21 +02:00
jos
abf1b02ee9 Renamed function unary to unaryminus. Documented and tested constant phi. 2014-06-08 20:12:07 +02:00
jos
2f467002d8 Upgraded to decimal.js v3.0.0. Fixed #189: not being able to load math.js using require.js. 2014-06-05 21:21:14 +02:00
Niels Heisterkamp
12147b3bd4 Some tweaks and fixes 2014-05-19 19:27:42 +02:00
Niels Heisterkamp
837306ac3e Test failed because of missing check of parameter type. 2014-05-19 15:18:45 +02:00
Niels Heisterkamp
fa643a485c Allow using symbols in subscript. 2014-05-19 14:33:55 +02:00
Niels Heisterkamp
f6990b16b0 Changed boolean true and false symbols 2014-05-19 08:20:06 +02:00
Niels Heisterkamp
b7fe0bfbf1 Added LaTeX conversion of expressions using toTex() on expression.
Also added some basic tests, which cover some use cases; but should be expanded.
2014-05-19 08:20:06 +02:00
jos
3e62516909 Documented new option epsilon for comparison. Changed default value to 1e-14 2014-04-16 09:28:03 +02:00