<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Musings &#187; IEEE 754</title>
	<atom:link href="http://blog.fpmurphy.com/tag/ieee-754/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.fpmurphy.com</link>
	<description>of an OS plumber</description>
	<lastBuildDate>Wed, 11 Jan 2012 19:14:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Half-Precision Floating Point Format</title>
		<link>http://blog.fpmurphy.com/2008/12/half-precision-floating-point-format_14.html</link>
		<comments>http://blog.fpmurphy.com/2008/12/half-precision-floating-point-format_14.html#comments</comments>
		<pubDate>Sun, 14 Dec 2008 13:40:00 +0000</pubDate>
		<dc:creator>fpmurphy</dc:creator>
				<category><![CDATA[IEEE 754]]></category>

		<guid isPermaLink="false">http://blog.fpmurphy.com/2008/12/half-precision-floating-point-format.html</guid>
		<description><![CDATA[<p>Half precision floating point is a 16-bit binary floating-point interchange format.&#160;&#160;It was not part of the original ANSI/IEEE 754 Standard for Binary Floating-Point Arithmetic published in 1985 but is included in the current version of the standard, IEEE 754-2008 (previously known as IEEE 754r) which was published last August.&#160;&#160;See this Wikipedia article for background information. </p> <p>Floating point formats defined by this standard are classified as either interchange or non-interchange.&#160;&#160;In the standard storage formats are narrow interchange formats, i.e. the set of floating point values that can be stored by the specified binary encoding is a proper subset of wider floating point formats such as the 32-bit float and 64-bit double.&#160;&#160;In particular, the standard defines the encodings for one binary storage floating-point format of 16 bits length and radix 2, and one decimal storage floating-point format of 32 bits length.&#160;&#160;Note that these two formats are for storage only and are not defined for in-memory arithmetic operations.&#160;&#160;The remainder of this post is about the 16-bit binary storage format which we will refer to as half precision.</p> <p>Half precision (also known as a 1.5.10 or s10e5 minifloat) was added to the standard because it is the de facto storage format for certain floating-point values frequently used in modern graphics processing units (GPUs) where minimizing memory usage and bus traffic is a major challange and priority.&#038;&#160;&#160;It is used in several computer graphics environments including OpenGL, OpenEXR, and by hardware in MP3 decoders and nVidia graphic cards.&#038;nbsp&#160;This format became popular because it can store a larger range of values than an int16 without requiring the bandwidth and storage space of a float type.&#160;&#160;Typically this increased range of numbers is used to preserve more highlighting and shadow detail.&#160;&#160;The minimum and maximum representable values are 2.98×10-8 and 65504 respectively.</p> <p>I only know of one C or C++ compiler which supports half precision i.e. Sourcery G++ Lite.&#160;&#160;It uses an __fp16 type to represent half precision with a number of limitations.&#160;&#160;However, whether __fp16 becomes part of ISO C remains to be seen.&#038;&#160;&#160;The lastest version of the C++ ABI also provides some support for name mangling of half precisions.&#160;&#160;The GNU debugger appears to have some limited support.&#160;&#160;Ruby supports half precision (IEEE_binary16) using the float-formats package (but only for little endian platforms according to the float-formats README).&#160;&#160;The Python structs module which is the logical home for half-precision support does not currently support this format.&#160;&#160;A cursory search of CPAN did not ]]></description>
		<wfw:commentRss>http://blog.fpmurphy.com/2008/12/half-precision-floating-point-format_14.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

