Sunday 1 May 2016

Haskell: Number related type classes

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.




Previous                                                 Next                                                 Home

No comments:

Post a Comment