Amicitas@lemmy.world to Technology@lemmy.worldEnglish · 2 months agoSecret calculator hack brings ChatGPT to the TI-84, enabling easy cheatingarstechnica.comexternal-linkmessage-square103fedilinkarrow-up1435arrow-down124 cross-posted to: hardware@lemmy.world
arrow-up1411arrow-down1external-linkSecret calculator hack brings ChatGPT to the TI-84, enabling easy cheatingarstechnica.comAmicitas@lemmy.world to Technology@lemmy.worldEnglish · 2 months agomessage-square103fedilink cross-posted to: hardware@lemmy.world
minus-squarelinearchaos@lemmy.worldlinkfedilinkEnglisharrow-up1·2 months agoI 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.
minus-squareVintageGenious@sh.itjust.workslinkfedilinkEnglisharrow-up5·2 months agoThe 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
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.
The use of for makes sense.
k=0; for (i=0; i<n; i++) k=k+f(i);
is the same ask=\sum_{i=0}^{n-1} f(i)
and
k=1; for (i=0; i<n; i++) k=k*f(i);
is the same ask=\prod_{i=0}^{n-1} f(i)
In our case,
f(i)=1+r
andk=1; for (i=0; i<n; i++) k*(1+r);
is the same ask=\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