The Dlang Bot
c6bd15f76c
Merge pull request #7711 from kinke/reduce_ldc_diff
...
Reduce LDC diff a bit
merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
2021-01-13 19:35:05 +01:00
Nathan Sashihara
28f8de0112
Fix Issue 21408 - Make std.math.nextUp and nextDown and nextafter work in CTFE for extended-precision real
2020-12-01 09:03:55 +01:00
Martin Kinkelin
7556c1c62a
std.math: Revise inline-asm-related versions and add some pragma(inline, true)
...
To slightly reduce the LDC diff.
2020-11-29 02:20:00 +01:00
Nathan Sashihara
f82d057d3d
Fix Issue 21407 - Make std.math.NaN and std.math.getNaNPayload work in CTFE
2020-11-19 23:53:29 +01:00
Iain Buclaw
ab8221efb0
std.math: Add support for FreeBSD x86 53-bit precision reals
2020-11-09 15:04:08 +01:00
Luís Ferreira
b65fa40c1e
math: mark tan as @safe instead of @trusted
...
Signed-off-by: Luís Ferreira <contact@lsferreira.net>
2020-10-28 02:52:00 +01:00
Iain Buclaw
996affb490
std.math: Fix log coefficiants for 128-bit implementation
2020-10-20 23:16:14 +02:00
Nicholas Lindsay Wilson
bff8c21344
[LDC] move pragma(inline, true);
out of function bodies
2020-10-19 15:46:27 +02:00
Nicholas Wilson
f85ca8dbe8
fix real precision use for inverse and hyperbolic sinh, tanh, scalbn, asinh, acosh ( #7651 )
2020-10-08 16:46:36 +08:00
Nicholas Lindsay Wilson
de75a27248
cos/sin/rint/bigint use appropriate precision, remove rndtonl
2020-10-07 11:58:06 +08:00
Andrei Alexandrescu
f97c2c05be
Provide float and double versions of fmin and fmax. Improve docs. ( #7604 )
...
Provide float and double versions of fmin and fmax. Improve docs.
merged-on-behalf-of: Andrei Alexandrescu <andralex@users.noreply.github.com>
2020-09-09 07:13:00 +02:00
Martin Kinkelin
1e15cf6e0d
std.math: Avoid ldexp calls with constant exponents
...
Quoting from https://en.cppreference.com/w/cpp/numeric/math/ldexp :
> On many implementations, std::ldexp is less efficient than
> multiplication or division by a power of two using arithmetic
> operators.
2020-08-15 02:07:39 +02:00
Martin Kinkelin
a76200dd17
std.math: Enable proper single- and double-precision ldexp overloads
...
As the according intrinsics have recently been added to core.math.
Also move `pragma(inline, true)` out of the function as required for LDC
(and non-templated functions, not getting their body analyzed).
2020-08-15 02:00:58 +02:00
Martin Kinkelin
4d3ba080b7
Prepare for properly parsed float/double literals ( #7591 )
...
This fixes failing unittests with dlang/dmd#11387 on Linux x64 by
appending a L suffix to (some) literals, to keep full `real` parsing
precision (instead of double precision).
2020-08-14 21:06:56 +08:00
Nathan Sashihara
453faadf5b
Replace is(Unqual!T == Unqual!U) with is(immutable T == immutable U) for speed & memory usage
2020-08-03 15:07:32 +02:00
Walter Bright
5a0dddcb98
fix fabs() to not use x87 for float/double
2020-07-21 01:18:10 -07:00
Iain Buclaw
22ebc705c1
std.math: Begin deprecation of accidentally leaked AliasSeq
2020-07-03 05:37:57 +02:00
Iain Buclaw
268b56be49
std.math: Remove duplicated RISCV version conditions
2020-06-29 16:35:52 +02:00
Martin Nowak
fa87fdc1fc
Merge remote-tracking branch 'upstream/stable' into merge_stable
2020-06-12 00:12:33 +02:00
Martin Kinkelin
a7a1e0dc4e
std.math: Fix comment for isIdentical
2020-06-07 16:32:15 +02:00
Walter Bright
016b33a1a4
scalbn() doesn't inline
2020-06-05 21:46:27 -07:00
Nathan Sashihara
0a0b03353e
Fix documentation of std.math.isIdentical for NaN: compares all bits not just payload
2020-06-05 18:48:25 -07:00
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