Data.Fixed

Data.Fixed

Copyright (c) Ashley Yakeley 2005, 2006, 2009
License BSD-style (see the file libraries/base/LICENSE)
Maintainer Ashley Yakeley <ashley@semantic.org>
Stability experimental
Portability portable
Safe Haskell Trustworthy
Language Haskell2010

Description

This module defines a "Fixed" type for fixed-precision arithmetic. The parameter to Fixed is any type that's an instance of HasResolution. HasResolution has a single method that gives the resolution of the Fixed type.

This module also contains generalisations of div, mod, and divmod to work with any Real instance.

div' :: (登录查看完整内容