Adam Ledger

Mr. Adam Ledger

360 Reputation

11 Badges

9 years, 126 days
unemployed
hobo
Perth, Australia

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by Adam Ledger

@tomleslie ok so i have run all 4 and taken a quick look, i just dont see how or why the code is more efficient. i with try and use show stat to take a look at some things as well, but i guess the obvious question is, what information was in front of me that i must have missed in developing the habit of using the slower option?

@tomleslie 

This my error occured inside the worksheet as i had attached with the embedded components.

I do use the arrow notation ever so frequently, so this might indeed be one of those defining aspects of the way i write code in maple that improves me a great deal in terms of efficiency etc. 

If you dont mind, i would really really appreciate an example of code that uses the arrow notation, and the explicit procedure you would use in place of it in a second example of code, so that i can familiarise with what i need to change in my habits whenever i believe the arrow notation to be necessary

@acer in general unapply does not work if the function contains indeterminants with indeterminant exponents

for example my calculator works perfectly fine for F:=(-2*n[2]*n[1]-4*n[2]*n[1]+4*n[1]+n[1])/(-n[1]^2-2*n[2]*n[1]+2*n[3])

But not:

(-2*n[2]*n[1]-4*n[2]*n[1]+4*n[1]+n[1])/(-n[1]^n[2]-2*n[2]*n[1]+2*n[3])

and this is something that does not work for unapply in general, not just for the context of the code you shared earlier

@acer I'm not disputing what you are saying is correct it's just that i have gotten it to work that way and well yes for someone of my experience quite often there isnt as many ways of doing things for a specific task as there would be for you. 

Anyway it is attached for you to take a look at. all of the main proc is in the button.

DIVISION_BY_ZERO_CALCULATOR.mw

@tomleslie yes i made it to the help page for unapply literally 2 minutes ago and i think i will be alright from here, but much appreciated anyway.

Its just that it seems everything is so much more syntax sensitive when i want to pass information around between embedded components and things but yeah i guess i am trying to build a user friendly  data & function analysis tool and im really happy with how its going so far, if i dont think about the fact that its nature renders it  completely unviable as a commercially saleable product because of the small subset of people that it will appeal to, so its really for friends that probably wont even use it bar the humour of features that are typically something i would chose. Basically for example this one lets the user define a nested sequence of up to 10 integer variables,  and pressing the button returns all args that result in a division by zero error for the ranges for each variable the user specifies, then im going to have it return conditional statements involving the arguments in terms of avoiding the division by zero errors, which is a really big ask.

I wrote the one for up to 4 variables so tonight is basically extending that to any arbitary number which has proven to be tricky for me

@Kitonum 

F := (-2*n[1]*n[3]-4*n[2]*n[1]*n[3]+4*n[2]*n[3]+4*n[3]*n[4]*n[1]+n[1])/(-n[1]-2*n[2]*n[1]+2*n[2]+2*n[4]*n[1]):

 

NumVARIABLES := 5;

unapply(F, seq(n[k], k = 1 .. NumVARIABLES));

I get the output:


proc (n_1, n_2, n_3, n_4) options operator, arrow; (-2*n_1*n_3-4*n_2*n_1*n_3+4*n_2*n_3+4*n_3*n_4*n_1+n_1)/(-n_1-2*n_2*n_1+2*n_2+2*n_4*n_1) end proc;
 

@Kitonum 

 

sorry the code i described above gives me the error: "Error, invalid operator parameter name"

do you know anyway around this?
 

@Kitonum  im sure you also will know this:

 

how do i get around the invalid operator name error that arises with:

 S:=(seq(v[k],k=1..NumVARIABLES))->Soutput

 

for some reason the arrow operator wont let seq run first and define the list of inputs i dont understand these parts of maple properly

@acer 

how do i get around the invalid operator name error that arises with:

 S:=(seq(v[k],k=1..NumVARIABLES))->Soutput

for some reason the arrow operator wont let seq run first and define the list of inputs i dont understand these parts of maple properly

@acer  ok thanks but there is just no way i would have predicted these syntax differences when compare to applying foldl with any other operator other than seq, like why is the underslash needed beforehand? (_seq)

 

and also why is the single quotes needed  'i' and 'j'? i dont even understand why the j:='j' was necessary this is really confusing but im glad i have the code so thankyou for that

@John Fredsted  yep dont worry ive been there more times than id like to count with code ive written myself, im hoping that over time if i remain actively asking questions here my style of maple code writing will become more efficient overall

@Kitonum  have you seen the trigonometric integral formula for the total number of lucky tickets up to a given number in any number base? If not take a look on russian wikipedia, doesn't give a derivation but it's still genius 

 

EDIT: opps sorry i didnt follow your link first! you already know of these then.

@Jjjones98 well first of all congradulations on your placement in such a fantastic university! and I think Andrew Granville also studied there and has won a Fields Medal, Cambridge has quite a history of excellence in mathematics, i really would encourage you to have a read of about this especially if that is the field of your study.

Also not entirely sure if Mr Baker would be his appropriate title.

 

Edit: Ok i had assumed he completed his doctorate at Cambridge, but none the less congradulations on your placement

@acer  Ok so everything here combined with StringTools,ListTools,kernelopts, Statistics, and an  Error Handling proc that stores detailed data for every error encountered and tabulates that data will be everything i need for the data mining step.

Another big component of what is necessary that will take me a long time is those execution failures that are to do with java, this will require me to become proficient in java and how maple interfaces with it.On a few occasions i have had specific messages appear upon failure informing me the crash was associated with the java engine, and an error log file is produced in the folder of the worksheet detailing this. So it would be a good start for me to find out how to have maple produce such a log for all interaction that is java based, for every worksheet.

And because i want the data mining code to of course be culminative for every execution for which it is implemented, FileTools and Excel Export will be needed and a directory for on going data storage in the home directory. 

The statistical analysis will then require those spreadsheets to be imported and the Statistical values i have declared relevant updated every "x" executions for which new data has been collected, and notification code for the point at which reliably consistent stats are being returned and so i can at that point move to the next step.

@acer I really wish things were so simple as to have one project to work on, but still, i feel guilty whenever someone asks what have i done for something and i have done very little, so i just need to type a heap of excuses for it, feel free to ignore the next few paragraphs.

I am currently "following along" with a Phd's course in Real Analysis, and if i submit passing assignments on time and demonstrate an understanding of the subject he has agreed to write me a letter of reccomendation which i am wanting to submit for an application for a semester abroad in Budapest.

I also need to divide a proportion of my time to organic chemistry seeings that seems to be my only viable option out of a somewhat challenging predicament.

And today i worked on two proofs, one for Lagrange's Group theorem for a finite field, the other is a proof of Fermat's Little Theorem that is essentially Golomb's combinatoric proof or at least the basic example of it they provided on wikipedia, but formalized and in relation to some other things that i have previously worked on, as well as attempting to take a group theory approach, seeings i need to also get a letter of reccomendation in abstract algebra for the semester abroad as stated in their minimum criteria. 

 

But as far as this one is concerned i have opened the help page on CodeTools

First 12 13 14 15 16 17 18 Last Page 14 of 30