<div class="gmail_quote">Hi,<br><br>Yes, I mean &quot;sizeOf 2&quot;. It&#39;s useful not only on GPUs but also in &quot;normal&quot; 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.<br>

<br>Cheers,<br>Oleksandr.<div><div></div><div class="h5"><br><br><div class="gmail_quote">On Sun, Sep 27, 2009 at 9:19 PM, Peter Verswyvelen <span dir="ltr">&lt;<a href="mailto:bugfact@gmail.com" target="_blank">bugfact@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
He meant 16-bit floats, which have sizeOf 2<div><br></div><div>On GPUs this is common and implemented in hardware (at least on the old GPUs).</div><div><br></div><div>On DPSs you commonly had 24-bit floats too.</div><div>

<br>
</div><div>But these days I guess 32-bit is the minimum one would want to use? Most of the time I just use double anyway :)</div><div><div></div><div><div><br></div><div>On Sun, Sep 27, 2009 at 9:47 PM, Ross Mellgren <span dir="ltr">&lt;<a href="mailto:rmm-haskell@z.odi.ac" target="_blank">rmm-haskell@z.odi.ac</a>&gt;</span> wrote:</div>


<div><div><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">What about the built-in Float type?<br>
<br>
Prelude Foreign.Storable&gt; sizeOf (undefined :: Float)<br>
4<br>
Prelude Foreign.Storable&gt; sizeOf (undefined :: Double)<br>
8<br>
<br>
Or maybe you mean something that can be used with FFI calls to C, in which case Foreign.C.Types (CFloat).<br>
<br>
Both instance the Floating, RealFloat, RealFrac, etc, classes so should operate largely the same as (modulo precision) a Double.<br>
<br>
-Ross<div><div></div><div><br>
<br>
On Sep 27, 2009, at 2:42 PM, Olex P wrote:<br>
<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div>
Hi guys,<br>
<br>
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 this?<br>
<br>
Cheers,<br>
Oleksandr.<br></div></div>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org" target="_blank">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</blockquote>
<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org" target="_blank">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</blockquote></div><br></div></div>
</div></div></blockquote></div><br>
</div></div></div><br>