wordToDouble :: Word64 -> Double
wordToDouble (W64# x) = runST $ ST $ \s1 ->
    case newByteArray# 8# s1 of
        (# s2, mbarr #) ->
            let !s3 = writeWord64Array# mbarr 0# x s2
             in case readDoubleArray# mbarr 0# s3 of
                    (# s4, f #) -> (# s4, D# f #)

wordToDouble :: Word64 -> Double
wordToDouble (W64# x) = runST $ ST $ \s1 ->
    case newByteArray# 8# s1 of
        (# s2, mbarr #) ->
            let !s3 = writeWord64Array# mbarr 0# x s2
             in case readDoubleArray# mbarr 0# s3 of
                    (# s4, f #) -> (# s4, D# f #)

wordToDouble (W64# x) = runST $ ST $ \s1 ->
    case newByteArray# 8# s1 of
        (# s2, mbarr #) ->
            let !s3 = writeWord64Array# mbarr 0# x s2
             in case readDoubleArray# mbarr 0# s3 of
                    (# s4, f #) -> (# s4, D# f #)
