[FFmpeg-devel] [FFmpeg-devel-irc] IRC log for 2010-04-14

Michael Niedermayer michaelni
Fri Apr 23 21:15:22 CEST 2010


On Fri, Apr 23, 2010 at 07:46:27PM +0100, M?ns Rullg?rd wrote:
> Michael Niedermayer <michaelni at gmx.at> writes:
> 
> > On Thu, Apr 15, 2010 at 01:00:40AM +0100, irc at mansr.com wrote:
> > [...]
> >
> >> [21:56:17] <mru> don't remember what 1/-0 is defined as
> >> [21:58:02] <BastyCDGS> intuitively I would say -inf
> >> [21:58:09] <BastyCDGS> -1/-0 = +inf
> >> [21:58:23] <mru> negative zeros are evil anyway
> >> [21:58:32] <Dark_Shikari> it makes if( x == 0 ) hard
> >> [21:58:38] <Dark_Shikari> or at least annoying
> >> [21:58:48] <mru> bitmask
> >> [21:58:49] <BastyCDGS> yes I haven't ever heard of somebody really using this
> >> [21:58:53] <Dark_Shikari> Yeah, bitmask works
> >> [21:58:56] <Dark_Shikari> just more immediate bits
> >> [21:59:03] <BastyCDGS> or fabs(x) == 0.0
> >> [21:59:07] <mru> ugh
> >> [21:59:10] <BastyCDGS> :D
> >> [21:59:21] <mru> shift left one and test for zero
> >> [21:59:21] <BastyCDGS> but looks really lame i know
> >> [21:59:25] <Dark_Shikari> fabs *is* faster than abs ;)
> >> [21:59:36] <Dark_Shikari> clearly we should use one's complement for all data
> >> [21:59:39] <mru> if shift also sets flags
> >> [22:00:51] <BastyCDGS> luckily I doesn't happen that often that you have to divide some value by george w. bush's IQ :D
> >> [22:01:19] <mru> well, suppose you need to calculate wars/iq
> >> [22:01:49] <Dark_Shikari> how about pretzels/iq
> >> [22:02:01] <mru> wars/pretzel
> >> [22:02:46] <BastyCDGS> oh yeah you're right, for dividing by bush's IQ we have to introduce complex numbers
> >> [22:02:57] <BastyCDGS> oops dragging sqrt
> >> [22:05:59] <BastyCDGS> what about if ( x == 0.0 || x == -0.0 )?
> >
> > 0.0 == -0.0
> > if(x==0.0) is enough
> >
> > this fact comes from basic algebra and thus should be true in every language
> > though one cant be certain these days anymore ;)
> 
> Wrong, this fact comes from IEEE754:
> 
>   Comparisons shall ignore the sign of zero (so +0 = -0).

it does not become wrong by being explicitly stated in IEEE754



> 
> Algebra as defined by mathematicians cannot be trusted around computers.

thats just because you dont know algebra

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Many things microsoft did are stupid, but not doing something just because
microsoft did it is even more stupid. If everything ms did were stupid they
would be bankrupt already.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100423/bbc06578/attachment.pgp>



More information about the ffmpeg-devel mailing list