Re: Gutenprint 5.3.4: only on 32-bit failures with "Image is too long/wide for the page" for certain PPDs

Robert Krawitz <[email protected]>
Newsgroups gmane.linux.printing.gimp-print.devel
Message-ID <[email protected]>
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). We may need to implement small fudge factors, maybe something like 0.000001
point, for things that aren't exact (i. e. dyesub) or round the check functions up to the larger
integer number of points for comparison.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.