Commits

Bryan O'Sullivan committed cc86872

Switch rendering of Double values to 6 digits of precision.

This makes our behaviour more friendly, and a little more similar
to printf besides.

  • Participants
  • Parent commits 1d992bb

Comments (0)

Files changed (1)

Data/Text/Buildable.hs

     build a = build (numerator a) <> singleton '/' <> build (denominator a)
 
 instance Buildable Float where
-    build = fromText . C.toShortest . realToFrac
+    build = fromText . C.toPrecision 6 . realToFrac
     {-# INLINE build #-}
 
 instance Buildable Double where
-    build = fromText . C.toShortest
+    build = fromText . C.toPrecision 6
     {-# INLINE build #-}
 
 instance Buildable DiffTime where