summaryrefslogtreecommitdiffstats
path: root/rust/vendor/num
diff options
context:
space:
mode:
Diffstat (limited to 'rust/vendor/num')
-rw-r--r--rust/vendor/num/.cargo-checksum.json1
-rw-r--r--rust/vendor/num/Cargo.toml62
-rw-r--r--rust/vendor/num/LICENSE-APACHE201
-rw-r--r--rust/vendor/num/LICENSE-MIT25
-rw-r--r--rust/vendor/num/README.md124
-rw-r--r--rust/vendor/num/RELEASES.md62
-rw-r--r--rust/vendor/num/src/lib.rs115
7 files changed, 590 insertions, 0 deletions
diff --git a/rust/vendor/num/.cargo-checksum.json b/rust/vendor/num/.cargo-checksum.json
new file mode 100644
index 0000000..b9fb13b
--- /dev/null
+++ b/rust/vendor/num/.cargo-checksum.json
@@ -0,0 +1 @@
+{"files":{"Cargo.toml":"4ce08f1624b297eecf05340b4fe1c0ae53d0d0e30287ebf20b677379e7722b98","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"6df9fdf7ad297e5bc448129b55ae76169f89f8d04aada688b6f82a16fe3399b0","RELEASES.md":"40bc428700aa1a6b614ec572ebd74ec05a7419759675163d14d301a2f825a3e8","src/lib.rs":"64843c8ed75f4940e70f45bfd8d67510b565c39dc0455729c13ced11deb71410"},"package":"b8536030f9fea7127f841b45bb6243b27255787fb4eb83958aa1ef9d2fdc0c36"} \ No newline at end of file
diff --git a/rust/vendor/num/Cargo.toml b/rust/vendor/num/Cargo.toml
new file mode 100644
index 0000000..f496f25
--- /dev/null
+++ b/rust/vendor/num/Cargo.toml
@@ -0,0 +1,62 @@
+# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
+#
+# When uploading crates to the registry Cargo will automatically
+# "normalize" Cargo.toml files for maximal compatibility
+# with all versions of Cargo and also rewrite `path` dependencies
+# to registry (e.g., crates.io) dependencies
+#
+# If you believe there's an error in this file please file an
+# issue against the rust-lang/cargo repository. If you're
+# editing this file be aware that the upstream Cargo.toml
+# will likely look very different (and much more reasonable)
+
+[package]
+name = "num"
+version = "0.2.1"
+authors = ["The Rust Project Developers"]
+exclude = ["/ci/*", "/.travis.yml", "/bors.toml"]
+description = "A collection of numeric types and traits for Rust, including bigint,\ncomplex, rational, range iterators, generic integers, and more!\n"
+homepage = "https://github.com/rust-num/num"
+documentation = "https://docs.rs/num"
+readme = "README.md"
+keywords = ["mathematics", "numerics", "bignum"]
+categories = ["algorithms", "data-structures", "science", "no-std"]
+license = "MIT/Apache-2.0"
+repository = "https://github.com/rust-num/num"
+[package.metadata.docs.rs]
+features = ["std", "serde", "rand"]
+[dependencies.num-bigint]
+version = "0.2.5"
+optional = true
+default-features = false
+
+[dependencies.num-complex]
+version = "0.2.4"
+default-features = false
+
+[dependencies.num-integer]
+version = "0.1.42"
+default-features = false
+
+[dependencies.num-iter]
+version = "0.1.40"
+default-features = false
+
+[dependencies.num-rational]
+version = "0.2.3"
+default-features = false
+
+[dependencies.num-traits]
+version = "0.2.11"
+default-features = false
+
+[dev-dependencies]
+
+[features]
+default = ["std"]
+i128 = ["num-bigint/i128", "num-complex/i128", "num-integer/i128", "num-iter/i128", "num-rational/i128", "num-traits/i128"]
+rand = ["num-bigint/rand", "num-complex/rand"]
+serde = ["num-bigint/serde", "num-complex/serde", "num-rational/serde"]
+std = ["num-bigint/std", "num-complex/std", "num-integer/std", "num-iter/std", "num-rational/std", "num-rational/bigint", "num-traits/std"]
+[badges.travis-ci]
+repository = "rust-num/num"
diff --git a/rust/vendor/num/LICENSE-APACHE b/rust/vendor/num/LICENSE-APACHE
new file mode 100644
index 0000000..16fe87b
--- /dev/null
+++ b/rust/vendor/num/LICENSE-APACHE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+Copyright [yyyy] [name of copyright owner]
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
diff --git a/rust/vendor/num/LICENSE-MIT b/rust/vendor/num/LICENSE-MIT
new file mode 100644
index 0000000..39d4bdb
--- /dev/null
+++ b/rust/vendor/num/LICENSE-MIT
@@ -0,0 +1,25 @@
+Copyright (c) 2014 The Rust Project Developers
+
+Permission is hereby granted, free of charge, to any
+person obtaining a copy of this software and associated
+documentation files (the "Software"), to deal in the
+Software without restriction, including without
+limitation the rights to use, copy, modify, merge,
+publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software
+is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice
+shall be included in all copies or substantial portions
+of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
+ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
+TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
+SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
+IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
diff --git a/rust/vendor/num/README.md b/rust/vendor/num/README.md
new file mode 100644
index 0000000..6051ecc
--- /dev/null
+++ b/rust/vendor/num/README.md
@@ -0,0 +1,124 @@
+# num
+
+[![crate](https://img.shields.io/crates/v/num.svg)](https://crates.io/crates/num)
+[![documentation](https://docs.rs/num/badge.svg)](https://docs.rs/num)
+![minimum rustc 1.15](https://img.shields.io/badge/rustc-1.15+-red.svg)
+[![Travis status](https://travis-ci.org/rust-num/num.svg?branch=master)](https://travis-ci.org/rust-num/num)
+
+A collection of numeric types and traits for Rust.
+
+This includes new types for big integers, rationals (aka fractions), and complex numbers,
+new traits for generic programming on numeric properties like `Integer`,
+and generic range iterators.
+
+`num` is a meta-crate, re-exporting items from these sub-crates:
+
+| Repository | Crate | Documentation |
+| ---------- | ----- | ------------- |
+| [`num-bigint`] | [![crate][bigint-cb]][bigint-c] | [![documentation][bigint-db]][bigint-d]
+| [`num-complex`] | [![crate][complex-cb]][complex-c] | [![documentation][complex-db]][complex-d]
+| [`num-integer`] | [![crate][integer-cb]][integer-c] | [![documentation][integer-db]][integer-d]
+| [`num-iter`] | [![crate][iter-cb]][iter-c] | [![documentation][iter-db]][iter-d]
+| [`num-rational`] | [![crate][rational-cb]][rational-c] | [![documentation][rational-db]][rational-d]
+| [`num-traits`] | [![crate][traits-cb]][traits-c] | [![documentation][traits-db]][traits-d]
+| ([`num-derive`]) | [![crate][derive-cb]][derive-c] | [![documentation][derive-db]][derive-d]
+
+Note: `num-derive` is listed here for reference, but it's not directly included
+in `num`. This is a `proc-macro` crate for deriving some of `num`'s traits.
+
+## Usage
+
+Add this to your `Cargo.toml`:
+
+```toml
+[dependencies]
+num = "0.2"
+```
+
+and this to your crate root:
+
+```rust
+extern crate num;
+```
+
+## Features
+
+This crate can be used without the standard library (`#![no_std]`) by disabling
+the default `std` feature. Use this in `Cargo.toml`:
+
+```toml
+[dependencies.num]
+version = "0.2"
+default-features = false
+```
+
+The `num-bigint` crate is only available when `std` is enabled, and the other
+sub-crates may have limited functionality when used without `std`.
+
+Implementations for `i128` and `u128` are only available with Rust 1.26 and
+later. The build script automatically detects this, but you can make it
+mandatory by enabling the `i128` crate feature.
+
+The `rand` feature enables randomization traits in `num-bigint` and
+`num-complex`.
+
+The `serde` feature enables serialization for types in `num-bigint`,
+`num-complex`, and `num-rational`.
+
+The `num` meta-crate no longer supports features to toggle the inclusion of
+the individual sub-crates. If you need such control, you are recommended to
+directly depend on your required crates instead.
+
+## Releases
+
+Release notes are available in [RELEASES.md](RELEASES.md).
+
+## Compatibility
+
+The `num` crate as a whole is tested for rustc 1.15 and greater.
+
+The `num-traits`, `num-integer`, and `num-iter` crates are individually tested
+for rustc 1.8 and greater, if you require such older compatibility.
+
+
+[`num-bigint`]: https://github.com/rust-num/num-bigint
+[bigint-c]: https://crates.io/crates/num-bigint
+[bigint-cb]: https://img.shields.io/crates/v/num-bigint.svg
+[bigint-d]: https://docs.rs/num-bigint/
+[bigint-db]: https://docs.rs/num-bigint/badge.svg
+
+[`num-complex`]: https://github.com/rust-num/num-complex
+[complex-c]: https://crates.io/crates/num-complex
+[complex-cb]: https://img.shields.io/crates/v/num-complex.svg
+[complex-d]: https://docs.rs/num-complex/
+[complex-db]: https://docs.rs/num-complex/badge.svg
+
+[`num-derive`]: https://github.com/rust-num/num-derive
+[derive-c]: https://crates.io/crates/num-derive
+[derive-cb]: https://img.shields.io/crates/v/num-derive.svg
+[derive-d]: https://docs.rs/num-derive/
+[derive-db]: https://docs.rs/num-derive/badge.svg
+
+[`num-integer`]: https://github.com/rust-num/num-integer
+[integer-c]: https://crates.io/crates/num-integer
+[integer-cb]: https://img.shields.io/crates/v/num-integer.svg
+[integer-d]: https://docs.rs/num-integer/
+[integer-db]: https://docs.rs/num-integer/badge.svg
+
+[`num-iter`]: https://github.com/rust-num/num-iter
+[iter-c]: https://crates.io/crates/num-iter
+[iter-cb]: https://img.shields.io/crates/v/num-iter.svg
+[iter-d]: https://docs.rs/num-iter/
+[iter-db]: https://docs.rs/num-iter/badge.svg
+
+[`num-rational`]: https://github.com/rust-num/num-rational
+[rational-c]: https://crates.io/crates/num-rational
+[rational-cb]: https://img.shields.io/crates/v/num-rational.svg
+[rational-d]: https://docs.rs/num-rational/
+[rational-db]: https://docs.rs/num-rational/badge.svg
+
+[`num-traits`]: https://github.com/rust-num/num-traits
+[traits-c]: https://crates.io/crates/num-traits
+[traits-cb]: https://img.shields.io/crates/v/num-traits.svg
+[traits-d]: https://docs.rs/num-traits/
+[traits-db]: https://docs.rs/num-traits/badge.svg
diff --git a/rust/vendor/num/RELEASES.md b/rust/vendor/num/RELEASES.md
new file mode 100644
index 0000000..e605ace
--- /dev/null
+++ b/rust/vendor/num/RELEASES.md
@@ -0,0 +1,62 @@
+# Release 0.2.1 (2019-01-09)
+
+- Updated all sub-crates to their latest versions.
+
+**Contributors**: @cuviper, @ignatenkobrain, @jimbo1qaz
+
+# Release 0.2.0 (2018-06-29)
+
+All items exported from `num-integer`, `num-iter`, and `num-traits` are still
+semver-compatible with those exported by `num` 0.1. If you have these as public
+dependencies in your own crates, it is not a breaking change to move to `num`
+0.2. However, this is not true of `num-bigint`, `num-complex`, or
+`num-rational`, as those exported items are distinct in this release.
+
+A few common changes are listed below, but most of the development happens in
+the individual sub-crates. Please consult their release notes for more details
+about recent changes:
+[`num-bigint`](https://github.com/rust-num/num-bigint/blob/master/RELEASES.md),
+[`num-complex`](https://github.com/rust-num/num-complex/blob/master/RELEASES.md),
+[`num-integer`](https://github.com/rust-num/num-integer/blob/master/RELEASES.md),
+[`num-iter`](https://github.com/rust-num/num-iter/blob/master/RELEASES.md),
+[`num-rational`](https://github.com/rust-num/num-rational/blob/master/RELEASES.md),
+and [`num-traits`](https://github.com/rust-num/num-traits/blob/master/RELEASES.md).
+
+### Enhancements
+
+- Updates to `num-integer`, `num-iter`, and `num-traits` are still compatible
+ with `num` 0.1.
+- 128-bit integers are supported with Rust 1.26 and later.
+- `BigInt`, `BigUint`, `Complex`, and `Ratio` all implement `Sum` and `Product`.
+
+### Breaking Changes
+
+- `num` now requires rustc 1.15 or greater.
+- `num-bigint`, `num-complex`, and `num-rational` have all been updated to 0.2.
+- It's no longer possible to toggle individual `num-*` sub-crates using cargo
+ features. If you need that control, please use those crates directly.
+- There is now a `std` feature, enabled by default, along with the implication
+ that building *without* this feature makes this a `#![no_std]` crate.
+ `num::bigint` is not available without `std`, and the other sub-crates may
+ have limited functionality.
+- The `serde` dependency has been updated to 1.0, still disabled by default.
+ The `rustc-serialize` crate is no longer supported by `num`.
+- The `rand` dependency has been updated to 0.5, now disabled by default. This
+ requires rustc 1.22 or greater for `rand`'s own requirement.
+
+**Contributors**: @CAD97, @cuviper, and the many sub-crate contributors!
+
+# Release 0.1.42 (2018-02-08)
+
+- [All of the num sub-crates now have their own source repositories][num-356].
+- Updated num sub-crates to their latest versions.
+
+**Contributors**: @cuviper
+
+[num-356]: https://github.com/rust-num/num/pull/356
+
+
+# Prior releases
+
+No prior release notes were kept. Thanks all the same to the many
+contributors that have made this crate what it is!
diff --git a/rust/vendor/num/src/lib.rs b/rust/vendor/num/src/lib.rs
new file mode 100644
index 0000000..5754139
--- /dev/null
+++ b/rust/vendor/num/src/lib.rs
@@ -0,0 +1,115 @@
+// Copyright 2014-2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+//! A collection of numeric types and traits for Rust.
+//!
+//! This includes new types for big integers, rationals, and complex numbers,
+//! new traits for generic programming on numeric properties like `Integer`,
+//! and generic range iterators.
+//!
+//! ## Example
+//!
+//! This example uses the BigRational type and [Newton's method][newt] to
+//! approximate a square root to arbitrary precision:
+//!
+//! ```
+//! extern crate num;
+//! # #[cfg(feature = "std")]
+//! # mod test {
+//!
+//! use num::FromPrimitive;
+//! use num::bigint::BigInt;
+//! use num::rational::{Ratio, BigRational};
+//!
+//! # pub
+//! fn approx_sqrt(number: u64, iterations: usize) -> BigRational {
+//! let start: Ratio<BigInt> = Ratio::from_integer(FromPrimitive::from_u64(number).unwrap());
+//! let mut approx = start.clone();
+//!
+//! for _ in 0..iterations {
+//! approx = (&approx + (&start / &approx)) /
+//! Ratio::from_integer(FromPrimitive::from_u64(2).unwrap());
+//! }
+//!
+//! approx
+//! }
+//! # }
+//! # #[cfg(not(feature = "std"))]
+//! # mod test { pub fn approx_sqrt(n: u64, _: usize) -> u64 { n } }
+//! # use test::approx_sqrt;
+//!
+//! fn main() {
+//! println!("{}", approx_sqrt(10, 4)); // prints 4057691201/1283082416
+//! }
+//!
+//! ```
+//!
+//! [newt]: https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method
+//!
+//! ## Compatibility
+//!
+//! The `num` crate is tested for rustc 1.15 and greater.
+
+#![doc(html_root_url = "https://docs.rs/num/0.2")]
+#![no_std]
+
+#[cfg(feature = "std")]
+extern crate num_bigint;
+extern crate num_complex;
+extern crate num_integer;
+extern crate num_iter;
+extern crate num_rational;
+extern crate num_traits;
+
+#[cfg(feature = "std")]
+pub use num_bigint::{BigInt, BigUint};
+
+pub use num_complex::Complex;
+
+#[cfg(feature = "std")]
+pub use num_rational::BigRational;
+pub use num_rational::Rational;
+
+pub use num_integer::Integer;
+
+pub use num_iter::{range, range_inclusive, range_step, range_step_inclusive};
+
+#[cfg(feature = "std")]
+pub use num_traits::Float;
+pub use num_traits::{
+ abs, abs_sub, cast, checked_pow, clamp, one, pow, signum, zero, Bounded, CheckedAdd,
+ CheckedDiv, CheckedMul, CheckedSub, FromPrimitive, Num, NumCast, One, PrimInt, Saturating,
+ Signed, ToPrimitive, Unsigned, Zero,
+};
+
+#[cfg(feature = "std")]
+pub mod bigint {
+ pub use num_bigint::*;
+}
+
+pub mod complex {
+ pub use num_complex::*;
+}
+
+pub mod integer {
+ pub use num_integer::*;
+}
+
+pub mod iter {
+ pub use num_iter::*;
+}
+
+pub mod traits {
+ pub use num_traits::*;
+}
+
+pub mod rational {
+ pub use num_rational::*;
+}