acer

32747 Reputation

29 Badges

20 years, 111 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are answers submitted by acer

At Digits<=15 Maple can use double precision (64bit) hardware floats and store Matrices of real or complex floating-point values in contiguous blocks of memory. That's what is called a datatype=float[8] rtable in Maple. And linear algebra computations such as eigenvectors, matrix-matrix products, etc, are then done in specialized compiled libraries such as the Intel Math Kernel Library (MKL). Such optimized versions of standard libraries of functions such as LAPACK and the BLAS are cache-tuned and often make use of chipset extensions such as SIMD and AVX or are otherwise parallelized.

At Digits>15 Maple uses a so-called "software float" representation where such high precision floating-point values are stored internally using big integers. Basic arithmetic can then use GMP et al. But this is much more involved than using optimized or vectorized arithmetic functions built right into the CPU hardware. Linear algebra computations done with such software floats in Maple is accomplished using generic nonparallelized BLAS and LAPACK libraries recompiled to redefine "double" and overload arithmetic with hooks into Maple's kernel.

Yes, the jump in timing is quite steep, at the crossover from hardware to software precision.

It might be possible to soften the blow of the crossover a little, by having a quadruple-precision implementation of the BLAS and LAPACK, to cover a range close to Digits=16 through Digits=30 or so. Or perhaps key generic software float BLAS functions could be parallelized or cache-tuned.

acer

restart:                   

ee := sin(3*arcsin(x)):    

radnormal(convert(ee,exp));

                                        2
                                 -x (4 x  - 3)

That was in Maple 18.01. I notice that Maple 7.00 could do that too.

I also got it with Maple 18.01 using,

radnormal(expand(convert(ee,ln)));

acer

restart:                      
with(LinearAlgebra):                

A:=<<2,4,1>|<1,-1,1>|<3,3,2>>:
b:=<8,5,4>:                         
x:=MatrixInverse(A,method=pseudo).b:

If the rank of Matrix A stacked with the transpose of column Vector x is the same as the rank of A then must not x be in the row space of A?

evalb( Rank(<A,x^%T>) = Rank(A) );

                                     true

What about if x is orthogonal to everything in the null space of A?

andmap(v->v.x=0, NullSpace(A));

                                     true

acer

Change that to cos(x) in the numerator instead.

What you have shown is an expression with multiplication of `cos` and `x` as the numerator (and your plot is an "2-D Implicit Plot" of "variables" `cos` and `x`).

acer

There have been a few reports (here, and here) of this particular error message which seem due to a corrupt Maple installation likely due to a faulty or corrupted Maple product Installer.

I suggest you contact Maplesoft's tech support and get them to provide you with a download link to a fresh and valid installer.

I suggest asking for a "full 18.02 installer" since it might be that the problem is specific to some instance of the 18.02 "upgrade" installer which would get applied to a full 18.00 or 18.01 install.

acer

For this particular example each equation can be isolated for either x or y. The first is of the form y=f(x) and the second is of the form x=g(y). So the first can be plotted directly using the plot command. The second can also be handled directly using the plot command, and if the transformation (x,y)->(y,x) is applied then the second plot can be sensibly displayed with the first plot. I mention this just because it can produce a smooth pair of curves.

Of course you can adjust the ranges, colors, or the scaling and view options to taste. But I expect that you might want to make the ranges used in the plot calls match the respective ranges in the view option.

plots:-display(
  plot(x^3-4*x,x=-2..2,color=red),
  plottools:-transform((x,y)->[y,x])(plot(y^3-3*y,y=-2..2,color=blue)),
  scaling=constrained, view=[-2..2,-2..2]);

acer

restart:

result:=solve({x+y=1,x+2*y=4},{x,y});

                        {x = -2, y = 3}

vals:=eval([x,y],result);

                            [-2, 3]

acer

I'm not sure I understand your issue.

restart:

v:=Vector([Record('l','R')]):                      

TypeTools:-AddType(Element,'record(l,R)'):         
TypeTools:-AddType(ExpandedLine,'Vector(Element)'):

type(v,ExpandedLine);                              

                                     true

type(Vector([Record('s','p')]),ExpandedLine);

                                     false

kernelopts(version);

            Maple 18.01, X86 64 LINUX, Mar 28 2014, Build ID 935137

acer

expr:=I*b+a+x+I*y+I^2*c;   

                         expr := b I + a + x + y I - c

evalc(expr);               

                             a - c + x + (b + y) I

evalc(Re(expr)+I*Im(expr));

                             a - c + x + (b + y) I

acer


:-`&blacksquare;`;

`&blacksquare;`

':-`&blacksquare;`';

`&blacksquare;`

Typesetting:-mrow(Typesetting:-mn(':-`&blacksquare;`',':-mathsize'=30));

"&blacksquare;"

:-`&#9642;`;

`&blacksquare;`

':-`&#9642;`';

`&blacksquare;`

Typesetting:-mrow(Typesetting:-mn(':-`&#9642;`',':-mathsize'=30));

"&blacksquare;"

kernelopts(version);

`Maple 18.02, X86 64 WINDOWS, Oct 20 2014, Build ID 991181`

 


Download blacksquare.mw

acer

Here's another approach.

It'd be a little trickier than this, to make fencing with brackets be fully optional. The display would look nicer fenced, however, when multiplying a pair of such displayed mixed rationals.

If a more complete package to deal with such things were wanted then it might instead be done with objects (ModulePrint, static exports to handle their arithmetic, etc).

I realize that you showed a textplot simply as another way to get the effect using an axes-less plot, and that you may not want plots. But for what it's worth, I show below that the approach given here seems to play ok with textplots anyway.

[edit] See corrected version in comment below, to properly get `value` from a negative example. 

restart:

`print/%mixed` := proc(a,b)
   uses Typesetting;
   #mcomplete(mfenced(mrow(mn(convert(a,string)),mn(" "),Typeset(b))));
   mcomplete(mrow(mn(convert(a,string)),mn(" "),Typeset(b)));
end proc:

%mixed := proc(x::rational)
  if nargs=1 then
    if abs(x)>1 then
      'procname'(trunc(args[1]), abs(args[1]-trunc(args[1])));
    else x; end if;
  else 'procname'(args); end if;
end proc:

mixed := `+`:

%mixed( 17/6 );

%mixed(2, 5/6)

value(%);

17/6

%mixed( -100001/9971 );

%mixed(-10, 291/9971)

value(%);

-99419/9971

%mixed( 17/6 ) + %mixed( 11/5 );

%mixed(2, 5/6)+%mixed(2, 1/5)

value(%);

151/30

plots:-textplot( [ 1, 1, %mixed( 17/6 ) ],
                 size=[200,200], gridlines=false);

 

 

Download mixedrationals.mw

acer

restart:
assign(a,c):
assign('a'=d,b=2):

a,b,c;

                                    d, 2, c

By using uneval quotes the assignment is made to that quoted name rather than whatever (other name) it might currently evaluate to.

acer

This is not the first time that I've seen Maple do better with mixtures of sin and cos than with tan or cot.

value(convert(Int(tan(x)^(n-2)*sec(x)^2,x),sincos));

                                       (n - 1)
                               /sin(x)\       
                               |------|       
                               \cos(x)/       
                               ---------------
                                    n - 1     

int( convert(tan(x)^(n-2)*sec(x)^2, sincos), x );

                                       (n - 1)
                               /sin(x)\       
                               |------|       
                               \cos(x)/       
                               ---------------
                                    n - 1     

In this particular case, it also does a nicer job after preliminary conversion to expln.

acer

Try Ctrl-Del (Control and Delete keys at the same time).

See here (Windows, which has the above as an item for "Delete an Element") or here (Operating System links, because on OSX it is Command-Del).

acer

In a plaintext preferences file I see a HelpZoom=100 item.

On my Windows 7 I found one of these as,

cat(kernelopts(homedir),"/AppData/Roaming/Maple/18/Maple.ini")

But even if I manually edit that entry to have instead a value of 300 (say) then this appears to be ignored/clobbered when any new Help (browser) window is opened. And even if I use the Help window's menu to zoom to 300% (Ctrl-6) then upon exiting the whole GUI that new value is lost. It appears to be lost any time I open a wholly separate and new Help window, and the preferences file is re-saved with the 100 value when I exit the GUI.

It seems that this item in the preferences file is just not doing anything. To me, it looks like it was at least someone's intention, at some point, that it work. It would be useful and user-friendly if worked.

acer

First 234 235 236 237 238 239 240 Last Page 236 of 341