Expand description
Numeric abstraction traits.
Every MathVerse crate is generic over these traits. The hierarchy is:
┌─────────┐
│ Num │ Integer + Float
└────┬────┘
│
┌────────┴────────┐
│ │
┌────┴────┐ ┌─────┴─────┐
│ Signed │ │ Unsigned* │ (*marker, not enforced)
└────┬────┘ └───────────┘
│
┌────────┴────────┐
│ │
┌────┴────┐ ┌──────┴──────┐
│ Field │ │ (marker) │
└────┬────┘ └─────────────┘
│
┌────┴──────────────────────────────────┐
│ Real │ core: conversion, powers, rounding
└────┬────────┬─────────┬───────┬───────┘
│ │ │ │ │
Transcendental Trig Hyperbolic FloatOps FloatClass
│ │ │ │ │
└────┴────────┴─────────┴───────┴───────┘
│
┌─────┴─────┐
│ RealFull │ backward-compat supertrait
└───────────┘Traits§
- Field
- Division ring: everything
Numis, plus division and reciprocal. - Float
Class - Floating-point classification.
- Hyperbolic
- Hyperbolic functions.
- Normed
- Normed type: has an absolute value satisfying the triangle inequality.
- Num
- Foundation: anything that can add, subtract, multiply, and has 0/1.
- Real
- Core real number operations: conversion, powers, rounding, min/max.
- Real
Full - Backward-compat supertrait combining all sub-traits.
- Signed
- Signed numbers: negation, absolute value, sign.
- Transcendental
- Transcendental functions: exp, log, and their variants.
- Trig
- Trigonometric functions (radians).