[MPlayer-dev-eng] Patch for gcc 3.4 against MPlayer-1.0pre5

Torinthiel torinthiel at megapolis.pl
Thu Sep 2 17:25:31 CEST 2004


On Thu, Sep 02, 2004 at 10:23:04AM -0400, D Richard Felker III wrote:
> 
> On Thu, Sep 02, 2004 at 03:29:07PM +0200, Torinthiel wrote:
> > On Thu, Sep 02, 2004 at 02:06:01PM +0200, Michael Niedermayer wrote:
> > > from 'info libc'
> > > ----
> > > Round to nearest.
> > >      This is the default mode.  It should be used unless there is a
> > >      specific need for one of the others.  In this mode results are
> > >      rounded to the nearest representable value.  If the result is
> > >      midway between two representable values, the even representable is
> > >      chosen. "Even" here means the lowest-order bit is zero.  This
> > >      rounding mode prevents statistical bias and guarantees numeric
> > >      stability: round-off errors in a lengthy calculation will remain
> > >      smaller than half of `FLT_EPSILON'.
> > 
> > Now this is more specific. But also quite strange. I don't want to argue
> > against specs, but AFAIK numbers are coded as sign*0.1(mantissa)*pow(2,exp)
> 
> 0.1?!? wtf? 0.1 is not even representible as a float, it takes
> infinitely many places in binary...
> 
> > where sign, mantissa and exp are stored in memory and fraction is
> > a binary one, not decimal. (mantissa binary, exp decimal)

How about reading till end? I said the fraction is BINARY.

> > So, 1.5 (mantissa 1, exponent 1) would round to 1 (mantissa 0, exp 1)
> > but 3.5 (mantissa 11, exponent 2) would round to 4 (mantissa 0, exp 3).
> > Or am I wrong somewhere? This is some random rounding as I see it.
> 
> you're wrong. 1.5 and 3.5 both round to _even_ numbers, so they round
> to 0 and 4.

Holy shit. So, the nearest integer to 1.5 is 0? And what about 2 and 1?
I assume there are further away in some strange metrics.
Torinthiel


-- 
 Waclaw "Torinthiel" Schiller       GG#: 542916, 3073512
   torinthiel(at)megapolis(dot)pl
   gpg: B06901F1 fpr: FAA3 559F CAE9 34DE CDC8  7346 2B6E 39F2 B069 01F1
 "No classmates may be used during this examination"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20040902/707642f3/attachment.pgp>


More information about the MPlayer-dev-eng mailing list