× 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.



If  mean finding the value of e^x, if you're willing to accept an arbitrary
level of precision for e, RPGIV has an exponentiation operator: **

You can define e as a constant or assign it to a number and do something
like:

eval result = e ** x

You can alse investigate the ILE math apis or the C math functions which are
both pretty easy to prototype and call.  The ILE api documentation actually
has explicit definitions of the RPG data types necessary to call them.  C
library functions require mentioning the binding directory QC2LE.

> -----Original Message-----
> From: Trevor [mailto:trevor@airmail.net]
> Sent: Monday, December 04, 2000 6:29 PM
> To: MIDRANGE-L@midrange.com
> Subject: RPGIV math function
> 
> 
> Can anyone help?
> 
> I have to calculate the exponent of a number (e raised to the 
> power of that
> number where e = the natural logarithm 2.71828182845904). 
> Given I have no C
> compiler and I need to access this from RPGIV, how can I 
> create/access a
> procedure that would do this?
> 
> Thanks in advance,
> Trevor
> 
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.