Runa
b2ecb210a1
Fix Issue 10386: Make std.math.isIdentical work in CTFE with coverage tests ( #10576 )
...
* Fix Issue 20197 - Make std.math.isIdentical work in CTFE
* Added tests for function isIdentical
Signed-off-by: runiixx <murgua03@gmail.com>
* Fix Issue 10386
Signed-off-by: runiixx <murgua03@gmail.com>
* fixing style
Signed-off-by: runiixx <murgua03@gmail.com>
---------
Signed-off-by: runiixx <murgua03@gmail.com>
Co-authored-by: Nathan Sashihara <21227491+n8sh@users.noreply.github.com>
2024-12-08 17:17:39 -08:00
Dennis
a6ad1522a5
Move std.math.exponential.pow
implementation outside template ( #9019 )
...
* Move `std.math.exponential.pow` implementation outside template
* Fix compilation on Mac
2024-07-03 10:22:25 +03:00
Dennis Korpel
312a86d741
Mark std.math.exponential.pow @safe
2024-07-01 01:20:46 +02:00
Martin Kinkelin
acd2013413
Get rid of obsolete CRuntime_DigitalMars support
2024-05-25 21:45:49 +02:00
WANG Rui
1a8d2eae06
std/math/hardware.d: Fix compile error for LoongArch
...
```
std/math/hardware.d(187):1:19: error: invalid operand for instruction
movfcsr2gr $a0, $r2
```
2024-05-09 14:26:40 +02:00
liushuyu
676710c7b8
std/math/hardware.d: use an alternative register naming ...
...
... for LoongArch64 so that LDC/LLVM can recognize certain fp
instructions
2024-03-23 23:38:07 +01:00
Walter Bright
a44abe9167
use cast() where we can
2024-03-08 11:57:50 -08:00
Iain Buclaw
c6e1f98fab
std.math.hardware: Remove mixin around RISCV implementations
2024-01-18 00:44:26 +01:00
Dennis Korpel
2bb54df391
Move floatTraits to std.math.traits
2024-01-09 13:00:50 +01:00
HuskyNator
e5e6f6088d
Fix misplaced doc backticks and reorder attributes
...
Reorder attributes as per style guidelines:
> Attributes should be listed in alphabetical ordering
Fix issue 24278
2023-12-15 01:48:21 +01:00
HuskyNator
e425dc69d1
Document problematic behaviour
2023-12-15 01:32:48 +01:00
HuskyNator
00a2b65db9
Separate assert statements
2023-12-12 16:04:58 +01:00
HuskyNator
473bb759d2
Fix tests
2023-12-10 16:08:38 +01:00
HuskyNator
9073c1d454
Change return type of abs to conform with documentation
...
Integral types should simply return their own type.
2023-12-10 16:00:29 +01:00
Yang Yujie
870eb5d5d6
Add std/math/hardware.d support for LoongArch64.
2023-11-17 09:01:36 +01:00
H. S. Teoh
4773cdf85d
Cross-link to std.mathspecial.
2023-08-18 00:50:20 +02:00
Iain Buclaw
105bc4508c
Remove declarations with expired deprecations
2023-07-04 21:37:48 +02:00
Vladimir Panteleev
b1612bbc38
Fix Issue 23997 - isClose(1, -double.infinity) returns true ( #8767 )
2023-06-22 17:41:44 +03:00
Dennis
5cd77a6e32
User hyperlinks to refer to bugzilla issues ( #8766 )
2023-06-16 14:45:44 +03:00
Iain Buclaw
65e380c339
std.math.exponential: Fix wrong placement of 1.0 in log1p coefficient
2023-03-11 14:52:06 +01:00
Iain Buclaw
f2ac205a9d
std.math.exponential: Disable use of fyl2x and fyl2xp1 intrinsics on dmd/macOS port
2023-03-03 01:42:36 +01:00
Iain Buclaw
e74d997522
fix Issue 23750 - log1p for floats/doubles not actually providing extra accuracy
2023-03-01 12:13:52 +01:00
Iain Buclaw
a33d048302
std.math.exponential: Fix log10 coefficient order
2023-02-20 20:39:50 +01:00
Iain Buclaw
2a62b4c798
std.math.exponential: Add deprecations for calling log family functions with an integral argument
2022-12-13 00:56:49 +01:00
Iain Buclaw
8e799c14dc
std.math.exponential: Implement log/log2/log10 for double- and float-precision
2022-12-12 19:59:05 +01:00
Iain Buclaw
5a9919c802
std.math.hardware: Use forceOp in another ieeeFlags test
2022-12-04 20:26:28 +01:00
Iain Buclaw
2e1f8de817
std.math.hardware: Fix broken IEEE FP flags tests
...
1. The `pragma(inline, false)` doesn't do what the author thinks it does
(Issue 23520).
2. Change that introduced `blockopt` seems to have a slight
misunderstanding about what constant propagation is (`a /= 0.0L` can
always be constant propagated regardless of what surrounds it).
3. Undocument tests that depend on the need for forcing operations to
disarm the optimizer, and replace with simple tests behind StdDdoc.
2022-12-03 00:17:36 +01:00
Iain Buclaw
d957f13db3
std.math: Faster floor(double) implementation
2022-07-13 00:16:51 +00:00
Iain Buclaw
ff16d73e4c
std.math.exponential: Fix coefficients for log2 and log10
2022-07-05 23:24:50 +00:00
Iain Buclaw
0497537e22
std.math.exponential: Split generic logN implementations to own impl templates
2022-07-05 10:37:31 +02:00
Iain Buclaw
682e16d3ec
std.math.exponential: Implement pure logb() for double and float precision
2022-07-04 23:48:56 +00:00
Ast-x64
0c56468d19
RISCV: Fix wrong ExceptionMask values
...
According to RISCV specifications
https://riscv.org/wp-content/uploads/2019/12/riscv-spec-20191213.pdf ,
figure 11.2, the mask flags should be NX, UF, OF, DZ, NV in order.
2022-06-16 20:22:10 +00:00
Ast-x64
b2d5da9c43
Extend floating point precision in some tests
...
These tests may work better with quadruple-presicion real types now.
2022-06-16 19:53:02 +00:00
Luís Ferreira
a56287dd8b
chore(math/exponential): avoid import constants if not InlineAsm_X87
...
Signed-off-by: Luís Ferreira <contact@lsferreira.net>
2022-05-09 18:44:14 +00:00
Luís Ferreira
19c6e8d251
chore(math/hardware): align spaces by 4 instead of by 3
...
Signed-off-by: Luís Ferreira <contact@lsferreira.net>
2022-05-09 18:42:23 +00:00
Petar Kirov
dfaaf8fa53
Merge remote-tracking branch 'upstream/stable' into merge_stable
2021-11-09 10:30:28 +02:00
Brian Callahan
8a42656f67
Fix Issue 22416 - Unify polyImpl implementations
2021-10-18 05:40:34 +00:00
Brian Callahan
36eeb42292
OpenBSD: Add polyImpl implementation for x86
...
Fix Issue 22393 - OpenBSD: Add polyImpl implementation for x86
2021-10-16 08:05:02 -04:00
Per Nordlöw
46d416fa9d
Qualify some function parameters under std.format as const to reduce template bloat
2021-09-22 23:12:15 +00:00
Iain Buclaw
1cbbb845af
std.math: Reference Issue 5305 in unittest taking pointer to function
2021-08-25 19:27:16 +00:00
Luís Ferreira
62e01fc442
std.math.trigonometry: fix tan asm x86 implementation for ldc compiler
...
Somehow, separating asm blocks in small pieces produces additional
`mov`s and other instructions on LDC that breaks the tanAsm logic and
therefore returns wrong values.
Signed-off-by: Luís Ferreira <contact@lsferreira.net>
2021-08-21 17:29:15 +01:00
Luís Ferreira
8514636059
std.math.algebraic: use fabs from druntime
...
Signed-off-by: Luís Ferreira <contact@lsferreira.net>
2021-08-19 09:56:55 +00:00
Martin Nowak
3fff60bc50
Merge remote-tracking branch 'upstream/stable' into merge_stable
2021-07-13 12:24:06 +02:00
Walter Bright
13d84801e7
declaring templates inside static foreach is not reliable
2021-06-08 10:57:08 +00:00
The Dlang Bot
19003dd639
Merge pull request #8127 from kinke/bitpattern
...
[stable] std.math.operations: Slightly revise extractBitpattern()
Signed-off-by: Razvan Nitu <RazvanN7@users.noreply.github.com>
Merged-on-behalf-of: Razvan Nitu <RazvanN7@users.noreply.github.com>
2021-06-07 18:22:22 +00:00
Martin Kinkelin
06037a25b4
std.math.exponential: Minimally relax a pow() unittest for targets with 64-bit real
...
Required since #7783 .
2021-06-03 07:56:03 +00:00
Martin Kinkelin
8946209a9b
Revert #7823 - Faster pow implementation for integral exponents
...
There are multiple issues with that commit, incl. out-of-bounds read
on x86 systems and a significant performance decrease for qualified
floating-point types; see #8124 for a full list of flaws.
I'm questioning the tackled goal in the first place, because I expect
users to use that `pow` mainly with small integral exponents, *not*
expecting underflows to 0 or overflows to ±infinity, so optimizing
for these cases and sacrificing performance for the regular case doesn't
make a lot of sense to me.
2021-06-03 09:57:57 +09:00
Martin Kinkelin
3d90677e51
std.math.operations: Fix extractBitpattern() unittest
2021-06-02 21:22:27 +02:00
Martin Kinkelin
4d8be9050b
std.math.operations: Slightly simplify extractBitpattern()
2021-06-02 20:45:13 +02:00
Martin Kinkelin
5a46c9ecf6
std.math.operations: Make extractBitpattern() @trusted
...
To enable unsafe reinterpret-casts directly, without extra lambdas.
2021-06-02 20:42:09 +02:00