diff --git a/ChangeLog.md b/ChangeLog.md
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -1,5 +1,6 @@
 # Changelog for som
 
+10.1.4 Modified SGM3 to work with limited range floating point types.
 10.1.3 Added SGM3.
 10.1.2 Fixed a warning.
        Added SGM2.
diff --git a/som.cabal b/som.cabal
--- a/som.cabal
+++ b/som.cabal
@@ -2,10 +2,10 @@
 --
 -- see: https://github.com/sol/hpack
 --
--- hash: adbfa8982ae14db2b504e528d5122057466a1628c04b8f3d74dbbb3d25dc2fdd
+-- hash: 1bf49fbb93fa296979cf7d70de8ae9502be4b03a10627c6d7d158c97eafae269
 
 name:           som
-version:        10.1.3
+version:        10.1.4
 synopsis:       Self-Organising Maps
 description:    Please see the README on GitHub at <https://github.com/mhwombat/som#readme>
 category:       Math
diff --git a/src/Data/Datamining/Clustering/SGM3Internal.hs b/src/Data/Datamining/Clustering/SGM3Internal.hs
--- a/src/Data/Datamining/Clustering/SGM3Internal.hs
+++ b/src/Data/Datamining/Clustering/SGM3Internal.hs
@@ -205,11 +205,12 @@
 -- | Returns the labels of the two most similar models, and the
 --   difference between them.
 meanModelDiff
-  :: (Fractional x, Num x, Ord x, Eq k, Ord k)
+  :: (Fractional x, Real x, Num x, Ord x, Eq k, Ord k)
   => SGM t x k p -> x
 meanModelDiff s
   | size s == 0 = 0
-  | otherwise  = mean . map snd $ modelDiffs s
+  | otherwise  = fromRational . mean . map (toRational . snd)
+                   $ modelDiffs s
 
 -- | Calculate the mean of a set of values.
 -- mean :: (Eq a, Fractional a, Foldable t) => t a -> a
@@ -290,7 +291,7 @@
 --   SGM,
 --   and the updated SGM.
 trainAndClassify
-  :: (Num t, Ord t, Fractional x, Num x, Ord x, Enum k, Ord k)
+  :: (Num t, Ord t, Fractional x, Real x, Num x, Ord x, Enum k, Ord k)
     => SGM t x k p -> p -> (k, x, M.Map k (p, x), SGM t x k p)
 trainAndClassify s p
   | size s < 2               = addModelTrainAndClassify s p
@@ -327,7 +328,7 @@
 --   matches @p@, and updates it to be a somewhat better match.
 --   If necessary, it will create a new node and model.
 train
-  :: (Num t, Ord t, Fractional x, Num x, Ord x, Enum k, Ord k)
+  :: (Num t, Ord t, Fractional x, Real x, Num x, Ord x, Enum k, Ord k)
     => SGM t x k p -> p -> SGM t x k p
 train s p = s'
   where (_, _, _, s') = trainAndClassify s p
@@ -336,7 +337,7 @@
 --   model in @s@ that most closely matches @p@,
 --   and updates it to be a somewhat better match.
 trainBatch
-  :: (Num t, Ord t, Fractional x, Num x, Ord x, Enum k, Ord k)
+  :: (Num t, Ord t, Fractional x, Real x, Num x, Ord x, Enum k, Ord k)
     => SGM t x k p -> [p] -> SGM t x k p
 trainBatch = foldl' train
 
