@danielsimonjr/mathts-arithmetic 0.1.85 → 0.1.87

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Daniel Simon Jr.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -14,9 +14,30 @@ Matrix where supported).
14
14
  npm install @danielsimonjr/mathts-arithmetic
15
15
  ```
16
16
 
17
+ ## Example
18
+
19
+ ```ts
20
+ import { add, multiply, sqrt } from '@danielsimonjr/mathts-arithmetic';
21
+ import { Complex } from '@danielsimonjr/mathts-numbers';
22
+
23
+ add(1, 2); // 3
24
+ multiply(new Complex(1, 2), new Complex(3, 4)); // -5 + 10i
25
+ sqrt(9); // 3
26
+ ```
27
+
28
+ For hyperbolic functions use `@danielsimonjr/mathts-trigonometry` (`sinh`, `cosh`, …). For
29
+ `mean` / `variance` / `std` use `@danielsimonjr/mathts-statistics`. This package still
30
+ re-exports those names on the `typedArithmetic` bundle for one-import scripts, but the domain
31
+ packages above are the supported entry points.
32
+
17
33
  ## What it exports
18
34
 
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).
35
+ Core arithmetic: `add`, `subtract`, `multiply`, `divide`, `unaryMinus`, `unaryPlus`, `abs`,
36
+ `sign`, `pow`, `sqrt`, `square`, `cube`, `cbrt`, `nthRoot`, `exp`, `log`, `log10`, `log2`,
37
+ `log1p`, `expm1`, `round`, `floor`, `ceil`, `fix`, `mod`, `gcd`, `lcm`, `xgcd`, `norm`,
38
+ `equal`, `smaller`, `larger`, `smallerEq`, `largerEq`, `compare`, `min`, `max` (plus the
39
+ `typedArithmetic` bundle, which also carries adjacent reducers and hyperbolic names from the
40
+ functions typed graph).
20
41
 
21
42
  ## License
22
43
 
package/dist/index.js CHANGED
@@ -1 +1,2 @@
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";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["/**\n * @danielsimonjr/mathts-arithmetic\n *\n * Standalone arithmetic functions for MathTS. Re-exports the `arithmetic` typed-function domain\n * from {@link @danielsimonjr/mathts-functions} as a focused package. The\n * implementation lives in functions; this is an entry point, not a copy.\n *\n * @packageDocumentation\n */\n\nexport {\n add,\n subtract,\n multiply,\n divide,\n unaryMinus,\n unaryPlus,\n abs,\n sign,\n pow,\n sqrt,\n square,\n cube,\n cbrt,\n nthRoot,\n exp,\n log,\n log10,\n log2,\n log1p,\n expm1,\n round,\n floor,\n ceil,\n fix,\n mod,\n gcd,\n lcm,\n xgcd,\n norm,\n sinh,\n cosh,\n tanh,\n equal,\n smaller,\n larger,\n smallerEq,\n largerEq,\n compare,\n min,\n max,\n sum,\n mean,\n variance,\n std,\n dot,\n typedArithmetic,\n} from '@danielsimonjr/mathts-functions';\n"],"names":[],"mappings":"AAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danielsimonjr/mathts-arithmetic",
3
- "version": "0.1.85",
3
+ "version": "0.1.87",
4
4
  "description": "Standalone arithmetic functions for MathTS, re-exported as a focused package",
5
5
  "author": "Daniel Simon Jr.",
6
6
  "license": "MIT",
@@ -12,15 +12,17 @@
12
12
  ".": {
13
13
  "import": "./dist/index.js",
14
14
  "types": "./dist/index.d.ts"
15
- }
15
+ },
16
+ "./package.json": "./package.json"
16
17
  },
17
18
  "files": [
18
19
  "dist",
19
- "README.md"
20
+ "README.md",
21
+ "LICENSE"
20
22
  ],
21
23
  "scripts": {
22
- "build": "tsdown src/index.ts --format esm && tsc -p tsconfig.dts.json",
23
- "dev": "tsdown src/index.ts --format esm --watch --on-success \"tsc -p tsconfig.dts.json\"",
24
+ "build": "tsdown src/index.ts --format esm && tsc -p tsconfig.dts.json && node ../tools/ensure-js-sourcemaps.mjs",
25
+ "dev": "tsdown src/index.ts --format esm --watch --on-success \"tsc -p tsconfig.dts.json && node ../tools/ensure-js-sourcemaps.mjs\"",
24
26
  "test": "bun test",
25
27
  "test:watch": "vitest",
26
28
  "test:coverage": "bun test --coverage",
@@ -28,7 +30,7 @@
28
30
  "lint": "oxlint src",
29
31
  "lint:fix": "oxlint src --fix",
30
32
  "clean": "rm -rf dist",
31
- "build:prod": "tsdown src/index.ts --format esm --minify && tsc -p tsconfig.dts.json"
33
+ "build:prod": "tsdown src/index.ts --format esm --minify && tsc -p tsconfig.dts.json && node ../tools/ensure-js-sourcemaps.mjs"
32
34
  },
33
35
  "tsdown": {
34
36
  "fixedExtension": false,
@@ -39,10 +41,11 @@
39
41
  "annotation": true,
40
42
  "jsdoc": false
41
43
  }
42
- }
44
+ },
45
+ "sourcemap": true
43
46
  },
44
47
  "dependencies": {
45
- "@danielsimonjr/mathts-functions": "^0.83.0"
48
+ "@danielsimonjr/mathts-functions": "^0.85.0"
46
49
  },
47
50
  "devDependencies": {
48
51
  "@types/node": "^26.4.0",
@@ -65,5 +68,10 @@
65
68
  "add",
66
69
  "multiply",
67
70
  "numeric"
68
- ]
71
+ ],
72
+ "homepage": "https://github.com/danielsimonjr/MathTS#readme",
73
+ "bugs": {
74
+ "url": "https://github.com/danielsimonjr/MathTS/issues"
75
+ },
76
+ "sideEffects": false
69
77
  }