× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



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.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.