@danielsimonjr/mathts-arithmetic 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,23 @@
1
+ # @danielsimonjr/mathts-arithmetic
2
+
3
+ Standalone arithmetic functions for [MathTS](https://github.com/danielsimonjr/mathts).
4
+
5
+ A focused entry point over the `arithmetic` typed-function domain in
6
+ [`@danielsimonjr/mathts-functions`](https://www.npmjs.com/package/@danielsimonjr/mathts-functions).
7
+ The implementation is re-exported, not duplicated. These are MathTS typed
8
+ functions (polymorphic dispatch across number / Complex / Fraction / BigNumber /
9
+ Matrix where supported).
10
+
11
+ ## Install
12
+
13
+ ```sh
14
+ npm install @danielsimonjr/mathts-arithmetic
15
+ ```
16
+
17
+ ## What it exports
18
+
19
+ `add`, `subtract`, `multiply`, `divide`, `unaryMinus`, `unaryPlus`, `abs`, `sign`, `pow`, `sqrt`, `square`, `cube`, `cbrt`, `nthRoot`, `exp`, `log`, `log10`, `log2`, `log1p`, `expm1`, `round`, `floor`, `ceil`, `fix`, `mod`, `gcd`, `lcm`, `xgcd`, `norm`, `sinh`, `cosh`, `tanh`, `equal`, `smaller`, `larger`, `smallerEq`, `largerEq`, `compare`, `min`, `max`, `sum`, `mean`, `variance`, `std`, `dot` (plus the `typedArithmetic` bundle).
20
+
21
+ ## License
22
+
23
+ MIT (c) Daniel Simon Jr.
@@ -0,0 +1 @@
1
+ export { abs, add, cbrt, ceil, compare, cosh, cube, divide, dot, equal, exp, expm1, fix, floor, gcd, larger, largerEq, lcm, log, log10, log1p, log2, max, mean, min, mod, multiply, norm, nthRoot, pow, round, sign, sinh, smaller, smallerEq, sqrt, square, std, subtract, sum, tanh, typedArithmetic, unaryMinus, unaryPlus, variance, xgcd } from '@danielsimonjr/mathts-functions';
package/dist/index.js ADDED
@@ -0,0 +1,97 @@
1
+ // src/index.ts
2
+ import {
3
+ add,
4
+ subtract,
5
+ multiply,
6
+ divide,
7
+ unaryMinus,
8
+ unaryPlus,
9
+ abs,
10
+ sign,
11
+ pow,
12
+ sqrt,
13
+ square,
14
+ cube,
15
+ cbrt,
16
+ nthRoot,
17
+ exp,
18
+ log,
19
+ log10,
20
+ log2,
21
+ log1p,
22
+ expm1,
23
+ round,
24
+ floor,
25
+ ceil,
26
+ fix,
27
+ mod,
28
+ gcd,
29
+ lcm,
30
+ xgcd,
31
+ norm,
32
+ sinh,
33
+ cosh,
34
+ tanh,
35
+ equal,
36
+ smaller,
37
+ larger,
38
+ smallerEq,
39
+ largerEq,
40
+ compare,
41
+ min,
42
+ max,
43
+ sum,
44
+ mean,
45
+ variance,
46
+ std,
47
+ dot,
48
+ typedArithmetic
49
+ } from "@danielsimonjr/mathts-functions";
50
+ export {
51
+ abs,
52
+ add,
53
+ cbrt,
54
+ ceil,
55
+ compare,
56
+ cosh,
57
+ cube,
58
+ divide,
59
+ dot,
60
+ equal,
61
+ exp,
62
+ expm1,
63
+ fix,
64
+ floor,
65
+ gcd,
66
+ larger,
67
+ largerEq,
68
+ lcm,
69
+ log,
70
+ log10,
71
+ log1p,
72
+ log2,
73
+ max,
74
+ mean,
75
+ min,
76
+ mod,
77
+ multiply,
78
+ norm,
79
+ nthRoot,
80
+ pow,
81
+ round,
82
+ sign,
83
+ sinh,
84
+ smaller,
85
+ smallerEq,
86
+ sqrt,
87
+ square,
88
+ std,
89
+ subtract,
90
+ sum,
91
+ tanh,
92
+ typedArithmetic,
93
+ unaryMinus,
94
+ unaryPlus,
95
+ variance,
96
+ xgcd
97
+ };
package/package.json ADDED
@@ -0,0 +1,59 @@
1
+ {
2
+ "name": "@danielsimonjr/mathts-arithmetic",
3
+ "version": "0.1.0",
4
+ "description": "Standalone arithmetic functions for MathTS, re-exported as a focused package",
5
+ "author": "Daniel Simon Jr.",
6
+ "license": "MIT",
7
+ "type": "module",
8
+ "main": "./dist/index.js",
9
+ "module": "./dist/index.js",
10
+ "types": "./dist/index.d.ts",
11
+ "exports": {
12
+ ".": {
13
+ "import": "./dist/index.js",
14
+ "types": "./dist/index.d.ts"
15
+ }
16
+ },
17
+ "files": [
18
+ "dist",
19
+ "README.md"
20
+ ],
21
+ "scripts": {
22
+ "build": "tsup src/index.ts --format esm --dts --clean",
23
+ "dev": "tsup src/index.ts --format esm --dts --watch",
24
+ "test": "vitest run",
25
+ "test:watch": "vitest",
26
+ "test:coverage": "vitest run --coverage",
27
+ "typecheck": "tsc --noEmit",
28
+ "lint": "eslint src --ext .ts",
29
+ "lint:fix": "eslint src --ext .ts --fix",
30
+ "clean": "rm -rf dist",
31
+ "build:prod": "tsup src/index.ts --format esm --dts --clean --minify --treeshake"
32
+ },
33
+ "dependencies": {
34
+ "@danielsimonjr/mathts-functions": "0.2.4",
35
+ "typed-function": "^4.0.0"
36
+ },
37
+ "devDependencies": {
38
+ "@types/node": "^25.5.2",
39
+ "tsup": "^8.0.0",
40
+ "typescript": "^5.3.0",
41
+ "vitest": "^4.1.5"
42
+ },
43
+ "publishConfig": {
44
+ "access": "public"
45
+ },
46
+ "repository": {
47
+ "type": "git",
48
+ "url": "https://github.com/danielsimonjr/mathts",
49
+ "directory": "arithmetic"
50
+ },
51
+ "keywords": [
52
+ "math",
53
+ "typescript",
54
+ "arithmetic",
55
+ "add",
56
+ "multiply",
57
+ "numeric"
58
+ ]
59
+ }