[Haskell-cafe] 16 bit floating point data in Haskell?
hoknamahn at gmail.com
Sun Sep 27 16:40:46 EDT 2009
Yes, I mean "sizeOf 2". It's useful not only on GPUs but also in "normal"
software. Think of huge data sets in computer graphics (particle clouds,
volumetric data, images etc.) Some data (normals, density, temperature and
so on) can be easily represented as float 16 making files 200 GB instead of
300 GB. Good benefits.
On Sun, Sep 27, 2009 at 9:19 PM, Peter Verswyvelen <bugfact at gmail.com>wrote:
> He meant 16-bit floats, which have sizeOf 2
> On GPUs this is common and implemented in hardware (at least on the old
> On DPSs you commonly had 24-bit floats too.
> But these days I guess 32-bit is the minimum one would want to use? Most of
> the time I just use double anyway :)
> On Sun, Sep 27, 2009 at 9:47 PM, Ross Mellgren <rmm-haskell at z.odi.ac>wrote:
>> What about the built-in Float type?
>> Prelude Foreign.Storable> sizeOf (undefined :: Float)
>> Prelude Foreign.Storable> sizeOf (undefined :: Double)
>> Or maybe you mean something that can be used with FFI calls to C, in which
>> case Foreign.C.Types (CFloat).
>> Both instance the Floating, RealFloat, RealFrac, etc, classes so should
>> operate largely the same as (modulo precision) a Double.
>> On Sep 27, 2009, at 2:42 PM, Olex P wrote:
>> Hi guys,
>>> Do we have anything like half precision floats in Haskell? Maybe in some
>>> non standard libraries? Or I have to use FFI + OpenEXR library to achieve
>>> Haskell-Cafe mailing list
>>> Haskell-Cafe at haskell.org
>> Haskell-Cafe mailing list
>> Haskell-Cafe at haskell.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe