# Tag Info

## Hot answers tagged infinite-loop

### Paying off an installment

Using Annuity: pmt /.Solve[TimeValue[Annuity[pmt, 52, 1], .02, 0] == 5000, pmt] 155.545 ...
• 10.6k
Accepted

### How to calculate a list without loop?

Accumulate@Array[b, {3}] (* {b[1], b[1] + b[2], b[1] + b[2] + b[3]} *) therefore: ...
• 36.8k
Accepted

### A while loop that terminates after a number of seconds elapsed?

You could do something like this: tstart = SessionTime[]; While[(t = SessionTime[] - tstart) < 60, (* do stuff *)]
• 68.7k

### How to calculate a list without loop?

FoldList[{0, 1} # + #2 &, list]
• 83.3k
Accepted

• 7,046
Accepted

### Generating trigonometric sums

n = 10; basis = Table[Cos[k t], {k, 0, n}]; Tuples[{-1, 1}, n + 1].basis
• 94.9k

### Looping things in Mathematica

As alluded to by Daniel Lichtblau you could use TriangleWave with appropriate scaling, e.g. ...
• 55k
Accepted

Simon's code ...
• 114k

### How to calculate a list without loop?

thanks to Mike Honeychurch, without pure function: ...
• 4,735
Accepted

### How to check keys and values in nested Associations?

This solution will traverse all nested associations regardless of depth and replace each value with the value that corresponds to its key in replacements. ...
• 68.7k
Accepted

### Check every list element for appearance

All you need is to do Map MemberQ over the second column (a.k.a. [[2]]) of each lines: <...
• 8,417
Accepted

### Coding While loops

Something like this: ...
• 68.7k
Accepted

### Paying off an installment

Just to show how to fix the origional loop: ...
• 38.3k

### Paying off an installment

Using the example for an ordinary annuity from here:- Calculating The Present And Future Value Of Annuities The example demonstrates how a present value principal of 4329.48 is paid down by five ...
• 29.2k

### A while loop that terminates after a number of seconds elapsed?

An example using TimeConstrained: ...
• 6,373

### Minimize loop optimization

I'm not sure exactly what you want, but in an effort to demonstrate some possibilities: ...
• 264k