Stephen Forrest

Mr. Stephen Forrest

461 Reputation

13 Badges

20 years, 45 days
Software Architect

Social Networks and Content at

Maple Application Center

MaplePrimes Activity

These are replies submitted by Stephen Forrest

Thanks, that was it. I'm not sure how I went wrong initially. Oh well.
The times I get are the following, with an input of 10^6.
cs1:              0.322
s3 compiled:      0.411
s3 with evalhf:   2.096
s3 with evalf:   21.733
where cs1 is the compiled version of alec's s1 procedure and s3 is your latest code, i.e. the version adapted for use with evalhf.
The exact boundaries between the forums are not especially well-defined, and it would probably be wrong to impose rigid divisions about where things go. But what you've said about where content should go is consistent with the intent of the forums' creators.
I believe that this would require you to be using ISO 8859-1 or ISO 8859-15 character set. So if you've set your OS to use UTF-8, or you're using Windows which I believe still has its own strange set of high-bit ASCII characters, this symbol won't work.
I believe that this would require you to be using ISO 8859-1 or ISO 8859-15 character set. So if you've set your OS to use UTF-8, or you're using Windows which I believe still has its own strange set of high-bit ASCII characters, this symbol won't work.
A forum is a place for general discussions in a certain subject area. A blog ("weblog") is the personal commentary of an individual user.
Maple 9.5 (and later versions) has a package for solving local optimization problems, called Optimization. Enter
in Maple for more information. My rather limited understanding of genetic algorithm optimization is that the problem of optimizing a given algorithm is typically reduced to a problem in discrete optimization: that is, the feasible region is discrete, and each feasible point corresponds to the encoding of some variant of the algorithm. In that case, the Optimization package may be of use to you, since it has some support for integer programs (mostly integer linear programs, AFAIK). And as alec mentioned, there is also a toolbox for global optimization, which is sold separately from standard Maple. It might be useful if you require a global optimum. You might look at this set of pages.
As far as I am aware, there is no generally-available trial version of Maple 10. I would guess that if such a thing were available, it would not be hard to find on the Maplesoft website.
Wow, I see I'll really have to play with Compile more: you can really get quite impressive results with it here. I believe the reason for the bad performance of sp5 for larger numbers is that it relies on ithprime, which implicitly relies on some precomputed information. If you look at the ithprime procedure with showstat, there is a magic number there, called `ithprime/global/magicNumber`. The branch associated with inputs less than this threshold is fast because it avoids a lot of expensive primality tests by first testing for coprimality with the hardcoded product of the first 19 primes. I'm also quite impressed by the speed of your procedure s even without compilation: I would have thought that explicitly marking all multiples of a prime divisor would have been a much bigger pain than just doing the division by each successive prime and testing.
Here's a USENET posting by Gaston Gonnet from Thursday, September 13, 1990, advertising the release of Maple V Release 1:

My first guess was that this might be a browser problem, i.e. Joe's post was coming through as written, but the browser's parsing rules didn't allow style in

However, the HTML source is simply missing the 'style' part altogether, so this is presumably a Drupal issue.
The cavernous room that housed the mainframe computers (the "Red Room") was renovated into big but unspectacular classrooms in 1999 or so. Here's a link to the closing ceremonies. It was definitely a conversation piece while it was there.
Maple does not force any particular ordering of terms in a sum. The reason for this is that, in most situations, x+y and y+x are equivalent. So, for the sake of efficiency, the order is determined by the memory addresses of 'x' and 'y' from earlier in the computation. As Joe has said, to force an ordering, use the 'sort' command. For example,
> sort(x+2*x^2+1, [x], descending);
                                 2 x  + x + 1

> sort(x+2*x^2+1, [x], ascending);
                                 1 + x + 2 x
If we're going to move towards a wiki, I think that incrementally adding wiki-like features here would be a lot more work (and be a lot more bug-ridden) than simply taking existing free wiki software and adapting it to our purposes, to be used alongside the blogging/messageboard software. The most frequently used wiki software out there is MediaWiki, which would probably not be too difficult to rebrand with the MaplePrimes look-and-feel; see Wikipedia for an example of MediaWiki in use. What would go in a MaplePrimes wiki? The basic idea of a wiki is centred around the idea of a web page that can be edited by anyone. A simple idea, but it has implications that require a bit of thought. One issue is that wiki pages should not be owned by any one user. For example, one could have "Steve's Top 10 Maple Tips", but since the page name implies that only one person could edit it, this is rather contrary to the wiki spirit and might as well be a static webpage. A slightly subtler issue is that, even if they're not formally owned by anyone, pages should not exhibit the personalities of their creators excessively: the idea is to work collaboratively towards a useful result, and avoid a tug-of-war over the page in question. Wikipedia solves this with their Neutral Point of View policy. MaplePrimes could have a similar policy focused towards being constructive in discussions about Maple. Some ideas for what could evolve on a MaplePrimes wiki:
  • "recipes" of code for specific tasks
  • unofficial, community-provided "help pages" for Maple functions or other components of Maple
  • pages about using Maple written by and targeted towards members of specific communities (e.g. engineers, computational biologists, high-performance computing types, etc.)
  • code fragments for people new to the language
  • a good explanation of Maple's nondeterministic behaviour
I'm fairly familiar with the MediaWiki system from my edits on Wikipedia, so feel free to ask me any questions you might have about that.
I almost hate to spoil the fun, but for an explanation of the Trogdor reference, read this Wikipedia article, and if you still want to know more, watch the animated cartoon from which the whole thing came.
4 5 6 7 Page 6 of 7