Isaac Carruthers
b29c13e54f
Remove unnecessary PartialOrd constraint on new Rem implementation.
2017-09-11 17:13:01 -04:00
Isaac Carruthers
263bd0ec44
Switch to using a simpler scheme for complex remainders
2017-08-22 16:14:36 -04:00
Isaac Carruthers
42a6ae5353
Extract common logic for from_str and from_str_radix for `Complex`
2017-08-22 14:27:43 -04:00
Isaac Carruthers
41d6a32dba
Removed extraneous where clauses
2017-08-10 11:11:31 -04:00
Isaac Carruthers
2dcb722007
Merge remote-tracking branch 'upstream/master'
2017-08-09 18:10:54 -04:00
Isaac Carruthers
1b671ca43e
Add general Rem and Num implementations for Complex<T>
2017-08-08 21:52:43 -04:00
Josh Stone
846ef39ba6
complex: bump to 0.1.40 with fixed traits dep
2017-07-23 21:24:34 -07:00
bors[bot]
a8ebac5af1
Merge #317
...
317: Feature/complex from str r=cuviper
This commit adds a basic parser for Complex types in Cartesian form, per https://github.com/rust-num/num/issues/289 . It will take numbers of the form `a + bi`, `ai + b`, `a - bi`, `ai - b`, `a`, or `ai`. At least one space between the real/imaginary parts and the operator is mandatory; without bringing in a dependency on some regex crate, it's nontrivial to handle cases like, e.g., 0.217828e+1+31.4159E-1, or a similar case with polar coordinates. I could work on these issues later if you like.
2017-07-19 22:19:24 +00:00
Josh Stone
ee6bbdb2f6
complex: refactor ParseComplexError a little
2017-07-19 15:16:34 -07:00
Josh Stone
bd22a89a32
complex: Simplify the from_str signature
2017-07-19 12:49:03 -07:00
Josh Stone
79c7a4be5f
complex: relax the FromStr trait requirements even more
2017-07-19 12:47:07 -07:00
Alan Liddell
16a180f132
simplifies parse loop, allows leading '+', parametrizes Error on T::Err
2017-07-19 06:03:05 -04:00
Alan Liddell
add0fbf0f0
More informative error messages for complex::from_str
2017-07-16 15:20:50 -04:00
Alan Liddell
38ee1304bb
Cleaned out some allocations
2017-07-16 09:51:55 -04:00
Josh Stone
11a23dd5d7
complex: bump to 0.1.39
2017-07-14 17:33:58 -07:00
Alan Liddell
97e6d45d03
Adds more tests, including failure cases
2017-07-13 14:50:27 -04:00
Alan Liddell
14d323f5a3
Allows 'j' for imaginary unit
2017-07-13 14:13:04 -04:00
Alan Liddell
ac746c2a5d
Allows for arbitrary spacing between operands when parsing Complex
2017-07-13 14:05:44 -04:00
bors[bot]
d159ed63be
Merge #320
...
320: complex: implement real ops directly r=cuviper
It's more efficient to implement these without creating an intermediate
complex value -- at the least, we don't have to rely on the compiler
optimizing out zero-ops.
2017-07-12 22:03:07 +00:00
Josh Stone
f06f5c548e
complex: implement real ops directly
...
It's more efficient to implement these without creating an intermediate
complex value -- at the least, we don't have to rely on the compiler
optimizing out zero-ops.
2017-07-12 14:37:50 -07:00
Josh Stone
d57c0c2879
complex: implement add/sub_assign directly
2017-07-12 13:59:30 -07:00
Josh Stone
055c6693b1
complex: require T:NumAssign for assign ops
2017-07-12 13:54:57 -07:00
bluss
686411f44e
complex: Add tests for OpAssign
...
Add tests by expanding the current a + b tests to include a += b, and so
on.
2017-07-12 13:48:12 -07:00
bluss
3ec194bafb
complex: implement OpAssign for Complex<T>
2017-07-12 13:48:12 -07:00
Keith Wansbrough
ef83e851e7
Add keywords and categories to subcrates too.
2017-07-11 09:30:42 +01:00
Alan Liddell
e5e8266009
handles case where imaginary part is just 'i' or '-i', adds tests
2017-07-10 09:51:46 -04:00
Alan Liddell
506fbaf4e7
swap 'Some(u)' out for '_' to suppress unused variable warnings
2017-07-10 08:09:49 -04:00
Alan Liddell
3c490cdee4
adds basic parser for complex numbers in Cartesian form
2017-07-10 05:57:38 -04:00
Josh Stone
9a9765a1db
complex: bump to 0.1.38
2017-06-08 23:46:08 -07:00
Josh Stone
1b895a8632
Get the default hasher indirectly
...
`DefaultHasher` wasn't stable until 1.13, at which point all the other
hashers were deprecated, so it's not easy for us to name a hasher type
to use for testing. However, `RandomState` has been stable since 1.7,
and it implements `BuildHasher` that has a `Hasher` associated type.
2017-05-06 22:23:31 -07:00
Patrick Jackson
71a15212a1
Replace deprecated SipHasher.
2017-04-28 18:48:50 -07:00
Josh Stone
fca95eaf42
num-complex-0.1.37
2017-04-09 06:18:09 -07:00
bluss
0cf3419b9e
complex: Use repr(C) and add documentation for what it means
2017-04-04 06:48:35 +02:00
Sigurd Kolltveit
2784b89837
Remove support for zero padding
2017-03-20 19:04:17 +01:00
Sigurd Kolltveit
e044cfbc6d
Simplify some lines
2017-03-18 17:24:00 +01:00
Sigurd Kolltveit
69943915ba
Add more string formatting tests
2017-03-18 16:04:53 +01:00
Sigurd Kolltveit
e2759e0321
Implement more formatting options for Complex
2017-03-18 16:04:53 +01:00
Sigurd Kolltveit
6113192e04
Add tests for more formatting options
2017-03-18 16:04:53 +01:00
Sigurd Kolltveit
f138f3da9e
Add formatting options for Complex
2017-03-18 16:04:53 +01:00
Josh Stone
1a66ee9e80
Add licenses to subcrates
2017-02-26 13:39:23 -08:00
Josh Stone
5531031252
complex: derive Eq
...
Fixes #245 .
2016-12-05 23:11:40 -08:00
bluss
ff2a350e98
Use the integer32 playground
2016-11-02 19:51:10 +01:00
bluss
e4a6956e5a
Add doc(html_root_url) and other doc attrs to each crate
...
Also update to use https instead of http. This avois mixed content
degradation on docs.rs.
The doc root URLs are correct as they are, the URL does not include the
crate name itself.
2016-11-01 02:14:23 +01:00
Josh Stone
c8ed8ff87b
num, bigint, complex, rational, traits: 0.1.35
2016-08-18 08:28:34 -07:00
Richard Janis Goldschmidt
a4ccb797cf
Allow serde version in [0.7,0.9)
2016-08-17 12:20:08 +02:00
Josh Stone
18b3cb425d
complex: bump to 0.1.33
2016-07-12 01:10:37 -07:00
Adam Crume
c7c974ec4b
Implement Default for Complex
...
Fixes #198
2016-06-29 18:33:19 -07:00
Richard Janis Goldschmidt
c8543380ea
Remove `use`ing serde. Import through `extern crate` is enough
2016-06-13 15:46:56 +02:00
Christian Liebhardt
24fcc1575a
Added powc, powf, log and expf methods for complex numbers
2016-04-15 11:28:43 -07:00
Josh Stone
dc733b1402
complex: add path-dependency versions
2016-04-14 00:29:19 -07:00