Carl Love

Carl Love

28045 Reputation

25 Badges

12 years, 330 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

@HDN46 This requires only a slight modification of my earlier code.

restart;
t:= Array(-1..20, [0,1]):  # [0,1] are initial values
Soln:= table():
abc:= combinat:-cartprod([[$-20..20] $ 3]):  #Iterator
while not abc[finished] do
    assign(('a','b','c')= abc[nextvalue]()[]);
    for n from 0 to 19 do        
        t[n+1]:= iquo((a*n*(n+1)+b)*t[n] + c*n^2*t[n-1], (n+1)^2, 'r');
        if r <> 0 or t[n+1] = 0 and t[n] = 0 then  break  end if;
    end do;
    if n = 20 then  
        Soln[a,b,c]:= convert(t,list);
        print(a,b,c)
    end if
end do:
[indices](Soln);
eval(Soln);

There are 34 solutions. Some are interesting.

@HDN46 This requires only a slight modification of my earlier code.

restart;
t:= Array(-1..20, [0,1]):  # [0,1] are initial values
Soln:= table():
abc:= combinat:-cartprod([[$-20..20] $ 3]):  #Iterator
while not abc[finished] do
    assign(('a','b','c')= abc[nextvalue]()[]);
    for n from 0 to 19 do        
        t[n+1]:= iquo((a*n*(n+1)+b)*t[n] + c*n^2*t[n-1], (n+1)^2, 'r');
        if r <> 0 or t[n+1] = 0 and t[n] = 0 then  break  end if;
    end do;
    if n = 20 then  
        Soln[a,b,c]:= convert(t,list);
        print(a,b,c)
    end if
end do:
[indices](Soln);
eval(Soln);

There are 34 solutions. Some are interesting.

Your post does not have the file attached.

Why does it seem impossible here to suppress or bypass evalhf? Doesn't library code usually try evalhf and then fall back to evalf if that fails? Also, setting Digits to a value significantly larger than evalhf(Digits) does not help, nor does setting UseHardwareFloats to false.

Why does it seem impossible here to suppress or bypass evalhf? Doesn't library code usually try evalhf and then fall back to evalf if that fails? Also, setting Digits to a value significantly larger than evalhf(Digits) does not help, nor does setting UseHardwareFloats to false.

@emma hassan Here's an update to your worksheet using the `.` operator and other modern Maple Matrix concepts. You can see that the values generated for the U vectors are the same as what you had. The option in the plot heights= histogram didn't make sense to me because I think that you want a surface, so I took it out.

y_not.mw

@emma hassan Here's an update to your worksheet using the `.` operator and other modern Maple Matrix concepts. You can see that the values generated for the U vectors are the same as what you had. The option in the plot heights= histogram didn't make sense to me because I think that you want a surface, so I took it out.

y_not.mw

Thanks for the idea. I also tried replacing procedure WARNING with one that generates an error (so that I could catch it):

saveWARNING:= eval(WARNING);
unprotect(WARNING);
WARNING:= proc()
saveWARNING(_passed);
error "WARNING"
end proc;

Both this and your stopat method will catch WARNINGs invoked from Maple code. But neither catches those invoked from the kernel. Well, maybe they catch some from the kernel, if the kernel calls the procedure, but they won't catch this:

proc() option builtin= 1; end proc:
Warning, not a built-in function (`1`)

It would be nice if there was a kernelopts(warnlevel) (akin to interface(warnlevel)) such that sufficiently high values of warnlevel would treat some or all warnings as errors. It would make testing large pieces of code easier if one did not have to search the output manually for warning messages.

Another issue: Your debugger output made me suspect that there was an unevaluated function INTERFACE_WARN and corresponding procedure `print/INTERFACE_WARN`, but this is not true. Indeed, attempting a call to INTERFACE_WARN() causes loss of connection to the kernel.

Thanks for the idea. I also tried replacing procedure WARNING with one that generates an error (so that I could catch it):

saveWARNING:= eval(WARNING);
unprotect(WARNING);
WARNING:= proc()
saveWARNING(_passed);
error "WARNING"
end proc;

Both this and your stopat method will catch WARNINGs invoked from Maple code. But neither catches those invoked from the kernel. Well, maybe they catch some from the kernel, if the kernel calls the procedure, but they won't catch this:

proc() option builtin= 1; end proc:
Warning, not a built-in function (`1`)

It would be nice if there was a kernelopts(warnlevel) (akin to interface(warnlevel)) such that sufficiently high values of warnlevel would treat some or all warnings as errors. It would make testing large pieces of code easier if one did not have to search the output manually for warning messages.

Another issue: Your debugger output made me suspect that there was an unevaluated function INTERFACE_WARN and corresponding procedure `print/INTERFACE_WARN`, but this is not true. Indeed, attempting a call to INTERFACE_WARN() causes loss of connection to the kernel.

Even if the same Matrix constructor is used,

a:= <1,2;3,4>:  b:= <1,2;3,4>:  evalb(a=b);

                                 false

 

Even if the same Matrix constructor is used,

a:= <1,2;3,4>:  b:= <1,2;3,4>:  evalb(a=b);

                                 false

 

One wonders what Maple commands you tried.

It's a fascinating question that I'll have to think about. To make sure that the terms of the problem are absolutely clear

  1. Is it a right cylinder?
  2. Is it a circular cylinder?
  3. Is it in 3-space? or higher dimension?
  4. Is it placed arbitrarily? That is, can the axis be any line in the space from question 3?
  5. How many points are given on the surface?

What is your desired output for n=26, p=2?

@Alejandro Jakubi There's plenty of room to fit all options on the top level.

First 669 670 671 672 673 674 675 Last Page 671 of 709