Skip to content

Commit

Permalink
Change float encoding to IEEE-754
Browse files Browse the repository at this point in the history
  • Loading branch information
elliottt committed Aug 14, 2015
1 parent 4eac99b commit 47d8396
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Data/Serialize.hs
Expand Up @@ -494,12 +494,12 @@ instance (Serialize e) => Serialize (Seq.Seq e) where
-- Floating point

instance Serialize Double where
put d = put (decodeFloat d)
get = liftM2 encodeFloat get get
put = putFloat64be
get = getFloat64be

instance Serialize Float where
put f = put (decodeFloat f)
get = liftM2 encodeFloat get get
put = putFloat32be
get = getFloat32be

------------------------------------------------------------------------
-- Trees
Expand Down

0 comments on commit 47d8396

Please sign in to comment.