Commit graph

551 commits

Author SHA1 Message Date
Martin Nowak
b42d6291ab Merge remote-tracking branch 'upstream/stable' into merge_stable 2019-06-13 01:06:21 +02:00
The Dlang Bot
7cdd92f544
Merge pull request #7026 from wilzbach/import-selective4
Use selective top-level module imports in std.{functional,getopt,math,net,outbuffer}
merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
2019-05-23 15:08:36 +02:00
Sebastian Wilzbach
b56db9a061 Use selective top-level module imports in std.{functional,getopt,math,net,outbuffer} 2019-05-23 13:20:04 +02:00
Andrei Alexandrescu
b240c867c1 Faster isNaN test (#7009)
* Faster isNaN test
2019-05-22 07:55:04 +08:00
Eugen Wissner
f95f81af9c math.d: disable inline asm tests if unsupported 2019-05-20 14:44:56 +02:00
Iain Buclaw
03ce27d1d4 [S390] std.math: Use IBMZ_Any for SystemZ bindings 2019-04-28 09:12:17 +02:00
Johannes Pfau
fb82c219b7 MinGW build fixes 2019-04-27 09:58:32 +02:00
Iain Buclaw
501080fa4f Add minimum RISCV support to phobos 2019-04-09 21:12:46 +02:00
tibi77
d28a879fec Fix Issue 18728 - std.math.fdim does not handle nan correctly (#6896)
Fix Issue 18728 - std.math.fdim does not handle nan correctly
merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
2019-03-11 13:45:08 +01:00
Simen Kjærås
4cc23fd93a Fix issue 19686 - sgn is too greedy 2019-02-19 09:27:38 +01:00
Iain Buclaw
3abe79ed52 Add minimum HPPA support to phobos 2019-01-18 01:41:28 +01:00
Iain Buclaw
a5751e5b39 std/math.d: Don't emit message saying that test is disabled 2019-01-05 17:16:54 +01:00
The Dlang Bot
43be36c179
Merge pull request #6790 from joakim-noah/stable
Android and AArch64: tweak tests that trip
merged-on-behalf-of: unknown
2018-12-18 03:26:39 +01:00
Joakim
073ea406c6 Loosen two tests for IEEE Quadruple precision and make sure std.variant.VariantN is properly aligned for Quadruples. 2018-12-17 19:58:33 +05:30
Basile Burg
33aefbb729 [trivial] remove empty asm instructions from std.math 2018-11-23 17:10:37 +01:00
Iain Buclaw
918954a3d9 std.math: Use SPARC_Any instead of SPARC64 2018-11-01 01:24:46 +01:00
The Dlang Bot
a00b2e59af
Merge pull request #6719 from jpf91/aarch64
[AArch64] [GDC] Fix two small AArch64 bugs / typos
merged-on-behalf-of: Nathan Sashihara <n8sh@users.noreply.github.com>
2018-09-30 10:24:39 +02:00
Johannes Pfau
00301f0f0b AArch64: Fix typo in std.math 2018-09-30 09:28:47 +02:00
Iain Buclaw
fd5facfe04 posix.mak: Enforce whitespace before opening parenthesis for version conditions 2018-09-22 16:57:24 +02:00
Iain Buclaw
a55fcb7349 std.math: Remove support for IBM extended reals 2018-09-15 12:07:21 +02:00
Johannes Pfau
24c998d021 Make hasExceptionTraps pure on ARM 2018-09-08 14:39:07 +02:00
Walter Bright
33cceac7ac switch Digital Mars copyright to D Language Foundation 2018-09-05 13:49:46 -07:00
Sebastian Wilzbach
6a0a91a813 Use version(TestComplex) as a workaround against issue 18051 2018-08-20 14:09:57 +02:00
Sebastian Wilzbach
d9e4524e06 Reorder abs constraints to avoid the integral promotion deprecation message 2018-08-20 14:09:57 +02:00
Sebastian Wilzbach
eabbc8e949 Add unittest for 19162 2018-08-20 14:09:57 +02:00
look-at-me
1798119abf Fix issue 19162 2018-08-20 14:09:57 +02:00
Martin
77376fcf56 Add std.math.expm1(float) overload (using double precision) 2018-08-15 18:32:33 +02:00
Martin
21468e788b Forward to (builtin) real version for CTFE in single/double precision overloads 2018-08-15 18:32:33 +02:00
Martin
0288386001 Streamline Cephes implementations for single precision
I.e., use poly() as for the other precisions (unlike the C source).
With enabled compiler optimizations, it should be inlined anyway.
2018-08-15 18:32:33 +02:00
Martin
63254627ca Avoid ldexp() for static exponents
Prefer an arithmetic multiply by the according power-of-two constant, as
that's much faster. E.g., this makes tan(double) run 2.05x faster on an
Intel i5-3550.
2018-08-15 18:32:33 +02:00
Martin
e1d987dda6 Improve performance of std.math.poly()
Add a statically unrolled version for 1..10 coefficients.

Results on Linux x86_64 and with an Intel i5-3550 for:

  static immutable T[6] coeffs = [ 0.1, 0.2, 0.3, 0.4, 0.5, 0.6 ];
  std.math.poly(cast(T) 0.43685, coeffs);

=> real:   ~1.2x faster
=> double: ~3.2x faster
=> float:  ~3.0x faster
2018-08-15 18:32:33 +02:00
Martin
adc30e7756 Implement std.math.exp2() for single- and double-precision 2018-08-15 18:32:33 +02:00
Martin
a08c986a42 Implement std.math.expm1() for double-precision
And make the x87 `real` version CTFE-able.
I couldn't find the single-precision version in Cephes.
2018-08-15 18:32:33 +02:00
Martin
d17cda4c77 Implement std.math.exp() for single- and double-precision 2018-08-15 18:32:33 +02:00
Martin
d3f5005568 Implement std.math.tan() for single- and double-precision
And make the x87 `real` version CTFE-able.
2018-08-15 18:32:33 +02:00
Martin
83e0a95468 Implement std.math.atan2() for single- and double-precision
And make the x87 `real` version CTFE-able.
2018-08-15 18:32:33 +02:00
Martin
ef21892f52 Implement std.math.atan() for single- and double-precision
And make the x87 `real` version CTFE-able.
2018-08-15 18:32:32 +02:00
Nathan Sashihara
7f1301c3a7 Remove duplicate definitions of DOUBLEPAIR_MSB & DOUBLEPAIR_LSB for IBM doubledouble 2018-08-13 12:34:08 -04:00
Joakim
c37092a5bf std.math: IEEE Quadruple-precision fixes for AArch64 2018-06-24 16:33:55 +05:30
Joakim
789843992e std.math: sign of NaN returned by remainder with zero divisor doesn't matter 2018-06-24 16:33:55 +05:30
Joakim
f85f98ee60 std.math: only version out tests that rely on a FPU with D_HardFloat 2018-06-24 16:33:55 +05:30
Sebastian Wilzbach
c324714fde Remove a few cases of underscore escaping 2018-06-04 13:05:01 +02:00
The Dlang Bot
9974b6190e
Merge pull request #6512 from ibuclaw/mipsmasks
std.math: Fix mask values of inexact and invalid on Mips
merged-on-behalf-of: David Nadlinger <code@klickverbot.at>
2018-05-26 19:41:05 +02:00
Iain Buclaw
acd81b316a std.math: Remove redundant '&' from ARM setControlState call 2018-05-23 23:21:14 +02:00
Iain Buclaw
92d0942044 std.math: Merge ARM and AArch64 versions into ARM_Any 2018-05-23 23:21:14 +02:00
The Dlang Bot
4d27f76bd0
Merge pull request #6510 from ibuclaw/mathcw
std.math: Define ControlState and ExceptionMask for SPARC64 and SystemZ
merged-on-behalf-of: Petar Kirov <ZombineDev@users.noreply.github.com>
2018-05-20 12:17:37 +02:00
The Dlang Bot
eaa667311f
Merge pull request #6479 from kinke/fixFmin
std.math: Change fmin/fmax semantics wrt. NaNs
merged-on-behalf-of: Jack Stouffer <jack@jackstouffer.com>
2018-05-18 20:20:00 +02:00
Iain Buclaw
fc9a25c403 std.math: Define ExceptionMask values for SPARC64 and SystemZ 2018-05-16 23:37:35 +02:00
Iain Buclaw
0b4873792c std.math: Fix mask values of inexact and invalid on Mips 2018-05-16 23:22:37 +02:00
Iain Buclaw
7296b299c8 std.math: Define ControlState type for SPARC64 and SystemZ 2018-05-16 00:29:40 +02:00