diff options
| -rwxr-xr-x | rpn.hs | 2 |
1 files changed, 1 insertions, 1 deletions
| @@ -40,7 +40,7 @@ fromSymbol (Number x d) = (x, d) | |||
| 40 | fromSymbol _ = (0, 0) | 40 | fromSymbol _ = (0, 0) |
| 41 | 41 | ||
| 42 | 42 | ||
| 43 | pPrint :: Show a => Symbol a -> String | 43 | pPrint :: (Show a, Fractional a) => Symbol a -> String |
| 44 | pPrint (Number x d) = (show x) ++ " ± " ++ (show d) ++ " (relative error: " ++ (show $ d / x) ++ ")" | 44 | pPrint (Number x d) = (show x) ++ " ± " ++ (show d) ++ " (relative error: " ++ (show $ d / x) ++ ")" |
| 45 | pPrint s = show s | 45 | pPrint s = show s |
| 46 | 46 | ||
