Commit graph

167 commits

Author SHA1 Message Date
Johannes Pfau
3a9b0513d9 gammafunction: Add constants for ieeeQuadruple reals
Setting MAXGAMMA to the same as for ieeeExtended reals means the range
of the gamma function will be limited to the same range as ieeeExtended.
However, until someone reviews the algorithm to work fine for
ieeeQuadruple ranges, this workaround seems fine. We just lose some
128bit real features, but we're still as good as x86.
2017-12-19 20:08:38 +01:00
The Dlang Bot
ccdfcc9839
Merge pull request #5465 from andralex/sharedstaticinbigintnomore
Eliminate shared this from std/internal/math/biguintcore.d
merged-on-behalf-of: Andrei Alexandrescu <andralex@users.noreply.github.com>
2017-11-27 21:53:49 +01:00
MetaLang
630e927a14
Remove fully qualified use of dataCaches 2017-11-25 03:33:41 -04:00
MetaLang
603113a0dd
Fix CircleCI and change deprecated symbols 2017-11-25 03:31:05 -04:00
Sebastian Wilzbach
85ec5dead5 Manually fix Allman brace style 2017-11-20 15:45:04 +01:00
Sebastian Wilzbach
df6365092a Replace body keyword with its replacement: do
Automatic replacement with

    sed -i "s/^\([ ]*\)body/\1do/" -i **/*.d
2017-11-20 15:33:52 +01:00
Kohei Morita
93ee606fba Fix Issue 16264(+11599) - BigInt multiplication crashes on 64-bit 2017-08-31 20:59:03 +09:00
Andrei Alexandrescu
3535fc47ab Eliminate shared this from std/internal/math/biguintcore.d 2017-08-03 12:40:00 -04:00
Sebastian Wilzbach
70f06b2357 Remove old, redundant private import access specifier
Very very old versions of D (well into 0.x) had imports public by default,
like C header files. This modernizes the codebase and removes the
redundant `private` access specifier.
This has been done with:

sed "s/private import/import/g" -i **/*.d
2017-07-11 12:28:39 +02:00
Sebastian Wilzbach
61717ecc7d Sort imports 2017-06-12 07:54:38 +02:00
David Nadlinger
3662b6ff55 std.mathspecial: erf*() for quad-precision reals
Like the 80 bit real implementation, this is a translation of
CEPHES code.

Verified on LDC/AArch64.
2017-06-10 23:06:53 +01:00
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
ef7be4b60d 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
Sebastian Wilzbach
c352281212 Enforce Allman style for do { 2016-12-09 17:40:50 +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
ec47ac4224 Remove the WEB macro in favor of HTTP
replacement: sed 's/\$(WEB/\$(HTTP/g' -i **/*.d
2016-06-16 00:14:51 +02: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
Jack Stouffer
db33adc2ec Fixed long lines in std/internal/math/gammafunction.d 2016-05-10 20:51:39 -04:00
Jack Stouffer
531ae8e998 Fixed long lines in std/internal/math/biguintx86.d 2016-05-10 20:51:39 -04: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
Steven Schveighoffer
630e227c5a Merge pull request #3992 from quickfur/bigint_octal
Issue 14503: Implement formatting BigInt in octal
2016-03-31 16:56:40 -04:00
H. S. Teoh
b12b767b7c output() should take unsigned parameter. 2016-03-31 11:05:59 -07:00
Dan Olson
b938a74628 Fix NaN payload unittest in errorfunction
For some platforms, math on a NaN may change the sign.  This is
ok according to C99.  Replaced with test that ignores signbit.
2016-03-19 15:29:00 -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
Martin
a3035d7d77 Slightly relax std.internal.math.gammafunction unittest for 64-bit reals
Using LDC master on Win64, I get a relative diff of 1.068e-15 for the
second tuple (input = 1/8), exceeding the allowed upper bound by not even
7%. I chose to be generous and doubled the limit. ;)

More details for the 2nd tuple:
actual:   0x1.0a333fd8b6880p+2
expected: 0x1.0a333fd8b687bp+2
rel diff: 1.067682e-15

The other 4 tuples are perfect matches.
2015-11-08 15:27:34 +01:00
Walter Bright
cf22992cbb Merge pull request #3768 from CyberShadow/pull-20151024-051829
HTML fixes
2015-10-24 15:05:00 -07:00
Vladimir Panteleev
86cf380007 HTML fixes 2015-10-24 06:19:23 +00:00
Walter Bright
db53e3b153 biguintcore: eliminated unnecessary divides 2015-10-19 07:00:42 -07:00
Johan Engelen
0bd234bfe2 Provide MAXGAMMA, MAXLOG, and MINLOG for 64-bit reals.
Inside gammaStirling(), fix a call to pow() that would overflow for 64-bit reals.
2015-07-20 22:42:04 +02: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
Iain Buclaw
c3b05edcc5 Merge pull request #3309 from ibuclaw/fix_pr3020
Relax compile-time assertion in gammafunction to runtime
2015-06-30 18:09:04 +02:00