1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.4"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libkate: Format - floating point value</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">libkate<span id="projectnumber"> 0.4.3</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
$(function() {
initMenu('',false,false,'search.php','Search');
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div><div class="header">
<div class="headertitle"><div class="title">Format - floating point value </div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p >Floating point values are stored as a series of digitized fixed point values in the Kate bitstream format. Several distinct streams of floating point values may be saved at the same time. A stream has a constant format (number of bits saved per value). Streams may be merged together (eg, merging 2 streams of V values yields a single stream of 2*V values). Streams stored together always have the same number of values.</p>
<p >When loading N streams, the bitstream format is as follows:</p>
<ul>
<li>1 bit, being 1 if the streams are merged.</li>
</ul>
<p>If the streams to load are merged, the different streams are stored as a single stream. In this case, N is set to 1, and the number of values is equal to the total number of values in all streams (eg, the original N times the number of values in a single stream).</p>
<p >Then, for each stream:</p>
<ul>
<li>4bits being the number of zero bits in the high bits of the integer part of a number (‘head’). </li>
<li>4bits being the number of bits in the low bits of the fractional part of a number (‘tail’).</li>
</ul>
<p>Then, for each value:</p>
<ul>
<li>if head is strictly positive, a bit representing the sign of the number. </li>
<li>32-(head+tail) bits, representing the middle bits of the absolute value of the number.</li>
</ul>
<p>Each number may then be reconstructed by concatenating the given number of high zero bits (‘head’), the middle bits, the given number of low zero bits (‘tail’), and negating the number if the sign bit was 1. </p>
</div></div><!-- contents -->
</div><!-- PageDoc -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.4
</small></address>
</body>
</html>
|