module Mcmc.Monitor.Log
( renderLog,
)
where
import qualified Data.ByteString.Lazy.Char8 as BL
import qualified Data.Double.Conversion.ByteString as BC
import Numeric.Log
renderLog :: Log Double -> BL.ByteString
renderLog :: Log Double -> ByteString
renderLog = ByteString -> ByteString
BL.fromStrict (ByteString -> ByteString)
-> (Log Double -> ByteString) -> Log Double -> ByteString
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> Double -> ByteString
BC.toFixed Int
8 (Double -> ByteString)
-> (Log Double -> Double) -> Log Double -> ByteString
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Log Double -> Double
forall a. Log a -> a
ln
{-# INLINEABLE renderLog #-}