Commit graph

365 commits

Author SHA1 Message Date
Sebastian Wilzbach
2dfbc51f17 Standardize whitespace after imports
Unified with:

sed -E "s/import\s*([^ ]+)\s*:\s*(.*(,|;))/import \1 : \2/" -i **/*.d
2016-05-29 22:09:56 +02:00
Dmitry Olshansky
b173b32969 Merge pull request #4361 from joakim-noah/imports
std.math and std.stdio: use more selective imports
2016-05-27 13:26:46 +04:00
Sebastian Wilzbach
18b8abf60a remove the deprecated wiki macros 2016-05-27 05:52:23 +02:00
Joakim
11d3bf6b57 For std.math and std.stdio, use more selective imports and document the current symbols imported at the module level, done by checking with ddmd. 2016-05-26 01:11:11 +05:30
David Nadlinger
4991b82304 Merge pull request #4337 from tsbockman/issue_16026
Fix issue 16026: std.math.frexp!float() wrong for very small subnormals
2016-05-22 22:07:35 +01:00
tsbockman
a6a1957be3 Fix issue 16026: std.math.frexp!float() wrong for very small subnormal values 2016-05-18 03:37:46 -07:00
Joakim
d965b1aa64 Fix Android regressions: make sure all tests don't use the local directory and no unzip 2016-05-16 21:57:17 +05:30
tsbockman
9ecb82e31f Fix the completely broken fallback algorithm for std.math.isInfinity(). 2016-05-15 03:48:44 -07:00
Jack Stouffer
fdffbebe17 Fixed long lines in std/math.d 2016-05-10 20:51:39 -04:00
Jack Stouffer
6d8f0b8285 Fixed Issue 15973: nextPow2 and truncPow2 rely on processor specific behavior 2016-05-02 09:56:48 -04:00
Sebastian Wilzbach
d1714c9afb minor style fixes 2016-04-27 04:18:22 +03:00
Sebastian Wilzbach
3d67cd228c style fix: space between operators 2016-04-26 22:26:20 +03:00
H. S. Teoh
8d4b940f09 Merge pull request #3999 from redstar/solarismath
Solaris: Add inline assembly version of poly().
2016-03-31 22:38:53 -07:00
Johannes Pfau
fc7ab7fcae std.math: unittest isn't @safe
* The unittest isn't @safe (taking address of a local variable
+ pointer cast)
2016-03-31 22:20:22 +02:00
Ilya Yaroshenko
15c26cd74b Merge pull request #4101 from JohanEngelen/patch-1
std.math.pow: change type from `double` to `real` for internal variable.
2016-03-29 21:01:12 +02:00
Johan Engelen
4b1f2f0147 std.math.pow: change type from double to real for internal variable.
This change fixes a unittest failure with LDC with optimizations on. Note that the return type of `impl` is `real` (not `Float`) and thus changing the type of `sign` to `real` should not matter / be more correct? I am not sure why `w` on line 6299 is of type `Float`.
2016-03-20 19:32:38 +01:00
Dan Olson
fd10beb59c Fix getNaNPayload for 64-bit reals
Shift was off-by-one.
2016-03-19 15:26:03 -07:00
Ilya Yaroshenko
1fecd68a9a Merge pull request #3755 from JackStouffer/pow2
Added nextPow2 and truncPow2
2016-03-14 22:46:31 +02:00
Kai Nacke
8acb8306a5 Solaris: Add inline assembly version of poly().
Uses the same code as FreeBSD.
2016-02-14 14:19:25 +01:00
Jonathan M Davis
c3cd933131 Moving deprecations along.
This is mostly just putting dates on existing deprecations that were
missing dates, but it does remove a few things that have been deprecated
long enough to be removed.
2016-02-10 16:43:25 -08:00
tsbockman
03ec7f38bd Don't use top-level selective import in std.math because of DMD issue 314. 2016-01-29 14:00:49 -08:00
Jack Stouffer
478527e3c5 added nextPow2 and truncPow2 2016-01-16 01:11:28 -05:00
Andrei Alexandrescu
66e2918040 Merge pull request #3888 from tsbockman/bitop-ulong
Update Phobos for druntime PR #1452 core.bitop changes
2016-01-13 23:55:32 -05:00
tsbockman
9da546b2a6 core.bitop bsr(), bsf(), and popcnt() now support ulong inputs even on a 32-bit arch.
This also fixes a few small issues:
* In std.numeric, `Ulong union` didn't consider endianness, and
* in `roundDownToPowerOf2()`, this expression: (1 << bsr(num)) is always 32-bit,
    whereas it should, at a minimum, match the bit-ness of num.
* ilogb() supports integer inputs, but this was undocumented.
2016-01-13 13:54:27 -08:00
Iain Buclaw
c5053cbf47 Fix precision bug in poly unittest 2015-12-27 22:44:56 +01:00
tsbockman
4b690ef72f Added a slower generic fallback method, in case real.mant_dig > 64. 2015-12-05 15:39:48 -08:00
tsbockman
7929a45c1f Optimized slightly and made the unittests more generic in case real.mant_dig < 64. 2015-12-05 15:38:31 -08:00
tsbockman
01860999a9 Added static assert documenting the maximum precision for which this fix is valid. 2015-12-05 15:38:31 -08:00
tsbockman
49d4720e5c Fix Issue 14786 - std.math.pow sometimes gets the sign of the result wrong. 2015-12-05 15:38:31 -08:00
Infiltrator
91c38b4bfd fix issue 9717 - std.math.round rounds away from zero instead of to the nearest even integer 2015-12-03 03:56:37 +11:00
Iain Buclaw
edba3c09f9 Adjust expected result of test to match ARM and others 2015-11-19 10:12:40 +01:00
Walter Bright
cf22992cbb Merge pull request #3768 from CyberShadow/pull-20151024-051829
HTML fixes
2015-10-24 15:05:00 -07:00
Vladimir Panteleev
86cf380007 HTML fixes 2015-10-24 06:19:23 +00:00
Dragos Carp
d698887729 Remove obsolete TypeTuple references
Replace following names:
std.typetuple      -> std.meta
TypeTuple          -> AliasSeq
ParameterTypeTuple -> Parameters
FieldTypeTuple     -> Fields

std.traits requires more work than search/replace and is left unchanged.
2015-10-13 20:37:44 +02:00
Andrei Alexandrescu
8b974d2b49 Undo inadvertent changes to std/math.d and std/traits.d, delete std/typed_allocator.d 2015-10-02 07:35:09 -04:00
Martin
c1f00fe3a2 Fix compile error in std.math.exp(real) for non-x86 platforms 2015-09-26 14:35:51 +02:00
Dmitry Olshansky
f2220c2139 Merge pull request #3022 from ivan-timokhin/totalOrder
Total ordering for floating-point values.
2015-09-02 12:39:55 +03:00
Daniel Murphy
8cbacba491 Forward std.math intrinsics to core.math 2015-08-30 17:34:07 +10:00
Martin Nowak
14a19c2645 Merge remote-tracking branch 'upstream/stable' into merge_stable 2015-08-05 01:34:36 +02:00
Martin Nowak
bd8ed8c13c fix Issue 14842 - [REG 2.068-b2] approxEqual does not work with integers
- promote any comparision with integers to real
2015-08-04 23:57:41 +02:00
Johan Engelen
321f8d7493 Add integer ilogb 2015-08-02 23:46:31 +02:00
Johan Engelen
98638abfc4 Add a D implementation for std.math.ilogb, templated for different floating point types. 2015-07-29 19:10:07 +02:00
Martin Nowak
5ca7ddad60 Merge remote-tracking branch 'upstream/stable' into merge_stable
Conflicts:
	posix.mak

Manually edited:
	std/datetime.d (rename toNormalizedPath -> asNormalizedPath)
2015-07-24 01:28:58 +02:00
Iain Buclaw
73493bbb49 Fix-up coefficients and smallest denormal value for ieeeDouble in exp() 2015-07-23 08:02:11 +02:00
Ivan Timokhin
9f5aa69050 Remove unnecessary empty line 2015-07-16 12:05:30 +03:00
Ivan Timokhin
baf1482936 Relax unittests 2015-07-16 11:40:12 +03:00
Ivan Timokhin
5786fe47a1 Extend testing 2015-07-16 00:59:48 +03:00
Ivan Timokhin
9755253926 Additional braces 2015-07-16 00:53:12 +03:00
Ivan Timokhin
e1a2115bbe Change arrays into tuples to force loop unrolling 2015-07-16 00:51:32 +03:00
Ivan Timokhin
96227bde13 Rewrite to use union repainting instead of pointer casts 2015-07-16 00:01:03 +03:00