module Mcmc.Monitor.Log
( renderLog,
)
where
import qualified Data.ByteString.Builder as BB
import qualified Data.ByteString.Lazy.Char8 as BL
import Numeric.Log
renderLog :: Log Double -> BL.ByteString
renderLog :: Log Double -> ByteString
renderLog = Builder -> ByteString
BB.toLazyByteString (Builder -> ByteString)
-> (Log Double -> Builder) -> Log Double -> ByteString
forall b c a. (b -> c) -> (a -> b) -> a -> c
. FloatFormat -> Double -> Builder
BB.formatDouble (Int -> FloatFormat
BB.standard Int
8) (Double -> Builder)
-> (Log Double -> Double) -> Log Double -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Log Double -> Double
forall a. Log a -> a
ln
{-# INLINEABLE renderLog #-}