Ronan

242 Reputation

13 Badges

7 years, 190 days
East Grinstead, United Kingdom

MaplePrimes Activity


These are questions asked by Ronan

I am trying to get this to work

{seq(isolve({a = k, irem(a*b, 10000) = 2391}), k = 1 .. 9999)}

but am not getting any answer. One solution is irem(297*9503, 10000).

I have noticed a few times now with Maple 2019. It looses kernel connection when it is sitting there idly. This time I observed it. Had saved a document after an intensive calculation. The memory used was about 30Gig. shortly after saving the cpu fan was running hard. I checked task manager and cpu was cycling to 100%, it was mserever. Then the memory usage droped to about 6gig and message as shown. During this time Maple screen down in the LH corner displayed "Ready", so it didn't think it was doing anything.
 

My code below works but I an looking to speed it up to apply to large arrays. I have large integers and I want to store the exponent and first and last few digits.

nelems := 10;  ~ takes about 50mins when n=100,000,000
n := 374894756873546859847556;
op(n);
A := Array(1 .. 4, 1 .. nelems);
length(n);
st := time();
for i to nelems do
    A[1, i] := i^10*n;
    A[2, i] := length(A[1, i]) - 1;
    b := convert(A[1, i], string);
    A[3, i] := parse(b[1 .. 3]);
    A[4, i] := parse(b[-3 .. -1]);
end do;
time() - st;
A;
A[1, -2];
A[2, -2];
A[3, -2];
A[4, -2];

 

How do I remove Array B from Array A? e.g.

A:=Array([1,2,3,4,5,6,7,8...1000]
B:=Array([3,6,9,12,15....])   assuming A contains all the elements of B.

to get [1,2,4,5,7,8,11....]

Also is it possible to do it in place?

.I am testing out the MutableSet command, There seems to be a problem with the number of emements that can be operated on. When N =100000 things are ok. When N=1000000 (or there abouts) the process doesn't terminate last line. Uorks ok for sets. Using Maple 2018.2 on Win10 64bit.


 

restart

N := 900000

900000

(1)

A := {seq(i^2, i = 1 .. N)}

B := {seq(A[i+1]-A[i], i = 1 .. nops(A)-1)}

``

``

C := MutableSet(seq(i^2, i = 1 .. N))

module MutableSet () local storage; global MutableSet; option object; end module

(2)

upperbound(C)

900000

(3)

MutableSet(seq(C[i+1]-C[i], i = 1 .. N-1))

``


 

Download Mutable_set_issue.mw

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