delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/29/11:11:23

Date: Wed, 29 Jan 1997 16:41:44 -0200
Message-Id: <1.5.4.16.19970129140048.3857d552@dmeasc.rc.ipt.br>
Mime-Version: 1.0
To: DJ Delorie <dj AT delorie DOT com>, pweeks AT execulink DOT com
From: Cesar Scarpini Rabak <csrabak AT dce03 DOT ipt DOT br>
Subject: Re: fixed point math: NEED HELP QUICK!
Cc: djgpp AT delorie DOT com

At 20:30 28/01/97 -0500, DJ Delorie wrote:
>
>> function.  Anyway, here's my problem;  To my understanding the following
>> are 100% equal:
>> 
>> other_stuff = stuff / 256;
>> other_stuff = stuff << 8;
>
>The second multiplies.  Try ">> 8" instead.
>
>
Also, as the whole source was not posted, if the source is compiled as C++,
the segfault is developed...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Cesar Scarpini Rabak                      E-mail: csrabak AT ipt DOT br
DME/ASC                                   Phone: 55-11-268-3522 Ext.350
IPT - Instituto de Pesquisas Tecnologicas Fax:   55-11-268-5996
Av. Prof. Almeida Prado, 532.  Sao Paulo - SP 05508-901 BRAZIL
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019