
17 Mar
2008
17 Mar
'08
1:06 p.m.
Hello David, Monday, March 17, 2008, 7:59:09 PM, you wrote:
foreign import ccall unsafe "math.h log10" c_log10 :: CDouble -> CDouble
log10 :: Double -> Double log10 x = realToFrac (c_log10 (realToFrac x))
It's a bit sloppier, but shouldn't cause any trouble. And I've no idea how realToFrac is implemented, but would worry about it behaving oddly... for instance when given NaNs.
it should be nop (no operation) in such cases -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com