dhawal543
4b39202045
Fix #10565 : Prevent negative zero when multiplying BigInt zero by neg… ( #10655 )
2025-03-02 21:08:03 +08:00
Vladiwostok
231ae8b68a
Fix D-Scanner linting issues ( #9070 )
...
* Fix UndocumentedDeclarationCheck linting issue
* Fix IfConstraintsIndentCheck linting issue
* Address feedback
* Fix publictests CI
* Fix old (libdparse) D-Scanner linting warn
2024-10-27 01:21:56 -07:00
Paul Backus
afe5d47167
Fix issue 24028 - BigInt power operator ignores sign of exponent
2023-07-03 12:19:09 -04:00
Jan Jurzitza
f8c80db44e
Fix upcoming D-Scanner argument warnings ( #8753 )
...
* upgrade D-Scanner
* Fix upcoming D-Scanner argument checks
2023-05-30 09:42:02 +03:00
tynuk
1d93fa32eb
add pure attriv
2022-08-01 15:28:45 +00:00
dkorpel
6389953fa0
Fix bigint return scope order
2022-02-19 11:47:37 +00:00
dkorpel
b3b0e74152
Unblock "address of ref can be assigned to non-scope parameter"
2022-02-17 00:44:02 +00:00
dkorpel
1e30d05a3f
Fix issue 22771 - BigInt divMod can return "-0" (negative zero)
2022-02-14 23:34:34 +00:00
dkorpel
b1281eb67a
add more return/scope to pure bigint functions
2021-05-30 01:10:13 +02:00
Walter Bright
22ca8abece
bigint.d: add return annotations for opOpAssign()
2021-05-18 09:43:40 -07:00
nordlow
a44f71813f
Annotate std/bigint.d and std/internal/math/biguintcore.d to please dlang/dmd#12520 #8076
2021-05-18 13:14:08 +02:00
Nathan Sashihara
d3a1433921
Fix Issue 21721 - casting std.BigInts to built-in floating point types not allowed in @safe
code without -preview=dip1000
2021-04-25 20:43:24 +08:00
berni44
b2019ebab0
Narrow imports of std.math in the rest of phobos.
2021-04-21 03:00:57 +02:00
berni44
6f2a0934a7
Adapt imports of std.format to new structure of std.format.
2021-03-19 13:22:00 +01:00
Nathan Sashihara
afe9cb5e1a
Adjust some assert(a == b)
examples in std.bigint to improve DDoc runnable examples
...
Some public unit tests are currently being translated into e.g.
https://dlang.org/phobos/std_bigint.html#.BigInt.opCast.3
---
// BigInts that fall somewhere between two non-infinite floats/doubles
// are rounded to the closer value when cast to float/double.
writeln(0x1.aaa_aaep+28f); // cast(float)BigInt(0x1aaa_aae7)
---
which is not confidence-inspiring. Additionally writeln will default to
scientific notation instead of hex format here.
2021-03-18 10:05:58 +01:00
Nathan Sashihara
52da0ef73c
Throughout Phobos use core.math intrinsics instead of std.math wrappers
...
Followup to PR #7821 .
2021-03-02 07:09:08 +01:00
Nathan Sashihara
b09ef4c1ae
Change private function BigInt.isNegative to an alias
2020-11-26 15:23:37 +01:00
Nathan Sashihara
cabaad079f
Fix Issue 20980 - std.bigint.BigInt: special case x & non-negative int to avoid unnecessary allocation
2020-11-11 02:10:22 +01:00
Nicholas Lindsay Wilson
de75a27248
cos/sin/rint/bigint use appropriate precision, remove rndtonl
2020-10-07 11:58:06 +08:00
Nathan Sashihara
4edc8c8922
Remove an unnecessary allocation from BigInt powmod
2020-08-27 23:59:09 +02:00
Nathan Sashihara
453faadf5b
Replace is(Unqual!T == Unqual!U) with is(immutable T == immutable U) for speed & memory usage
2020-08-03 15:07:32 +02:00
Nathan Sashihara
a0f4b65db8
Fix Issue 20889 - Support construction of std.bigint.BigInt from a sign and a byte-array magnitude
...
For consistency with other std.bigint functions allows arbitrary ranges.
2020-06-04 16:04:26 -07:00
dkorpel
679be81114
mark BigInt.toHash
pure nogc
2020-05-12 10:49:54 +02:00
Geod24
04f3979317
Replace 'Issue XXX' with Bugzilla links
...
Make the links clickable, as was done in the DMD repository.
Also avoids any ambiguity w.r.t. where the issue is stored.
2020-04-13 16:28:09 +09:00
The Dlang Bot
c37c4bccc3
Merge pull request #7151 from n8sh/issue-20146-20147
...
std.bigint.BigInt: allow casting to floating point numbers
merged-on-behalf-of: unknown
2019-12-30 00:02:51 +01:00
dkorpel
52a1897464
add comments justifying trusted
annotations
2019-12-22 13:48:37 +01:00
dkorpel
f67a48f150
add changelog entry
2019-12-14 19:04:26 +01:00
dkorpel
10ed87ddb9
make tostring backwards compatible
2019-12-14 17:12:44 +01:00
dkorpel
037cf197e3
use put for outputrange
2019-12-14 12:17:02 +01:00
dkorpel
5ad491a451
make std.bigint @safe
2019-12-14 11:54:05 +01:00
The Dlang Bot
f8196e626f
Merge pull request #7184 from WalterBright/bigintError
...
bigint.d: replace Error with assert()
merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
2019-09-13 10:11:37 +02:00
Walter Bright
b1638b116b
bigint.d: replace Error with assert()
2019-09-12 23:21:37 -07:00
Nathan Sashihara
374cbd3e22
Fix Issue 20146 - Allow casting from std.bigint.BigInt to built-in floating point types
2019-09-08 04:23:27 -07:00
Nathan Sashihara
ce3e7f6dbb
Fix Issue 20147 - Enable comparison (==, >, >=, <=, <) between std.bigint.BigInt and floating point numbers
2019-09-05 22:41:08 -07:00
Robert Schadek
312006cc46
Addes assert messages to bigint
2019-07-10 10:46:56 +01:00
Mike
e0585fa785
Replace D1 operator overloads with D2 operator overloads
2019-07-04 13:33:53 +09:00
shove
e962cc7ec5
Add powmod() for BigInt operands.
2019-05-24 19:55:56 +08:00
Basile Burg
7bf6a6d0d1
fix issue 19883 - Cyclic constructor call for BigInt(dstring)
2019-05-19 04:36:20 +02:00
shove70
4bb550d206
Fixes #19740 : Incorrect result of BigInt * BigInt.
2019-04-21 08:41:33 +08:00
Walter Bright
b8b710f66e
more scope for FormatSpec
2019-03-18 00:27:33 -07:00
Sebastian Wilzbach
c324714fde
Remove a few cases of underscore escaping
2018-06-04 13:05:01 +02:00
Sebastian Wilzbach
42894784dd
Markdownify Phobos
...
$(D word) -> `word`
2018-04-02 22:32:47 +02:00
Sebastian Wilzbach
d9830b739e
Fix DScanner warnings
2018-02-10 22:46:32 +01:00
Biotronic
dd371c19ac
Added divMod function to std.bigint
2018-01-28 14:24:15 +01:00
Andrei Alexandrescu
adee662094
Merge pull request #5987 from JackStouffer/issue17249
...
Fix Issue 17249: Added BigInt.getDigit
2018-01-25 16:59:51 -05:00
The Dlang Bot
3784831e30
Merge pull request #6029 from BBasile/issue-14767
...
fix issue 14767 - Support CTFE of BigInt under x86
merged-on-behalf-of: Jack Stouffer <jack@jackstouffer.com>
2018-01-24 22:39:54 +01:00
Basile Burg
fa12390b39
prevent deprecetation message about imports + add test from bugzilla
2018-01-14 22:07:17 +01:00
Basile Burg
f2c5ee3bf1
fix issue 14767 - Support CTFE of BigInt under x86
2018-01-14 21:21:36 +01:00
Markus F.X.J. Oberhumer
1115ccb219
Fix issue 18224 - BigInt modulo uint must return long.
2018-01-12 18:37:16 +01:00
Jack Stouffer
aa995a6ff9
Made BigInt.opCast pure
2018-01-04 15:05:25 -05:00