Adam Ledger

Mr. Adam Ledger

335 Reputation

11 Badges

4 years, 212 days
unemployed
hobo
Perth, Australia

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are questions asked by Adam Ledger

Hi I was wondering if this is allowed and possible, because of the convienience of being able to call it up with the ?[command name] command, it would be an ideal scenario to write extensive notes for procedures and commands I write myself or written by others that are not part of the original maple install, I forget why and how to use alot of the things i write and this would be convienient for me to have quick access to, also to share with others on here or on stack exchange when maple has a stack exchange community.

I am a little confused by why this error occurs in the second line and not the first, as well as the weird details specified in it. I don't know if the commands that are being called are inbuilt or not, but it is a safe bet that they will be. thankyou.


 

MAX := max({[seq(seq(n-(n^k-floor(n^(1/k))^(k-1)*igcd(floor(ithprime(n)^k/n^k), floor(n^(1/k))))^(1/k), n = 2 .. 100), k = 2 .. 100)][]}):

seq(seq(piecewise(radnormal(n-(n^k-floor(n^(1/k))^(k-1)*igcd(floor(ithprime(n)^k/n^k), floor(n^(1/k))))^(1/k)) = MAX, [n, k], NULL), n = 2 .. 100), k = 2 .. 100)

Error, (in radnormal/rational/nthpower) cannot determine if this expression is true or false: iroot(646162507019111437893207695980096110233782566593779/(_c27_37*_c25_38), [_c25_38, 1]) < 0

 

``


 

Download ASKMAPLE000.mw

I just need someone to explain to me why the following occurs:

 

 

 

showstat(rand)


rand := proc(r::{posint, numeric .. numeric}, $)
   1   if nargs = 0 then
   2     RandomTools:-MersenneTwister:-GenerateInteger()
       else
   3     try
   4       if type(r,('numeric') .. ('numeric')) then
   5         if rhs(r) < lhs(r) then
   6           error "invalid range, end points are out of order"
             elif not type(r,('integer') .. ('integer')) then
   7           return () -> RandomTools:-Generate(float(('range') = r,('method') = ('uniform')))
             end if
           end if;
   8       return RandomTools:-MersenneTwister:-NewGenerator(('range') = r)
         catch :
   9       error
         end try
       end if
end proc

 

NULL

showstat(RandomTools:-MersenneTwister:-GenerateInteger)


RandomTools:-MersenneTwister:-GenerateInteger := proc({range::{integer, integer .. integer} := 1000000000000}, $)
local bits, divisor, offset;
   1   if nargs = 0 then
   2     return MTKernelInterface(4)
       end if;
   3   if type(range,'integer') then
   4     divisor := range;
   5     offset := 0
       else
   6     if rhs(range) < lhs(range) then
   7       error "illegal range, end points out of order"
         end if;
   8     if lhs(range) = rhs(range) then
   9       return lhs(range)
         end if;
  10     offset := lhs(range);
  11     divisor := rhs(range)-offset+1
       end if;
  12   if divisor = 0 then
  13     return offset
       end if;
  14   bits := MTKernelInterface(5,divisor);
  15   MTKernelInterface(6,divisor,bits)+offset
end proc

 

NULL

showstat(MTKernelInterface)

Error, (in showstat) procedure name expected

 

``

``

 

 

Download rand_showstat.mw

Coming across this post upon investigating relational symbols available in Maple that I am yet to use, (the first listing in the search results):

https://math.stackexchange.com/questions/1929439/what-does-square-subset-and-square-union-symbol-mean

I again wish to reinforce the motive behind a post I previously made, and that is that a stack exchange maple community would be beneficial to education in general.

I also want to point out that I have no stake in this, I am an average user of both the Stack exchange mathematics domain, and an average user of Maple, neither of which I am employed by or would be in any realistic forseeable future.

Basically I need to include an if condition that assigns one set of values to a set of variables if the while loop completes a cycle without me interrupting it, and another set of values in the event I have pressed the interrupt button.

Is this able to be done?

1 2 3 4 5 6 7 Last Page 2 of 34