1. Core Euphoria Functions
- Posted by George Orr <gorr at woh.rr.c??> Jan 24, 2008
- 590 views
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. Just curious! George
2. Re: Core Euphoria Functions
- Posted by Robert Craig <rds at Rapi?Eu?horia.com> Jan 24, 2008
- 569 views
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 http://www.RapidEuphoria.com
3. Re: Core Euphoria Functions
- Posted by CChris <christian.cuvier at ag?iculture?gouv.fr> Jan 24, 2008
- 568 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
4. Re: Core Euphoria Functions
- Posted by George Orr <gorr at w?h.rr.?om> Jan 24, 2008
- 560 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> Rob - I actually use your solution myself, having added the value for e (I called it GSL_E since I borrowed it from the GNU Scientific Library code) and having added an exp(x) function using this value of e and the power(x,y) function. As a personal confession, I spent a good bit of time going through the manual looking for exp(x) which I was certain must be there after I found log(x). This may just be a personal problem, but others curious about Euphoria might make the same assumption and get turned off when they can't find exp(x), e, or any explanation of how they are expected to "invert" the provided log(x) function. If nothing else, perhaps a note in the log(x) manual entry indicating the use of power(x,y) to "invert" would be useful. As a side note, I did a quick comparison of using the power(x,y) solution to get to exp(x) versus linking to the libm exp(x) (on Linux). The timings are comparable, so I don't think there is a performance question here. I really like Euphoria as a primary language (for the complete amateur in my case) and just think not having complete "pairs" of elementary functions, like exp(x) to go with log(x), may be a turn off for others taking a quick look at the language. Thanks for Euphoria, by the way. I occasionally get drawn to other languages but seem to always come back! I think the basis of the language in sequences is very powerful and probably not well understood or used! I would like to see our user community grow as others come to appreciate your good work and the many great contributions of other Euphorians. Thanks! George
5. Re: Core Euphoria Functions
- Posted by George Orr <gorr at w?h.rr.?om> Jan 24, 2008
- 550 views
CChris wrote: > > 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 I tried this and didn't really see any difference until x is larger than 20 and insignificant differences afterwards. For x = 30 difference between the power(x,y) and libm exp(x) solution was less than 0.02 in ten trillion. Of course, libm could be unstable in this range as well! I don't really see a problem in accuracy, although I would prefer to have exp(x) as a core Euphoria function. George
6. Re: Core Euphoria Functions
- Posted by c.k.lester <euphoric at cklest?r.?om> Jan 24, 2008
- 548 views
George Orr wrote: > Robert Craig wrote: > > George Orr wrote: > > > Is there a reason that we have the natural logarithm log(x) as a core > > > Euphoria > > > function but do not have exp(x)? > > 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. > I actually use your solution myself, having added the value for e (I called > it GSL_E since I borrowed it from the GNU Scientific Library code) and having > added > an exp(x) function using this value of e and the power(x,y) function. This is why there's often been a call for standard libraries. That's also why I finally created the Euphoria Unofficial Standard Libraries, which includes math.e and which defines E and exp(). If anybody would like to take a look, please see the entry titled, "The Perfect Euphoria Setup" at my Euphoria site: http://cklester.com/euphoria/, and make sure to visit the EusLibs repository at SourceForge. Work with me, people. :)
7. Re: Core Euphoria Functions
- Posted by George Orr <gorr at woh.r?.com> Jan 24, 2008
- 563 views
- Last edited Jan 25, 2008
c.k.lester wrote: > > George Orr wrote: > > Robert Craig wrote: > > > George Orr wrote: > > > > Is there a reason that we have the natural logarithm log(x) as a core > > > > Euphoria > > > > function but do not have exp(x)? > > > 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. > > I actually use your solution myself, having added the value for e (I called > > it GSL_E since I borrowed it from the GNU Scientific Library code) and > > having added > > an exp(x) function using this value of e and the power(x,y) function. > > This is why there's often been a call for standard libraries. That's also why > I finally created the Euphoria Unofficial Standard Libraries, which includes > math.e and which defines E and exp(). > > If anybody would like to take a look, please see the entry titled, > "The Perfect Euphoria Setup" at my Euphoria site: <a > href="http://cklester.com/euphoria/,">http://cklester.com/euphoria/,</a> > and make sure to visit the EusLibs repository at SourceForge. > > Work with me, people. :) C.K. - I suspect this is just what is needed, but am having trouble accessing. Going straight to the Sourceforge reposition indicates no packages uploaded yet. Using SVN (I am using RapidSVN on Ubuntu Linux) and pointing to the repository with the URL on your website results in the system asking for a user id and password. Do you have any more information on how to get to your libraries? I am most interested in taking a look. George!
8. Re: Core Euphoria Functions
- Posted by c.k.lester <euphoric at ckl?ster.?om> Jan 24, 2008
- 552 views
- Last edited Jan 25, 2008
George Orr wrote: > I suspect this is just what is needed, but am having trouble accessing. > > Going straight to the Sourceforge reposition indicates no packages uploaded > yet. > Using SVN (I am using RapidSVN on Ubuntu Linux) and pointing to the repository > with the URL on your website results in the system asking for a user id and > password. Hmmmm. Do you have a sourceforge account? Maybe that's what it needs... because the repository is free to read from by anybody. In fact, Sourceforge says there's no provision for me to DENY read access. :)
9. Re: Core Euphoria Functions
- Posted by George Orr <gorr at w?h.rr.co?> Jan 24, 2008
- 556 views
- Last edited Jan 25, 2008
c.k.lester wrote: > > George Orr wrote: > > I suspect this is just what is needed, but am having trouble accessing. > > > > Going straight to the Sourceforge reposition indicates no packages uploaded > > yet. > > Using SVN (I am using RapidSVN on Ubuntu Linux) and pointing to the > > repository > > with the URL on your website results in the system asking for a user id and > > password. > > Hmmmm. Do you have a sourceforge account? Maybe that's what it needs... > because the repository is free to read from by anybody. In fact, Sourceforge > says there's no provision for me to DENY read access. :) CK - I did not have a sourceforge account, so I got one. Still didn't help. When trying to use SVN to access https://euslibs.svn.sourceforge.net/svnroot/euslibs/trunk I get a popup asking for a user id and password. I tried the Sourceforge user id and password, but this failed. Error message was: "Error while performing action: MKACTIVITY of '/svnroot/euslibs/!svn/act/bdf653ba-3cb7-4516-b5b8-78f2eb1f7105': authorization failed (https://euslibs.svn.sourceforge.net)" There is a (significant) probability that I'm just not doing something right with SVN. Has anyone else accesses CK's repository? If so, do you have any advice?? Thanks. George
10. Re: Core Euphoria Functions
- Posted by George Orr <gorr at woh.rr.?om> Jan 24, 2008
- 565 views
- Last edited Jan 25, 2008
c.k.lester wrote: > > George Orr wrote: > > I suspect this is just what is needed, but am having trouble accessing. > > > > Going straight to the Sourceforge reposition indicates no packages uploaded > > yet. > > Using SVN (I am using RapidSVN on Ubuntu Linux) and pointing to the > > repository > > with the URL on your website results in the system asking for a user id and > > password. > > Hmmmm. Do you have a sourceforge account? Maybe that's what it needs... > because the repository is free to read from by anybody. In fact, Sourceforge > says there's no provision for me to DENY read access. :) CK - I got to the repository. As I suspected there was a slight user error on my part! I'm taking a look at your libraries. Do you have some sort of "governance" scheme in mind to manage this once it becomes wildly popular? Thanks for your help. George
11. Re: Core Euphoria Functions
- Posted by c.k.lester <euphoric at ckl?ster?com> Jan 24, 2008
- 561 views
- Last edited Jan 25, 2008
George Orr wrote: > > I got to the repository. As I suspected there was a slight user error on my > part! Can you document it here so if others encounter it they'll have an answer? :) > I'm taking a look at your libraries. Do you have some sort of "governance" > scheme in mind to manage this once it becomes wildly popular? Uh. No. Should I? *gulp* P.S. They aren't "my" libraries, per se. They are just a collection of open source libs I have found that seem to cover the basics of a "standard library" for Euphoria. I'm open to suggestions on what to do with the repository and the libraries therein. :)
12. Re: Core Euphoria Functions
- Posted by Robert Craig <rds at RapidEuphor?a.?om> Jan 24, 2008
- 575 views
- Last edited Jan 25, 2008
George Orr wrote: > As a personal confession, I spent a good bit of time going through the manual > looking for exp(x) which I was certain must be there after I found log(x). > This > may just be a personal problem, but others curious about Euphoria might make > the > same assumption and get turned off when they can't find exp(x), e, or any > explanation of how they are expected to "invert" the provided log(x) function. > If nothing else, perhaps a note in the log(x) manual entry indicating the use > of power(x,y) to "invert" would be useful. OK, done. Thanks, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com
13. Re: Core Euphoria Functions
- Posted by George Orr <gorr at w?h.rr.c?m> Jan 24, 2008
- 549 views
- Last edited Jan 25, 2008
c.k.lester wrote: > > George Orr wrote: > > > > I got to the repository. As I suspected there was a slight user error on my > > part! > > Can you document it here so if others encounter it they'll have an answer? :) > > > I'm taking a look at your libraries. Do you have some sort of "governance" > > scheme in mind to manage this once it becomes wildly popular? > > Uh. No. Should I? *gulp* > > P.S. They aren't "my" libraries, per se. They are just a collection of open > source libs I have found that seem to cover the basics of a "standard library" > for Euphoria. I'm open to suggestions on what to do with the repository and > the libraries therein. :) CK - My experience is probably more embarrassing than helpful. I apparently originally used the "import" function rather than the "checkout" function. No id or password was required for the checkout. It appears one is needed to import (which seems to be a check back in with changes). I just used the rapidsvn gui interface to svn (both loaded via Syntatics on my Ubuntu 7.10), chose (red face here) the checkout option from the repository menu dropdown, entered your URL for the source and a destination folder I had created earlier. Worked like a charm at that point. Dumb user..... Relative to the need for governance: Your repository is useful now as sort of a recommended subset of the Euphoria archive. If it is ever graduated to an "official" set of include files, it would seem that some control mechanism would be needed. In that case, there should be some attempt to eliminate duplication, make naming standard, and provide global documentation of some sort. No hurry on this! Thanks! George
14. Re: Core Euphoria Functions
- Posted by c.k.lester <euphoric at ?klester.c?m> Jan 24, 2008
- 553 views
- Last edited Jan 25, 2008
George Orr wrote: > > My experience is probably more embarrassing than helpful. LOL! (Pointing at you). Actually, I did the EXACT same thing when I first started using SVN. Oops! heheh! So, we can be embarrassed together. :D > Your repository is useful now as sort of a recommended subset of the Euphoria > archive. If it is ever graduated to an "official" set of include files, it > would seem that some control mechanism would be needed. Oh. Well, I'm a dictator. All things go through me. Is that control enough?! (I'm a kind dictator, though, so no worries.) > In that case, there should be some attempt to eliminate duplication, make > naming > standard, and provide global documentation of some sort. I agree. Volunteers welcome to apply to "clean up" the libs. :)
15. Re: Core Euphoria Functions
- Posted by Matt Lewis <matthewwalkerlewis at ?mail.c?m> Jan 24, 2008
- 552 views
- Last edited Jan 25, 2008
c.k.lester wrote: > > George Orr wrote: > > > > My experience is probably more embarrassing than helpful. > > LOL! (Pointing at you). Actually, I did the EXACT same thing when I first > started using SVN. Oops! heheh! So, we can be embarrassed together. :D Yeah, that was a lot of fun. :P That's why I like the command line version. It's a lot harder to mess things up. Matt
16. Re: Core Euphoria Functions
- Posted by c.k.lester <euphoric at ckl??ter.com> Jan 25, 2008
- 560 views
Matt Lewis wrote: > c.k.lester wrote: > > George Orr wrote: > > > My experience is probably more embarrassing than helpful. > > LOL! (Pointing at you). Actually, I did the EXACT same thing when I first > > started using SVN. Oops! heheh! So, we can be embarrassed together. :D > Yeah, that was a lot of fun. :P See, George. Not only did I do it wrong, I also caused trouble for somebody else. That's taking ineptitude to a whole new level that you just can't match! :P