984 Commits

Author SHA1 Message Date
Jos de Jong
00a985dbfe chore: publish v13.1.0 2024-08-26 13:49:27 +02:00
David Contreras
bcf0da46f0
feat: support multiple inputs in function map (#3228) 2024-08-22 13:35:21 +02:00
David Contreras
459ae13725
docs: spelling fixes in the embedded docs (#3252)
Co-authored-by: Jos de Jong <wjosdejong@gmail.com>
2024-08-21 14:30:40 +02:00
David Contreras
c8e4bbd573
fix: function map not always working with matrices (#3242)
* Removed maxArgumentCount in favor of applyCallback

* Making a pure _recurse function

* Added cbrt tests, removed unnecesary changes in functions.

* Fixed main bottleneck

* Restored back function before unintended change

* Fix format

---------

Co-authored-by: Jos de Jong <wjosdejong@gmail.com>
2024-08-01 15:54:20 +02:00
Jos de Jong
a1eec936fc
feat: export util functions for maps and improve documentation of scope (#3243)
* feat: export util functions `isMap`, `isPartitionedMap`, and `isObjectWrappingMap` and improve the documentation of `scope` (see #3150)

* chore: fix broken unit tests

* docs: refine the explanation about scopes
2024-08-01 10:57:23 +02:00
Jos de Jong
61c5d07ae1 docs: add a link to the documentation page about the syntax expression from the function evaluate (fix #3238) 2024-07-31 12:16:10 +02:00
David Contreras
cf24943d4c
feat: add matrix datatypes in more cases (#3235) 2024-07-30 19:48:19 +02:00
Jos de Jong
5a632d93ea chore: publish v13.0.3 2024-07-18 20:11:59 +02:00
Orel Ben Neriah
f5a5463b0d
fix: types static methods and members for Unit class (#3230)
* fix: types static method for Unit class

Changes unit interface to declare class to enable the adding of static methods.

* refactor: change to not using declare class

* fix: adds more unit static methods and updates tests

* chore: moves test from wrong location

* fix: adds additional static methods and updates jsDocs

---------

Co-authored-by: Jos de Jong <wjosdejong@gmail.com>
2024-07-11 13:26:50 +02:00
Vistinum
975d1ba800
fix: use exact values for US liquid volume units (#3229)
1 US gallon is defined as 231 cubic inches, which is exactly 3.785411784 L (since 1 inch is defined as 25.4 mm). Other units are defined against the gallon.

Co-authored-by: Jos de Jong <wjosdejong@gmail.com>
2024-07-11 13:16:46 +02:00
Jos de Jong
096b35a3cf chore: publish v13.0.2 2024-07-04 12:20:16 +02:00
Jos de Jong
4319616f51 chore: publish v13.0.1 2024-06-28 11:54:25 +02:00
David Contreras
5785cb95f1
Broadcast refactor (#3220) 2024-06-19 18:51:37 +02:00
Jos de Jong
247e605383 chore: publish v13.0.0 2024-05-31 14:23:20 +02:00
Jos de Jong
fe4667cd8f Merge branch 'refs/heads/develop' into v13
# Conflicts:
#	AUTHORS
#	package-lock.json
2024-05-31 14:09:56 +02:00
Jos de Jong
0f65a4486a chore: publish v12.4.3 2024-05-31 14:01:18 +02:00
Jos de Jong
ab3461d484
feat: implement support for bigint (#3207, #2737) 2024-05-31 12:43:09 +02:00
Jos de Jong
1f05a35d68
chore: convert CJS files to ESM (#3204) 2024-05-22 08:46:14 +02:00
Jos de Jong
31b68ced13 chore: adjust isPositive, isNegative, and isZero to the new relTol and absTol 2024-05-15 11:12:19 +02:00
David Contreras
eded7e1dc3
feat: nearly equal with relative and absolute tolerance (#3152)
* nearlyEqual with absolute and relative tolerances

* Format

* nearlyEqual for bigNumber

* Added skip for NaN

* Reduce diff a bit

* Issue with examples in jsdcos

* Updated all calls for nearlyEqual

* Fixed failing tests

* Changed epsilon to relTol, absTol

* Changed references to epsilon in docs and tests

* Added warning for config.epsilon

* Fix warning in zeta.test

* Added config test

* Added sinon to test console.warn

---------

Co-authored-by: Jos de Jong <wjosdejong@gmail.com>
2024-05-15 10:56:11 +02:00
Jos de Jong
5ee9f6f8d6 Merge branch 'refs/heads/develop' into v13 2024-05-15 10:51:15 +02:00
Jos de Jong
599f4ee804 Fix: outdated, incorrect documentation about the order of precedence for
operator modulus `%`. See #3189
2024-04-29 11:19:44 +02:00
Jos de Jong
da0c70ebe3 fix: serialization of Units without a value, see #1240 2024-04-29 10:40:57 +02:00
Jos de Jong
d97f338fcc chore: replace util functions values and contains and usages of indexOf with using native JS functions values and contains (see #3194) 2024-04-25 08:35:49 +02:00
Jos de Jong
a9fbb3560c chore: publish v12.4.2 2024-04-24 18:51:10 +02:00
Laurent Gérin
81d2e71445
fix #3192: function isNaN returns false for NaN units in a matrix or array
* Use referToSelf() to recursively check if various types are NaN in an array or matrix

* fix array test description from isNegative to isNaN

* Add test for units in a matrix

---------

Co-authored-by: Jos de Jong <wjosdejong@gmail.com>
2024-04-24 09:31:06 +02:00
Jos de Jong
5c12c07e2c chore: replace utility function values with Object.values (fix #3194) 2024-04-24 08:14:48 +02:00
Jos de Jong
c5922191e4 chore: publish v12.4.1 2024-03-13 16:47:30 +01:00
Jos de Jong
becae3775f fix: #3175 cannot delete units using math.Unit.deleteUnit 2024-03-13 16:35:52 +01:00
Jos de Jong
a41def8360 fix: #3172 simplify "true and true" 2024-03-13 14:25:56 +01:00
Jos de Jong
d430cf1e5b fix #3175: expose math.Unit.ALIASES, update history 2024-03-08 16:26:13 +01:00
Jos de Jong
c1cf1c483e
fix #3162: add license information about CSParse (#3164) 2024-02-23 15:35:54 +01:00
Jos de Jong
50b15a751d fix #3163: toTex wrongly returning Infinity for large BigNumbers 2024-02-23 11:20:17 +01:00
Jos de Jong
f37d4154ad Merge branch 'develop' into v13 2024-02-22 17:19:48 +01:00
Jos de Jong
4c42a14c81 chore: publish v12.4.0 2024-02-22 16:32:22 +01:00
Brian Fugate
85b65da6cb
Fix: #3100 function round not handling round-off errors (#3136)
* Fixing rounding bug from issue 3100

* Corrected syntax and converted if...else to logic using ternary operator

* Removing nearlyEqual comparison because a false
return value was mathematically impossible by
user input.

Adding dynamic epsilon logic to cover cases when
a user requests to round a number to a higher
precision than epsilon in the config file.

Also adding tests to cover dynamic epsilon cases.

* Removing dynamic epsilon and adding test for changing config.epsilon during runtime

* Reintroducing nearly equal verification for
round function.

Adding test case for changing epsilon at runtime.

Both tests for changing epsilon at runtime also
verify the false nearlyEqual scenario.

---------

Co-authored-by: Jos de Jong <wjosdejong@gmail.com>
2024-02-22 16:17:05 +01:00
RandomGamingDev
207623c931
feat: improve the performance f multiply by adding matrix type inferencing (#3149)
* added type inference

* added back accidentally removed return statement and made it so that the explicitly defined type is returned at the end

* made sure that mixed types are ignored in the process data types check

* fixed issue with undefined _data for SparseMatrix and linting issues

* simplified syntax and added type inferencing to src/type/matrix/utils and src/function/matrix/dot.js

* shortened the final part of the type inferencing and moved it to matrix creation in multiply

---------

Co-authored-by: Jos de Jong <wjosdejong@gmail.com>
2024-02-22 11:10:26 +01:00
Jos de Jong
a7f84abe51 fix: PartitionedMap and ObjectWrappingMap missing a property
`Symbol.iterator`
2024-02-21 12:17:30 +01:00
David Contreras
065b3ae4e8
feat: trailing commas in matrices (#3154) 2024-02-15 13:35:19 +01:00
David Contreras
e1817baa0b
Determinant with small numbers fix (#3139) 2024-02-14 17:49:07 +01:00
Jos de Jong
cee9deb377 chore: publish v12.3.2 2024-02-08 10:07:33 +01:00
Jos de Jong
5a4f60fdf6
Fix not being able to use and and or inside a function definition (#3150)
* chore: write unit tests using `and` and `or` inside a function definition (WIP)

* fix: #3143 fix scope issues in rawArgs functions by implementing a `PartitionedMap`

* fix: add more unit tests for `ObjectWrappingMap`

* fix: don't let `ObjectWrappingMap` and `PartitionedMap` extend `Map` (risk of having non-overwritten methods)

* docs: update docs about `rawArgs` functions
2024-02-08 09:53:21 +01:00
Jos de Jong
9fe4ffee5f chore: publish v12.3.1 2024-02-01 11:57:55 +01:00
Jos de Jong
a9dd8e7d5c fix: #3141 help(config) altering the actual config when evaluating the examples 2024-02-01 11:09:02 +01:00
Jos de Jong
c60f637a60 fix: #3142 support BigNumber values for the options of function format: precision, wordSize, lowerExp, upperExp 2024-01-31 10:58:42 +01:00
Jos de Jong
3f6cf76170 fix: #3114 build warnings related to a number of wrong /* #__PURE__ */ annotations 2024-01-17 12:16:07 +01:00
Jos de Jong
0cbecec25b chore: publish v12.3.0 2024-01-12 11:36:55 +01:00
Carl Osterwisch
211d1b7041
fix toSI() wrongly converting degC (#3118)
* Add new test for degC toSI

* Convert value using to() if needed

* Only set ret.value = null when it is not already null

---------

Co-authored-by: Jos de Jong <wjosdejong@gmail.com>
2024-01-12 11:07:15 +01:00
Jos de Jong
a167a1519d Merge remote-tracking branch 'origin/develop' into develop 2024-01-10 17:59:06 +01:00
Carl Osterwisch
f89e3cbbff
Unitless quantity conversion bug (#3117)
* Add test for conversion to unitless quantity

* Avoid access to missing array index

* Also check that other.units is not empty

* Add test for abs of dimensionless unit

* Fix: avoid access to missing units array index

---------

Co-authored-by: Jos de Jong <wjosdejong@gmail.com>
2024-01-10 17:53:18 +01:00