Sling Academy
Home/Rust/Math and Numbers in Rust

Math and Numbers in Rust

This series of tutorials aims to help you understand deeply about numbers and math operations in the Rust programming language.

1 Introduction to Numeric Types in Rust: Integers, Floats, and Beyond

2 Understanding Signed vs Unsigned Integers in Rust

3 Performing Basic Arithmetic Operations in Rust: Addition, Subtraction, Multiplication, Division

4 Exploring Rust’s Overflow Behavior: Wrapping, Saturating, and Panicking

5 Working with the `std::ops` Traits for Custom Math Operations in Rust

6 Converting Between Numeric Types in Rust Safely

7 Using the `From` and `TryFrom` Traits for Type Conversion in Rust

8 Handling Floating-Point Precision and Rounding in Rust

9 Working with `f32` vs `f64` in Rust for Performance and Accuracy

10 Implementing Constants and Literals for Rust Number Types

11 Leveraging the `num` Crate for Extended Rust Numeric Capabilities

12 Fixed-Point Arithmetic in Rust Using External Libraries

13 Using the `BigInt` and `BigUint` Types for Arbitrary Precision in Rust

14 Benchmarking Math Operations in Rust with Criterion

15 Parsing Numbers from Strings and Command-Line Inputs in Rust

16 Generating Random Numbers in Rust with the `rand` Crate

17 Uniform vs Non-Uniform RNG in Rust for Statistical Applications

18 Exploring Statistical Functions: Mean, Median, Mode in Rust

19 Calculating Variance and Standard Deviation in Rust

20 Implementing Linear Regression in Rust with Basic Math Operations

21 Working with Complex Numbers in Rust via External Crates

22 Performing Trigonometric Calculations Using Rust’s Standard Library

23 Handling Logarithms and Exponentials in Rust Float Operations

24 Creating and Optimizing Matrix Operations in Rust

25 Using SIMD Intrinsics for High-Performance Math in Rust

26 Implementing Fast Fourier Transforms (FFT) in Rust

27 Combining Rust Math with Multi-Threading for Parallel Speedups

28 Leveraging the BLAS/LAPACK Ecosystem through FFI in Rust

29 Overloading Operators for Custom Numeric Types in Rust

30 Working with Wrapping Arithmetic in Rust’s `Wrapping` Type

31 Managing Endianness and Byte-Level Operations in Rust

32 Creating Compile-Time Computations in Rust with `const fn`

33 Using Rust’s `core::arch` Module for Low-Level Math Intrinsics

34 Exploring Fraction and Rational Types in Rust

35 Handling Geometry Calculations with 2D and 3D Points in Rust

36 Implementing Vector and Matrix Libraries for Rust Game Development

37 Generating Random Distributions: Normal, Poisson, Uniform in Rust

38 Working with Probability Functions and Statistical Tests in Rust

39 Implementing Basic Neural Network Math Operations in Rust

40 Calculating Dot Products and Cross Products in Rust

41 Profiling Math-Heavy Rust Code for Performance Bottlenecks

42 Handling Large Integer Factorials and Combinatorics in Rust

43 Exploring Fixed-Precision Decimals with `rust_decimal`

44 Creating and Using a Rust Enum for Numeric Error Handling

45 Implementing Quadratic Equations and Polynomial Evaluations in Rust

46 Building a Simple Math Interpreter in Rust

47 Working with Interval Arithmetic for Bounds Checking in Rust

48 Implementing Newton’s Method in Rust for Numerical Root-Finding

49 Performing Numerical Integration and Differentiation in Rust

50 Comparing Floating-Point Values Safely in Rust

51 Handling Underflow and Denormalized Floats in Rust

52 Creating a Rust Library for Basic Linear Algebra Routines

53 Utilizing Approximate Equality with the `approx` Crate in Rust

54 Computing Correlation and Covariance in Rust

55 Calculating Rolling Statistics Over Arrays and Vectors in Rust

56 Implementing Fast Matrix Multiplication Algorithms in Rust

57 Exploring Multidimensional Arrays with `ndarray` in Rust

58 Building a Statistics CLI Tool in Rust for Data Analysis

59 Using Traits for Generic Numeric Functions Across Rust Types

60 Working with Mixed Integer-Float Calculations in Rust

61 Performing Bitwise Operations on Rust Integers

62 Understanding Rust’s `const` Generics for Numeric Arrays

63 Dealing with Remainders and Modulo Arithmetic in Rust

64 Optimizing Big-O Complexity in Math-Intensive Rust Algorithms

65 Calculating Series and Sums Efficiently in Rust

66 Implementing Random Walk Simulations Using Rust Floats

67 Leveraging Rust’s PhantomData for Safe Numeric Wrappers

68 Generating Prime Numbers and Testing Primality in Rust

69 Implementing Matrix Inversion and Determinants in Rust

70 Handling Sparse Matrix Representations for Memory Efficiency in Rust

71 Combining Rust with C/C++ Libraries for Advanced Math Operations

72 Creating a Rust Program for Polynomial Curve Fitting

73 Designing Generic Math Traits for Custom Algebraic Structures in Rust