Commit graph

330 commits

Author SHA1 Message Date
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
Ivan Timokhin
54edaa1351 Change parameter types to const to avoid template bloat. 2015-07-15 23:21:13 +03:00
Ivan Timokhin
87a4b107d1 Fix pointer conversion in 'real' branch 2015-07-15 23:14:52 +03:00
Ivan Timokhin
e1a80d7cf1 Relax return value requirements in the ddoc comment 2015-07-15 23:13:16 +03:00
Ivan Timokhin
24129bcbbb Rewrite test runner for consistency. 2015-07-15 22:46:17 +03:00
Ivan Timokhin
68762b746e Got rid of if-else nesting. 2015-07-15 22:46:16 +03:00
Ivan Timokhin
843d14f913 Styling.
Removed ?: chains and braces around single statements.
2015-07-15 22:46:16 +03:00
Ivan Timokhin
1de499f0ff Changed to do three-way comparison. 2015-07-15 22:46:16 +03:00
Ivan Timokhin
cb57d23089 Total ordering for floating-point values. 2015-07-15 22:46:16 +03:00
Dmitry Olshansky
db4d872d6e Merge pull request #3011 from 9il/float-traits
std.math: №1, change protection
2015-07-15 21:31:02 +03:00
Martin Nowak
eaeeccd4ac workaround Issue 14718 - float parsing depends on platform strtold
- comment out the affected unittests for now
2015-06-21 16:36:37 +02:00
Andrei Alexandrescu
a0ccc918d6 Merge pull request #3351 from rainers/trail_whitespace
remove trailing whitespace, detab, tolf
2015-05-31 19:12:25 -07:00
Rainer Schuetze
adab223837 remove trailing whitespace, detab, tolf 2015-05-31 11:24:01 +02:00
Daniel Murphy
ebc90dc149 Merge pull request #2657 from joakim-noah/separate_glibc
Separate linux kernel, glibc, and bionic APIs where appropriate
2015-05-30 08:22:30 -06:00
Robert burner Schadek
a3fc53e601 math: alias syntax update 2015-05-28 18:52:01 +02:00
Joakim
3352c90c2e Separate linux kernel, glibc, and bionic APIs where appropriate 2015-05-27 21:54:52 -05:00
Clement Courbet
e5613663dc Make isNan and isInfinite available at compile time. 2015-05-22 14:34:28 +02:00
David Nadlinger
f640df12e4 Merge pull request #3298 from smolt/arm-fpscr
ARM FPSCR bit corrections
2015-05-20 15:42:49 +02:00
Dan Olson
cc8a3e1e0d ARM FPSCR bit corrections
Correct IeeeFlags exception masks and FloatingPointControl
RoundingModes for ARM.
2015-05-19 23:24:15 -07:00
Walter Bright
e1f1838a52 Merge pull request #3287 from BBasile/fix-misleading-math-isSomething
fix several misleading ddocs and return types in the function isXXX()
2015-05-19 20:23:51 -07:00
Martin
70e5e942a0 std.math: proper support for 64-bit real in exp() 2015-05-17 20:30:43 +02:00
Martin
a514ac9686 std.math: refactor feqrel() incl. subnormal fix
For subnormal diffs, the old code used the whole ushort containing
the exponent bits as exponent, without masking and shifting. This
seems to have worked for 80-bit reals so far and the single unit-
test was only enabled for x87 reals.
2015-05-17 20:30:43 +02:00
Daniel Murphy
972c9485b6 Merge pull request #3293 from redstar/mathsqrt
Add additional tests for std.math.sqrt()
2015-05-17 23:48:11 +10:00
kai
d29d5d4130 Add additional tests for std.math.sqrt()
These tests spotted an implementation issue of LDC.

Provided by KevinBrogan.
2015-05-17 14:18:46 +02:00
kai
d3c6757286 Add missing EXPBIAS value for 128bit floats.
Found this source for the value: http://en.wikipedia.org/wiki/Quadruple-precision_floating-point_format
2015-05-17 13:51:20 +02:00
Basile Burg
94566c4c27 style, ddoc
+ removed note about isSubnormal() implementation that's not relevant for the end user since there are no public overloads.
2015-05-17 09:07:48 +02:00
Basile Burg
ef134e6d0d fix several misleading ddocs and return types in the function isXXX()
their results are always of type  bool.
2015-05-16 09:46:07 +02:00
Walter Bright
d9a9826e55 Revert "Introducing std.meta package" 2015-05-06 14:36:45 -07:00
Dicebot
82f54a38d3 TypeTuple -> MetaList inside Phobos 2015-05-05 22:22:11 +03:00
Dicebot
73f773838d import std.typetuple -> import std.meta 2015-05-05 22:22:10 +03:00
Johan Engelen
b9239bfa38 Add unittests for std.math.ilogb 2015-04-12 18:55:05 +02:00
Johan Engelen
f841c91aac Fix bug in std.math.ilogb in CRuntime_Microsoft path. 2015-04-12 16:49:26 +02:00
Ilya Yaroshenko
5bbceb4b65 fixAfter #3014 2015-04-08 13:31:36 +03:00
Robert Schadek
e5f9e078a7 Merge pull request #3014 from 9il/intrinsic
std.math: №4, workaround for intrinsics
2015-04-08 12:07:12 +02:00
Johan Engelen
723e894c9a Fix compilation.
The errors were:
- phobos/std/math.d(2599): Error: only global variables can be referenced by identifier in naked asm
- phobos/std/math.d(2611): Error: only global variables can be referenced by identifier in naked asm
- phobos/std/math.d(2612): Error: only global variables can be referenced by identifier in naked asm
2015-04-06 15:38:48 +02:00
Martin
9be862c931 Fix an std.math.poly() unit test.
The expression (6L * x) with 6 being a long literal (instead of an
intended real literal) and x of type double evaluates to a double,
while poly() uses real precision.
2015-04-04 14:34:27 +02:00