Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Reducing precision to Float16
Date: Sun, 22 Feb 2009 21:02:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 13
Message-ID: <gnseg9$lml$1@fred.mathworks.com>
References: <gnpjei$j5t$1@fred.mathworks.com> <gnprdh$a66$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1235336521 22229 172.30.248.38 (22 Feb 2009 21:02:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 22 Feb 2009 21:02:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1724134
Xref: news.mathworks.com comp.soft-sys.matlab:520031

"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <gnprdh$a66$1@fred.mathworks.com>...
> 
>   I am not quite sure what you mean by "reduce the precision of my vector".  Do you wish to actually convert a matlab double to some 16-bit quantity whose format is that of half precision floating, or do you merely want to do the appropriate rounding to a double which would correspond to its having been converted in this manner though still represented in double?  Presumably doubles that were too large or too small would be converted to inf's and zeros, respectively.  Hopefully you are aware of the limited range of half precision floating point numbers, with a maximum of 65504 and a minimum normalized of 2^(-14).
> 
>   With some considerable labor, the latter operation should be quite possible to do, though I don't see any evidence of it having been done in the matlab file exchange.  If you want the actual 16-bit quantities, I am not sure what you wish to do with them.  They could be stored as, say, uint16 integers, but what would you do with them afterwards?
>  
> Roger Stafford

Thank you for your reply,

The appropriate rounding to half-precision is sufficient.  I would like to test the feasibility of using 16-bit numbers for transmission on a hardware platform.  I would have the ability to perform calculations in single or double precision, but then would be transmitting across a low-BW satellite link, and would like to see if Float16 is sufficient to transmit the data and have valid results when I perform the remaining simulations at the other end.  Using single or double precision data format is no problem, as I would always have that available for calculations, but at a certain stage I would like to be able to round to the appropriate level.

Jenne