Commit graph

135 commits

Author SHA1 Message Date
Sean Kelly
747f3cf1e4 Changed Phobos to use the Boost license. Currently, all public domain modules and all licensed modules by Walter, Andrei, Bartosz, and Don have been changed to use this license (excepting std.c, for the moment). Ideally, all Phobos modules will eventually be distributed under this license, which means obtaining permission from a few more authors, deleting, or rewriting some modules.
Removed std.openrj.
2009-09-16 18:19:51 +00:00
Andrei Alexandrescu
0c142994d9 See changelog - bunch of bug fixes and a couple additions for release 2.032 2009-08-31 19:46:33 +00:00
Andrei Alexandrescu
511fe83802 replaced std.c with core.stdc; improved approxEqual to work with ranges, not only numbers or arrays 2009-07-11 19:02:05 +00:00
Walter Bright
3a3130afa9 last minute fixes for 2.031 2009-07-06 17:32:48 +00:00
Andrei Alexandrescu
14bffe780b minor 2009-07-04 07:13:50 +00:00
Don Clugston
cf6fcdf625 Fix for bugzilla 3040 (if that actually is a bug). 2009-06-01 05:55:46 +00:00
Walter Bright
dbb18c7e66 bugzilla 3016 2009-05-22 23:58:31 +00:00
Don Clugston
cf05d1909b Fix exp() so that it won't break when issue #2942 is fixed. 2009-05-11 08:46:51 +00:00
Andrei Alexandrescu
40e9003856 isNaN returns bool 2009-04-29 22:07:08 +00:00
Don Clugston
02bfae247a Implemented log1p using the new intrinsics. All log functions and atanh, acosh, and asinh are now pure nothrow. 2009-04-14 06:51:52 +00:00
Andrei Alexandrescu
d929e706b0 fixed pow 2009-04-11 20:39:24 +00:00
Walter Bright
dd89bdf4fa add yl2x 2009-04-09 18:40:31 +00:00
Don Clugston
935dbdf282 double/float overloads in std.math are now pure nothrow.
(required fix for bug2756).
2009-03-30 08:15:02 +00:00
Brad Roberts
22c437c8b3 Apply attachment from bug 2570 from Aziz to cleanup some bad html in ddoc comments 2009-03-29 06:32:11 +00:00
Don Clugston
5ae67f23ac * Disabled pure nothrow for double & float functions, because of bug 2756
* More extensive unittests for nextUp.
Trivial tidying up:
* Changed all references to std.math.isXXX to the new names instead of the aliased old names.
* Moved license to end of std.math.
2009-03-24 08:49:38 +00:00
Don Clugston
47ddb78118 * All math functions are now pure nothrow, except those which call the C library. (This assumes that the 'pure float' problem will be solved, perhaps by one of the two methods I've proposed).
* New implementation of std.math.hypot() which is faster, and now works correctly for subnormal numbers.
2009-03-18 09:19:02 +00:00
Don Clugston
eed37a809b Correct a bug in frexp() for the GDC doubledouble case. (Copied from Tango). 2009-03-09 15:35:52 +00:00
Don Clugston
5fc7dab498 Fixes the failing unit tests. 2009-03-05 08:04:35 +00:00
Walter Bright
095813650f comment out unittests 2009-03-05 06:45:47 +00:00
Walter Bright
ce0dc8aa42 fix unittest compile fail 2009-03-04 19:19:59 +00:00
Don Clugston
a9ee82e9fc Added comments, fixed a broken unit test, simplify frexp(). 2009-02-27 08:05:13 +00:00
Don Clugston
eb61deb82e Tango compatibility.
* IEEE754 names for isNaN, isFinite, isNormal, isSubnormal, isInfinity. Aliases for the old names have been retained.
* The non-functional nan(char[]) is replaced with NaN, getNaNpayload.
* Restored float, double versions of the trig & exp functions
* finally got rid of the private mfeq() function
2009-02-26 19:44:09 +00:00
Don Clugston
cde0563c68 Added NaN payload functions (from Tango).
Removed std.math.nan, which was a no-op.
2009-02-26 10:02:43 +00:00
Don Clugston
99e533ab68 Faster complex trig functions. Marked math as a System module. 2009-02-26 08:13:21 +00:00
Walter Bright
18404fdeea add purity and nothrow 2009-02-24 11:02:48 +00:00
Don Clugston
2d098cbc5e Removed the last bits of HTML from the ddoc comments. 2009-02-24 08:13:34 +00:00
Don Clugston
02b2dc3fe5 Replaced html with ddoc tags 2009-02-24 07:55:57 +00:00
Don Clugston
f76e9c5ff1 * exp2() and expm1() also 3 times faster. 2009-02-23 20:05:01 +00:00
Don Clugston
cabeb2fac6 * exp() is now 3 times faster.
* sinh, cosh, tanh now use D implementations rather than the C standard library.
2009-02-20 14:17:21 +00:00
Walter Bright
295a1633b7 fails unit tests 2009-02-14 17:47:38 +00:00
Walter Bright
d57e203dc9 fold in some OSX changes 2009-02-10 02:21:15 +00:00
Walter Bright
f2ae2d5248 fix missing; 2009-02-10 00:11:27 +00:00
Don Clugston
8a26741130 Restored #881 which just got rolled back in previous commit.
Fixed sgn() for floating point numbers (now does NaN,+-0 correctly).
2009-01-31 17:20:28 +00:00
Andrei Alexandrescu
d835dc3dc0 templatized a number of math functions 2009-01-30 16:54:16 +00:00
Walter Bright
288b76bd82 rollup 2008-12-12 10:45:36 +00:00
Don Clugston
49826b4077 Removed all workarounds for bug #1257 (hooray!) 2008-12-08 14:43:01 +00:00
Walter Bright
b1042a219e bugzilla 2269 2008-08-07 20:25:08 +00:00
Andrei Alexandrescu
fe4af2bd9f $(LI In $(B std.math), replaced a bunch of $(B const)s with $(B enum)s) 2008-07-08 03:24:51 +00:00
Don Clugston
40f2786ef9 Fixes for bugzilla #2092 2008-05-28 07:08:41 +00:00
Don Clugston
4439653a58 Bugfix: the new pow(x,n) was wrong for int.max<n<=uint.max 2008-05-28 06:49:27 +00:00
Andrei Alexandrescu
1ae5300f52 * std.algorithm: Changed the map() function so that it deduces the return type
* std.contracts: Added file and line information to enforce. Added errnoEnforce that reads and formats a message according to errno. Added corresponding ErrnoException class.

* std.encoding: For now commented out std.encoding.to. 

* std.file: Fixed bug 2065

* std.format: Fixed bug in raw write for arrays

* std.getopt: Added new option stopOnFirstNonOption. Also automatically expand dubious option groups with embedded in them (useful for shebang scripts)

* std.math: improved integral powers

* std.md5: Improved signature of sum so it takes multiple arrays. Added getDigestString.

* std.path: changed signatures of test functions from bool to int. Implemented rel2abs for Windows. Improved join so that it accepts multiple paths. Got rid of some gotos with the help of scope statements.

* std.process: added getenv and setenv. Improved system() so it returns the exit code correctly on Linux.

* std.random: added the dice function - a handy (possibly biased) dice.

* std.file: added support for opening large files (not yet tested)

* std.utf: added the codeLength function. Got rid of some gotos.
2008-05-06 05:08:52 +00:00
Walter Bright
fbcc8b5ad8 fix some of the build breaks in last checkin 2008-05-05 05:17:10 +00:00
Don Clugston
7908579037 Bugfix(typo) for issubnormal() on non-X86 systems. 2008-05-02 12:36:05 +00:00
Don Clugston
58749fe3fd * added numeric.findRoot. AFAIK this is faster than any previously published 1D general-purpose root finder,
* added math.ieeeMean. Not yet public (may need a different name). Used  by findRoot.
* reformatting for std.math -- 80 char width, etc.
2008-04-01 19:10:40 +00:00
Andrei Alexandrescu
716e16bb20 Fixed minor documentation typo. 2008-03-06 20:15:10 +00:00
Don Clugston
3b11e8600d * Support for different CPU IEEE 'real' formats: 64-bit, 80-bit and 128-bit (quadruple) reals, both BigEndian and LittleEndian; partial support for non-IEEE 'doubledouble' reals.
* Bugzilla 1877 (atan2 doc bugs)
* Bugzilla 1722 std.math.nextafter not implemented on Windows
* Added implementation of scalb for DMD-Windows.
* Added nextUp(), nextDown()
* Bugzilla 1881: feqrel nonsensical for non-real arguments.
2008-02-29 08:40:45 +00:00
Walter Bright
3b9583956f dtor support 2008-02-25 08:37:57 +00:00
Andrei Alexandrescu
dcddec72f4 Don Clugston's changes 2008-02-20 08:14:39 +00:00
Andrei Alexandrescu
a71a28d734 Don Clugston's changes 2008-02-20 08:13:18 +00:00
Andrei Alexandrescu
29f3cc23f7 std.math: minor change in approxEqual.
std.contracts: added functions pointsTo()

std.numeric: minor unittest fixes.

std.bitmanip: fixed code bloat issue, reintroduced FloatRep and DoubleRep.

std.conv: minor simplification of implementation.

std.regexp: added reference to ECMA standard in the documentation.

std.getopt: changed return type from bool to void, error is signaled by use of exceptions.

std.functional: added unaryFun, binaryFun, adjoin.

std.string: updated documentation, changed code to compile with warnings enabled.

std.traits: changed FieldTypeTuple; added RepresentationTypeTuple, hasAliasing; fixed bug 1826; added call to flush() from within write; fixed unlisted bug in lines().

std.algorithm: added map, reduce, filter, inPlace, move, swap, overwriteAdjacent, find, findRange, findBoyerMoore, findAdjacent, findAmong, findAmongSorted, canFind, canFindAmong, canFindAmongSorted, count, equal, overlap, min, max, mismatch, EditOp, none, substitute, insert, remove, levenshteinDistance, levenshteinDistanceAndPath, copy, copyIf, iterSwap, swapRanges, reverse, rotate, SwapStrategy, Unstable, Semistable, Stable, eliminate, partition, nthElement, sort, schwartzSort, partialSort, isSorted, makeIndex, schwartzMakeIndex, lowerBound, upperBound, equalRange, canFindSorted.

std.thread: fixed so it compiles with warnings enabled.

std.file: made getSize() faster under Linux.

std.random: fixed so it compiles with warnings enabled; improved function uniform so it deduces type generated from its arguments.

std.format: added fixes to make formatting work with const data.

std.path: minor documentation changes.
2008-02-19 07:00:56 +00:00