Changeset 8800 for src/Pugs/Prim/Numeric.hs
- Timestamp:
- 01/27/06 13:35:58 (3 years ago)
- Files:
-
- 1 modified
-
src/Pugs/Prim/Numeric.hs (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Pugs/Prim/Numeric.hs
r8736 r8800 56 56 op2Exp x y = do 57 57 num1 <- fromVal =<< fromVal' x 58 if isNaN num1 then return (VNum (0/0)) else do 58 59 if num1 == (1 :: VNum) then return (VInt 1) else do 59 60 num2 <- fromVal =<< fromVal' y 61 if isNaN num2 then return (VNum (0/0)) else do 60 62 if num2 == (0 :: VNum) then return (VInt 1) else do 61 63 case reverse $ show (num2 :: VNum) of … … 66 68 else op2Num ((**) :: VNum -> VNum -> VNum) x y 67 69 _ -> op2Num ((**) :: VNum -> VNum -> VNum) x y 70 where 71 _NaN = 0/0 68 72 69 73 op2Divide :: Val -> Val -> Eval Val
