Conversation
Notices
-
Gnarley Boot (gnarley_boot@norwoodzero.net)'s status on Friday, 12-Jul-2024 19:12:35 JST Gnarley Boot @iska @enigmatico @iro_miya
Yeah hit them up with real math they will know what yer talking about cc @theorytoe @3T- † top dog :pedomustdie: likes this.
-
Gnarley Boot (gnarley_boot@norwoodzero.net)'s status on Friday, 12-Jul-2024 19:12:36 JST Gnarley Boot @iska @enigmatico @iro_miya
AFAIK toe and 3T are math brains. -
Iska (iska@catposter.club)'s status on Friday, 12-Jul-2024 19:12:38 JST Iska @enigmatico@mk.absturztau.be @iro_miya@mk.absturztau.be do you actually think fedi users can comprehend math above elementary school
-
【Ξnigmatico】:misskey: (enigmatico@mk.absturztau.be)'s status on Friday, 12-Jul-2024 19:12:39 JST 【Ξnigmatico】:misskey: @iro_miya While it's true that you can implement sums using a for loop, it can be optimized using basic summation identities. More specifically
\displaystyle{\sum^k_{n=0}3n = 3\sum^k_{n=0}n = 3\left(\sum^{k-1}_{n=0}n + k\right) = 3\left(\frac{k(k-1)}{2}+k\right)}
Where k \in \mathbb{Z}⁺, k > 0. So you can simply use this generic formula and save yourself a for loop.
The same can be applied to the multiplication as well, although in this case how much computational cost you save will depend on how the machine calculates the factorial.
\displaystyle{\prod^k_{n=1}2n = 2\prod^k_{n=1}n = 2(k!)} -
(NekoSock) Miya Ironami (iro_miya@mk.absturztau.be)'s status on Friday, 12-Jul-2024 19:12:40 JST (NekoSock) Miya Ironami WHAT
(You can follow Freya Holmér on fedi at @acegikmo@mastodon.social!)