Jack Stouffer
4ce5d44dbb
Use underscores for number literals with five or more digits
2017-02-23 09:45:49 -05:00
Sebastian Wilzbach
a1bb0515fc
Automatically add spaces to binary operators (>=)
...
command:
sed -E "s/([[:alnum:]]) >= ([[:alnum:]])/\1 >= \2/g" -i **/*.d
sed -E "s/([[:alnum:]])>= ([[:alnum:]])/\1 >= \2/g" -i **/*.d
sed -E "s/([[:alnum:]]) >=([[:alnum:]])/\1 >= \2/g" -i **/*.d
2017-02-23 00:57:47 +01:00
Sebastian Wilzbach
203755d296
Automatically add spaces to binary operators (>>)
...
command:
sed -E "s/([[:alnum:]]) >> ([[:alnum:]])/\1 >> \2/g" -i **/*.d
sed -E "s/([[:alnum:]])>> ([[:alnum:]])/\1 >> \2/g" -i **/*.d
sed -E "s/([[:alnum:]]) >>([[:alnum:]])/\1 >> \2/g" -i **/*.d
2017-02-23 00:57:47 +01:00
Sebastian Wilzbach
d905ef53b1
Automatically add spaces to binary operators (<=)
...
command:
sed -E "s/([[:alnum:]]) <= ([[:alnum:]])/\1 <= \2/g" -i **/*.d
sed -E "s/([[:alnum:]])<= ([[:alnum:]])/\1 <= \2/g" -i **/*.d
sed -E "s/([[:alnum:]]) <=([[:alnum:]])/\1 <= \2/g" -i **/*.d
2017-02-23 00:57:47 +01:00
Sebastian Wilzbach
0b33b50812
Automatically add spaces to binary operators (!=)
...
command:
sed -E "s/([[:alnum:]]) != ([[:alnum:]])/\1 != \2/g" -i **/*.d
sed -E "s/([[:alnum:]])!= ([[:alnum:]])/\1 != \2/g" -i **/*.d
sed -E "s/([[:alnum:]]) !=([[:alnum:]])/\1 != \2/g" -i **/*.d
2017-02-23 00:57:47 +01:00
Sebastian Wilzbach
a2c6398332
Automatically add spaces to binary operators (==)
...
command:
sed -E "s/([[:alnum:]]) == ([[:alnum:]])/\1 == \2/g" -i **/*.d
sed -E "s/([[:alnum:]])== ([[:alnum:]])/\1 == \2/g" -i **/*.d
sed -E "s/([[:alnum:]]) ==([[:alnum:]])/\1 == \2/g" -i **/*.d
2017-02-23 00:57:47 +01:00
Andrei Alexandrescu
30724e67d9
Merge pull request #5166 from wilzbach/dscanner-unittest-safe-or-system
...
Dscanner: let unittest be @safe or @system
2017-02-22 14:44:08 -05:00
Sebastian Wilzbach
a36cec8686
DScanner: automatially set all unattributed unittests to @safe or @system
2017-02-22 05:42:04 +01:00
Sebastian Wilzbach
425ab667a3
Automatically set the range style from a..b -> a .. b
...
Commands:
sed -E "s/([[:alnum:]])[.][.]([[:alnum:]])/\1 .. \2/g" -i **/*.d
sed -E "s/([[:alnum:]])[.][.] ([[:alnum:]])/\1 .. \2/g" -i **/*.d
sed -E "s/([[:alnum:]]) [.][.]([[:alnum:]])/\1 .. \2/g" -i **/*.d
2017-02-22 05:37:31 +01:00
Sebastian Wilzbach
805c720595
Unify Phobos by ensuring there's always a space after cast(...)
...
Command:
sed -E 's/([^"])cast\(([^)]*?)\)([[:alnum:]])/\1cast(\2) \3/g' -i **/*.d
2017-02-21 16:40:20 +01:00
Sebastian Wilzbach
5521541032
Unify assert style to have no spaces between the first brace
...
Application of:
sed -E "s/assert +\(/assert(/" -i **/*.d
2017-02-21 15:27:15 +01:00
Sebastian Wilzbach
87dec58a41
DStyle: Constraints on declarations should have the same indentation level
2017-02-17 07:36:23 +01:00
Jack Stouffer
0fed86c07b
Removed uses of the delete keyword from std.internal.math.biguintcore.d
2016-10-26 08:59:44 +01:00
Jack Stouffer
4f81cb0f63
Added const and immutable to several variables in std.internal.math.biguintcore
2016-07-26 15:54:26 -04:00
Sebastian Wilzbach
1d34a121e9
apply all-man braces in Phobos
...
// find common cases
sed -E "s/^(\s*)((if|static if|for|foreach|foreach_reverse|while|unittest|switch|else|version).*)\s*\{$/\1\2\n\1{/" -i **/*.d
// catch else-if
sed -E "s/^(\s*)} (else static if| if|else if|else)(.*)\s*\{$/\1}\n\1\2\3\n\1{/" -i **/*.d
// remove created trailing whitespace
sed -i 's/[ \t]*$//' **/*.d
2016-05-31 13:07:53 +02:00
Sebastian Wilzbach
2dfbc51f17
Standardize whitespace after imports
...
Unified with:
sed -E "s/import\s*([^ ]+)\s*:\s*(.*(,|;))/import \1 : \2/" -i **/*.d
2016-05-29 22:09:56 +02:00
Dmitry Olshansky
8c3f343237
Merge pull request #3876 from JackStouffer/bigint2
...
[issue 15229] Range-ified BigInt's Ctor to Accept Ranges of Characters
2016-04-29 15:18:54 +04:00
Jack Stouffer
dd0d139831
Fix Issue 15229: Refactored BigInt code to work with character ranges
2016-04-28 09:51:24 -04:00
Dmitry Olshansky
c1027f1970
Merge pull request #4246 from wilzbach/sed_spaces_part_2
...
style fix: add space after 'for' operator
2016-04-27 16:17:18 +04:00
Sebastian Wilzbach
d1714c9afb
minor style fixes
2016-04-27 04:18:22 +03:00
Sebastian Wilzbach
5a8988c149
style fix: add space after for operator
2016-04-27 02:04:02 +03:00
Sebastian Wilzbach
3d67cd228c
style fix: space between operators
2016-04-26 22:26:20 +03:00
H. S. Teoh
b12b767b7c
output() should take unsigned parameter.
2016-03-31 11:05:59 -07:00
H. S. Teoh
6282dda407
Implement conversion of biguint to octal.
...
Carried bits in last word must be output at the end.
Add unittest for 3rd/4th word no-carry boundary.
Implement 'o' format specifier in BigInt.toString().
2016-02-25 13:30:35 -08:00
Walter Bright
db53e3b153
biguintcore: eliminated unnecessary divides
2015-10-19 07:00:42 -07:00
Walter Bright
feb88b8148
std.internal.math.biguintcore: minor improvements
2015-07-02 18:41:28 -07:00
H. S. Teoh
47dfc369b0
Merge pull request #3240 from e10s/issue14503
...
Fix BigInt.toString with "%x"
2015-06-30 10:56:00 -07:00
Clement Courbet
8558b22cfe
Remove a bad cast (issue 3841). Functional noop.
2015-05-13 20:20:03 +02:00
e10s
9e0b10c9ae
append letterCase param to toHexString
2015-04-30 00:23:59 +09:00
k-hara
981bb7be7d
Supplemental fix for issue 5770
2015-04-06 01:01:00 +09:00
Denis Shelomovskij
7820bf3310
Add (mostly @nogc
) attributes to bigint
module.
...
Also add comment to `internal.math.biguintcore.fromDecimalString`.
2015-02-27 18:31:05 +03:00
Jakob Ovrum
6a8bcb32e9
Add @nogc attribute to several BigInt accessor functions
2015-02-07 04:03:36 +09:00
Михаил Страшун
21ef7c2ced
Merge pull request #2612 from burner/bigint_safe_one
...
BigInt @safe https://issues.dlang.org/show_bug.cgi?id=13607
2014-11-02 15:59:44 +01:00
Robert burner Schadek
5b38506d47
BigInt @safe
...
some more
some more
some cleanup
some more
hope I got them all
another one
another one
some more
review fix and some additional style changes
some more quickfur
2014-10-31 10:27:20 +01:00
k-hara
ae5c00b114
Annotate asm statements with attributes
2014-10-29 22:00:56 +09:00
Joakim
093d636de4
Deprecate std.c.* and move all remaining declarations to core.stdc.*
2014-10-14 09:26:21 -05:00
Peter Alexander
5862d71811
Fix Issue 13391 - Allow division of BigInt by long/ulong
2014-08-31 21:42:28 +01:00
Denis Shelomovskij
30d99b011a
[Fix] Fix property enforcement when using BigInt
.
2014-07-09 20:02:00 +04:00
Dylan Knutson
a9552611af
more operators nothrow
2014-05-28 11:57:22 -07:00
Dylan Knutson
ace6a6076d
Make BigInt nothrow where possible
2014-05-27 23:29:52 -07:00
Andrei Alexandrescu
20833c3b94
Merge pull request #1962 from gittywithexcitement/master
...
Add unittests: compare BigUint(0) to 0UL
2014-03-14 01:45:48 -07:00
gittywithexcitement
30999e7dc1
Add unittests: compare BigUint(0) to 0UL
...
to prevent regression of bug 12234.
2014-02-23 16:27:38 -08:00
k-hara
b391b2ec9f
Convert to new alias syntax
2014-02-11 15:27:05 +09:00
monarchdodra
44fe3d88f7
Remove tabs
2014-01-08 08:37:52 +01:00
monarchdodra
fd8540072d
Remove trailing white
2014-01-08 08:30:28 +01:00
Simen Kjærås
8412f4d37a
Removed unnecessary allocations in twosComplement call.
2013-12-14 20:08:43 +01:00
Simen Kjærås
92560323dd
Got rid of expensive AddOrSubInt call (and related allocation).
2013-12-14 19:54:18 +01:00
Simen Kjærås
56ab3796ce
Merge branch 'master' of https://github.com/D-Programming-Language/phobos
...
Conflicts:
std/bigint.d
2013-12-05 10:53:12 +01:00
H. S. Teoh
8f132413dd
Fix issue 11583.
...
The problem is that the assumption that the first word of a BigUint is
always non-zero is false when BigUint == biguintcore.ZERO, which is
defined to be [0]. So we need to check for that case in
BigUint.opCmp(ulong).
Also, crash-proof BigUint's invariant, since it would cause an
out-of-bounds array access if a bug causes data.length==0.
2013-12-04 22:28:23 -08:00
H. S. Teoh
1945bcacf8
Fix issue 11600: to!BigInt(string) should validate input.
2013-11-27 18:43:06 -08:00