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
Walter Bright
4f28db6ffb
not really pure
2011-06-25 19:58:09 -07:00
Lars T. Kyllingstad
02e88f30eb
Make complex() @safe pure nothrow
2011-06-13 19:10:05 +02:00
Lars T. Kyllingstad
f7c2582eec
Improved complex() examples
2011-06-13 19:06:05 +02:00
Lars T. Kyllingstad
cf88c755b6
Add std.complex.complex()
2011-06-13 17:32:41 +02:00
Lars T. Kyllingstad
6462b0cfaa
Complex: opAssign and opOpAssign return by ref
...
This was impossible earlier due to bug 2460, which has now been fixed.
2011-04-26 18:44:17 +02:00
Walter Bright
046e1b36db
add source links
2011-02-06 15:46:50 -08:00
Lars T. Kyllingstad
ad2f13cc8a
All of std.complex (except toString()) is now @safe pure nothrow.
2010-11-12 07:53:40 +00:00
Walter Bright
b8ce58ccd1
detab sources
2010-08-23 02:14:45 +00:00
Lars T. Kyllingstad
4de804f614
Applied pure and nothrow to std.complex. To make this work, I had to add a few nothrows to std.math.pow() as well.
2010-08-13 09:58:13 +00:00
Lars T. Kyllingstad
2b4433e174
Changed Complex.toString() to take a delegate, and also to allow calling it without parameters.
2010-07-14 11:36:07 +00:00
Andrei Alexandrescu
536cb93d9c
Fixed issue in Appender
2010-07-06 05:34:59 +00:00
Walter Bright
f18ec20cb4
update for change in opOpAssign
2010-05-22 01:38:28 +00:00
Lars T. Kyllingstad
4b5f350137
Complete redesign of std.complex
2010-04-20 13:13:11 +00:00
Sean Kelly
747f3cf1e4
Changed Phobos to use the Boost license. Currently, all public domain modules and all licensed modules by Walter, Andrei, Bartosz, and Don have been changed to use this license (excepting std.c, for the moment). Ideally, all Phobos modules will eventually be distributed under this license, which means obtaining permission from a few more authors, deleting, or rewriting some modules.
...
Removed std.openrj.
2009-09-16 18:19:51 +00:00
Andrei Alexandrescu
e4e66b0d88
commented failing unittest
2009-04-06 20:39:35 +00:00
Andrei Alexandrescu
7d5b1ed849
added complex and iterator modules
2008-02-19 07:02:13 +00:00