Viewing a single comment thread. View all comments

Nostr0m t1_isbt2ks wrote

You can save multiplication operations by clever additions and subtractions. See Strassen's algorithm for an example.

8

mcilrain t1_isbtvx2 wrote

That wouldn't work in all cases though, right? Wouldn't the logic needed to determine when it's safe make it slow? Or are errors worth the increased performance?

1

Nostr0m t1_iscv4x4 wrote

No, these are deterministic algorithms guaranteed to produce the right answer, so there are no errors involved. If you would like to learn more look into an intro to algorithms course, pretty interesting stuff

5

mcilrain t1_iscw9kh wrote

Floating point number calculations are always slightly inaccurate to a certain degree as a performance trade-off, increasing the inaccuracy in the result in exchange for even greater efficiency is plausible.

I'd expect an algorithms course to go right over my head, I'm good with logic but terrible with numbers.

3

Chop1n t1_isdcwxh wrote

Don't tell me: your name is a portmanteau of Nick Bostrom.

1

Nostr0m t1_isggbvd wrote

Haha not intentionally, but that's interesting now you mentioned it.

3