Commit graph

499 commits

Author SHA1 Message Date
Diederik de Groot
cb7bd1b158
truncl is defined as pure in core/stdc/math
(Removed exception for dragonfly, fixed up documentation and comment)
2018-04-30 16:35:13 +02:00
Martin
7583d5434c Fix std.math.log1p() unittest
log1p(-2.0) returns +NaN for the non-x87 software implementation, and so
does the MSVC runtime function. The x87 asm implementation and libm on
Linux return -NaN. So just ignore the sign.
2018-04-26 22:54:57 +02:00
Steven Schveighoffer
d4a35f09da More removal of version(unittest) 2018-04-13 12:20:02 -04:00
Jack Stouffer
89ad7e79c1 Removed scope wide @trusted use in std.math 2018-04-11 19:36:27 -04:00
Jack Stouffer
b4f675fe15 Work On Issue 18693 - Remove rndtonl from std.math 2018-04-10 15:32:43 -04:00
Jack Stouffer
73c325da9d Remove outdated status from std.math 2018-04-07 11:21:52 -04:00
Jack Stouffer
dfa8ccd2a2 Add public examples to all functions in std.math 2018-04-06 12:53:14 -04:00
Iain Buclaw
3c1067d384 std.math: Implement floor for ibmExtended reals. 2018-04-05 20:17:47 +02:00
The Dlang Bot
de259d43fb
Merge pull request #6336 from ibuclaw/noraisefe
std.math: Remove special cases that attempt to raise FE overflow/underflow flag
merged-on-behalf-of: Jack Stouffer <jack@jackstouffer.com>
2018-04-04 05:25:12 +02:00
Jack Stouffer
618018e69a
Merge pull request #6409 from JackStouffer/math-examples3
Add public examples to many functions to std.math
2018-04-03 15:24:47 -04:00
Jack Stouffer
52b27fa576 Add public examples to many functions to std.math 2018-04-03 10:56:40 -04:00
Sebastian Wilzbach
42894784dd Markdownify Phobos
$(D word) -> `word`
2018-04-02 22:32:47 +02:00
Iain Buclaw
cd6f8ffe5b Mark IeeeFlags and FloatingPointControl as @trusted nothrow @nogc
Added pure onto all FP flag getter functions, removing pure from all FP
flag setter functions.
2018-04-01 19:08:43 +02:00
Jack Stouffer
42afceb8c0 Add public examples to many functions to std.math 2018-03-30 13:46:31 -04:00
Radu Racariu
aefb272c81 fix wrong MIPS global identifier 2018-03-29 09:01:28 +03:00
Jack Stouffer
bc61918f07 Add public examples to many examples to std.math 2018-03-28 15:24:00 -04:00
The Dlang Bot
8c222350f4
Merge pull request #5820 from ibuclaw/floatfloor
std.math: Implement more optimal floorImpl for ieeeSingle
merged-on-behalf-of: Jack Stouffer <jack@jackstouffer.com>
2018-03-28 03:58:18 +02:00
Nathan Sashihara
83430da5c6 fix misnamed variable so PR #5820 compiles 2018-03-27 20:36:15 -04:00
Iain Buclaw
8164083940 std.math: Remove unittests that test exp() FE flags post calling. 2018-03-24 11:04:34 +01:00
Iain Buclaw
d79b27eab3 std.math: Remove special cases that attempt to raise FE overflow/underflow flag. 2018-03-24 10:42:23 +01:00
Iain Buclaw
87ff45038d std.math: Implement more optimal floorImpl for ieeeSingle 2018-03-17 17:24:37 +01:00
Iain Buclaw
cc3960aaad std.math: Use DOUBLEPAIR_MSB/LSB for accessing high/low parts of ibmExtended format 2018-03-17 10:37:23 +01:00
Jack Stouffer
a4d98d0e90 Fix Issue 18174 - std.math.equalsDigit should be usable in @safe 2018-03-15 10:16:25 -04:00
Kai Nacke
cbf4d44e19 std.math: fix feqrel for ibmExtended floats.
cast(double*)(&x)[MANTISSA_MSB] is of type double*. Moving the
opening parenthesis gives the right result.
2018-03-13 22:56:22 +01:00
MetaLang
a74271be4c
Revert "Issue 18244: std.math generic functions need to have sig constraints" 2018-02-23 10:46:07 -04:00
Jack Stouffer
663b5b9278 Revert addition of StdUnittest 2018-02-20 13:32:32 -05:00
Sebastian Wilzbach
d9830b739e Fix DScanner warnings 2018-02-10 22:46:32 +01:00
Sebastian Wilzbach
a24b4509ac Remove use of undefined ddoc macros from Phobos 2018-02-09 19:19:57 +01:00
Basile Burg
ec21afaa94 use Unqual to prevent impl. conv. 2018-02-07 16:50:44 +01:00
Basile Burg
a2ab91ad48 fix issue 18349 - std/math.d(543,33): Deprecation: integral promotion not done for -x 2018-02-07 10:09:47 +01:00
Jack Stouffer
18cbb29b04 Replaced version(unittest) blocks with version(StdUnittest) 2018-02-01 19:56:59 -05:00
The Dlang Bot
2f25cdf076
Merge pull request #5902 from kinke/ldc_to_upstream
Upstream some LDC patches
merged-on-behalf-of: unknown
2018-01-29 19:15:07 +01:00
Martin
31b8fee4bd Revise std.math.tan() for 64-bit reals
Minor fixes after cross-checking against the Cephes implementation for
doubles, see
https://github.com/jeremybarnes/cephes/blob/master/cmath/tan.c.

The `assert(!isNaN(tan(0x1p300L)))` unittest (still) fails for 64-bit
reals, while `tan(-0x1p300L) == -0x1p300L`. Not really suprising, as the
total loss threshold is 2^30; Cephes returns 0 as error for greater
(absolute) inputs.
The threshold for 128-bit quadruple reals is 2^55 btw.
2018-01-26 20:16:51 +01:00
Martin
a32a8aecbc std.math: Improve support for AArch64, MIPS and MIPS64 2018-01-26 20:16:51 +01:00
The Dlang Bot
976cb990f1
Merge pull request #6014 from wilzbach/complex
Start to move away from complex and imaginary types
merged-on-behalf-of: Andrei Alexandrescu <andralex@users.noreply.github.com>
2018-01-18 22:34:40 +01:00
Sebastian Wilzbach
9aeb953411 Merge remote-tracking branch 'upstream/stable' into merge_stable 2018-01-17 23:56:25 +01:00
Sebastian Wilzbach
a972e266ed Allow running all unittest with -transition=complex 2018-01-17 11:14:32 +01:00
H. S. Teoh
b1402c3cba Fix indentation. 2018-01-17 02:26:23 +01:00
H. S. Teoh
0becf2d2db Sig constraints for approxEqual. 2018-01-17 02:26:23 +01:00
H. S. Teoh
113579ec6b Fix issue 18244: Generic functions in std.math need to have proper sig constraints.
Not having any sig constraints causes needless conflicts with
user-defined numerical types, e.g.:

````
// myNumber.d
module myNumber;
struct MyNumber { ... }
int signbit(T : MyNumber)(T num) { ... }

// usercode.d
import myNumber;
import std.math;
MyNumber num;
auto x = signbit(num); // tries to call std.math.signbit, and fails
````

Add sig constraints to:

* signbit
* isFinite.
* isNormal.
* isSubnormal
* sgn.
* nextafter.
2018-01-17 02:26:23 +01:00
Sebastian Wilzbach
adcf48c405 Mark usage of creal functions as deprecated. 2018-01-16 03:04:35 +01:00
The Dlang Bot
f3189822ab
Merge pull request #5989 from wilzbach/static-foreach
Use static foreach in Phobos
merged-on-behalf-of: Andrei Alexandrescu <andralex@users.noreply.github.com>
2018-01-03 19:05:07 +01:00
Sebastian Wilzbach
7de3787876 Use static foreach in Phobos 2018-01-03 17:30:11 +01:00
The Dlang Bot
5c37fa2046
Merge pull request #5985 from wilzbach/small-safe-2
@safeify more unittests II
merged-on-behalf-of: Petar Kirov <ZombineDev@users.noreply.github.com>
2018-01-03 10:39:35 +01:00
Sebastian Wilzbach
b0575c8a66 @safeify more unittests II 2018-01-03 06:26:05 +01:00
Martin Nowak
ac821be1de Merge remote-tracking branch 'upstream/stable' into merge_stable 2017-12-30 19:15:43 +01:00
Basile Burg
b183307018 prevent deprecation message caused by std.math.abs() on short and byte 2017-12-25 12:45:13 +01:00
Joakim
008064792c Don't run HardFloat tests on SoftFloat systems, like ARM_SoftFloat. 2017-12-22 18:42:35 +05:30
Diederik de Groot
31ca73d58d
Port of phobos to DragonFlyBSD
Notes:
- FIXME message related to dragonfly malloc issue (issue reported on upstream dragonfly issue database)
2017-12-20 08:05:49 +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