[Numpy-discussion] Does float16 exist?
Charles R Harris
Tue Jan 8 14:24:49 CST 2008
On Jan 8, 2008 1:09 PM, Anne Archibald <email@example.com> wrote:
> On 08/01/2008, Charles R Harris <firstname.lastname@example.org> wrote:
> > Well, at a minimum people will want to read, write, print, and promote
> > That would at least let people work with the numbers, and since my
> > understanding is that the main virtue of the format is compactness for
> > storage and communication, a basic need will be filled right there. One
> > potential problem I see is handling +/-inf and nans, tests for these
> > probably be built into the type.
> The el-cheapo solution to this simply provides two functions: take an
> int16 array (which actually contains float16) and produce a float32
> array, and vice versa. Then people do all their work in float32 (or
> float64 is float32 doesn't have inf/nan, I don't remember) but can
> read and write float16.
Sure, but where's the fun in that? Besides, I think that adding a data type
might be an opportunity to generate a detailed road map for future projects
that might actually matter (quads and decimal floats for money stuff), and
might provide a chance to revisit some code and see if it can be simplified.
It's tough to get up the motivation to do that without some other prod.
Besides, it's new and I have a weakness for new stuff.
> Of course it would be nicer to use flaot16 natively, more or less, but
> without all the math that's going to be a frustrating experience.
I would plan on at least arithmetic. Adding special functions probably ain't
worth it and even now a lot of things are done by promoting things to floats
or doubles and calling routines in LAPACK.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Numpy-discussion