[SLUG] big numbers

From: mrock (mrock@stewartsigns.com)
Date: Wed Mar 31 2004 - 11:43:56 EST


I have a program that analyses calls to phone numbers. (yes, this is the
same program that I have struggle with for some time now) The data file
is sorted on phone number (area code and the number) that makes it a 10
digit number. My comparisons fail at 2 to the 31st power. My last
phone number that works is 2147493101. 2 to the 31st power is
2147483648. I think this is also the 2 Gbit limit I ran into in much
older systems. I am running RH 8.0.

How do I construct a test using numbers larger than this if the program
ignores all logic at this point?

This is one of my conditional statements and it is being ignored when
pnum exceeds my last phone number of 2147493101.
Ext is phone extension. P is for current value and pp is for previous
value. Str is a switch I set in the program.

elif [ $pnum -eq $ppnum -a $pext -eq $ppext -a $pext -lt 300 -a $str -eq
1 ] ; then

When all conditiona are true this condition fails to execute the desired
script. It just whizzes by. I have checked the debug file and
confirmed that all values are true and the condition should execute.

All suggestions are accepted.

Michael C Rock
Systems Analyst
JM Stewart Corp

-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS). Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 19:50:22 EDT