runmat 0.4.7 → 0.4.8-dev.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.
@@ -0,0 +1,4 @@
1
+ import type { BuiltinDoc } from "../../builtins.js";
2
+ declare const builtinDoc: BuiltinDoc;
3
+ export default builtinDoc;
4
+ //# sourceMappingURL=deg2rad.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deg2rad.d.ts","sourceRoot":"","sources":["../../../src/generated/builtins/deg2rad.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,QAAA,MAAM,UAAU,EAAE,UA6FjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,98 @@
1
+ // @generated by scripts/generate-builtins.cjs
2
+ // Do not edit by hand.
3
+ const builtinDoc = {
4
+ "title": "deg2rad",
5
+ "category": "math/trigonometry",
6
+ "keywords": [
7
+ "deg2rad",
8
+ "degrees",
9
+ "radians",
10
+ "angle",
11
+ "trigonometry",
12
+ "elementwise"
13
+ ],
14
+ "summary": "Convert angles from degrees to radians.",
15
+ "references": [],
16
+ "gpu_support": {
17
+ "elementwise": true,
18
+ "reduction": false,
19
+ "precisions": [
20
+ "f32",
21
+ "f64"
22
+ ],
23
+ "broadcasting": "matlab",
24
+ "notes": "GPU inputs can be gathered to the host for the reference implementation. Fusion can keep compatible elementwise expressions on the active provider."
25
+ },
26
+ "fusion": {
27
+ "elementwise": true,
28
+ "reduction": false,
29
+ "max_inputs": 1,
30
+ "constants": "inline"
31
+ },
32
+ "requires_feature": null,
33
+ "tested": {
34
+ "unit": "builtins::math::trigonometry::deg2rad::tests",
35
+ "integration": null
36
+ },
37
+ "description": "`r = deg2rad(d)` converts each angle in `d` from degrees to radians using `d*pi/180`.",
38
+ "behaviors": [
39
+ "Operates element-wise on scalars, vectors, matrices, and N-D tensors.",
40
+ "Integer and logical inputs are promoted to double precision before conversion.",
41
+ "Complex inputs are scaled component-wise, matching ordinary multiplication by `pi/180`.",
42
+ "Output shape matches the input shape.",
43
+ "String inputs are unsupported and raise a builtin-scoped error."
44
+ ],
45
+ "examples": [
46
+ {
47
+ "description": "Converting a scalar angle",
48
+ "input": "r = deg2rad(90)",
49
+ "output": "r = 1.5708"
50
+ },
51
+ {
52
+ "description": "Converting a vector of angles",
53
+ "input": "angles = [0 30 45 60 90];\nr = deg2rad(angles)",
54
+ "output": "r = [0 0.5236 0.7854 1.0472 1.5708]"
55
+ }
56
+ ],
57
+ "faqs": [
58
+ {
59
+ "question": "Is `deg2rad(x)` equivalent to `x*pi/180`?",
60
+ "answer": "Yes. The builtin exists for readability and MATLAB compatibility."
61
+ },
62
+ {
63
+ "question": "Does `deg2rad` preserve array shape?",
64
+ "answer": "Yes. Each element is converted independently and the original shape is preserved."
65
+ }
66
+ ],
67
+ "links": [
68
+ {
69
+ "label": "rad2deg",
70
+ "url": "./rad2deg"
71
+ },
72
+ {
73
+ "label": "sin",
74
+ "url": "./sin"
75
+ },
76
+ {
77
+ "label": "cos",
78
+ "url": "./cos"
79
+ },
80
+ {
81
+ "label": "tan",
82
+ "url": "./tan"
83
+ }
84
+ ],
85
+ "source": {
86
+ "label": "`crates/runmat-runtime/src/builtins/math/trigonometry/deg2rad.rs`",
87
+ "url": "https://github.com/runmat-org/runmat/blob/main/crates/runmat-runtime/src/builtins/math/trigonometry/deg2rad.rs"
88
+ },
89
+ "key": "deg2rad",
90
+ "slug": "deg2rad",
91
+ "aliases": [],
92
+ "categoryPath": [
93
+ "math",
94
+ "trigonometry"
95
+ ]
96
+ };
97
+ export default builtinDoc;
98
+ //# sourceMappingURL=deg2rad.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deg2rad.js","sourceRoot":"","sources":["../../../src/generated/builtins/deg2rad.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,uBAAuB;AAIvB,MAAM,UAAU,GAAe;IAC7B,OAAO,EAAE,SAAS;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AE,KAAK;YACd,KAAK,EAAE,OAAO;SACf;KACF;IACD,QAAQ,EAAE;QACR,OAAO,EAAE,mEAAmE;QAC5E,KAAK,EAAE,gHAAgH;KACxH;IACD,KAAK,EAAE,SAAS;IAChB,MAAM,EAAE,SAAS;IACjB,SAAS,EAAE,EAAE;IACb,cAAc,EAAE;QACd,MAAM;QACN,cAAc;KACf;CACF,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { BuiltinDoc } from "../../builtins.js";
2
+ declare const builtinDoc: BuiltinDoc;
3
+ export default builtinDoc;
4
+ //# sourceMappingURL=rad2deg.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rad2deg.d.ts","sourceRoot":"","sources":["../../../src/generated/builtins/rad2deg.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,QAAA,MAAM,UAAU,EAAE,UA6FjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,98 @@
1
+ // @generated by scripts/generate-builtins.cjs
2
+ // Do not edit by hand.
3
+ const builtinDoc = {
4
+ "title": "rad2deg",
5
+ "category": "math/trigonometry",
6
+ "keywords": [
7
+ "rad2deg",
8
+ "radians",
9
+ "degrees",
10
+ "angle",
11
+ "trigonometry",
12
+ "elementwise"
13
+ ],
14
+ "summary": "Convert angles from radians to degrees.",
15
+ "references": [],
16
+ "gpu_support": {
17
+ "elementwise": true,
18
+ "reduction": false,
19
+ "precisions": [
20
+ "f32",
21
+ "f64"
22
+ ],
23
+ "broadcasting": "matlab",
24
+ "notes": "GPU inputs can be gathered to the host for the reference implementation. Fusion can keep compatible elementwise expressions on the active provider."
25
+ },
26
+ "fusion": {
27
+ "elementwise": true,
28
+ "reduction": false,
29
+ "max_inputs": 1,
30
+ "constants": "inline"
31
+ },
32
+ "requires_feature": null,
33
+ "tested": {
34
+ "unit": "builtins::math::trigonometry::rad2deg::tests",
35
+ "integration": null
36
+ },
37
+ "description": "`d = rad2deg(r)` converts each angle in `r` from radians to degrees using `r*180/pi`.",
38
+ "behaviors": [
39
+ "Operates element-wise on scalars, vectors, matrices, and N-D tensors.",
40
+ "Integer and logical inputs are promoted to double precision before conversion.",
41
+ "Complex inputs are scaled component-wise, matching ordinary multiplication by `180/pi`.",
42
+ "Output shape matches the input shape.",
43
+ "String inputs are unsupported and raise a builtin-scoped error."
44
+ ],
45
+ "examples": [
46
+ {
47
+ "description": "Converting a scalar angle",
48
+ "input": "d = rad2deg(pi)",
49
+ "output": "d = 180"
50
+ },
51
+ {
52
+ "description": "Converting a vector of angles",
53
+ "input": "angles = [0 pi/6 pi/4 pi/3 pi/2];\nd = rad2deg(angles)",
54
+ "output": "d = [0 30 45 60 90]"
55
+ }
56
+ ],
57
+ "faqs": [
58
+ {
59
+ "question": "Is `rad2deg(x)` equivalent to `x*180/pi`?",
60
+ "answer": "Yes. The builtin exists for readability and MATLAB compatibility."
61
+ },
62
+ {
63
+ "question": "Does `rad2deg` preserve array shape?",
64
+ "answer": "Yes. Each element is converted independently and the original shape is preserved."
65
+ }
66
+ ],
67
+ "links": [
68
+ {
69
+ "label": "deg2rad",
70
+ "url": "./deg2rad"
71
+ },
72
+ {
73
+ "label": "sin",
74
+ "url": "./sin"
75
+ },
76
+ {
77
+ "label": "cos",
78
+ "url": "./cos"
79
+ },
80
+ {
81
+ "label": "tan",
82
+ "url": "./tan"
83
+ }
84
+ ],
85
+ "source": {
86
+ "label": "`crates/runmat-runtime/src/builtins/math/trigonometry/rad2deg.rs`",
87
+ "url": "https://github.com/runmat-org/runmat/blob/main/crates/runmat-runtime/src/builtins/math/trigonometry/rad2deg.rs"
88
+ },
89
+ "key": "rad2deg",
90
+ "slug": "rad2deg",
91
+ "aliases": [],
92
+ "categoryPath": [
93
+ "math",
94
+ "trigonometry"
95
+ ]
96
+ };
97
+ export default builtinDoc;
98
+ //# sourceMappingURL=rad2deg.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rad2deg.js","sourceRoot":"","sources":["../../../src/generated/builtins/rad2deg.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,uBAAuB;AAIvB,MAAM,UAAU,GAAe;IAC7B,OAAO,EAAE,SAAS;IAClB,UAAU,EAAE,mBAAmB;IAC/B,UAAU,EAAE;QACV,SAAS;QACT,SAAS;QACT,SAAS;QACT,OAAO;QACP,cAAc;QACd,aAAa;KACd;IACD,SAAS,EAAE,yCAAyC;IACpD,YAAY,EAAE,EAAE;IAChB,aAAa,EAAE;QACb,aAAa,EAAE,IAAI;QACnB,WAAW,EAAE,KAAK;QAClB,YAAY,EAAE;YACZ,KAAK;YACL,KAAK;SACN;QACD,cAAc,EAAE,QAAQ;QACxB,OAAO,EAAE,qJAAqJ;KAC/J;IACD,QAAQ,EAAE;QACR,aAAa,EAAE,IAAI;QACnB,WAAW,EAAE,KAAK;QAClB,YAAY,EAAE,CAAC;QACf,WAAW,EAAE,QAAQ;KACtB;IACD,kBAAkB,EAAE,IAAI;IACxB,QAAQ,EAAE;QACR,MAAM,EAAE,8CAA8C;QACtD,aAAa,EAAE,IAAI;KACpB;IACD,aAAa,EAAE,uFAAuF;IACtG,WAAW,EAAE;QACX,uEAAuE;QACvE,gFAAgF;QAChF,yFAAyF;QACzF,uCAAuC;QACvC,iEAAiE;KAClE;IACD,UAAU,EAAE;QACV;YACE,aAAa,EAAE,2BAA2B;YAC1C,OAAO,EAAE,iBAAiB;YAC1B,QAAQ,EAAE,SAAS;SACpB;QACD;YACE,aAAa,EAAE,+BAA+B;YAC9C,OAAO,EAAE,wDAAwD;YACjE,QAAQ,EAAE,qBAAqB;SAChC;KACF;IACD,MAAM,EAAE;QACN;YACE,UAAU,EAAE,2CAA2C;YACvD,QAAQ,EAAE,mEAAmE;SAC9E;QACD;YACE,UAAU,EAAE,sCAAsC;YAClD,QAAQ,EAAE,mFAAmF;SAC9F;KACF;IACD,OAAO,EAAE;QACP;YACE,OAAO,EAAE,SAAS;YAClB,KAAK,EAAE,WAAW;SACnB;QACD;YACE,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,OAAO;SACf;QACD;YACE,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,OAAO;SACf;QACD;YACE,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,OAAO;SACf;KACF;IACD,QAAQ,EAAE;QACR,OAAO,EAAE,mEAAmE;QAC5E,KAAK,EAAE,gHAAgH;KACxH;IACD,KAAK,EAAE,SAAS;IAChB,MAAM,EAAE,SAAS;IACjB,SAAS,EAAE,EAAE;IACb,cAAc,EAAE;QACd,MAAM;QACN,cAAc;KACf;CACF,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"builtins-manifest.d.ts","sourceRoot":"","sources":["../../src/generated/builtins-manifest.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAE7E,eAAO,MAAM,eAAe,EAAE,oBAAoB,EAozPjD,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CA4Y9D,CAAC;AAEF,eAAO,MAAM,4BAA4B,sEAC0C,CAAC"}
1
+ {"version":3,"file":"builtins-manifest.d.ts","sourceRoot":"","sources":["../../src/generated/builtins-manifest.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAE7E,eAAO,MAAM,eAAe,EAAE,oBAAoB,EA81PjD,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CA8Y9D,CAAC;AAEF,eAAO,MAAM,4BAA4B,sEAC0C,CAAC"}
@@ -1397,6 +1397,27 @@ export const builtinManifest = [
1397
1397
  "summary": "Divide one polynomial (or 1-D sequence) by another, returning the quotient and remainder.",
1398
1398
  "exampleCount": 6
1399
1399
  },
1400
+ {
1401
+ "key": "deg2rad",
1402
+ "title": "deg2rad",
1403
+ "slug": "deg2rad",
1404
+ "aliases": [],
1405
+ "category": "math/trigonometry",
1406
+ "categoryPath": [
1407
+ "math",
1408
+ "trigonometry"
1409
+ ],
1410
+ "keywords": [
1411
+ "deg2rad",
1412
+ "degrees",
1413
+ "radians",
1414
+ "angle",
1415
+ "trigonometry",
1416
+ "elementwise"
1417
+ ],
1418
+ "summary": "Convert angles from degrees to radians.",
1419
+ "exampleCount": 2
1420
+ },
1400
1421
  {
1401
1422
  "key": "delete",
1402
1423
  "title": "delete",
@@ -5537,6 +5558,27 @@ export const builtinManifest = [
5537
5558
  "summary": "Visualize 2-D vector fields with scalable arrows, GPU-aware execution, and MATLAB `quiver` call forms.",
5538
5559
  "exampleCount": 4
5539
5560
  },
5561
+ {
5562
+ "key": "rad2deg",
5563
+ "title": "rad2deg",
5564
+ "slug": "rad2deg",
5565
+ "aliases": [],
5566
+ "category": "math/trigonometry",
5567
+ "categoryPath": [
5568
+ "math",
5569
+ "trigonometry"
5570
+ ],
5571
+ "keywords": [
5572
+ "rad2deg",
5573
+ "radians",
5574
+ "degrees",
5575
+ "angle",
5576
+ "trigonometry",
5577
+ "elementwise"
5578
+ ],
5579
+ "summary": "Convert angles from radians to degrees.",
5580
+ "exampleCount": 2
5581
+ },
5540
5582
  {
5541
5583
  "key": "rand",
5542
5584
  "title": "rand",
@@ -8059,6 +8101,7 @@ export const builtinDocLoaders = {
8059
8101
  "datetime": () => import("./builtins/datetime.js").then((mod) => mod.default),
8060
8102
  "day": () => import("./builtins/day.js").then((mod) => mod.default),
8061
8103
  "deconv": () => import("./builtins/deconv.js").then((mod) => mod.default),
8104
+ "deg2rad": () => import("./builtins/deg2rad.js").then((mod) => mod.default),
8062
8105
  "delete": () => import("./builtins/delete.js").then((mod) => mod.default),
8063
8106
  "det": () => import("./builtins/det.js").then((mod) => mod.default),
8064
8107
  "diag": () => import("./builtins/diag.js").then((mod) => mod.default),
@@ -8263,6 +8306,7 @@ export const builtinDocLoaders = {
8263
8306
  "pwd": () => import("./builtins/pwd.js").then((mod) => mod.default),
8264
8307
  "qr": () => import("./builtins/qr.js").then((mod) => mod.default),
8265
8308
  "quiver": () => import("./builtins/quiver.js").then((mod) => mod.default),
8309
+ "rad2deg": () => import("./builtins/rad2deg.js").then((mod) => mod.default),
8266
8310
  "rand": () => import("./builtins/rand.js").then((mod) => mod.default),
8267
8311
  "randi": () => import("./builtins/randi.js").then((mod) => mod.default),
8268
8312
  "randn": () => import("./builtins/randn.js").then((mod) => mod.default),