XMP, Krita, KFileMetaInfo and Strigi

Evgeny Egorochkin phreedom.stdin at gmail.com
Sat Jun 23 00:43:45 BST 2007


On Saturday 23 June 2007 00:14:13 Tobias G. Pfeiffer wrote:
> Hi!
>
> On Friday 22 June 2007, 19:09, Jos van den Oever wrote:
> > 2007/6/22, Cyrille Berger <cberger at cberger.net>:
> > > > >  - it lacks some important types like rationals
> > > >
> > > > a double is not a rational? QVariant::Double
> > >
> > > Yes it is, but a rational isn't a double, it's a division between two
> > > integers.
> > > For instance, there is no double representation of the rational 2 / 3
> > > (0.66666666666666666666666666666666 is just an approximation, even if
> > > the mathematical theory says that 0.666 followed only by 6 is equal to
> > > 2 / 3, but there is no way to represent such a thing in double, 2/3 is
> > > represented by 0.666..67 in a double anyway).
> >
> > It is very simple and not expensive to find a nice rational from a
> > double.
>
> What do you mean by "not expensive"? And what by "nice"? For every number
> that is stored as a double, there are infinitely many rational numbers that
> give that result. With both numerator and denominator being represented by
> a finite number of bits, you end up with a finite number of possible
> combinations, yeehaw. Now you don't even want to find a rational that has
> the same value as this double, but something "nice" that has a *similar*
> value as the given double. (Funny: look at 1.001002004008016032064128256,
> which might look very constructed, with powers of 2, but is actually the
> result of 999/998, continuing with digits 513 = 512 + 001024 etc.) -- Maybe
> this is a bit academic, but it seems to me as if storing a pair of integers
> is waaaay less problematic than trying to recreate such a representation
> from a double.

The algo to recreate ratio representation is simple and efficient. It's like 
1.5x the size of the brute-force algo proposed.

Representation precision of double is sufficient for all 
practical(human-readable) ratios.

Take a look at this: http://nrich.maths.org/public/viewer.php?obj_id=1397

This is nit picking. I propose instead move to a constructive dialogue and 
start looking for solutions instead of problems.

Users will expect strigi/nepo to support xmp, and krita to behave as a part of 
an *integrated* desktop, that is a behavior coherent with the rest of the 
system.

The extent of integration we can achieve is still unclear, but it certainly 
can go much further than DC tags.

-- Evgeny




More information about the kde-core-devel mailing list