Git Product home page Git Product logo

num's Introduction

num

crate documentation minimum rustc 1.15 Travis status

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 documentation
num-complex crate documentation
num-integer crate documentation
num-iter crate documentation
num-rational crate documentation
num-traits crate documentation
(num-derive) crate documentation

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:

[dependencies]
num = "0.2"

and this to your crate root:

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:

[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.

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's People

Contributors

alexcrichton avatar aliddell avatar aturon avatar bluss avatar bors[bot] avatar colrdavidson avatar cuviper avatar darksonn avatar donsheddow avatar emerentius avatar feadoor avatar gifnksm avatar hauleth avatar homu avatar huonw avatar jbcrail avatar koverstreet avatar kw217 avatar mbrubeck avatar mitchmindtree avatar murarth avatar nwin avatar ollie27 avatar phaiax avatar plasmapower avatar steveklabnik avatar superfluffy avatar vks avatar xaeroxe avatar yoanlcq avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.