Iain Buclaw
1ca6addba8
std.complex: Relax unittests for FreeBSD x86 53-bit precision reals
2020-11-24 12:21:37 +01:00
Iain Buclaw
dd2edb247f
Synchronize dmd-cxx with gdc-stable
2019-01-05 14:10:15 +01:00
Vladimir Panteleev
d0b9555a06
Revert "Sort selective imports"
...
This reverts commit 998ad51fd7
.
2017-06-13 17:51:52 +00:00
Sebastian Wilzbach
998ad51fd7
Sort selective imports
2017-06-12 08:12:09 +02:00
Sebastian Wilzbach
61717ecc7d
Sort imports
2017-06-12 07:54:38 +02:00
John Colvin
7eafb6d539
fix im 0 init placement info for complex
2017-05-31 11:22:45 +01:00
John Colvin
81f1c582da
document std.complex .im 0 initialization
2017-05-31 09:49:14 +01:00
Sebastian Wilzbach
425ab667a3
Automatically set the range style from a..b -> a .. b
...
Commands:
sed -E "s/([[:alnum:]])[.][.]([[:alnum:]])/\1 .. \2/g" -i **/*.d
sed -E "s/([[:alnum:]])[.][.] ([[:alnum:]])/\1 .. \2/g" -i **/*.d
sed -E "s/([[:alnum:]]) [.][.]([[:alnum:]])/\1 .. \2/g" -i **/*.d
2017-02-22 05:37:31 +01:00
Sebastian Wilzbach
5521541032
Unify assert style to have no spaces between the first brace
...
Application of:
sed -E "s/assert +\(/assert(/" -i **/*.d
2017-02-21 15:27:15 +01:00
Sebastian Wilzbach
87dec58a41
DStyle: Constraints on declarations should have the same indentation level
2017-02-17 07:36:23 +01:00
Robert burner Schadek
29135bd846
std.complex unittest safe pure
...
* all tests are safe
* most are pure
* 99% test coverage
2016-06-30 15:58:33 +02:00
Atila Neves
519100ff63
Add @safe to std.complex unittests
2016-06-29 18:57:56 +02:00
Walter Bright
96884bb095
switch complex.toString to use Writer instead of sink
2016-06-26 14:49:28 -07:00
Sebastian Wilzbach
ec47ac4224
Remove the WEB macro in favor of HTTP
...
replacement: sed 's/\$(WEB/\$(HTTP/g' -i **/*.d
2016-06-16 00:14:51 +02:00
Sebastian Wilzbach
1d34a121e9
apply all-man braces in Phobos
...
// find common cases
sed -E "s/^(\s*)((if|static if|for|foreach|foreach_reverse|while|unittest|switch|else|version).*)\s*\{$/\1\2\n\1{/" -i **/*.d
// catch else-if
sed -E "s/^(\s*)} (else static if| if|else if|else)(.*)\s*\{$/\1}\n\1\2\3\n\1{/" -i **/*.d
// remove created trailing whitespace
sed -i 's/[ \t]*$//' **/*.d
2016-05-31 13:07:53 +02:00
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
anonymous
764caefa36
XREF -> REF (sed)
...
Done by:
(find . -type f -name "*.d" -print0; \
find . -type f -name "*.dd" -print0) | \
xargs -0 sed -i -r \
's/\$\(XREF\s+([^(),]*),\s*([^(),]*)\)/$(REF \2, std,\1)/g'
2016-05-27 21:32:46 +02:00
Sebastian Wilzbach
89a2dd5f11
use mref macro instead of link2
2016-05-16 03:30:08 +03:00
Steven Schveighoffer
7be2a35045
Switch some static imports to selective.
2016-02-22 17:06:29 -05:00
Steven Schveighoffer
b0acb7a394
Fix remaining import deprecation messages
2016-02-22 16:03:12 -05:00
anonymous
6832caf0be
use DDLINK/DDSUBLINK instead of LINK2 and raw HTML
...
DDLINK/DDSUBLINK use ROOT_DIR which is more robust than a relative path.
2015-11-26 16:04:44 +01:00
H. S. Teoh
7d22b3e021
[dox] Improve std.complex ddocs.
...
Add `Params:` and `Returns:`, make unittests ddoc'd examples.
2015-08-25 17:41:38 -07:00
Joseph Rushton Wakeling
24c13a6e52
Document std.complex.complex with Params and Returns
...
The template parameters have been included (with note) in the main
Params list. The single-parameter version has had its template
parameter name tweaked for consistency.
2015-03-22 15:14:46 +01:00
k-hara
e7b3d834d7
detab and remove trailing whitespaces
2015-02-10 00:56:40 +09:00
Robert burner Schadek
90152e76fb
example moved fom comment to unittest
2015-01-20 13:21:59 +01:00
Ilya Yaroshenko
c8d9afedea
clean scope imports
...
imports of `std.range, std.algorithm, std.array, std.string,
std.format, std.uni` are affected.
2014-11-21 00:08:35 +03:00
H. S. Teoh
31fa941b65
Fix missing local import in std.math.expi.
2014-11-17 10:51:41 -08:00
Ilya Yaroshenko
83f9e0fbef
std.complex: clean imports
2014-11-14 14:59:16 +03:00
Ilya Yaroshenko
bb98c11236
std.complex: clean imports
2014-11-07 00:40:19 +03:00
Martin Nowak
5f9b77a5b7
Merge pull request #2637 from 9il/fptemp
...
remove FPTemporary usage
2014-11-06 15:19:42 +01:00
jmdavis
76df657bb4
Move some deprecations along.
2014-10-26 19:31:08 -07:00
Ilya Yaroshenko
9b20fb00b3
remove FPTemporary usage
2014-10-25 00:43:27 +04:00
Jean-Loup Tastet
3b2fb2ea51
Enhancement request 13022: add std.complex.sqAbs
...
Add `std.complex.abs2`, which returns the squared modulus of a
`Complex` or real number.
Rationale:
* It is common to need the squared modulus of a complex number,
and using `abs(z)*abs(z)` would be inefficient due to the
computation of the square root.
* The name `abs2` has been chosen for consistency with `abs`, and
for being mathematically more correct than `norm`, used by C++ STL
for the equivalent function.
* For genericity, the function `abs2` is also declared for real
floating point numbers, in which case it simply returns its
square.
UPDATE: use `sqAbs` instead of `abs2`.
2014-07-03 18:47:06 +02:00
k-hara
c90ef1b823
Mark some unittest blocks deprecated to suppress messages during Phobos build
2014-06-29 15:52:06 +09:00
monarch dodra
dbf108b451
Merge pull request #2145 from WalterBright/nogc-complex
...
@nogc for std.complex
2014-05-19 15:57:52 +02:00
monarchdodra
d609bd332f
Sed "@safe pure nothrow"
2014-05-06 08:21:13 +02:00
Walter Bright
06005934ea
@nogc for std.complex
2014-05-05 23:14:28 -07:00
Marc Schütz
f94f858661
Remove DDOC comment from deprecated Complex(T).toString() with sink and format string
2014-04-28 22:16:25 +02:00
k-hara
b391b2ec9f
Convert to new alias syntax
2014-02-11 15:27:05 +09:00
Joseph Rushton Wakeling
8e26e2d8ce
Complex.opBinaryRight for numeric types, to allow numeric ^^ complex operations.
...
The current design takes advantage of the fact that we know
we're dealing with a number whose argument is either 0 or PI.
An alternative design would be to just create a complex number
whose real part is equal to the input, and then raise it to
the power of this:
return typeof(return)(lhs, 0) ^^ this;
This would generate probably less precisely calculated values
but would be 100% consistent with complex ^^ complex calculations.
2013-12-09 16:18:11 +01:00
Joseph Rushton Wakeling
1d04bb2883
Correct docs & deprecation message in std.complex.
...
Reference to std.format.format [sic!] should be to std.string.format.
I've also taken the opportunity to slightly clean up the module's
import statements and some whitespace errors.
2013-11-27 19:48:54 +01:00
H. S. Teoh
3bdb1a1a04
Add TODO to make toString() pure @safe nothrow
...
I tried each of those qualifiers but none of them compiled due to the
way std.format works right now. So leave it for the future.
2013-08-29 08:13:18 -07:00
H. S. Teoh
108e223aa8
Add deprecation date.
...
Improve documentation for new toString.
2013-08-28 09:47:39 -07:00
H. S. Teoh
fe75e2da57
Implement toString that supports %f.
2013-08-27 15:06:59 -07:00
Maksim Zholudev
494e6bd35e
Improved unittest
2012-12-13 14:20:48 +01:00
Maksim Zholudev
b5ff933a19
Added unittest
2012-12-13 10:44:32 +01:00
Maksim Zholudev
7a7aeb7eb3
Added initialization of e.g. Complex!double with Complex!real
2012-12-12 14:48:17 +01:00
Maksim Zholudev
14d3359396
Fixed for the case of different types of real and imaginary parts.
2012-12-12 14:40:32 +01:00
Maksim Zholudev
1970cb6cc6
Added possibility to initialize complex numbers with "real" types
2012-12-12 14:29:50 +01:00
Lars T. Kyllingstad
029440c2f9
Removed asm code from std.complex.expi()
2012-05-11 19:08:12 +02:00