acer

32328 Reputation

29 Badges

19 years, 318 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

My earlier post mentioned "similar" treatment for properties. I was thinking  of  something like extended_real. The difficulties are that adding it to the property lattice would likely not be nearly enough. Other parts of Maple (`is/internal`, coulditbe, `convert/PropertyRelation`, convert/relation, etc) might also need to be taught explicitly how to use it. Some code logic might have to be expanded. That would involve work -- how much being hard to estimate in advance. And suprising things might break. Even after covering all the detectable cases (from running a test suite) there could well still be important broken situations as yet not discovered.

It could be a lot of work, to fix a few examples (which not everyone might agree are utterly wrong?!).

acer

Suppose one is working inside the IntTutor. Eg,

> Student[Calculus1][IntTutor](exp(x)*sin(x));

Now, if one hits the All Steps (or Next Step) button then the problem is solved by parts. But Maple does not show which choices it made in applying the Parts rule. One would have to figure it out, working backwards from the line resulting from its application. Setting infolevel[Calculus]=1000 didn't make the choices get shown in either the tutor or the parent worksheet.

Also, once the tutor is exited, the particular by-parts choices made during the solving of the problem is not shown after executing the command,

> Student[Calculus1][Show](all);

That's true even if one sets,

> infolevel[Calculus1]:=1000:

before invoking the tutor.

I don't see how to get Student:-Calculus1 to solve this example showing all the steps and including some printed display of the by-parts choice. (I think this is in agreement with Tim's point.)

acer

Suppose one is working inside the IntTutor. Eg,

> Student[Calculus1][IntTutor](exp(x)*sin(x));

Now, if one hits the All Steps (or Next Step) button then the problem is solved by parts. But Maple does not show which choices it made in applying the Parts rule. One would have to figure it out, working backwards from the line resulting from its application. Setting infolevel[Calculus]=1000 didn't make the choices get shown in either the tutor or the parent worksheet.

Also, once the tutor is exited, the particular by-parts choices made during the solving of the problem is not shown after executing the command,

> Student[Calculus1][Show](all);

That's true even if one sets,

> infolevel[Calculus1]:=1000:

before invoking the tutor.

I don't see how to get Student:-Calculus1 to solve this example showing all the steps and including some printed display of the by-parts choice. (I think this is in agreement with Tim's point.)

acer

I's pretty sure that you realize that setting trace() is an awkward solution to this.  :)

It would be much nicer if it were shown at some level of infolevel[IntegrationTools].

acer

I's pretty sure that you realize that setting trace() is an awkward solution to this.  :)

It would be much nicer if it were shown at some level of infolevel[IntegrationTools].

acer

Yes, that's why I mentioned the 'numeric' versus 'extended_numeric' types above. But it's hard to tell whether that is the way to go, and how it might (best) be implemented without breaking all sorts of things in surprising ways.

acer

Ok, sorry. I thought that it was hard, to separate the coding errors from the math, because it's so unclear what was wanted. Maybe the (-1)^(n+1) for n odd is indeed what was wanted, and any simplification to that is expected. It's not clear.

As for the tricks to generate the odd (or even) integers in the formula, it's hard to tell whether that too is part of the assignment or is just incidental. And it's unclear because a new user might well expect Maple's `sum` or `add` functions to handle those directly with a special syntax (instead of the standard "trick").

I was also wondering whether the original poster meant to sum from 1 to N, using n as the index of summation. It's not clear.

acer

Ok, sorry. I thought that it was hard, to separate the coding errors from the math, because it's so unclear what was wanted. Maybe the (-1)^(n+1) for n odd is indeed what was wanted, and any simplification to that is expected. It's not clear.

As for the tricks to generate the odd (or even) integers in the formula, it's hard to tell whether that too is part of the assignment or is just incidental. And it's unclear because a new user might well expect Maple's `sum` or `add` functions to handle those directly with a special syntax (instead of the standard "trick").

I was also wondering whether the original poster meant to sum from 1 to N, using n as the index of summation. It's not clear.

acer

Others that I find strange,

> assume(x=3);
> is(x<4); # ok
                                     true
 
> is(x<3); # ok
                                     false
 
> assume(x=infinity);
> is(abs(x)<infinity);
                                     true
 
> assume(x>=infinity);
Error, (in assume) the assumed property or properties cannot be satisfied

acer

I understand the topology viewpoint.

But I am not happy with the mixed results. Neither am I thrilled with this:

> is( abs(x) < infinity );
                                     true

acer

That mechanism for setting compiler/linker flags for define_external (using that record like 'p') will do nothing for the Compiler.

Overriding the compiler/linker and flags for use by the Compiler is quite different. (I figured out a hack to accomplish it -- I'd have to find and dig it out...)

Instead, can you simply alias gcc='gcc -m32' in the linux shell from which you start Maple?

acer

You say that you are using 32bit Maple 12. And you have both 64bit and 32bit gcc compilers installed. Is the 32bit gcc the first one that will be found in the PATH that Maple sees?

Assuming that's the source of the problem, try appending the location of the 32bit gcc to be first in the PATH in a linux shell. Then start maple from there.

There is a way to force the Maple Compiler to use other values (CC, LDFLAGS, etc). But maybe this above is a simpler solution for your case.

acer

Yes, sure. I was trying (not very well) to preclude the need for all the details.

This one would have risked stirring that up again,

> simplify( signum(1,Q) ) assuming Q>0 or Q<0;
                                       0

acer

Yes, sure. I was trying (not very well) to preclude the need for all the details.

This one would have risked stirring that up again,

> simplify( signum(1,Q) ) assuming Q>0 or Q<0;
                                       0

acer

Eric, I suggest that you abandon using lists of lists for this. I would suggest using either an Array or a Matrix, and perhaps with float[8] datatype for maximal speed and minimal memory footprint.

For one thing, lists of lists are inherently bad for sorting, due to immutability. (Sorting lists of lists via attributes is neat, but the very fact that acrobatics are required makes it suspect.)

Extraction of columns or rows of a Matrix/Array is easy -- there are several nice ways and even nice syntax. If you sort a column, and store the permutations as a side-effect, then you can apply those permutations to all the Array/Matrix at once. There are easy ways to do that too, with nice syntax.

And, if the Array/Matrix is float[8] datatype then you can using Maple's Compiler on procedures that you write to do these tasks. Such a compiled routine could be the fastest approach.

Slicing an Array/Matrix (by sorted values in a named column, or not) is also very easy and relatively fast.

acer

First 522 523 524 525 526 527 528 Last Page 524 of 591