| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
Changed `Rect` edge inclusivity behavior (#3253) * Changed `Rect` edge inclusivity behavior `contains_point` is now exclusive on the maximum edge * Add `BoundingBox` * Move `Rectangle` to `geometry` module * Remove rect inclusivity checks for final behaviour * Add `Rect` bounding box methods * Make `Rect` names more consistent | 2 个月前 | |
fix(bigint): shift left for values > 32 bits (#3469) * Fix shift_left: check MAX_LEN instead of current length BigInt.shl silently returned 0 for any shift of 32 bits or more: 1 << 1 = 2 (correct) 1 << 31 = 2147483648 (correct) 1 << 32 = 0 (wrong, expected 4294967296) 1 << 64 = 0 (wrong) 1 << 100 = 0 (wrong) Root cause is a capacity-vs-length confusion in shift_left. When the shift produced a carry out of the top limb, the carry was only appended under the guard `buf_len + 1 <= len`, where `len` is the value's current *significant* length, not the capacity of the backing array (which is always MAX_LEN, since BigInt.data is a fixed uint[MAX_LEN]). Shifting a value whose significant length is already at its maximum -- which includes the common case of shifting 1, where buf_len == len == 1 -- left the carry with nowhere to go, so it was silently discarded and every bit shifted out of the top limb was lost. Shifting by 32 or more moves the entire value into that discarded carry, yielding 0. The result must be allowed to grow up to MAX_LEN limbs, so bound buf_len against the array capacity instead. This matches the guard already used by BigInt.add_this for the same carry-out situation. Both callers of shift_left (BigInt.shl_this and multi_byte_divide) pass buffers of exactly MAX_LEN uints, so bounding by MAX_LEN cannot overflow. shift_right needs no equivalent change: it only ever shrinks the value and appends nothing. Also adds unit tests covering shifts across the 32-bit limb boundary (1, 31, 32, 33, 63, 64, 65 and 100 bits), cross-checked against repeated doubling and multiplication by 2^n, plus shl/shr round-trips. * Check for overflow in shift_left. * Updated releasenotes. * Add description. --------- Co-authored-by: Christoffer Lerno <christoffer@aegik.com> | 1 个月前 | |
distributions: fix tests (#2975) Remove stochastic elements in the distributions tests and ensure they are deterministic. Co-authored-by: Christoffer Lerno <christoffer@aegik.com> | 6 个月前 | |
- Type properties are now accessed using `::` and the "of" suffix, removed: `int.sizeof` -> `int::size` - Added `$reflect` with properties `name`, `cname`, `qname`, `offset`, `alignment`, `size`. - Added `@kindof`, `@alignof` and `@sizeof` macros. - Removed `$nameof`, `$extnameof`, `$qnameof`, `$offsetof`, `$alignof`, `$kindof`, `$sizeof`. - `.nameof` is changed to `.description` on `fault` and enum types. - Property `is_eq` is renamed to `has_equals`. - Type function `tagof` is renamed `get_tag`. - Add `untypedlist` as a usable type #2647. - EnumSet with more than 128 entries was broken. - Handle underflow in zip. - Bugs in check for name suggestions on name mismatch. | 5 个月前 | |
Add @feat (#3406) * - Add `@feat` attribute. - Add `$feat` compile time function. * Update http tests. * Fixes * EMSCRIPTEN -> POSIX | 2 个月前 | |
Fix to simple a += b overload fallback. Renaming and reordering in the stdlib. | 1 年前 | |
Remove $vacount and $vasplat | 4 个月前 | |
Add @feat (#3406) * - Add `@feat` attribute. - Add `$feat` compile time function. * Update http tests. * Fixes * EMSCRIPTEN -> POSIX | 2 个月前 | |
Add @feat (#3406) * - Add `@feat` attribute. - Add `$feat` compile time function. * Update http tests. * Fixes * EMSCRIPTEN -> POSIX | 2 个月前 | |
Add @feat (#3406) * - Add `@feat` attribute. - Add `$feat` compile time function. * Update http tests. * Fixes * EMSCRIPTEN -> POSIX | 2 个月前 | |
Regression: Invalid is_random implementation due to changes in 0.6. | 2 年前 | |
- Type properties are now accessed using `::` and the "of" suffix, removed: `int.sizeof` -> `int::size` - Added `$reflect` with properties `name`, `cname`, `qname`, `offset`, `alignment`, `size`. - Added `@kindof`, `@alignof` and `@sizeof` macros. - Removed `$nameof`, `$extnameof`, `$qnameof`, `$offsetof`, `$alignof`, `$kindof`, `$sizeof`. - `.nameof` is changed to `.description` on `fault` and enum types. - Property `is_eq` is renamed to `has_equals`. - Type function `tagof` is renamed `get_tag`. - Add `untypedlist` as a usable type #2647. - EnumSet with more than 128 entries was broken. - Handle underflow in zip. - Bugs in check for name suggestions on name mismatch. | 5 个月前 | |
- Implicit unsigned <-> signed integer conversions removed. | 4 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 2 个月前 | ||
| 1 个月前 | ||
| 6 个月前 | ||
| 5 个月前 | ||
| 2 个月前 | ||
| 1 年前 | ||
| 4 个月前 | ||
| 2 个月前 | ||
| 2 个月前 | ||
| 2 个月前 | ||
| 2 年前 | ||
| 5 个月前 | ||
| 4 个月前 |