El Dimecres, 14 de maig de 2014, a les 18:15:03, James Cloos va escriure: > >>>>> "D" == Dyweni <- Poppler <[email protected]>> writes: > D> pg_h = 0x1.9c80000000001p+10 > > That shows the single extra bit. 13 hex digits to the right, so the > least significant bit of a double (aka _Float64). > > If you replace: > > h = (int)ceil(pg_h) > > with: > > h = (int)ceilf((float)pg_h) > > it should avoid the rounding bug. > > (pg_w should get the same treatment.) > > Or perhaps pg_h and pg_w should get a (double)(float) treatment earlier > in the code.
Once you guys reach a conclusion of what's the better patch can you please open a bug since it's easier for me to track there what patches need review/commiting than on the mailing list? Thanks! Cheers, Albert > > A more accurate treatment would round fewer of the least significant > bits, but casting to float and back still leaves 24 bits of resolution. > > -JimC > -- > James Cloos <[email protected]> OpenPGP: 0x997A9F17ED7DAEA6 > > _______________________________________________ > poppler mailing list > [email protected] > http://lists.freedesktop.org/mailman/listinfo/poppler _______________________________________________ poppler mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/poppler
