Commit graph

43 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
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
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
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
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
Sebastian Wilzbach
a36cec8686 DScanner: automatially set all unattributed unittests to @safe or @system 2017-02-22 05:42:04 +01:00
Sebastian Wilzbach
c352281212 Enforce Allman style for do { 2016-12-09 17:40:50 +01: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
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
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
Vladimir Panteleev
86cf380007 HTML fixes 2015-10-24 06:19:23 +00: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
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
Iain Buclaw
65b103fc08 Relax compile-time assertion in gammafunction to runtime 2015-06-25 11:23:51 +02:00
Rainer Schuetze
adab223837 remove trailing whitespace, detab, tolf 2015-05-31 11:24:01 +02:00
Martin
468a7ed080 std.internal.math.gammafunction: loosen some tests for 64-bit reals. 2015-05-21 23:09:55 +02:00
Ilya Yaroshenko
9b86eebed5 Inverse of the Log Minus Digamma function
fix test

fix unittest

add crosreferences
2015-03-05 13:48:29 +03:00
k-hara
e7b3d834d7 detab and remove trailing whitespaces 2015-02-10 00:56:40 +09:00
Ilya Yaroshenko
f201989054 add refs for logmdigamma, digamma 2015-02-04 23:06:00 +03:00
Ilya Yaroshenko
e7bf1cdfa2 Log Minus Digamma function
logmdigamma: fix comprasion

move declarations
2015-02-04 20:51:11 +03:00
Lars T. Kyllingstad
96583fe46b isNaN() is not a property
...so it shouldn't be used as one.
2014-11-20 20:22:00 +01:00
Ilya Yaroshenko
3ddf9133f3 remove unused import in gammafunction.d 2014-11-11 18:47:27 +03:00
Walter Bright
ac1ff4692a annotate mathspecial functions 2014-05-18 10:37:49 -07:00
monarchdodra
fd8540072d Remove trailing white 2014-01-08 08:30:28 +01:00
Daniel Murphy
a11a20ef74 Remove more uses of NCEG operators in phobos 2013-11-30 14:09:39 +11:00
ibuclaw
88b44697bb Fixup std.math unittests for new math implementations. 2013-08-18 16:28:16 +01:00
Jernej Krempuš
f880870009 Added igammaTemmeLarge to std.internal.math.gammafunction. 2012-11-23 03:00:43 +01:00
Karl Broman
320c92d355 Change second paramater of gammaIncompleteComplInverse from x to p
- more meaningful for it to be p rather than x
  - also, this matches the corresponding internal function in
    std.internal.math.gammafunction
  - revise comments to match
2012-05-21 06:10:34 -05:00
Daniel Murphy
b9ad889cf3 real.min -> real.min_normal 2012-02-06 00:58:11 +11:00
k-hara
7dcb93621d Supplemental change of issue 3382 - [tdpl] Implement uniform function call syntax 2011-12-26 22:57:49 +09:00
David Simcha
8aede6061f Attempt number 2: Work around Bug 4298 in gammafunction and errorfunction code. 2010-11-29 13:57:37 +00:00
Don Clugston
6d5104ceb5 Relaxed tolerance on betaIncompleteInv unit test. The fact that a 0.8-bit error in log() caused a 38 bit change in the result, is a nice demonstration of how difficult this function is to calculate. BTW Mathematica crashes on this calculation. 2010-11-29 08:31:51 +00:00
Don Clugston
5db6dad8c1 Increase tolerance of this test, now that we know that failure is caused by a small imprecision in AMD's microcode. 2010-11-28 20:11:36 +00:00
Don Clugston
d0c8affabc Some tougher, more accurate unit tests for betaIncomplete. Possibly these will shed more light on the AMD/Intel difference. 2010-11-23 21:50:05 +00:00
David Simcha
172ec1dc1a Revert the last changeset. 2010-11-20 22:48:31 +00:00
David Simcha
66bdf06479 Work around Bug 4298 in gammafunction and errorfunction code. 2010-11-20 22:02:35 +00:00
Don Clugston
09667828b6 Enable unittests which used to fail, but are working now. 2010-11-19 22:25:28 +00:00
Don Clugston
876bf9789d Added std.mathspecial. Only 14 functions are included at this stage. 2010-11-18 19:55:57 +00:00