about summary refs log tree commit diff
path: root/src/libnum/complex.rs
AgeCommit message (Collapse)AuthorLines
2014-09-23Deprecate `#[ignore(cfg(...))]`Steven Fackler-1/+1
Replace `#[ignore(cfg(a, b))]` with `#[cfg_attr(all(a, b), ignore)]`
2014-08-29complex: use `///...` instead of `/**...*/` for commentVinzent Steinberg-4/+2
2014-08-29num: implement `Hash` for `Complex` and `Ratio`Vinzent Steinberg-3/+14
2014-08-14Add a test for complex divide by zero.Jonas Hietala-0/+8
2014-07-08std: Rename the `ToStr` trait to `ToString`, and `to_str` to `to_string`.Richo Healey-2/+2
[breaking-change]
2014-06-06Change to_str().to_string() to just to_str()Adolfo OchagavĂ­a-1/+1
2014-05-30std: Rename {Eq,Ord} to Partial{Eq,Ord}Alex Crichton-3/+3
This is part of the ongoing renaming of the equality traits. See #12517 for more details. All code using Eq/Ord will temporarily need to move to Partial{Eq,Ord} or the Total{Eq,Ord} traits. The Total traits will soon be renamed to {Eq,Ord}. cc #12517 [breaking-change]
2014-05-28std: Remove format_strbuf!()Alex Crichton-6/+6
This was only ever a transitionary macro.
2014-05-27std: Rename strbuf operations to stringRicho Healey-8/+8
[breaking-change]
2014-05-24core: rename strbuf::StrBuf to string::StringRicho Healey-2/+2
[breaking-change]
2014-05-22libstd: Remove `~str` from all `libstd` modules except `fmt` and `str`.Patrick Walton-3/+7
2014-05-21Remove two outdated FIXMEs from complex.rsPiotr Jawniak-4/+0
2014-05-15Updates with core::fmt changesAlex Crichton-2/+2
1. Wherever the `buf` field of a `Formatter` was used, the `Formatter` is used instead. 2. The usage of `write_fmt` is minimized as much as possible, the `write!` macro is preferred wherever possible. 3. Usage of `fmt::write` is minimized, favoring the `write!` macro instead.
2014-05-15core: Move intrinsic float functionality from stdAlex Crichton-2/+2
The Float trait in libstd is quite a large trait which has dependencies on cmath (libm) and such, which libcore cannot satisfy. It also has many functions that libcore can implement, however, as LLVM has intrinsics or they're just bit twiddling. This commit moves what it can of the Float trait from the standard library into libcore to allow floats to be usable in the core library. The remaining functions are now resident in a FloatMath trait in the standard library (in the prelude now). Previous code which was generic over just the Float trait may now need to be generic over the FloatMath trait. [breaking-change]
2014-05-14libnum: Remove all uses of `~str` from `libnum`Patrick Walton-9/+9
2014-05-12num: rename Cmplx to ComplexCorey Richardson-53/+53
Cmplx is a uselessly short name. Change it to be more clear. [breaking-change]
2014-04-22auto merge of #13597 : bjz/rust/float-api, r=brsonbors-2/+2
This pull request: - Merges the `Round` trait into the `Float` trait, continuing issue #10387. - Has floating point functions take their parameters by value. - Cleans up the formatting and organisation in the definition and implementations of the `Float` trait. More information on the breaking changes can be found in the commit messages.
2014-04-19Have floating point functions take their parameters by value.Brendan Zabarauskas-2/+2
Make all of the methods in `std::num::Float` take `self` and their other parameters by value. Some of the `Float` methods took their parameters by value, and others took them by reference. This standardises them to one convention. The `Float` trait is intended for the built in IEEE 754 numbers only so we don't have to worry about the trait serving types of larger sizes. [breaking-change]
2014-04-18Replace all ~"" with "".to_owned()Richo Healey-7/+7
2014-04-01make Cmplx fields publicTed Horst-2/+2
2014-03-28Convert most code to new inner attribute syntax.Brian Anderson-1/+1
Closes #2569
2014-03-13Implement automatic overloaded dereference.Eduard Burtescu-1/+1
Closes #7141.
2014-02-23Remove all ToStr impls, add Show implsAlex Crichton-4/+5
This commit changes the ToStr trait to: impl<T: fmt::Show> ToStr for T { fn to_str(&self) -> ~str { format!("{}", *self) } } The ToStr trait has been on the chopping block for quite awhile now, and this is the final nail in its coffin. The trait and the corresponding method are not being removed as part of this commit, but rather any implementations of the `ToStr` trait are being forbidden because of the generic impl. The new way to get the `to_str()` method to work is to implement `fmt::Show`. Formatting into a `&mut Writer` (as `format!` does) is much more efficient than `ToStr` when building up large strings. The `ToStr` trait forces many intermediate allocations to be made while the `fmt::Show` trait allows incremental buildup in the same heap allocated buffer. Additionally, the `fmt::Show` trait is much more extensible in terms of interoperation with other `Writer` instances and in more situations. By design the `ToStr` trait requires at least one allocation whereas the `fmt::Show` trait does not require any allocations. Closes #8242 Closes #9806
2014-02-17Remove Real trait and move methods into FloatBrendan Zabarauskas-6/+6
This is part of the effort to simplify `std::num`, as tracked in issue #10387.
2014-02-11Factoring bigint, rational, and complex out of libextra into libnum.Felix S. Klock II-0/+361
Removed use of globs present in earlier versions of modules. Fix tutorial.md to reflect `extra::rational` ==> `num::rational`.