405
you are viewing a single comment's thread
view the rest of the comments
[-] linearchaos@lemmy.world 17 points 1 day ago

I could never remember the formula to calculate compound interest.

But I had no trouble writing a for loop.

[-] VintageGenious@sh.itjust.works 4 points 1 day ago
[-] linearchaos@lemmy.world 1 points 1 day ago

I would just rebuild something in my head like this every time.

While i < n; k=k+(k*r); i++;

You'd think I could remember k(1+r)^n but when you posted, it looked as alien as it felt decades ago.

[-] VintageGenious@sh.itjust.works 5 points 1 day ago

The use of for makes sense.

k=0; for (i=0; i<n; i++) k=k+f(i); is the same as k=\sum_{i=0}^{n-1} f(i)

and

k=1; for (i=0; i<n; i++) k=k*f(i); is the same as k=\prod_{i=0}^{n-1} f(i)

In our case, f(i)=1+r and k=1; for (i=0; i<n; i++) k*(1+r); is the same as k=\prod_{i=0}^{n-1} (1+r) = (1+r)^n

All of that just to say that exponentiation is an iteration of multiplication, the same way that multiplication is an iteration of addition

[-] BluesF@lemmy.world 2 points 1 day ago

What always annoyed me was having to draw charts by hand. Just let me put the data in a computer for god's sake, the rest of the working is there... I did actually write a python function for one of my assignments which was fine, but they told me not to do it for the exam.

this post was submitted on 20 Sep 2024
405 points (94.7% liked)

Technology

58180 readers
3768 users here now

This is a most excellent place for technology news and articles.


Our Rules


  1. Follow the lemmy.world rules.
  2. Only tech related content.
  3. Be excellent to each another!
  4. Mod approved content bots can post up to 10 articles per day.
  5. Threads asking for personal tech support may be deleted.
  6. Politics threads may be removed.
  7. No memes allowed as posts, OK to post as comments.
  8. Only approved bots from the list below, to ask if your bot can be added please contact us.
  9. Check for duplicates before posting, duplicates may be removed

Approved Bots


founded 1 year ago
MODERATORS