Re: Gutenprint 5.3.4: only on 32-bit failures with "Image is too long/wide for the page" for certain PPDs
jsmeix <[email protected]>
| Newsgroups | gmane.linux.printing.gimp-print.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello, On 2021-09-11 17:51, Robert Krawitz wrote: > On 9/9/21 7:58 AM, jsmeix wrote: >> From my own experience about 30 years ago I remember >> that in practice >> "there is no such thing as 'equal' with float data types". >> >> I.e. code that is based on 'float1 == float2' cannot work >> reliably in general because even if float1 and float2 >> must me mathematically identical it does not mean their >> representations as a limited sequences of bits are same. > > That's certainly true, but the converse (that > inequality comparisons are safe) is not necessarily > true (even strict inequality comparisons, > e. g. < vs. <=, aren't always safe for numbers > that can't be represented exactly). Yes, of course. That's what I meant with "based on 'float1 == float2'". E.g. 'float1 < float2' is based on 'float1 == float2' because when one cannot safely/reliably determine when 'float1 == float2' holds then one also cannot safely/reliably determine when 'float1 < float2' holds because 'float1 < float2 <=> 'NOT float1 >= float2' and 'float1 >= float2' <=> 'float1 > float2' OR 'float1 == float2' so 'float1 < float2' needs (is based on) 'float1 == float2'. > We may need to implement small fudge factors, > maybe something like 0.000001 point I would not call it "fudge" because it is not about to somehow "cheat" a bit here but the contrary: It is about to ignore meaningless aritfacts of differences in some least significant bits. I.e. ignoring such meaningless aritfacts makes things working correct. Kind Regards Johannes Meixner -- SUSE Software Solutions Germany GmbH Maxfeldstr. 5 - 90409 Nuernberg - Germany (HRB 36809, AG Nuernberg) GF: Felix Imendoerffer