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
Lars T. Kyllingstad
c80bb85897
std.complex: Minor doc improvement
2012-05-01 11:54:56 +02:00
Lars T. Kyllingstad
03295d1ebc
Added std.complex.expi()
...
Also added Don as author, since there are several functions in
std.complex, including expi(), that are copied more or less verbatim
from std.math.
2012-05-01 10:44:15 +02:00
Lars T. Kyllingstad
34bc329af8
std.complex: Cleanup
...
Moved some stuff around, removed some extraneous whitespace, made
function documentation more consistent.
2012-05-01 10:27:26 +02:00
Lars T. Kyllingstad
5b4351d425
std.complex: Moved abs, arg & conj to module level
...
Backwards compatibility is preserved through the magic of UFCS.
2012-05-01 10:10:30 +02:00
k-hara
1673bc594e
fix sink to scope
2011-09-05 09:32:29 +09:00
Lars T. Kyllingstad
69e8663fc1
Add sin(), cos() and sqrt() to std.complex
...
This also requires std.math.coshisinh() to be accessible to std.complex,
so I changed its protection attribute to "package".
2011-08-24 14:55:45 +02:00
jmdavis
302323559a
Revert "not really pure"
...
This reverts commit 4f28db6ffb
.
Since Walter put weakly pure back in, these changes need to be undone.
Conflicts:
std/datetime.d
2011-07-07 01:40:07 -07:00