pdf-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pdf-devel] Issues with bug FS#105


From: Jose E . Marchesi
Subject: Re: [pdf-devel] Issues with bug FS#105
Date: Wed, 31 Mar 2010 14:04:19 +0200 (CEST)

    However, I believe there is some issue with signs.

    [...]

    That means that the result sign is _only_ decided on the dividend
    sign.

The sign of the integer modulus when either the dividend or the
divisor is negative is implementation defined in C.  Other languages,
such as Ada, enforce some policy or provide several different
solutions.

I don't have the Knuth books at hand now, but if we are implementing
that method then we have to use his rule of election.  Can someone
check?

In any case, code like:

          if (result_sign == -1)
            {
              result_sign = -1;
            }
          else
            {
              result_sign = -1;
            }

needs a check and a rewrite.

--
Jose E. Marchesi    address@hidden
GNU Project         http://www.gnu.org






reply via email to

[Prev in Thread] Current Thread [Next in Thread]