Comment Is the ABL function EXP wrong?

Cecil

19+ years progress programming and still learning.
I was recently doing some comparisons of the ABL language to that of JavaScript. I've noticed JavaScript had EXP function witch only requires a single parameter the 'exponent', and the function returns ex, where x is the argument, and e is Euler's constant, the base of the natural logarithms. The ABL does not do this natively.

Also JavaScript also has a POW() function which is more identical to that of ABL's EXP( ) function.

Additionally, Excel also has EXP() function and only requires a single parameters (see attached screen shot).

Conclusion:

ABL's EXP() function should be renamed to a new function call POW() and a new version of the EXP() function should only have a single input parameter to be in-line with the rest of the mathematical world.

Or alternatively:

Amend the existing EXP() function to allow only a single parameter which represents the 'exponent' value and the 'base' value to become automatically equal to Euler's number constant (2.7182818284590452353602874713527...)

Reality:

Nothing is going to change as this will not provide any backward compatible functionally for existing ABL code.

Or am I completely wrong about the whole thing?
 

Attachments

  • ScreenShot014.png
    ScreenShot014.png
    8.2 KB · Views: 3

Rob Fitzpatrick

ProgressTalk.com Sponsor
No one in their right mind in product management at PSC is going to break tons of customer code just so they can (a) have a function for natural logarithms and (b) name it the same as in Javascript or Excel. I doubt either is a high priority. But avoiding breaking changes without a very good reason is a very high priority.

I'm not opposed to a new language function for e^x, although I'm not sure how much demand there is for that among ABL developers. It just shouldn't be called EXP().
 

TomBascom

Curmudgeon
Progress 4gl predates both JavaScript and excel. Obviously they both need to rename their functions to conform with the standard that progress set and they so unwisely ignored.
 

Cecil

19+ years progress programming and still learning.
Progress 4gl predates both JavaScript and excel. Obviously they both need to rename their functions to conform with the standard that progress set and they so unwisely ignored.

<geek>I do believe it was Hewlett-Packard with it's HP-35 pocket calculator, the world's first scientific pocket calculator that had exponential functions. And this was back in the early 70's. This was a time before Progress Software (Data Logic Corporation).</geek>
 

TomBascom

Curmudgeon
I couldn't comment on HP calculators. But my TI calculator from that era had an e^x key on it. It also had a y^x key.

Different languages have different names for things. They aren't "wrong", they're just different. In this case the 4GL has chosen a more flexible approach -- rather than implement an exp() function that assumes the base = "e" and a second pow() function to use for arbitrary base values we got a more useful function that lets us specify whatever base we'd like.
 
Top