cancel
Showing results for
Did you mean:
cancel
Showing results for
Did you mean:

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Program with 10 internal loops takes for ever to returen the result.

Program with 10 internal loops takes for ever to returen the result.

I am writing a program with about 10 internal loops, and its not returning any results, but the counter is still running, I tried to simplify it, still running while I am typing at this moment.

19-Tanzanite

Do you mean loops nested 10 deep?

4-Participant

Yes, they are 10 loops, one inside the other. I tried to simplify them, still take time, any advise in how to shorten the time!!

19-Tanzanite

Can you post the worksheet?

24-Ruby III
 Richard Jackson wrote:Can you post the worksheet?

Can I post?

There was an old task USA+USSR=PEACE

We can try to solve this task by using 7 nested for-loops: for U, for S, for A, for R, for E, for C, for E

But we can simplify (by a mind help) this task and have only 3 nested for-loops - for A, for C and for S:

This program gives us 4 solutions (решение) but only first is correct: 932+9338=10270.

Try please solve this (modern) problem USA+IRAN=PEACE

Both tasks are a good example of a combination of own mind and a computer!

24-Ruby II

1-Newbie

Try using the trace() or pause() functions at strategic points in the loop and run in debug mode.

Use the help resource for details on how to implement them.

24-Ruby III
 MCH wrote:Try using the trace() or pause() functions at strategic points in the loop and run in debug mode.Use the help resource for details on how to implement them.

1-Newbie

Hi Valery,

Could you possibly upload the Mathcad 15 version of the Root Newton file you have posted a picture of - and perhaps you could explain to me how you put the squiggly = sign (the approximate sign) - in the program loop - since I thought you could only use Boolean operators in the programming?

Look forward to hearing from you.

Kind regards,

Gordon.

24-Ruby III

1-Newbie

Hi Valery,

Your foot note below the picture explains why I couldn't see this in Mathcad 15

I haven't moved onto Mathcad Prime yet.

Many thanks,

Gordon.

24-Ruby V
 Your foot note below the picture explains why I couldn't see this in Mathcad 15 I haven't moved onto Mathcad Prime yet.

Thats a misunderstanding - its not Prime. On contrary, the whole trick works in Mathcad 15 (and below) only, as Prime is too much limited - there is no choice for infix function evaluation available there AFAIK.

The approximate sign is simply the name of a user defined function which is then used the infix way - you can copy and paste that character from anywhere. One way to do it without any external character map is to go to Help/Quicksheets/ExtraMathSymbols and copy it from there. Everytime you use that newly created function you will have to do some kind of copy and paste action again.

24-Ruby III

It is user defined operator.

In Mathcad Prime Minister it is a built-in operator:

1-Newbie

Hi Werner,

Thanks for showing me something else I didn't know about Mathcad. It would be good if some of you Mathcad experts got together to write a book on the things you just don't see in Mathcad books or on the Mathcad training courses.

Thanks again,

Gordon.

Community Manager
Status changed to: Archived

Hello,

We are archiving your idea as part of a general review. This action is based on the age of your idea and the total number of votes received, as per this announcement.

You can always post a new idea with all the details required in the form.