Commit graph

605 commits

Author SHA1 Message Date
Kazuya Takahashi
3d56e642ac Add nearbyint, lround, remainder, remquo for MS CRT 2020-05-24 18:18:18 +08:00
Iain Buclaw
6c7555c3f6 std.math: Remove redundnt public from top-level module 2020-05-17 00:02:09 +02:00
Iain Buclaw
165b2808f0 std.math: Remove redundnt public from FloatingPointControl 2020-05-17 00:01:22 +02:00
Iain Buclaw
f063e1936f std.math: Remove redundant private from IeeeFlags 2020-05-17 00:01:19 +02:00
Iain Buclaw
c9327ac060 fix Issue 20836 - std.math: reorder declarations from most visible to least 2020-05-16 23:57:54 +02:00
Geod24
433c7504c9 Restore accidentally removed import from std.math
It was removed in PR7473.
2020-05-15 23:41:54 +09:00
Iain Buclaw
f68536ba51 std.math: Implement isClose for std.complex types 2020-05-14 13:43:01 +02:00
Iain Buclaw
c71bd19350 std.math: Remove deprecated creal functions
First deprecation was in Jan 2018.

Unittests have been copied across to std.complex where appropirate.
2020-05-13 19:30:02 +02:00
Nicholas Lindsay Wilson
db9b29704e Don't rely on implicit conversion of int to fp for args to intrinsic math functions 2020-04-27 13:49:32 +08:00
Geod24
04f3979317 Replace 'Issue XXX' with Bugzilla links
Make the links clickable, as was done in the DMD repository.
Also avoids any ambiguity w.r.t. where the issue is stored.
2020-04-13 16:28:09 +09:00
Luhrel
643f493ee8 Fix incorrect use of sprintf format 2020-04-09 14:45:47 +02:00
David Abdurachmanov
3d84369f87 Add support for RISC-V 32 & 64 bit
This allows libphobos to compiled on RISC-V targets.

Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>
2020-03-28 14:29:49 -07:00
John Colvin
04674ecbe5 move Unqual to right place 2020-02-28 14:02:08 +00:00
John Colvin
a17fb473de allow floatTraits to work with inout 2020-02-28 14:00:05 +00:00
Martin Kinkelin
9c04113936 Fix recent test regressions for targets with double-precision real 2020-02-22 00:36:56 +01:00
Kazuya Takahashi
1f1164932e Add special cases 2020-01-29 22:00:02 +09:00
Kazuya Takahashi
2d726d2dc3 Fix Issue 20542 - std.math.nextafter(NaN, y) and nextafter(x, NaN) should return NaN 2020-01-29 01:10:25 +09:00
Martin Kinkelin
f88116c2a3 bikeshed 2020-01-24 16:17:28 +01:00
Martin Kinkelin
4141cc15ad std.math: Follow-up to #7362
Get rid of redundant version conditions and don't disable whole unittest
blocks (like the extensive exp() tests) just because IEEE flags are
tested too.
2020-01-24 15:50:11 +01:00
Martin Kinkelin
4d98ca2ba8 Hide IEEE flags and FloatingPointControl for soft-float targets 2020-01-24 13:26:43 +07:00
Alexandru Militaru
bb62aaca3d Replaced version (unittest) with version (StdUnittest) to avoid unnecessary overhead when compiling with -unittest 2020-01-19 14:05:17 +02:00
Bernhard Seckinger
357a4df94d Fix Issue 7006 - std.math.pow (integral, integral) crashes on negative exponents 2020-01-03 09:00:46 +01:00
Bernhard Seckinger
1d45910499 Add isClose, a replacement for approxEqual 2019-12-30 13:41:14 +01:00
Bernhard Seckinger
7b9c474521 Fix Issue 5628 - std.math unittest disabled - roundoff error in pow() on SSE2 2019-12-25 09:38:27 +01:00
Bernhard Seckinger
6765bb98ab Fix Issue 19733 - expi documentation links broken 2019-12-06 14:34:09 +01:00
Nathan Sashihara
c62d4c9589 Fix Issue 20198 - Make std.math.nextUp and nextDown and nextafter work in CTFE for float and double 2019-11-24 00:53:25 -08:00
Stian Gulpen
d9db84ad5e prevent cases of illegal implicit convertions in switch 2019-11-24 08:42:33 +01:00
Iain Buclaw
c385950816 std/math.d: Explicitly handle zero and inf in scalbn. 2019-10-19 04:41:16 +02:00
Berni
56c1473f2a Fix issue 20205 - std.math: Wrong result for abs(int.min) 2019-10-06 16:37:04 +02:00
Berni
639f49770c Add unittest to std.math to avoid falling into the trap again. 2019-10-06 14:51:11 +02:00
Sebastian Wilzbach
23fe9b85c1
Revert "Fix issue 20205 - std.math: Wrong result for abs(int.min)" 2019-10-04 12:35:51 +02:00
The Dlang Bot
b36652a3e9
Merge pull request #7180 from crocopaw/approxEqual
Clearer documentation for approxEqual
merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
2019-09-26 16:40:20 +02:00
Berni
e6b5c68b4b Fix issue 20205 - std.math: Wrong result for abs(int.min) 2019-09-12 20:57:42 +02:00
The Dlang Bot
ee30e07854
Merge pull request #7177 from n8sh/issue-20199
Fix issues 20199 & 20200: make std.math.frexp & isPowerOf2 work in CTFE
merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
2019-09-10 16:48:31 +02:00
The Dlang Bot
1160d7bd39
Merge pull request #7178 from n8sh/issue-20201
Fix Issue 20201 - Make std.math.scalbn pure
merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
2019-09-10 09:02:05 +02:00
The Dlang Bot
cd1a9601ff
Merge pull request #7175 from n8sh/issue-20196
Fix Issue 20196 - Make std.math.isNormal work in CTFE
merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
2019-09-10 04:38:29 +02:00
Berni
22d4ca5748 Rearrange and add unittests 2019-09-09 21:09:55 +02:00
Berni
16912a3893 Change documentation to make the purpose more clear.
a) Make clear, that fullfilling one criterium is enough
b) Make clear, that the function is not symmetric.
2019-09-09 21:09:55 +02:00
Berni
0d2f54ba31 Remove misleading comments in unittests for approxEqual 2019-09-09 18:21:37 +02:00
Berni
dc22eb3c17 Remove duplicate unittest for approxEqual 2019-09-09 18:21:37 +02:00
Berni
5afe334b11 Refactor approxEqual, removed superfluous overload 2019-09-09 18:21:29 +02:00
Nathan Sashihara
e45ac910a2 Fix issues 20202 & 20203 - Make std.math.signbit and copysign work in CTFE 2019-09-08 16:38:55 -07:00
Nathan Sashihara
e7609cb873 Fix issues 20199 & 20200: make std.math.frexp & isPowerOf2 work in CTFE 2019-09-08 15:13:01 -07:00
Nathan Sashihara
083a0ac743 Fix Issue 20201 - Make std.math.scalbn pure 2019-09-08 13:13:46 -07:00
Nathan Sashihara
5fbe3b4ca1 Fix Issue 20196 - Make std.math.isNormal work in CTFE 2019-09-08 07:51:10 -07:00
The Dlang Bot
b37e91944a
Merge pull request #7169 from n8sh/issue-17705
Fix Issue 17705 - std.math.isFinite cannot run at compile-time
merged-on-behalf-of: Petar Kirov <ZombineDev@users.noreply.github.com>
2019-09-05 07:44:24 +02:00
Nathan Sashihara
3586763213 Fix Issue 20192 - Make std.math.isSubnormal work in CTFE 2019-09-04 13:10:33 -07:00
Nathan Sashihara
a26d88c16f Fix Issue 17705 - std.math.isFinite cannot run at compile-time 2019-09-04 12:31:47 -07:00
Nathan Sashihara
ef29e25985 Issue 20159 Followup - fix ldc-win32 test failure
https://github.com/dlang/phobos/pull/7153#issuecomment-524536212
2019-08-24 02:46:58 -07:00
Nathan Sashihara
7887d042e6 Fix Issue 20159 - Make std.math.scalbn work in CTFE 2019-08-23 20:52:26 -07:00