Hi cafe,<div><br></div><div>How do I most efficiently convert a Double to a Data.Fixed?</div><div><br></div><div>I&#39;m asking because I want to convert fractional seconds to the seconds field of Data.Time.TimeOfDay, which is Pico = Data.Fixed.Fixed E12.</div>
<div><br></div><div>For now the fastest thing I came up with was fromIntegral (round (sec*1000000)) / fromIntegral 1000000, but this frankly sucks and is rather slow, there must be a better way.<br clear="all"><div><br></div>
-- <br>Eugene Kirpichov<br>Principal Engineer, Mirantis Inc. <a href="http://www.mirantis.com/" target="_blank">http://www.mirantis.com/</a><br>Editor, <a href="http://fprog.ru/" target="_blank">http://fprog.ru/</a><br>
</div>