Preben Alsholm

11754 Reputation

22 Badges

15 years, 305 days

MaplePrimes Activity


These are replies submitted by Preben Alsholm

If Digits >=16 then you are asking for more digits than are supplied by using hardware floats, assuming that evalhf(Digits) evaluates to 15.

Thus your procedures using option hfloat can only benefit from that option if Digits <=15.

Incidentally, you called my attention to the existence of the option hfloat. Thank you!

Preben Alsholm

If Digits >=16 then you are asking for more digits than are supplied by using hardware floats, assuming that evalhf(Digits) evaluates to 15.

Thus your procedures using option hfloat can only benefit from that option if Digits <=15.

Incidentally, you called my attention to the existence of the option hfloat. Thank you!

Preben Alsholm

The problem seems to be default values {} or [].

Everything else I tried (  e.g. {{}},[[]], {a}, NULL, "" ) works fine.

It is not important that the type declared is 'Vector'.
The problem is exhibited in bare bones below.

restart;
DS:=proc({begynd::Vector:={}})
begynd
end proc:
################################
savelibname:="F:/DMat.mla";
savelib(DS);
restart;
libname:="F:/",libname;
DS();
eval(DS,1):
DS();
DS(begynd= <1,2,3>);
 

Preben Alsholm

Changing to .mla doesn't help.

I have just submitted a bug report.

Thank you!

Preben Alsholm

If you would like to see that the error message in fact does come up, you can get my package DMat from

http://www2.mat.dtu.dk/people/P.K.Alsholm/Noter/libDMat/

If you put the two files in a folder located at "F:/DMat/libDMat", you will see the problem after ececuting the following lines.
 

restart;
libname:="F:/DMat/libDMat",libname;
with(DMat):
K:=Matrix([[-.1,.075],[.1,-.2]]);
DSolveSys(K,variabel=x(t));
undebug(DMat:-DSolveSys);
DSolveSys(K,variabel=x(t));
 

I would be interested in knowing if you don't get the error message.

Preben Alsholm

This is how it should behave, yes.
However, it doesn't in my complicated setting.

Notice that my error message says "expects default value for keyword parameter ...".

What puzzles me in that error message is the word 'default', which doesn't appear in your error message.

After defining a matrix K, a vector b, the commands are

DSolveSys(K,b,variabel=<Q1(t),Q2(t)>);
Error, invalid input: DMat:-DSolveSys expects default value for keyword parameter begynd to be of type Vector, but received {}
undebug(DMat:-DSolveSys);
DSolveSys(K,b,variabel=<Q1(t),Q2(t)>);
 

After executing the undebug command (debug works too) the result from DSolveSys is perfect.

If I replace
begynd::Vector:={}
by
begynd::{Vector,identical({})}:={}

then there is no problem.
But why do I need to?

Why does that error message exist in Maple? There must be a reason?
I'm sorry that I cannot reproduce the error in a simple setting. 

Preben Alsholm

 

The reason I raised the question here was that 3 responses in comp.soft-sys.math.maple made me think that the problem was dependent on country specific settings. When I found out that the problem didn't exist in a Unix environment I realized that the 3 people responding might be using Unix. But you are quite right. I shall direct the question directly to Maplesoft.
First 200 201 202 203 204 Page 202 of 204