Carl Love

Carl Love

27731 Reputation

25 Badges

12 years, 163 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

@janhardo I don't see any connection between your Reply and the OP's Question or its attached worksheet. Perhaps you were intending to answer some other Question on this forum.

You simply need to learn how to do better searches with Google (or other search engine). The following searches using Google in Google Chrome returned exactly the info that you wanted as the the top hits. These were my 1st attempts: no guessing, no refining.

largest maplesoft product

earliest maple math software release

Changing the name won't help, because all the old web pages will still contain "Maple", which'll thus be the word indexed by Google.

@sursumCorda Your map2(`?()`, [f], L) is a great idea. It can be further shortened to

[`?()`]~(f, L)

In addition to @mmcdara 's fine Answer, I want to caution you to be careful not to confuse these two error messages:

  1. initial Newton iteration is not converging
  2. Newton iteration is not converging

The 2nd is much more difficult to fix than the 1st. Fixing the 1st often leads to the 2nd; nonetheless, you should still fix the 1st before attempting to fix the 2nd. 

@aroche I believe that the following much simpler is evaluation shows a more-proximal cause of the disappointing FAIL that you obtained for the cos/sin problem:

is(Or((x,-x)=~ abs(x))) assuming x::real;  #1
                              FAIL

Compare with this correct evaluation:

is(signum(x) in {-1,0,1}) assuming x::real;   #2
                              true

It should be easy to convert problem #1 to problem #2, and I think that this alone may be enough to solve the cos/sin problem and numerous others involving a disjunction of the branches of sqrt under a real assumption.

The above Answer was written before I saw that simulated rolls of a standard 6-sided die were a requirement for you. The above code can be easily modified to accomodate that. A roll in 1..6 can be converted to your {-1, 1} by the simple function sign(d-4), so the subs is still not needed. (See help page ?sign, and note that sign(0)=1, and don't confuse sign with signum.)

N:= 1000:
randomize(); #optional 
D6:= rand(1..6): #6-sided die simulator
Y:= [seq['scan'= `+`]](sign~([seq['scan'= D6]](1..N) -~ 4)):
plots:-listplot(Y, size= 200*[4,1], thickness= 0.7, color= red);

Note the distinction between type(R, some_type) and hastype(R, some_type). The hastype checks and all of its substructures. I think that what you want is simply type(...).

The ​​​with command has global side effects, and it shouldn't be used in procedures (or, at the very least, it shouldn't be used in the way that you've used it). The fact that it may sometimes seem to work is irrelevant. You can replace the three with commands with 

uses plots, DEtools, PDEtools;

This is an outstanding explanation. You should formally publish it for a wider audience than the Maple community. 

So, is each pair of teams supposed to play exactly one match? For 8 teams, there are 28 pairs, so 2 matches per week covers 14 weeks. On such a schedule, 4 teams wouldn't play on any given week. For 10 teams, there are 45 pairs, so 3 matches per week covers 15 weeks. This schedule would also have 4 teams not playing on any given week.

@salim-barzani When someone on MaplePrimes says "1D input", this "Maple Input" that you see on the menu within Maple itself is exactly what they mean. I don't think that the term "1D input" is officially used by Maplesoft. Thiat's a bit strange because "1D input" is the most natural term for the mode that is the alternative to 2D Input, any either mode is a method of giving input to Maple, so a naive user wouldn't guess that "Maple Input" refers strictly to the non-2D mode.

@segfault There is no command s-convert. It's just the previously defined series s minus all of its terms other than the order term. In other words, the `-` is simply the ordinary subtraction operator, with its second operand being the result of the convert command.

Even easier:

TypeTools:-AddType(gtoint, And(posint, Not(1)));

This avoids two procedure calls every time that the type is checked: a call to `type/satisfies` and a call to the anonymous procedure s-> s > 1

Unlike satisfiesAnd and Not are built-in type constructors, which don't involve procedure calls.

@salim-barzani The fact that there are extra characters in your input is not completely hidden. Look closely at the solve command in your Question and the one in acer's Answer. For the one in your Question, notice that there is extra white space before the A[0] {between the { and the A). Suspicious extra white space in 2D input usually means extra, unseen, characters. Once you get used to it, these extra white spaces "stick out like a sore thumb" (an English idiom meaning "immediately visibly obvious").

@Rouben Rostamian  Maple strings, as we know them today, were introduced in Maple 6 (I think). Before that, there was no syntactic distinction between symbols (a subtype of names) and strings. They were only distinguished by their intended use. The command substring comes from that time.

Note that substring works for strings and symbols. It doesn't work for names that aren't symbols.

1 2 3 4 5 6 7 Last Page 1 of 704