acer

32395 Reputation

29 Badges

19 years, 344 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

@Carl Love The NAG functions (d01ajc,d01akc,d01amc) accept arguments for the relative or absolute accuracy tolerance, and Maple passes something derived from evalf/Int's `epsilon` and passes it to the call_external to the NAG function.

The first few lines of this procedure indicate that epsilon may get passed as the relative tolerance.

showstat(`evalf/int/NAGInt`::d01akc);

@AndrewG The only instance I can recall of there being a Maple update which resulted in a changed build id without a corresponding increase to the point-release number shown in the product was 16.02a (see also here). That was quite unusual.

Aside from the update checker/downloader built right into the Maple Standard GUI, there is also this page which lists available updates.

 

 

@Markiyan Hirnyk I'm sorry, but I don't understand what you mean by "doubling" there. What doubled?

So FMI means Functional Mock-up Interface (1, 2]) then?

acer

@Markiyan Hirnyk Thanks very much. I too had found an approximate minimizing value near yC=0.46757... but I was wondering whether it could be shown to be some exact value. I don't see how to get it out of the high degree results in `sol`, but I was curious whether some other route could get it. I don't know whether that is tractable.

Thank you for the interesting post.

Do you know the exact value of yC at which the radius of the circle (on which all six points lie) is at its least? Is 1/4 the least radius, for your A and B?

acer

This should work in both Maple 17 and 18. But in Maple 18 it is more fun because one can simply left-click drag around the plotted point C instead of adjusting the two sliders which denote xC and yC.

I put in a try..catch to prevent a popup error when three points in a triangle are collinear. But otherwise pretty much all I had to do was put Markiyan's code inside a proc.

restart:

F:=proc(xC,yC)
  uses geometry, plots;
  try
  point(A, 0, 0);
  point(B, 1, 0);
  point(C, xC, yC);
  triangle(T, [A, B, C]);
  median(mA, A, T, MA);
  median(mB, B, T, MB);
  median(mC, C, T, MC);
  line(m1, [A, MA]);
  line(m2, [B, MB]);
  intersection(E, m1, m2);
  triangle(AEMB, [A, E, MB]);
  circumcircle(c1, AEMB, 'centername' = C1);
  circumcircle(c2, triangle(CEMB, [C, E, MB]), 'centername' = C2);
  circumcircle(c3, triangle(CEMA, [C, E, MA]), 'centername' = C3);
  circumcircle(c4, triangle(BEMA, [B, E, MA]), 'centername' = C4);
  circumcircle(c5, triangle(BEMC, [B, E, MC]), 'centername' = C5);
  circumcircle(c6, triangle(AEMC, [A, E, MC]), 'centername' = C6);
  circle(CC, [C1, C2, C3]);
  display([draw([T(color = black), mA(color = black),
                 mB(color = black), mC(color = black),
                 C1(color = blue), C2(color = blue),
                 C3(color = blue), C4(color = blue),
                 C5(color = blue), C6(color = blue),
                 CC(color = red)], symbol = solidcircle, symbolsize = 15,
                 thickness = 2, scaling = constrained),
           textplot({[-0.5e-1, 0.5e-1, "A"], [.95, 0.5e-1, "B"],
                     [xC-0.5e-1, yC+0.5e-1, "C"]})],
          axes = none, view = [-1..2,-2..2]
         );
  catch:
  end try;
end proc:

#F(15*(1/10), sqrt(3));

Explore( F(xc,yc), parameters=[xc=-1.0..2.0,yc=-2.0..2.0],
         initialvalues=[xc=1.5,yc=sqrt(3.0)], markers=[[xc,yc]] );

acer

The entries of your `words` are not being accessed in alphabetical order, so perhaps you are looking for "weird" in the wrong place.

acer

I was wondering whether the question was presented exactly as intended. In particular I was wondering whether the intention was to ask about, say,

add(...(add(f(i_1,...,i_n),i_1=0..k_1),...),i_n=0..k_n);

or perhaps even,

add(...(add(f(x[i_1],...,x[i_n]),i_1=0..k_1),...),i_n=0..k_n);

If that is actually the case then it seems to me that the question is about `fold` functionality. Ie,

p := n -> foldl(F, f(seq(i[j],j=1..n)), seq(i[j]=0..k[j],j=1..n)):

p(3);

    F(F(F(f(i[1], i[2], i[3]), i[1] = 0 .. k[1]),

          i[2] = 0 .. k[2]), i[3] = 0 .. k[3])

p := n -> foldl(F, f(seq(x[i[j]],j=1..n)), seq(i[j]=0..k[j],j=1..n)):

p(2);                                                                

         F(F(f(x[i[1]], x[i[2]]), i[1] = 0 .. k[1]), i[2] = 0 .. k[2])

So, if the various k[j] have all been assigned then `F` could be replaced with `add` above.

Of course this might not be a correct interpretation of the intended arguments to `f`. I was just wondering.

acer

@Carl Love Lookup by table.. indeed. Thank you.

It's been a long time since this old discussion and mention of using lookup tables for base conversion (convert base 10 also does the given task, but slowly) that I'd quite forgotten it.

Raising the above (10^5 digits) example up to 10^6 digits then a bit more speed might be squeezed out by switching to Threads:-Seq above some cutoff number of digits, but the memory allocation becomes huge.

The `in` syntax seems to save a little bit of (64bit MS-Win 7 quad-core i7) speed using either `seq` or Threads:-Seq, but doubles the huge memory allocation due to using Threads:-Seq.

restart:

F1:=proc(x) local y;
     y:=sprintf("%a",op(1,x));
     if length(y)>400000 then
       [Threads:-Seq(parse(s),s in y)];
     else
       [seq(parse(s),s in y)];
     end if;
end proc:

x:=evalf[1000000](5555/7):

CodeTools:-Usage( F1(x) ):
memory used=2.08GiB, alloc change=4.02GiB, cpu time=14.57s, real time=10.01s

Compare with,

restart:

F1:=proc(x) local y;
     y:=sprintf("%a",op(1,x));
     if length(y)>400000 then
       [Threads:-Seq(parse(y[i]),i=1..length(y))];
     else
       [seq(parse(s),s in y)];
     end if;
end proc:

x:=evalf[1000000](5555/7):

CodeTools:-Usage( F1(x) ):
memory used=2.08GiB, alloc change=1.82GiB, cpu time=14.94s, real time=10.78s

All a bit confusing.

@rlopez If such a sheet is closed and then re-opened, where should the mouse cursor be placed on that function assignment line so that pressing the Enter key will correctly execute it?

@Thomas Richard Just a note:

It can also be accomplished directly in the Worksheet/Document with the command,

Typesetting:-Settings(functionassign = true):

If it is a command in the sheet or in its Startup Region then other readers (eg. instructors, etc) of the sheet would also not need to be bothered by it, I suppose.

If you are using Maple 13 or earlier, and if you are using 2D Math input, then you could use this form of the `if` operator,

Butcher, map(x->`if`(x=0,``,x),Butcher);

acer

First 359 360 361 362 363 364 365 Last Page 361 of 592