Following table summarize the Type Classes for number types.
Class | Parent classes | Description |
Num | No parent class | Basic numeric class, provides functionality like (+), (*), abs, signum, fromInteger, (negate | (-)) etc., |
Real | Num, Ord | Convert values to real type |
Integral | Real, Enum | Support operations like integer Division, modulus etc., |
Fractional | Num | Fractional numbers, supporting real division. |
Floating | Fractional | Trigonometric and hyperbolic functions and related functions. |
This post first appeared on Java Tutorial : Blog To Learn Java Programming, please read the originial post: here