* 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>
* 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
* 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>
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>
* 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>
* 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>
* 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>
* 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>
* 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
* 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>
* 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>