Did i just made the fastest dependency checker in the world? (198 packages in 1.5 seconds)

Mark markg85 at gmail.com
Tue Apr 10 20:01:53 UTC 2007


so.. is mysql yust removing out those first 2 zero`s?... i`m having a hard
time believing that..
oke.. i wrote a tiny php script to make this clear:

<?php

    if (5.6 < 5.00504)
    {
        echo 'not what i would have expected<br />';
    }
    else
    {
        echo 'see, 5.00504 is smaller than 5.6 like i said<br />';
    }

    if (1.1 == 1.01)
    {
        echo 'not what i would have expected<br />';
    }
    else
    {
        echo 'see, they 1.1 is not equal to 1.01<br />';
    }

?>

the result on my php (5.2.1) is: "see, 5.00504 is smaller than 5.6 like i
said" and "see, they 1.1 is not equal to 1.01"
those are the facts that are gonna be used in the dep checker. though i will
probably need to break the recursive loop quite a few time if those strange
version numbers like 1.1b2 occur...
so jesse... how is your math going? ;)

2007/4/10, Jesse Keating <jkeating at redhat.com>:
>
> On Tuesday 10 April 2007 14:49:14 Mark wrote:
> > Which is smaller: 5.6 or 5.00504?
> >
> >
> > i would say that 5.00504 = smaller than 5.6 though i`m not sure if mysql
> > thinks the same..
>
> Actually, 5.6 is smaller.  5 and 5 is compared, then 00504 and 6 is
> compared.
> 00504 actually becomes 504 which is higher than just 6 and thus wins.
>
> --
> Jesse Keating
> Release Engineer: Fedora
>
> --
> fedora-devel-list mailing list
> fedora-devel-list at redhat.com
> https://www.redhat.com/mailman/listinfo/fedora-devel-list
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/fedora-devel-list/attachments/20070410/38ec8322/attachment.htm>


More information about the fedora-devel-list mailing list