/[gxemul]/trunk/src/float_emul.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/src/float_emul.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 31 by dpavlin, Mon Oct 8 16:19:56 2007 UTC revision 32 by dpavlin, Mon Oct 8 16:20:58 2007 UTC
# Line 24  Line 24 
24   *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF   *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *   *
27   *  $Id: float_emul.c,v 1.7 2006/03/30 19:36:03 debug Exp $   *  $Id: float_emul.c,v 1.8 2006/09/07 11:44:01 debug Exp $
28   *   *
29   *  Floating point emulation routines.   *  Floating point emulation routines.
30   */   */
# Line 232  uint64_t ieee_store_float_value(double n Line 232  uint64_t ieee_store_float_value(double n
232    
233                  /*                  /*
234                   *  How to convert back from double to exponent + fraction:                   *  How to convert back from double to exponent + fraction:
235                   *  We want fraction to be 1.xxx, that is                   *  The fraction should be 1.xxx, that is
236                   *  1.0 <= fraction < 2.0                   *  1.0 <= fraction < 2.0
237                   *                   *
238                   *  This method is very slow but should work:                   *  This method is very slow but should work:
239                     *  (TODO: Fix the performance problem!)
240                   */                   */
241                  exponent = 0;                  exponent = 0;
242                  while (nf < 1.0 && exponent > -1023) {                  while (nf < 1.0 && exponent > -1023) {

Legend:
Removed from v.31  
changed lines
  Added in v.32

  ViewVC Help
Powered by ViewVC 1.1.26