Adept Scientific - English
The world's best software for research, science and engineering.
flag arrow
clearclear
 

 Adept Store | register Join My Adept | Flags  
Adept Scientific | Amor Way | Letchworth Garden City | Herts | SG6 1ZA | Tel: +44 (0)1462 480055  
UKusdedksvnofi
Home
Products
Training
Consultancy
 Buy Online
Downloads
Education
Support
My Adept
International |  About Us |  Contact Us |  Press Room |  Jobs


The Next Steps

• Ask us a question
• Maple Product Tour
• Buy Maple Now
• View Maple Pricing
• Find out about Online Training
• Download a Brochure
• Request a Brochure
• Download a Demo
• Request a Demo
• Meet Our Team
• Read our RSS Feeds

Learn More

Maple Home
Maple 11 Professional
Maple 11 Academic
Maple 11 Student Use
Recorded Online Seminars
FREE Training Resources


MapleNet
Maple T.A.
MapleConnect
BlockImporter for Simulink
BlockBuilder for Simulink
Maple Toolboxes
Maple Rave Reviews
Maple Study Guides
Books about Maple
System Requirements

View Maple 10 in Action
Product Comparison Chart

Latest Information

New Features: Professional
New Features: Academic
The Maple Reporter
The Maple Reporter Online
Numerical Algorithms Group
(NAG)


Service & Support

Maple 10 Training Videos
MaplePrimes, blogs, forums
Elite Maintenance Program
Application Centre
Powertools
Maple User Group (MUG)
Join the Maple User Group
(MUG)

Search the Knowledge Base
Technical Support request

List Archives >  Maple User Group List Archive >  Archive by date >  This Month By Date >  This Month By Topic

[MUG] A bug?

Search email archive for  

[MUG] A bug?
Author: Carl Eberhart    Posted: 30/07/2001 21:01:47 GDT
>> From: "Carl Eberhart" "carl"

When I try to export a maple 7 worksheet to html the second time, maple
will not overwrite the
files. When I try to remove those old html files using del, I get the
error message that they cannot be removed because they are being used by
another process. I assume the other process is Maple itself, although
I don't understand what Maple would do with exported html files. The
net effect is that if I want to make the smallest change in the html
exported from Maple 7, I have to quit Maple, then remove all the old
html files with del, then start Maple up again, load the worksheet, make
the change, and finally export it to html. This is much too much work.
Is there a fix?
Thanks,
Carl Eberhart

[MUG] Re: A bug?
Author: Maple User Group    Posted: 03/08/2001 20:43:32 GDT
>> From: Maple User Group "maple_gr"

-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-

Date: Tue, 31 Jul 2001 17:27:45 -0700 (PDT)
From: Robert Israel "israel"
To: "maple-list"
Subject: A bug?


Curious... When I try this (under Windows NT), Maple very reasonably warns
me (the second time) that a file by that name (foo.html) already exists,
and asks "Do you want to replace it?". If I say yes, it again pops up
This file already exists:
fooTOC.html
Would you like to replace this file?

I click on "Yes to All", and everything goes smoothly.

What platform are you using?

In any case, I think there should be no need to quit and restart Maple:
an easier work-around would be to export to a new directory each time.
Then after you're finished with Maple, you can delete the directories and
all files for the old versions.

Robert Israel "israel"
Department of Mathematics http://www.math.ubc.ca/~israel
University of British Columbia
Vancouver, BC, Canada V6T 1Z2

On Mon, 30 Jul 2001, Carl Eberhart wrote:

> When I try to export a maple 7 worksheet to html the second time, maple
> will not overwrite the
> files. When I try to remove those old html files using del, I get the
> error message that they cannot be removed because they are being used by
> another process. I assume the other process is Maple itself, although
> I don't understand what Maple would do with exported html files. The
> net effect is that if I want to make the smallest change in the html
> exported from Maple 7, I have to quit Maple, then remove all the old
> html files with del, then start Maple up again, load the worksheet, make
> the change, and finally export it to html. This is much too much work.
> Is there a fix?
> Thanks,
> Carl Eberhart
>
>



-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-

From: "Carl Eberhart" "carl"
To: "Robert Israel" "israel" "maple-list"
Subject: A bug?
Date: Tue, 31 Jul 2001 23:44:24 -0400

I am using Windows 2000 at home and at school, but the problem has
disappeared for me, and I can't duplicate it. However, I still cannot
delete an exported html file until I exit the Maple that exported it.
Carl Eberhart


-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-

Date: Wed, 01 Aug 2001 10:26:34 +0200
From: Koch-Beuttenmueller "Heike.Koch-Beuttenmueller"
To: "maple-list"
Subject: A bug?


Please , tell us on which Platform you have those problems. On Compaq
True Unix I have no problems, but Maple is asking me if itshall
overwrite the old version.

Mit freundlichen Gruessen

Heike Koch-Beuttenmueller

=======================================================
Dr. Heike Koch-Beuttenmueller
Universitat Ulm
Universitatsrechenzentrum
Albert-Einstein-Allee 11
D-89081 Ulm
Germany
e-mail: "Heike.Koch-Beuttenmueller"
Telefon: 0731 5022465
=======================================================



-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-

Date: Fri, 03 Aug 2001 12:36:51 -0400
To: "maple-list"
From: Michael Faia "mafaia"
Subject: A bug?

First of all, I use Maple 6 with Windows 98.

(1) Before I export to html on a remote server, I make sure that I have just
executed and saved the Maple worksheet. I'm not sure, but I think the html
export process can be made very unhappy if the registers are not filled with
something, whether appropriate or not.

(2) I place each worksheet saved as html in a separate sub-directory of the
remote drive where my html material resides. This means that, if you use frames
and tables of contents, then in each sub-directory you should see only four
entities: the "coordinating" file having (by default) the same name as your
worksheet but with little content; the file that contains the bulk of the
worksheet, which will have a suffix "1" added to your worksheet name; the file
that contains the Table of Contents (t of c), if you have one; and a
subdirectory that contains "images," i.e., mathematical expressions, plots,
etc., from the worksheet. The t of c will be displayed at the left of your
viewing frame in the browser, and you can click on any given heading in order
to go directly to it. (See the Maple stuff on my netsite.)

(3) Not all sub-headings created by Maple seem to be picked up as part of the
html t of c. For instance, if you use the "heading 2" font in Maple, make sure
that the little button with a minus sign appears just to the left of your
heading. My experience is that if you have only the + buttons, the
corresponding headings will not be picked up by html and added to your t of c.
There should be helps to get this straight.

When I try to remove those old html files using del, I get the
>error message that they cannot be removed because they are being used by
>another process.

(4) The three files and the "images" mentioned above should all be overwritten
each time you export from Maple. When you carry out the export, make sure that
you see the window that asks if you wish to overwrite (say yes), and make sure
that you see the window that asks if you want to continue using "images" as the
sub-directory name, and want to use frames--there's a checkmark for this
latter. These are the defaults, and I always go with them. If your sub-headings
are not correct in the worksheet, I think all that happens is that html will
simply not place them as a clickable list to the left of your browser screen.

I assume the other process is Maple itself, although
>I don't understand what Maple would do with exported html files.

I don't know. I tried to get Maple to do something the other day with Carl
DeVore's procedure (in html when I got it) for adding log scales to 3-d plots,
but got stuck. But I suspect I just don't know what I'm doing here.

The
>net effect is that if I want to make the smallest change in the html
>exported from Maple 7, I have to quit Maple, then remove all the old
>html files with del,

You should not have to do that!

then start Maple up again, load the worksheet, make
>the change, and finally export it to html.

(5) You should be able to click back to Maple, make changes, execute them, and
shoot everything over to your html directory. It's smooth if everything above
is working. Remember, things may execute slowly. On my system, things are very
slow. (Construction people just tore up my cable twice in the last week, which
did not help, although I'm trying to parley things into fiber-optic.)

After all, html, LaTeX, etc. are not Maple. You have to backtrack all the time.
I've spent hours editing LaTeX files that I had to overwrite before lunchtime.

On the other hand, once you have your html files set up, there is no reason why
you cannot tweak them around directly. I often use Wordpad to make minor
alterations, e.g., changing the color of the background or changing the text
font. You can also do some editing with browsers. The file that you would
ordinarily wish to edit, among the three set up by Maple in your upper
subdirectory (not the "images" sub-subdirectory), is the one that will have a
suffix "1" attached to the name of your worksheet. This is the big one.

Don't rush your system. Maple takes a long time to ship things to my html
server, and the Netscape editor takes forever to move things back and forth. It
seems to jerk around the *.gif files whether you want to edit them or not. Look
for all the clues indicating Netscape is finished.

Of course, you can play around with Maple commands in the html files (as in
LaTeX), with the individual *.gif files in the "images" directory, etc., but
this game is usually not worth the candle.

This is much too much work.

Michael A. Faia
Box 8795
327 Richmond Road
College of William and Mary
Williamsburg, VA 23187-8795
757.221.2593
"mafaia"
<http://www.Soft-Eclectic.com>
<http://faculty.wm.edu/mafaia>



[MUG] A bug?
Author: Werner Burkhardt    Posted: 17/09/2001 14:13:23 GDT
>> From: Werner Burkhardt "burk"

> Hello,

can anybody explain this behavior of maple 7

> with( RealDomain ):

> solve(x^2-2=0);

sqrt(2)

Thank for an hit!

Werner Burkhardt





[MUG] Re: A bug?
Author: Helmut Kahovec    Posted: 01/10/2001 09:07:12 GDT
>> From: Helmut Kahovec "helmut.kahovec"

Werner Burkhardt wrote:

>| can anybody explain this behavior of maple 7
>| > with( RealDomain ):
>| > solve(x^2-2=0);
>| sqrt(2)


Well, as others have already pointed out, the bug is in the local
procedure clean() of RealDomain. We may fix it as shown below. Setting

> infolevel[modifyM]:=3:

prints some information on the exported and local procedures of a module
instance while modifyM() is executing. Additionally, change contexts of
modules by executing the with() function since modified module instances
do not correctly work with the 'use' statement. Nested modules are not
yet supported.


With kind regards,

Helmut


> restart;

> extractName:=proc(addr)
local NAME,L,s,i,q;
option `Copyright (c) 2001 by Helmut Kahovec. All rights reserved.`;
NAME:=8;
L:=[disassemble(addr)];
if L[1]=NAME then
s:=``;
for i from 4 to nops(L) do
q:=L[i];
s:=s,
convert(
convert([seq(irem(q,256,'q'),i=1..4)],bytes),
name
)
end do;
cat(s)
else
error "address does not point to a name"
end if
end proc:

> extractMember:=proc(M::`module`,m::evaln)
local EXPORTS,LOCALS,S,EA,LA,EN,LN,pos;
option `Copyright (c) 2001 by Helmut Kahovec. All rights reserved.`;
EXPORTS,LOCALS:=2,4;
S:=disassemble(disassemble(addressof(M))[2]);
EA:=[disassemble(S[EXPORTS])][2..-1];
LA:=[disassemble(S[LOCALS])][2..-1];
EN:=map(u->extractName(u),EA);
LN:=map(u->extractName(u),LA);
if member(m,EN,'pos') then
pointto(EA[pos])
elif member(m,LN,'pos') then
pointto(LA[pos])
else
NULL
end if
end proc:

> modifyM:=proc(M::`module`,loc::evaln)
local NAME,EXPSEQ,MODULE,
EXPORTS,MODULEDEF,LOCALS,
EXPORTSEQ,LOCALSEQ,
LEXICAL,
EVAL,S,emax,lmax,Ae,Al,i,A,Name,InfoLevel,
flag,esn,eso,lsn,lso,L,pos,IND,j,t;
option `Copyright (c) 2001 by Helmut Kahovec. All rights reserved.`;
# NAME,EXPSEQ,MODULE:=8,27,38; # Maple6
NAME,EXPSEQ,MODULE:=8,29,40; # Maple7
EXPORTS,MODULEDEF,LOCALS:=2,3,4;
EXPORTSEQ,LOCALSEQ:=5,3;
LEXICAL:=7;
EVAL:=u->pointto(disassemble(addressof(u))[2]);
InfoLevel:=3;
S:=disassemble(disassemble(addressof(M))[2]);
emax:=nops([disassemble(S[EXPORTS])]);
lmax:=nops([disassemble(S[LOCALS])]);
Ae:=array(1..emax);
Al:=array(1..lmax);
for i from 2 to emax do
A:=disassemble(disassemble(S[EXPORTS])[i])[2];
Name:=pointto(disassemble(S[EXPORTS])[i]);
if A=0 then
Ae[i-1]:=assemble(
NAME,
A,
op(3..-1,[disassemble(disassemble(S[EXPORTS])[i])])
);
userinfo(InfoLevel,modifyM,Name,'unassigned')
else
if disassemble(A)[1]=MODULE then
error "nested modules not yet supported"
else
flag:=true;
esn:=pointto(
disassemble(disassemble(S[MODULEDEF])[EXPORTSEQ])[i]
);
eso:=pointto(A);
if type(eso,procedure) then
L:=[op(LEXICAL,EVAL(eso))];
if has(EVAL(eso),loc) and member(loc,L,'pos') then
IND:=NULL;
for j from 2 by 2 to nops(L) do
t:=L[j];
if type('t',procedure) then IND:=IND,j end if
end do;
if [IND]<>[] then
t:=subsop(
seq([LEXICAL,j]=cat(L[j-1],`_`),j=[IND]),EVAL(eso)
);
t:=subsop([LEXICAL,pos+1]=loc,EVAL(t));
esn:=subs(seq(cat(L[j-1],`_`)=L[j],j=[IND]),EVAL(t))
else
esn:=subsop([LEXICAL,pos+1]=loc,EVAL(eso))
end if;
userinfo(InfoLevel,modifyM,Name,'modified')
else
esn:=EVAL(eso);
userinfo(InfoLevel,modifyM,Name,'unchanged')
end if
elif type(eso,table) then
esn:=EVAL(eso)
else
esn:=eso;
flag:=false
end if
end if;
if flag then
Ae[i-1]:=assemble(
NAME,
disassemble(addressof(esn))[2],
op(3..-1,[disassemble(disassemble(S[EXPORTS])[i])])
)
else
Ae[i-1]:=assemble(
NAME,
addressof(esn),
op(3..-1,[disassemble(disassemble(S[EXPORTS])[i])])
)
end if
end if
end do;
for i from 2 to lmax do
A:=disassemble(disassemble(S[LOCALS])[i])[2];
Name:=pointto(disassemble(S[LOCALS])[i]);
if A=0 then
Al[i-1]:=assemble(
NAME,
A,
op(3..-1,[disassemble(disassemble(S[LOCALS])[i])])
);
userinfo(InfoLevel,modifyM,Name,'unassigned')
else
if disassemble(A)[1]=MODULE then
error "nested modules not yet supported"
else
flag:=true;
lsn:=pointto(
disassemble(disassemble(S[MODULEDEF])[LOCALSEQ])[i]
);
lso:=pointto(A);
if type(lso,procedure) then
L:=[op(LEXICAL,EVAL(lso))];
if convert(Name,string)=convert(loc,string) then
lsn:=EVAL(loc);
userinfo(InfoLevel,modifyM,Name,'replaced')
elif has(EVAL(lso),loc) and member(loc,L,'pos') then
IND:=NULL;
for j from 2 by 2 to nops(L) do
t:=L[j];
if type('t',procedure) then IND:=IND,j end if
end do;
if [IND]<>[] then
t:=subsop(
seq([LEXICAL,j]=cat(L[j-1],`_`),j=[IND]),EVAL(lso)
);
t:=subsop([LEXICAL,pos+1]=loc,EVAL(t));
lsn:=subs(seq(cat(L[j-1],`_`)=L[j],j=[IND]),EVAL(t))
else
lsn:=subsop([LEXICAL,pos+1]=loc,EVAL(lso))
end if;
userinfo(InfoLevel,modifyM,Name,'modified')
else
lsn:=EVAL(lso);
userinfo(InfoLevel,modifyM,Name,'unchanged')
end if
elif type(lso,table) then
lsn:=EVAL(lso)
else
lsn:=lso;
flag:=false
end if
end if;
if flag then
Al[i-1]:=assemble(
NAME,
disassemble(addressof(lsn))[2],
op(3..-1,[disassemble(disassemble(S[LOCALS])[i])])
)
else
Al[i-1]:=assemble(
NAME,
addressof(lsn),
op(3..-1,[disassemble(disassemble(S[LOCALS])[i])])
)
end if
end if
end do;
pointto(
assemble(
NAME,
assemble(
MODULE,
assemble(EXPSEQ,seq(Ae[i-1],i=2..emax)),
S[MODULEDEF],
assemble(EXPSEQ,seq(Al[i-1],i=2..lmax))
),
op(3..-1,[disassemble(addressof(M))])
)
)
end proc:

After the necessary procedures have been shown, here comes the bug fix:

> extractMember(RealDomain,RorU);

RorU

> RorU:=eval(%);

RorU := proc(expr)
local fexpr;
if nargs <> 1 then op(map(procname, [args]))
elif hastype(expr, 'nonreal') then undefined
else
fexpr := evalf(expr);
if hastype(fexpr, '{nonreal, undefined}') then
undefined
else expr
end if
end if
end proc

> clean:=proc(expr)
options operator,arrow;
`if`( # <=== this line added ===
nargs>1, # <=== this line added ===
op(map(procname,[args])), # <=== this line added ===
`if`(
nargs=0,
NULL,
subsindets(
expr,
'anything',
proc(e)
if nargs<>1 then
op(map(procname,{args}))
else
if type(e,'complex(extended_numeric)') then
if type(e,'nonreal') then undefined
elif type(e,'embedded_real') then :-Re(e)
elif type(evalf(e),'embedded_real') then :-Re(e)
else RorU(e)
end if
elif hastype(e,'{undefined, nonreal}') then undefined
elif type(e,'negative^fraction') then convert(e,'surd')
else RorU(subs(0.*I=0.,e))
end if
end if
end proc
)
)
) # <=== this line added ===
end proc:

> with(RealDomain):
Warning, these protected names have been redefined and unprotected:
Im, Re, ^, arccos, arccosh, arccot, arccoth, arccsc, arccsch, arcsec,
arcsech, arcsin, arcsinh, arctan, arctanh, cos, cosh, cot, coth, csc,
csch, eval, exp, expand, limit, ln, log, sec, sech, signum, simplify,
sin, sinh, solve, sqrt, surd, tan, tanh

> S:=disassemble(disassemble(addressof(RealDomain))[2]):
> LA:=[disassemble(S[4])][2..-1]:
> LN:=map(u->extractName(u),LA):
> map(u->extractMember(RealDomain,u),LN):
> eval(%):

> # infolevel[modifyM]:=3:

> M:=modifyM(RealDomain,clean);

M := RealDomain

> with(M):
Warning, these names have been rebound:
Im, Re, ^, arccos, arccosh, arccot, arccoth, arccsc, arccsch, arcsec,
arcsech, arcsin, arcsinh, arctan, arctanh, cos, cosh, cot, coth, csc,
csch, eval, exp, expand, limit, ln, log, sec, sech, signum, simplify,
sin, sinh, solve, sqrt, surd, tan, tanh

> map(
print@op,
[
seq(
[
['k'=k],
selectremove(has,[solve(x^4-k=0,x)],'undefined')
],
k=0..16
)
]
):

[k = 0], [], [0, 0, 0, 0]

[k = 1], [undefined, undefined], [-1, 1]

(1/4) (1/4)
[k = 2], [undefined, undefined], [2 , -2 ]

(1/4) (1/4)
[k = 3], [undefined, undefined], [3 , -3 ]

[k = 4], [undefined, undefined], [sqrt(2), -sqrt(2)]

(1/4) (1/4)
[k = 5], [undefined, undefined], [5 , -5 ]

(1/4) (1/4)
[k = 6], [undefined, undefined], [6 , -6 ]

(1/4) (1/4)
[k = 7], [undefined, undefined], [7 , -7 ]

(3/4) (3/4)
[k = 8], [undefined, undefined], [2 , -2 ]

[k = 9], [undefined, undefined], [sqrt(3), -sqrt(3)]

(1/4) (1/4)
[k = 10], [undefined, undefined], [10 , -10 ]

(1/4) (1/4)
[k = 11], [undefined, undefined], [11 , -11 ]

(1/4) (1/4)
[k = 12], [undefined, undefined], [12 , -12 ]

(1/4) (1/4)
[k = 13], [undefined, undefined], [13 , -13 ]

(1/4) (1/4)
[k = 14], [undefined, undefined], [14 , -14 ]

(1/4) (1/4)
[k = 15], [undefined, undefined], [15 , -15 ]

[k = 16], [undefined, undefined], [-2, 2]

> with(RealDomain):
Warning, these names have been rebound:
Im, Re, ^, arccos, arccosh, arccot, arccoth, arccsc, arccsch, arcsec,
arcsech, arcsin, arcsinh, arctan, arctanh, cos, cosh, cot, coth, csc,
csch, eval, exp, expand, limit, ln, log, sec, sech, signum, simplify,
sin, sinh, solve, sqrt, surd, tan, tanh

> map(
print@op,
[
seq(
[
['k'=k],
selectremove(has,[solve(x^4-k=0,x)],'undefined')
],
k=0..16
)
]
):

[k = 0], [], [0]

[k = 1], [], [-1]

(1/4)
[k = 2], [], [2 ]

(1/4)
[k = 3], [], [3 ]

[k = 4], [undefined], []

(1/4)
[k = 5], [], [5 ]

(1/4)
[k = 6], [], [6 ]

(1/4)
[k = 7], [], [7 ]

(3/4)
[k = 8], [], [2 ]

[k = 9], [undefined], []

(1/4)
[k = 10], [], [10 ]

(1/4)
[k = 11], [], [11 ]

(1/4)
[k = 12], [], [12 ]

(1/4)
[k = 13], [], [13 ]

(1/4)
[k = 14], [], [14 ]

(1/4)
[k = 15], [], [15 ]

[k = 16], [], [-2]


[MUG] Re: A bug?
Author: Helmut Kahovec    Posted: 02/10/2001 22:03:14 GDT
>> From: Helmut Kahovec "helmut.kahovec"

Helmut Kahovec wrote:

>| Werner Burkhardt wrote:
>|
>| >| can anybody explain this behavior of maple 7
>| >| > with( RealDomain ):
>| >| > solve(x^2-2=0);
>| >| sqrt(2)
>|
>| Well, as others have already pointed out, the bug is in the local
>| procedure clean() of RealDomain. We may fix it as shown below.


Dear Werner,

In my previous reply, there are some loose input statements before
modifyM() gets called:

> S:=disassemble(disassemble(addressof(RealDomain))[2]):
> LA:=[disassemble(S[4])][2..-1]:
> LN:=map(u->extractName(u),LA):
> map(u->extractMember(RealDomain,u),LN):
> eval(%):

Of course, they can be incorporated into modifyM():

> modifyM:=proc(M::`module`,loc::evaln)
local NAME,EXPSEQ,MODULE,
EXPORTS,MODULEDEF,LOCALS,
EXPORTSEQ,LOCALSEQ,
LEXICAL,
S,LA,LN,EVAL,InfoLevel,emax,lmax,Ae,Al,i,A,Name,
flag,esn,eso,lsn,lso,L,pos,IND,j,t;
option `Copyright (c) 2001 by Helmut Kahovec. All rights reserved.`;
# NAME,EXPSEQ,MODULE:=8,27,38; # Maple6
NAME,EXPSEQ,MODULE:=8,29,40; # Maple7
EXPORTS,MODULEDEF,LOCALS:=2,3,4;
EXPORTSEQ,LOCALSEQ:=5,3;
LEXICAL:=7;
S:=disassemble(disassemble(addressof(M))[2]);
LA:=[disassemble(S[LOCALS])][2..-1]; # <===!!!===
LN:=map(u->extractName(u),LA); # <===!!!===
map(u->extractMember(M,u),LN); # <===!!!===
eval(%); # <===!!!===
EVAL:=u->pointto(disassemble(addressof(u))[2]);
InfoLevel:=3;
...

The rest of modifyM() remains the same. The other two helper procedures
-- extractName() and extractMember() -- remain the same as well. Now
fixing the bug in RealDomain is as follows (all output omitted):

> clean:=proc(expr)
options operator,arrow;
`if`( # <=== this line added ===
nargs>1, # <=== this line added ===
op(map(procname,[args])), # <=== this line added ===
`if`(
nargs=0,
NULL,
subsindets(
expr,
'anything',
proc(e)
if nargs<>1 then
op(map(procname,{args}))
else
if type(e,'complex(extended_numeric)') then
if type(e,'nonreal') then undefined
elif type(e,'embedded_real') then :-Re(e)
elif type(evalf(e),'embedded_real') then :-Re(e)
else RorU(e)
end if
elif hastype(e,'{undefined, nonreal}') then undefined
elif type(e,'negative^fraction') then convert(e,'surd')
else RorU(subs(0.*I=0.,e))
end if
end if
end proc
)
)
) # <=== this line added ===
end proc:

> extractMember(RealDomain,RorU);

> RorU:=eval(%);

> with(RealDomain):

> # infolevel[modifyM]:=3:

> M:=modifyM(RealDomain,clean);

> with(M):

> map(
print@op,
[
seq(
[
'k'=k,
selectremove(has,[solve(x^4-k=0,x)],'undefined')
],
k=0..16
)
]
):

> with(RealDomain):

> map(
print@op,
[
seq(
[
'k'=k,
selectremove(has,[solve(x^4-k=0,x)],'undefined')
],
k=0..16
)
]
):

Sorry for this follow up!

Helmut

[MUG] A bug?
Author: Emilio Sanchez    Posted: Sun, 28 Jul 2002 17:04:41 +0200

>> From: Emilio Sanchez "emilio.sanchez"

Dear MUG users,

I used Maple to solve an ODE. Maple found the following solution

>X:=3^(1/3*1/(1+w))*4^(-1/3*1/(1+w))*((-t-t*w+C1+C1*w)^2*kappa)^(1/3*1/(1+w));

Reinsertion of this solution into the ODE, i.e. evaluation of

>f1_sol:=((diff(X,t)/X)^2-(kappa/3*X^(-3*(1+w))));

yields a large expression (instead of "0"). But using the solve routine indicates
that X is really a solution of f1_sol, i.e.

> solve(f1_sol=0);


{kappa = kappa, t = t, w = w, C1 = C1}

Where the is() command says that this is not true

> is(f1_sol=0);


false

I have tested this in Maple 5.1/7/8 under Linux/Windows. The only
difference between the versions is that the Maple 5.1 is() command
yields "FAIL".

So the question is: Why does

>simplify(f1_sol);

not yield "0" as one would assume from the result of the
solve command?

Thanks for your help in advance!

--
Best regards,
Emilio "mailto:emilio.sanchez"

[MUG] Re: A bug?
Author: Maple User Group    Posted: Tue, 6 Aug 2002 10:44:16 -0400 (

>> From: Maple User Group "maple_gr"

-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-

From: "Peter Weigand" "Peter.Weigand"
To: "maple-list"
Date: Fri, 02 Aug 2002 10:04:53 +0200
Subject: A bug?

On 28 Jul 2002, at 17:04, Emilio Sanchez wrote:

> f1_sol:=((diff(X,t)/X)^2-(kappa/3*X^(-3*(1+w))));

So the question is: Why does

>simplify(f1_sol);

not yield "0" as one would assume from the result of the
solve command?

There are no assumptions on the variables and Maple works how a
'black box'

Try
> simplify(f1_sol, symbolic)

Peter



-----------------------------------------------------
Dr. Peter Weigand,
Chemnitz University of Technology
Faculty of Mathematics
Mail :D-09107 Chemnitz, Germany
Phone: +49 0371 531 2655
Fax : +49 0371 531 4947
E-mail: "weigand"
_____________________________________________________


-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-

Date: Fri, 02 Aug 2002 11:12:06 -0500
From: Juan Eloy =?ISO-8859-1?Q?Ay=F3n?= Beato "Juan.Ayon"
To: "maple-list"
Subject: A bug?

Emilio use

> simplify( f1_sol, symbolic );



Eloy Ayon Beato
Physics Department
CINVESTAV-IPN
Mexico

Previous by date: [MUG] Error(?) in labels on postscript export (Maple 7), Robert Chaffer
Next by date: [MUG] none,  A Makris
Previous thread: [MUG] curve fitting with ODEs, Angelique Lamour
Next thread: [MUG] none,  Juan Manuel De Olazabal



Ready to buy?

Maple - single user licence
Add to shopping basket
$ 1,895.00
Upgrade to Maple 12 from v11
Add to shopping basket
$ 995.00
Upgrade to Maple 12 from v10 & below
Add to shopping basket
$ 1,395.00

Featured Downloads

Maple White Paper: Technical Knowledge - An Asset You Can Afford to Lose?
Maple in Electronics Application Pack
Maple in Robotics & Aerospace Application Pack
Maple in Finance Application Pack

Product Reviews

"Without the Maple software, we would have to spend weeks generating the equations of motion for every experiment. Then the chances that we did it right would basically be near zero. There would always be a mistake somewhere. It is very difficult to set up a dynamic motion model by hand."
- Jean-Claude PiedBeouf, Ph.D Manager of Robotics, Canadian Space Agency

"Its very good - highly accurate and easy to use. The speed of Maple allows me to change equations and quickly reintegrate them into the application, so more possibilities can be explored to achieve the precise effect desired."
Shawn Neely, Senior R & D Director for PDI/Dreamworks
adept

Top of the Page

Our Privacy and Terms and Conditions Statement
All Trademarks Recognised. Copyright © 2007, Adept Scientific plc.
Site designed and maintained by Adeptise

Adept Scientific | Amor Way | Letchworth Garden City | Herts | SG6 1ZA | Tel: +44 (0)1462 480055