ZVON > References > Haskell reference
| Indexes | Syntax | >> Prelude << | Ratio | Complex | Numeric | Ix | Array | List | Maybe | Char | Monad | IO | Directory | System | Time | Locale | CPUTime | Random

Module: Prelude
Function: fromRational
Type: Fractional a => Rational -> a
Class: Fractional
Description: returns rational number
Related:

Example 1

Input: fromRational 10.2

Output: 10.2

Example 2

Input: fromRational 10

Output: 10.0