
25 Feb
2010
25 Feb
'10
5:23 p.m.
On Thu, Feb 25, 2010 at 10:40:48AM -0500, Nick Bowler wrote:
*** Idea #1 ***
Add two methods to the RealFloat class:
toDouble :: RealFloat a => a -> Double fromDouble :: RealFloat a => Double -> a
and a function:
toFloating :: (RealFloat a, RealFloat b) => a -> b toFloating = fromDouble . toDouble
That is exactly how I solved it in the jhc libraries. Though, I may switch to using a 'FloatMax' type that is always aliased to the largest floating point type available, now that Float128 and Float80 are potentially available. (but it would just be an alias for Double for now) John -- John Meacham - ⑆repetae.net⑆john⑈ - http://notanumber.net/