Java has classes for arbitrary-precision floating point numbers and arbitrary-precision integers, named java.math.BigDecimal and java.math.BigInteger, respectively. In V5R1+, you can call java methods directly from ILE RPG IV, C or COBOL, so you could write a small ILE "wrapper" program to allow calling from any OPM language, (even MI), to use this support. Or, since java is "open source" you could also study the code that implements BigDecimal and BigInteger to see how they did it, and then write your own equivalent routines in MI. ;-) For a definitive book of mathematical algorithms, try: The Art of Computer Programming Volume 2 Seminumerical Algorithms by Donald Knuth Third Edition 1997 Addison-Wesley ISBN 0-201-89684-2 Regards, Mark S. Waterbury ----- Original Message ----- From: "Bobby Hicks" <Robert.Hicks@xxxxxxxxxxxxxxxx> To: <mi400@xxxxxxxxxxxx> Sent: Thursday, March 18, 2004 9:32 AM Subject: [MI400] Large number division > Does anyone know or have code that can divide large integer values. > Something that would handle values that may be greater than 30 digits? > Thanks in advance for your help. > > Bobby. > _______________________________________________ > This is the MI Programming on the AS400 / iSeries (MI400) mailing list > To post a message email: MI400@xxxxxxxxxxxx > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/mailman/listinfo/mi400 > or email: MI400-request@xxxxxxxxxxxx > Before posting, please take a moment to review the archives > at http://archive.midrange.com/mi400. >
As an Amazon Associate we earn from qualifying purchases.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.