@algorithm.ts/gcd 3.1.0 → 4.0.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/CHANGELOG.md +126 -186
- package/README.md +11 -15
- package/lib/cjs/index.cjs +1 -0
- package/lib/esm/index.mjs +1 -0
- package/package.json +5 -19
package/CHANGELOG.md
CHANGED
|
@@ -1,405 +1,345 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
# 3.1.0 (2023-05-13)
|
|
3
|
+
All notable changes to this project will be documented in this file. See
|
|
4
|
+
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
7
5
|
|
|
6
|
+
## [3.1.1](https://github.com/guanghechen/algorithm.ts/compare/@algorithm.ts/gcd@3.1.0...@algorithm.ts/gcd@3.1.1) (2023-06-10)
|
|
8
7
|
|
|
9
8
|
### Performance Improvements
|
|
10
9
|
|
|
11
|
-
|
|
10
|
+
- ⬆️ upgrade dependencies
|
|
11
|
+
([c555512](https://github.com/guanghechen/algorithm.ts/commit/c55551269eda0f98e75fca3fb862ce122b1a4889))
|
|
12
|
+
|
|
13
|
+
# 3.1.0 (2023-05-13)
|
|
12
14
|
|
|
15
|
+
### Performance Improvements
|
|
13
16
|
|
|
17
|
+
- ⬆️ upgrade dependencies
|
|
18
|
+
([1ebc2c1](https://github.com/guanghechen/algorithm.ts/commit/1ebc2c167dcc4024d9552aacf5838e1ffc73e58f))
|
|
14
19
|
|
|
15
20
|
# 3.0.0 (2023-04-02)
|
|
16
21
|
|
|
17
|
-
|
|
18
22
|
### Performance Improvements
|
|
19
23
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
- 🔧 add missing devDependencies
|
|
25
|
+
([69f6da4](https://github.com/guanghechen/algorithm.ts/commit/69f6da43cf1ecebac9f6bf8a7d8ffaced7f9de4c))
|
|
26
|
+
- 🔧 don't pack src/ folder into tarball file
|
|
27
|
+
([2dc61ad](https://github.com/guanghechen/algorithm.ts/commit/2dc61ad8c031cfc1ecf4f63c405d3e23eff1d9c9))
|
|
28
|
+
- 🔖 publish v3.0.0
|
|
29
|
+
([9bb1f35](https://github.com/guanghechen/algorithm.ts/commit/9bb1f3515444890907c8e811b989f17073f39591))
|
|
30
|
+
- ⬆️ upgrade devDependencies
|
|
31
|
+
([e88a181](https://github.com/guanghechen/algorithm.ts/commit/e88a181201ea675715be11d165b0c49c0f9224b8))
|
|
26
32
|
|
|
27
33
|
# 3.0.0-alpha.8 (2023-03-11)
|
|
28
34
|
|
|
29
|
-
|
|
30
35
|
### Performance Improvements
|
|
31
36
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
+
- 🔖 publish v3.0.0-alpha.8
|
|
38
|
+
([104385f](https://github.com/guanghechen/algorithm.ts/commit/104385f40c0be99b843e3342e85b618761047b69))
|
|
39
|
+
- 🔧 update package entry
|
|
40
|
+
([fd4445a](https://github.com/guanghechen/algorithm.ts/commit/fd4445a0197b21b1d6cc157c543c1f59116c2cc5))
|
|
41
|
+
- ⬆️ upgrade devDependencies
|
|
42
|
+
([4aac0d0](https://github.com/guanghechen/algorithm.ts/commit/4aac0d0267b4050689e95902d081302131417ec5))
|
|
37
43
|
|
|
38
44
|
# 3.0.0-alpha.7 (2023-01-09)
|
|
39
45
|
|
|
40
|
-
|
|
41
46
|
### Performance Improvements
|
|
42
47
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
48
|
+
- 🔖 publish v3.0.0-alpha.7
|
|
49
|
+
([336c4da](https://github.com/guanghechen/algorithm.ts/commit/336c4da3b92a49804c60d0a6dfb783b14712ce0a))
|
|
46
50
|
|
|
47
51
|
# 3.0.0-alpha.6 (2023-01-07)
|
|
48
52
|
|
|
49
|
-
|
|
50
53
|
### Performance Improvements
|
|
51
54
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
55
|
+
- 🔖 publish v3.0.0-alpha.6
|
|
56
|
+
([1758289](https://github.com/guanghechen/algorithm.ts/commit/1758289e40e4d8786800b21aeed3525a572e89fe))
|
|
57
|
+
- 🔧 set engine node>=16.0.0
|
|
58
|
+
([76e08d7](https://github.com/guanghechen/algorithm.ts/commit/76e08d7a410d437f83a84002c97892204c1fd5ca))
|
|
56
59
|
|
|
57
60
|
# 3.0.0-alpha.5 (2023-01-07)
|
|
58
61
|
|
|
59
|
-
|
|
60
62
|
### Performance Improvements
|
|
61
63
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
- 🔖 publish v3.0.0-alpha.5
|
|
65
|
+
([6c10d3c](https://github.com/guanghechen/algorithm.ts/commit/6c10d3c77bf342c7284a27e0fe07ce26fbdba05b))
|
|
66
|
+
- 🔧 set engine node>=16.15.1
|
|
67
|
+
([464c990](https://github.com/guanghechen/algorithm.ts/commit/464c99062aeec99258c1a1e475570b549f63addb))
|
|
66
68
|
|
|
67
69
|
# 3.0.0-alpha.4 (2023-01-07)
|
|
68
70
|
|
|
69
|
-
|
|
70
71
|
### Performance Improvements
|
|
71
72
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
73
|
+
- 🔖 publish v3.0.0-alpha.4
|
|
74
|
+
([969d685](https://github.com/guanghechen/algorithm.ts/commit/969d68502c3c35690ed7aee86dde2fe60cddddfc))
|
|
75
|
+
- 🔧 update npm entries
|
|
76
|
+
([950e3ec](https://github.com/guanghechen/algorithm.ts/commit/950e3ec1d0c9ec3a53de613b9048b3442697404d))
|
|
76
77
|
|
|
77
78
|
# 3.0.0-alpha.3 (2023-01-04)
|
|
78
79
|
|
|
79
|
-
|
|
80
80
|
### Performance Improvements
|
|
81
81
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
82
|
+
- 🔖 publish v3.0.0-alpha.3
|
|
83
|
+
([d50b472](https://github.com/guanghechen/algorithm.ts/commit/d50b4725bde1b43474f490a29672db5aa1482ae3))
|
|
84
|
+
- 🔧 support dual esm/commonjs packages
|
|
85
|
+
([0f91fbf](https://github.com/guanghechen/algorithm.ts/commit/0f91fbf7c22d7778175ee833afdcf05df5dd34ba))
|
|
86
86
|
|
|
87
87
|
# 3.0.0-alpha.2 (2023-01-02)
|
|
88
88
|
|
|
89
|
-
|
|
90
89
|
### Performance Improvements
|
|
91
90
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
91
|
+
- 🔖 publish v3.0.0-alpha.2
|
|
92
|
+
([3d718fb](https://github.com/guanghechen/algorithm.ts/commit/3d718fba94605e2fd60a3056b502e2e1376ca0ed))
|
|
93
|
+
- ⬆️ upgrade dependencies
|
|
94
|
+
([2672a11](https://github.com/guanghechen/algorithm.ts/commit/2672a119246358d4589ae36bcabd044d395b6136))
|
|
96
95
|
|
|
97
96
|
# 3.0.0-alpha.1 (2022-11-13)
|
|
98
97
|
|
|
99
|
-
|
|
100
98
|
### Performance Improvements
|
|
101
99
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
100
|
+
- 🔖 publish v3.0.0-alpha.1
|
|
101
|
+
([8f9a0d0](https://github.com/guanghechen/algorithm.ts/commit/8f9a0d0dfee15efc08c4165848123b118c13ce81))
|
|
105
102
|
|
|
106
103
|
# 3.0.0-alpha.0 (2022-09-12)
|
|
107
104
|
|
|
108
|
-
|
|
109
105
|
### Features
|
|
110
106
|
|
|
111
|
-
|
|
112
|
-
|
|
107
|
+
- ✨ refactor gcd
|
|
108
|
+
([3896501](https://github.com/guanghechen/algorithm.ts/commit/38965015cda108e8dfbcdd8e49dddbace923fca9))
|
|
113
109
|
|
|
114
110
|
### Performance Improvements
|
|
115
111
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
112
|
+
- fix build error
|
|
113
|
+
([bbaa26f](https://github.com/guanghechen/algorithm.ts/commit/bbaa26fc2654a47438574c73997ab4e4fca7bc72))
|
|
114
|
+
- 🔖 publish v3.0.0-alpha.0
|
|
115
|
+
([7562a90](https://github.com/guanghechen/algorithm.ts/commit/7562a908843d63b6b1bf92e7aa2104e7b294eaa0))
|
|
120
116
|
|
|
121
117
|
## 2.0.14 (2022-08-27)
|
|
122
118
|
|
|
123
|
-
|
|
124
119
|
### Performance Improvements
|
|
125
120
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
121
|
+
- 🔖 publish v2.0.14
|
|
122
|
+
([53a2462](https://github.com/guanghechen/algorithm.ts/commit/53a24624195c9f09422c9769c552f9066bc22c70))
|
|
123
|
+
- 🔧 update build configs
|
|
124
|
+
([266538b](https://github.com/guanghechen/algorithm.ts/commit/266538bb6736e85c2439b706f11865425b570563))
|
|
125
|
+
- 📝 update repo link
|
|
126
|
+
([f0210ca](https://github.com/guanghechen/algorithm.ts/commit/f0210ca93780ed4109c90d4d337604a6b998b01b))
|
|
131
127
|
|
|
132
128
|
## 2.0.13 (2022-06-26)
|
|
133
129
|
|
|
134
|
-
|
|
135
130
|
### Performance Improvements
|
|
136
131
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
132
|
+
- 🔖 publish v2.0.13
|
|
133
|
+
([ebd6447](https://github.com/guanghechen/algorithm.ts/commit/ebd6447586d9958adaff5218e91768eda82b5bec))
|
|
140
134
|
|
|
141
135
|
## 2.0.12 (2022-06-07)
|
|
142
136
|
|
|
143
|
-
|
|
144
137
|
### Performance Improvements
|
|
145
138
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
139
|
+
- 🔖 publish v2.0.12
|
|
140
|
+
([cfc415a](https://github.com/guanghechen/algorithm.ts/commit/cfc415a6e56d76dcf795421d92dd81ac2a39a5fc))
|
|
149
141
|
|
|
150
142
|
## 2.0.11 (2022-04-19)
|
|
151
143
|
|
|
152
|
-
|
|
153
144
|
### Performance Improvements
|
|
154
145
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
146
|
+
- 🔖 publish v2.0.11
|
|
147
|
+
([42feafd](https://github.com/guanghechen/algorithm.ts/commit/42feafd0303f51767aa7e498f6de84d9478c1dca))
|
|
158
148
|
|
|
159
149
|
## 2.0.10 (2022-04-12)
|
|
160
150
|
|
|
161
|
-
|
|
162
151
|
### Performance Improvements
|
|
163
152
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
153
|
+
- 🔖 publish v2.0.10
|
|
154
|
+
([65694a5](https://github.com/guanghechen/algorithm.ts/commit/65694a5108c220d1edff9be57a12bf8c8403e14d))
|
|
167
155
|
|
|
168
156
|
## 2.0.9 (2022-04-10)
|
|
169
157
|
|
|
170
|
-
|
|
171
158
|
### Performance Improvements
|
|
172
159
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
160
|
+
- 🔖 publish v2.0.9
|
|
161
|
+
([1bdac64](https://github.com/guanghechen/algorithm.ts/commit/1bdac6453d21e3cfeca2e65413e01aa720a34d38))
|
|
176
162
|
|
|
177
163
|
## 2.0.8 (2022-04-10)
|
|
178
164
|
|
|
179
|
-
|
|
180
165
|
### Performance Improvements
|
|
181
166
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
167
|
+
- 🔖 publish v2.0.8
|
|
168
|
+
([7d92191](https://github.com/guanghechen/algorithm.ts/commit/7d921919d03570e772a847763100eb1a58d10d2d))
|
|
185
169
|
|
|
186
170
|
## 2.0.8-alpha.0 (2022-04-05)
|
|
187
171
|
|
|
188
|
-
|
|
189
172
|
### Performance Improvements
|
|
190
173
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
174
|
+
- 🔖 publish v2.0.8-alpha.0
|
|
175
|
+
([24a301c](https://github.com/guanghechen/algorithm.ts/commit/24a301c145ad9f6c0e50494de39456c42bb02f29))
|
|
194
176
|
|
|
195
177
|
## 2.0.7 (2022-04-03)
|
|
196
178
|
|
|
197
|
-
|
|
198
179
|
### Performance Improvements
|
|
199
180
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
181
|
+
- 🔖 publish v2.0.7
|
|
182
|
+
([814bc48](https://github.com/guanghechen/algorithm.ts/commit/814bc48415c5bbea555e0807b8a862cf348df5c1))
|
|
203
183
|
|
|
204
184
|
## 2.0.7-alpha.1 (2022-04-03)
|
|
205
185
|
|
|
206
|
-
|
|
207
186
|
### Performance Improvements
|
|
208
187
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
188
|
+
- 🔖 publish v2.0.7-alpha.1
|
|
189
|
+
([fd487f4](https://github.com/guanghechen/algorithm.ts/commit/fd487f425bd3b8273a414ead8b697010fe1a3a83))
|
|
212
190
|
|
|
213
191
|
## 2.0.7-alpha.0 (2022-03-27)
|
|
214
192
|
|
|
215
|
-
|
|
216
193
|
### Performance Improvements
|
|
217
194
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
195
|
+
- 🔖 publish v2.0.7-alpha.0
|
|
196
|
+
([8a89b2b](https://github.com/guanghechen/algorithm.ts/commit/8a89b2b68855a8eee6b244188792bd294e56045f))
|
|
221
197
|
|
|
222
198
|
## 2.0.6 (2022-03-26)
|
|
223
199
|
|
|
224
|
-
|
|
225
200
|
### Performance Improvements
|
|
226
201
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
202
|
+
- 🔖 publish v2.0.6
|
|
203
|
+
([27a96ca](https://github.com/guanghechen/algorithm.ts/commit/27a96ca7e37b440880b5fd3be8bd1bd08939104e))
|
|
230
204
|
|
|
231
205
|
## 2.0.5 (2022-03-23)
|
|
232
206
|
|
|
233
|
-
|
|
234
207
|
### Performance Improvements
|
|
235
208
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
209
|
+
- 🔖 publish v2.0.5
|
|
210
|
+
([b6f49a9](https://github.com/guanghechen/algorithm.ts/commit/b6f49a92024b9062f89a47277f692069e3abd9ec))
|
|
239
211
|
|
|
240
212
|
## 2.0.4 (2022-03-20)
|
|
241
213
|
|
|
242
|
-
|
|
243
214
|
### Performance Improvements
|
|
244
215
|
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
216
|
+
- 🔖 publish v2.0.4
|
|
217
|
+
([1f37699](https://github.com/guanghechen/algorithm.ts/commit/1f37699b24bbf498fa820a44056c5f7b291308ee))
|
|
248
218
|
|
|
249
219
|
## 2.0.3 (2022-02-24)
|
|
250
220
|
|
|
251
|
-
|
|
252
221
|
### Performance Improvements
|
|
253
222
|
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
223
|
+
- 🔖 publish v2.0.3
|
|
224
|
+
([bfd7ee8](https://github.com/guanghechen/algorithm.ts/commit/bfd7ee8420771cc02f7ef53833ba17780192cc88))
|
|
257
225
|
|
|
258
226
|
## 2.0.2 (2022-02-24)
|
|
259
227
|
|
|
260
|
-
|
|
261
228
|
### Performance Improvements
|
|
262
229
|
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
230
|
+
- 🔖 publish v2.0.2
|
|
231
|
+
([386ea6e](https://github.com/guanghechen/algorithm.ts/commit/386ea6eef0154a42689f03c4943c526a1234db45))
|
|
266
232
|
|
|
267
233
|
## 2.0.1 (2022-02-22)
|
|
268
234
|
|
|
269
|
-
|
|
270
235
|
### Performance Improvements
|
|
271
236
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
237
|
+
- 🔖 publish v2.0.1
|
|
238
|
+
([cac97b1](https://github.com/guanghechen/algorithm.ts/commit/cac97b1cbdc95e0c0914b24ea4e4d25e40bb15c5))
|
|
275
239
|
|
|
276
240
|
# 2.0.0 (2022-02-06)
|
|
277
241
|
|
|
278
|
-
|
|
279
242
|
### Performance Improvements
|
|
280
243
|
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
244
|
+
- 🔖 publish v2.0.0
|
|
245
|
+
([832e998](https://github.com/guanghechen/algorithm.ts/commit/832e998c72a5e2de64cdca52655e2f0456a17ba2))
|
|
284
246
|
|
|
285
247
|
# 2.0.0-alpha.0 (2022-02-05)
|
|
286
248
|
|
|
287
|
-
|
|
288
249
|
### Performance Improvements
|
|
289
250
|
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
251
|
+
- :art: [BREAKING] refactor: add 'I' as prefix name for interface types
|
|
252
|
+
([7253441](https://github.com/guanghechen/algorithm.ts/commit/7253441870bd61579f644b47c64b9a50b169afc3))
|
|
253
|
+
- 🔖 publish v2.0.0-alpha.0
|
|
254
|
+
([f48a558](https://github.com/guanghechen/algorithm.ts/commit/f48a558ad6decd6c5eee4b9a999ac085c9e19a22))
|
|
294
255
|
|
|
295
256
|
## 1.0.24 (2022-01-22)
|
|
296
257
|
|
|
297
|
-
|
|
298
258
|
### Performance Improvements
|
|
299
259
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
260
|
+
- 🔖 publish v1.0.24
|
|
261
|
+
([be5ff5e](https://github.com/guanghechen/algorithm.ts/commit/be5ff5ef055a514bd2f9113b541e9f49ad6008b4))
|
|
262
|
+
- 🎨 set print width to 100 (old is 80)
|
|
263
|
+
([dd57d3f](https://github.com/guanghechen/algorithm.ts/commit/dd57d3f5b59edb82426bc84fbf687bfa08c8cfe4))
|
|
304
264
|
|
|
305
265
|
## 1.0.23 (2021-11-28)
|
|
306
266
|
|
|
307
|
-
|
|
308
267
|
### Performance Improvements
|
|
309
268
|
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
269
|
+
- 🔖 publish v1.0.23
|
|
270
|
+
([cc85764](https://github.com/guanghechen/algorithm.ts/commit/cc8576431cceb414f18f481788d5df198deeb464))
|
|
313
271
|
|
|
314
272
|
## 1.0.22 (2021-10-19)
|
|
315
273
|
|
|
316
|
-
|
|
317
274
|
### Performance Improvements
|
|
318
275
|
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
276
|
+
- 🔖 publish v1.0.22
|
|
277
|
+
([d4af2ac](https://github.com/guanghechen/algorithm.ts/commit/d4af2ac47f6a8d2a22eee8763be73b3770d4754d))
|
|
322
278
|
|
|
323
279
|
## 1.0.21 (2021-10-07)
|
|
324
280
|
|
|
325
|
-
|
|
326
281
|
### Performance Improvements
|
|
327
282
|
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
283
|
+
- 🔖 publish v1.0.21
|
|
284
|
+
([610f21c](https://github.com/guanghechen/algorithm.ts/commit/610f21c513a5d0dce5afc2ad315a525c17300409))
|
|
331
285
|
|
|
332
286
|
## 1.0.20 (2021-10-07)
|
|
333
287
|
|
|
334
|
-
|
|
335
288
|
### Performance Improvements
|
|
336
289
|
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
290
|
+
- 🔖 publish v1.0.20
|
|
291
|
+
([e721e95](https://github.com/guanghechen/algorithm.ts/commit/e721e959aef75eb10bd9bc434074c4d8f9885506))
|
|
340
292
|
|
|
341
293
|
## 1.0.19 (2021-10-07)
|
|
342
294
|
|
|
343
|
-
|
|
344
295
|
### Performance Improvements
|
|
345
296
|
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
297
|
+
- 🔖 publish v1.0.19
|
|
298
|
+
([20db37d](https://github.com/guanghechen/algorithm.ts/commit/20db37dc1a3e533e15de0831fe02c20c6058f98b))
|
|
349
299
|
|
|
350
300
|
## 1.0.18 (2021-09-21)
|
|
351
301
|
|
|
352
|
-
|
|
353
302
|
### Performance Improvements
|
|
354
303
|
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
304
|
+
- 🔖 publish v1.0.18
|
|
305
|
+
([f70493b](https://github.com/guanghechen/algorithm.ts/commit/f70493bc9d28de3bb0575be29d867743c19758e0))
|
|
358
306
|
|
|
359
307
|
## 1.0.17 (2021-09-20)
|
|
360
308
|
|
|
361
|
-
|
|
362
309
|
### Performance Improvements
|
|
363
310
|
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
311
|
+
- 🔖 publish v1.0.17
|
|
312
|
+
([bee6123](https://github.com/guanghechen/algorithm.ts/commit/bee612385e4e6104f08e48d4d534413abcb18c33))
|
|
367
313
|
|
|
368
314
|
## 1.0.16 (2021-09-11)
|
|
369
315
|
|
|
370
|
-
|
|
371
316
|
### Performance Improvements
|
|
372
317
|
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
318
|
+
- 🔖 publish v1.0.16
|
|
319
|
+
([73206d8](https://github.com/guanghechen/algorithm.ts/commit/73206d88d133e51d33a131d25e0ba7309409038a))
|
|
376
320
|
|
|
377
321
|
## 1.0.15 (2021-09-11)
|
|
378
322
|
|
|
379
|
-
|
|
380
323
|
### Performance Improvements
|
|
381
324
|
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
325
|
+
- 🔖 publish v1.0.15
|
|
326
|
+
([e8fe1c7](https://github.com/guanghechen/algorithm.ts/commit/e8fe1c786a4e582b2965ea63b5c0f2700fe4f7b5))
|
|
385
327
|
|
|
386
328
|
## 1.0.14 (2021-09-08)
|
|
387
329
|
|
|
388
|
-
|
|
389
330
|
### Performance Improvements
|
|
390
331
|
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
332
|
+
- 🔖 publish v1.0.14
|
|
333
|
+
([1b305da](https://github.com/guanghechen/algorithm.ts/commit/1b305da4856161dd5750073f8e0f0203b9c78d10))
|
|
394
334
|
|
|
395
335
|
## 1.0.13 (2021-09-06)
|
|
396
336
|
|
|
397
|
-
|
|
398
337
|
### Features
|
|
399
338
|
|
|
400
|
-
|
|
401
|
-
|
|
339
|
+
- ✨ implemented '[@algorithm](https://github.com/algorithm).ts/gcd'
|
|
340
|
+
([2b3c113](https://github.com/guanghechen/algorithm.ts/commit/2b3c113240a019677956b63d1137099a55a08531))
|
|
402
341
|
|
|
403
342
|
### Performance Improvements
|
|
404
343
|
|
|
405
|
-
|
|
344
|
+
- 🔖 publish v1.0.13
|
|
345
|
+
([26265a9](https://github.com/guanghechen/algorithm.ts/commit/26265a9124e1e1709b4688a21acf7eb468de7d35))
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<header>
|
|
2
2
|
<h1 align="center">
|
|
3
|
-
<a href="https://github.com/guanghechen/algorithm.ts/tree/@algorithm.ts/gcd@
|
|
3
|
+
<a href="https://github.com/guanghechen/algorithm.ts/tree/@algorithm.ts/gcd@4.0.0/packages/gcd#readme">@algorithm.ts/gcd</a>
|
|
4
4
|
</h1>
|
|
5
5
|
<div align="center">
|
|
6
6
|
<a href="https://www.npmjs.com/package/@algorithm.ts/gcd">
|
|
@@ -49,33 +49,30 @@
|
|
|
49
49
|
</header>
|
|
50
50
|
<br/>
|
|
51
51
|
|
|
52
|
-
|
|
53
52
|
A typescript implementation of the **gcd** and **Extended Euclidean** algorithm.
|
|
54
53
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
* Extended Euclidean algorithm: For solving the smallest
|
|
58
|
-
integer solution (|x| + |y| smallest) of the equation `Ax + By = gcd(x,y)`.
|
|
54
|
+
- gcd: The Greatest Common Divisor.
|
|
59
55
|
|
|
56
|
+
- Extended Euclidean algorithm: For solving the smallest integer solution (|x| + |y| smallest) of
|
|
57
|
+
the equation `Ax + By = gcd(x,y)`.
|
|
60
58
|
|
|
61
59
|
## Install
|
|
62
60
|
|
|
63
|
-
|
|
61
|
+
- npm
|
|
64
62
|
|
|
65
63
|
```bash
|
|
66
64
|
npm install --save @algorithm.ts/gcd
|
|
67
65
|
```
|
|
68
66
|
|
|
69
|
-
|
|
67
|
+
- yarn
|
|
70
68
|
|
|
71
69
|
```bash
|
|
72
70
|
yarn add @algorithm.ts/gcd
|
|
73
71
|
```
|
|
74
72
|
|
|
75
|
-
|
|
76
73
|
## Usage
|
|
77
74
|
|
|
78
|
-
|
|
75
|
+
- gcd
|
|
79
76
|
|
|
80
77
|
```typescript
|
|
81
78
|
import { gcd, gcdBigint } from '@algorithm.ts/gcd'
|
|
@@ -84,7 +81,7 @@ A typescript implementation of the **gcd** and **Extended Euclidean** algorithm.
|
|
|
84
81
|
gcdBigint(3n, 6n) // => 3n
|
|
85
82
|
```
|
|
86
83
|
|
|
87
|
-
|
|
84
|
+
- Extended Euclidean algorithm
|
|
88
85
|
|
|
89
86
|
```typescript
|
|
90
87
|
import { euclidean, euclideanBigint } from '@algorithm.ts/gcd'
|
|
@@ -97,9 +94,8 @@ A typescript implementation of the **gcd** and **Extended Euclidean** algorithm.
|
|
|
97
94
|
|
|
98
95
|
## Related
|
|
99
96
|
|
|
97
|
+
- [数论基础之模方程初步][gcd]
|
|
100
98
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
[homepage]: https://github.com/guanghechen/algorithm.ts/tree/@algorithm.ts/gcd@3.1.0/packages/gcd#readme
|
|
99
|
+
[homepage]:
|
|
100
|
+
https://github.com/guanghechen/algorithm.ts/tree/@algorithm.ts/gcd@4.0.0/packages/gcd#readme
|
|
105
101
|
[gcd]: https://me.guanghechen.com/post/math/number-theory/%E6%A8%A1%E6%96%B9%E7%A8%8B/basic/
|
package/lib/cjs/index.cjs
CHANGED
package/lib/esm/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@algorithm.ts/gcd",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "GCD + Euclidean algorithm",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "guanghechen",
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
},
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
|
-
"url": "https://github.com/guanghechen/algorithm.ts/tree/
|
|
11
|
+
"url": "https://github.com/guanghechen/algorithm.ts/tree/@algorithm.ts/gcd@4.0.0-alpha.0",
|
|
12
12
|
"directory": "packages/gcd"
|
|
13
13
|
},
|
|
14
|
-
"homepage": "https://github.com/guanghechen/algorithm.ts/tree/
|
|
14
|
+
"homepage": "https://github.com/guanghechen/algorithm.ts/tree/@algorithm.ts/gcd@4.0.0-alpha.0/packages/gcd#readme",
|
|
15
15
|
"keywords": [
|
|
16
16
|
"algorithm",
|
|
17
17
|
"gcd",
|
|
@@ -28,9 +28,6 @@
|
|
|
28
28
|
"main": "./lib/cjs/index.cjs",
|
|
29
29
|
"module": "./lib/esm/index.mjs",
|
|
30
30
|
"license": "MIT",
|
|
31
|
-
"engines": {
|
|
32
|
-
"node": ">= 16.0.0"
|
|
33
|
-
},
|
|
34
31
|
"files": [
|
|
35
32
|
"lib/",
|
|
36
33
|
"!lib/**/*.map",
|
|
@@ -39,19 +36,8 @@
|
|
|
39
36
|
"LICENSE",
|
|
40
37
|
"README.md"
|
|
41
38
|
],
|
|
42
|
-
"scripts": {
|
|
43
|
-
"build": "rimraf lib/ && cross-env NODE_ENV=production rollup -c ../../rollup.config.mjs",
|
|
44
|
-
"prepublishOnly": "yarn build",
|
|
45
|
-
"test": "cross-env TS_NODE_FILES=true NODE_OPTIONS=--experimental-vm-modules jest --config ../../jest.config.mjs --rootDir ."
|
|
46
|
-
},
|
|
47
|
-
"dependencies": {
|
|
48
|
-
"@algorithm.ts/constant": "^3.0.1"
|
|
49
|
-
},
|
|
50
39
|
"devDependencies": {
|
|
51
|
-
"
|
|
52
|
-
"jest": "^29.5.0",
|
|
53
|
-
"rimraf": "^5.0.0",
|
|
54
|
-
"rollup": "^3.21.6"
|
|
40
|
+
"@algorithm.ts/internal": "0.0.0"
|
|
55
41
|
},
|
|
56
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "6a88f4a7ccb2ea5416185b562482255d752c4528"
|
|
57
43
|
}
|