Re: Core Euphoria Functions
- Posted by CChris <christian.cuvier at ag?iculture?gouv.fr> Jan 24, 2008
- 567 views
Robert Craig wrote: > > George Orr wrote: > > To Rob and company - > > > > Is there a reason that we have the natural logarithm log(x) as a core > > Euphoria > > function but do not have exp(x)? I know I can get the equivalent using > > power(x,y) > > provided I remember the value of e to enough significant places. > > I didn't like to add lots of very simple global functions that > the programmer could create for himself, probably in > less time than it would take him to browse through the manual. > > We have "PI" in misc.e. > We could add "e" as well, > but I bet that would cause a lot of naming conflicts. > > Regards, > Rob Craig > Rapid Deployment Software > <a href="http://www.RapidEuphoria.com">http://www.RapidEuphoria.com</a> For largish values of x (around 12 iirc, I don't have my test files at hand), power(E,x) starts drifting from exp(x), even with the most accurate value of E as double.. Introducing exp() would have the side benefit of not needing to define E - because of the likely name clashes -, since exp(1.0) would work well. CChris