Commit graph

474 commits

Author SHA1 Message Date
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
Sebastian Wilzbach
97f6f39e4e Change AliasSeq(0, ...) uses of foreach to static foreach 2017-11-02 17:11:37 +01:00
The Dlang Bot
c1f616b618
Merge pull request #5773 from ibuclaw/fix128bit
std.math: Fix names of PI/4 constants for RealFormat.ieeeQuadruple
merged-on-behalf-of: Andrei Alexandrescu <andralex@users.noreply.github.com>
2017-10-29 01:23:19 +02:00
Iain Buclaw
f54be16d46 std.math: Use static assert as default condition for FloatingPointControl.ControlState 2017-10-28 17:04:38 +02:00
Iain Buclaw
d80316f35d std.math: Use a runtime assert for FloatingPointControl.hasExceptionTraps 2017-10-28 17:04:38 +02:00
Iain Buclaw
3c6806895e std.math: Use static assert as default condition for FloatingPointControl.ExceptionMask 2017-10-28 17:04:38 +02:00
Iain Buclaw
e61f4bc082 std.math: Add FloatingPointControl.roundingMask value 2017-10-28 17:04:38 +02:00
Iain Buclaw
86bbc708b5 std.math: Make FloatingPointControl.setControlState a little easier to read 2017-10-28 17:03:59 +02:00
Iain Buclaw
8345abc8bf std.math: Declare FloatingPointControl.ExceptionMask alias 2017-10-28 17:03:59 +02:00
Iain Buclaw
d1d2b21c4c std.math: Remove FloatingPointControl.EXCEPTION_MASK enum
It's value is the same as FloatingPointControl.allExceptions
2017-10-28 17:03:59 +02:00
Iain Buclaw
03b3d7fb30 std.math: Use core.stdc.fenv for RoundingMode values 2017-10-28 17:03:59 +02:00
Andrei Alexandrescu
d072f7ca10 Update math.d 2017-10-20 12:36:02 +02:00
Walter Bright
2256a314f3 fix math.d for 16997 2017-10-20 02:32:15 -07:00
The Dlang Bot
24cc67c157 Merge pull request #5761 from jercaianu/powmod
Fix Issue 6244 - Add powmod / modpow function to std.math
merged-on-behalf-of: Andrei Alexandrescu <andralex@users.noreply.github.com>
2017-10-16 19:46:13 +02:00
Andrei Alexandrescu
67019022ad Minor doc 2017-10-16 19:14:49 +02:00
Alexandru Jercaianu
30b65e77f5 typo 2017-10-16 20:09:42 +03:00
Alexandru Jercaianu
298f160d86 updated documentation 2017-10-16 19:24:40 +03:00
Iain Buclaw
4ccbd65ef0 std.math: Fix names of PI/4 constants for RealFormat.ieeeQuadruple 2017-10-10 02:21:34 +02:00
The Dlang Bot
e974a88c5e Merge pull request #4272 from ibuclaw/ieeefenvflags
std.math: Use core.stdc.fenv for exception mask values
merged-on-behalf-of: Petar Kirov <ZombineDev@users.noreply.github.com>
2017-10-09 00:53:04 +02:00
The Dlang Bot
78e4db508f Merge pull request #5768 from ibuclaw/strangeline
std.math: Remove junk comment
merged-on-behalf-of: Petar Kirov <ZombineDev@users.noreply.github.com>
2017-10-09 00:19:53 +02:00
Iain Buclaw
87087e0f48 std.math: Remove junk comment 2017-10-08 23:42:52 +02:00
Alexandru Jercaianu
d149cd8403 removed isIntegral 2017-10-08 23:15:40 +03:00
Iain Buclaw
74f687c655 std.math: Use core.stdc.fenv for exception mask values 2017-10-08 22:14:20 +02:00
Alexandru Jercaianu
9d1464506a removed unused import 2017-10-08 19:39:24 +03:00
Alexandru Jercaianu
7781aaa7b1 Fix Issue 6244 - Add powmod / modpow function to std.math
addmod for powmod

powm refactor

supports unsigned

added more tests

specify imported symbols

spaces around casts

review comments
2017-10-08 19:37:25 +03:00
Sebastian Wilzbach
2e96d0654b Issue 16984 - Make std.math runnable 2017-10-05 21:30:13 +02:00