[sac-dev] A possible way to fix "WARNING: Number 4003 integer too large"

Kuang He icrazy at gmail.com
Wed Sep 3 11:11:54 PDT 2008


On Thu, Aug 28, 2008 at 1:01 PM, Brian Savage <savage at uri.edu> wrote:
> You are correct in that this routine contains a bug and
> you are again correct that it will be changed to use the strtol() routine
> in future releases.  I have routines ready to replace this one and the
> one in cnvatf.c as well.  This is major change to the code as it is heavily
> used and the ramifications of changing it need to be dealt with properly.

Dear Brian,

When we are on this point, how is the status of the testing suite? I
saw this in the History file of the source code.

Is it still just an idea, or is it already a work in progress? How can
can we contribute to that? If we had a unit testing suite already, it
would be a lot safer to refactor the code.

Best regards,

-- 
Kuang He
Department of Physics
University of Connecticut
Storrs, CT 06269-3046

Tel: +1.860.486.4919
Web: http://www.phys.uconn.edu/~he/

> Thanks for your interest. If you have other suggestions or code/bug fixes we
> would be glad hear them.
>
> Cheers
> Brian
>
> On Aug 28, 2008, at  12:48 PM , Kuang He wrote:
>> I met this "WARNING: Number 4003 integer too large" when I tried to
>> multiply my data by a factor of 10^9, and found in the changelog that
>> it is a known bug.
>>
>> [...]
>> In my opinion, instead of using magic numbers 1000000000 and 100000
>> above, it might be better to use strtol() to convert strings to
>> longints. strtol() can also show if the resulting value is out of
>> range (using errno ERANGE). Based on the linux manpage of strtol()
>> I've been reading, this function conforms to SVr4, 4.3BSD, C89, C99
>> and POSIX.1-2001, so there should be no portability problems of using
>> this at all .
>> --
>> Kuang He


More information about the sac-dev mailing list