Numbers

  1. Rust numerical types
  2. Numerical operations on integers
  3. Divide integers and get float
  4. Rust type mismatch in numerical operation
  5. Increment integers - augmented assignment
  6. unfit in i8 - compile time
  7. unfit in i8 - run time - overflow
  8. How to find code that might overflow / underflow?
  9. Handle overflow and underflow - saturating
  10. Handle overflow and underflow - checked
  11. Handle overflow and underflow - overflowing
  12. Handle overflow and underflow - carrying
  13. Handle overflow and underflow - strict
  14. Compare integers
  15. Compare integers in and if-statement
  16. Exponent - power
  17. Exponent protecting against overflow - checked_pow, saturating_pow
  18. Square root (sqrt)
  19. Square root of integer numbers
  20. Floating point imprecision
  21. Compare floating point numbers
  22. rounding float
  23. Compare floating point numbers by rounding
  24. Approximately compare floating point numbers
  25. NaN - Not a Number
  26. Infinite floating point numbers
  27. Complex numbers
  28. Functions and test adding numbers
  29. Exercise: Rectangle ARGS with protection
  30. Exercise: Rectangle add tests
  31. Exercise: Circle add tests
  32. Solution: Rectangle ARGS with protection