Index | math | Lists | strings | complex | matrix | poly |
hexa/bin | date/time | progs | conversion | files | apn |
Stack : 2 : { 2 5 6 4 8 } 1 : « FACT » |
If you perform ForEach on this stack, you will execute the program « FACT » on each item of the listThe result will be : {2 120 720 24 40320} |
« PRIMES « 1/x » ForEach sum » |
First, we are using PRIMES to get the prime numbers. and ForEach to compute reverse(1/x) on each primes. abd finaly we just have to perform sum to get the sum of these numbers.. |
150
SWAP, and then run4: 123 3: 1 2: { 1 2 3 4 } 1: « + + » |
Original stack |
RPNe will first create this virtual stack :
3: 123 2: 1 1: 1and then run ++ Result will be 125 |
and, RPNe will create this virtual stack :
3: 123 2: 1 1: 2and then run ++ Result will be 126 |
and, RPNe will first create this virtual stack :
3: 123 2: 1 1: 3and then run ++ Result will be 127 |
finaly, RPNe will first create this virtual stack :
3: 123 2: 1 1: 4and then run ++ Result will be 128 |
{125 126 127 128}
« PRIMES { 1/x } ForEach sum » |
a QLE script is used at ForEach call instead of a program. |