Adam Ledger

Mr. Adam Ledger

335 Reputation

11 Badges

4 years, 334 days
Perth, Australia

Social Networks and Content at

MaplePrimes Activity

These are questions asked by Adam Ledger

I was trying to learn more about the commands in this package and found it to be someone non satisfying:




How do i pipe maple output to the clipboard and vice versa (assigning clipboard content to a variable declared in a maple worksheet)?

I am pretty certain that the problem here is simple, but only in the sense that what is counter intuitive to me is intuitive to most.
The final line as i have indicated ought to be a sequence of 1's, which should be evident upon inspection  of the code within the "for loop". But as you can see, it always has an additional count which is going to be an issue if I elaborate on this basis to further investigate. 

Can someone please explain to me why this occurs? I intented for a boolean as can be seen, only two outcomes, either the tally represented by the variable TRUE is incremented by 1, or the tally represented by the variable FALSE is incremented by 1.

I'm hoping it is sleep deprivation and it is simply because  I am not paying attention, but it's hard to tell if I am or am not, i know it's very funny yes i am a strange breed of crazy

Help appreciated in advance.






delta := proc (x, y) options operator, arrow; piecewise(x = y, 1, x <> y, 0) end proc



Identity1 := proc (alpha, beta, eta, lambda, n, N) options operator, arrow; sum((delta(n, k)-(eta+I*lambda)*delta(n, k+1))*floor((alpha+I*beta)*(eta+I*lambda)^(k-N)), k = 1 .. N) = floor((alpha+I*beta)*(eta+I*lambda)^(n-N))-(eta+I*lambda)*floor((alpha+I*beta)*(eta+I*lambda)^(n-N-1))-delta(n, N+1)*(alpha+I*beta)*(eta+I*lambda) end proc:



R := {}:

Card := 0:

while Card < 10 do TOTAL := 1000; TRUE := 0; FALSE := 0; for w from 0 to TOTAL do A := (rand(-100 .. 100))()/(rand(1 .. 100))(); B := (rand(-100 .. 100))()/(rand(1 .. 100))(); C := (rand(-100 .. 100))()/(rand(1 .. 100))(); F := (rand(-100 .. 100))()/(rand(1 .. 100))(); N := 100; if is(Identity1(A, B, C, F, w, N)) = true then TRUE := TRUE+1 else FALSE := FALSE+1 end if end do; result := [TRUE/TOTAL, FALSE/TOTAL]; R := `union`(R, {result}); Card := Card+1 end do:

{[71/500, 859/1000]}



{[3/20, 851/1000], [7/50, 861/1000], [29/200, 107/125], [69/500, 863/1000], [141/1000, 43/50], [147/1000, 427/500], [149/1000, 213/250]}


seq(R[k][1]+R[k][2], k = 1 .. nops(R))

1001/1000, 1001/1000, 1001/1000, 1001/1000, 1001/1000, 1001/1000, 1001/1000





The help page for interface states that errorbreak can be between 0 and 2, however despite being able to do so according to the output of 




My worksheet still breaks on most errors.


Is this something I am doing wrong, or is this because i am using maple 2016?

I have specified the problem in the red comments of the worksheet i am uploading:




currentdir("H:\\USB 1 BACKUP\\ESD-USB\\maple_library"):

["ArithmeticMean_Display_Definition.txt", "BinomialCoefficient_PadicOrder.txt", "Binomial_coefficent_p_adic_valuation_Display_Definition.txt", "CompareGeometricMean.txt", "CompareHarmonicMean.txt", "CompareMean.txt", "Compare_Arithmetic_Mean_Description.txt", "Compare_Mean_Description.txt", "ConsistencyCompareGeometricMean.txt", "ConsistencyCompareHarmonicMean.txt", "ConsistencyCompareMean.txt", "delta.txt", "delta_Display_Definition.txt", "digit_base_conversion.txt", "EulerProduct.txt", "GeometricMean_Display_Definition.txt", "HarmonicMean_Display_Definition.txt", "Mobius.txt", "MultiplicitySet.txt", "omega.txt", "p_adic_valuation.txt", "p_adic_valuation_Display_Definition.txt", "RationalParition.txt", "SquareFreeCount.txt", "WilsonTheoremLemma.txt", "WilsonTheoremLemma1_Display_Definition.txt", "WilsonTheoremLemma2_Display_Definition.txt", "WilsonTheoremLemma3_Display_Definition.txt"]



L := map(StringTools:-Has, FunctionList, "_Display_Definition"):

S[display] := {}:

for k to nops(L) do if L[k] = true then S[display] := `union`(S[display], {FunctionList[k]}) else S[procedure] := `union`(S[procedure], {FunctionList[k]}) end if end do;

for t to nops(S[display]) do read S[display][t] end do;



{"p_adic_valuation.txt", "Compare_Mean_Description.txt", "delta_Display_Definition.txt", "digit_base_conversion.txt", "ArithmeticMean_Display_Definition.txt", "BinomialCoefficient_PadicOrder.txt", "Compare_Arithmetic_Mean_Description.txt", "GeometricMean_Display_Definition.txt", "HarmonicMean_Display_Definition.txt", "p_adic_valuation_Display_Definition.txt", "WilsonTheoremLemma1_Display_Definition.txt", "WilsonTheoremLemma2_Display_Definition.txt", "WilsonTheoremLemma3_Display_Definition.txt", "Binomial_coefficent_p_adic_valuation_Display_Definition.txt"}


read S[display][5]

`The Arithmetic Mean for the multiset:`


[a[j]][j = 1 .. n]


mu[A] = (sum(a[j], j = 1 .. n))/n


read S[display][7]

`CompareArithmeticMean(L,N) will return output informing you of what percentage of N random`


`natural number multisets of the same length as the multiset L and same range=[min(L),max(L)]`


`have a lower arithmetic mean than L, equal to L, and greater than L.`





5 6 7 8 9 10 11 Last Page 7 of 34