0x5f3759df and the fast inverse square root (2012)
1–10 of 27 posts
Re: 0x5f3759df and the fast inverse square root (2012)
#2Of course it does, it is about square roots and inversions.
In most of the cases, in order to optimize an algorithm or solve a problem, mathematics will do it for you, and that ranges from simple arithmetic properties to base changing theorems in linear algebra.
You just can not tackle such subjects without expecting it to contain a fair bit of math .
Re: 0x5f3759df and the fast inverse square root (2012)
#3Re: 0x5f3759df and the fast inverse square root (2012)
#4I may be going on rampage here but " It does contain a fair bit of math " really grinds my gears! Of course it does, it is about square roots and inversions. In most of the cases, in order to optimize an algorithm or solve a problem, mathematics will do it for you, and that ranges from simple arithmetic properties to base changing theorems in linear algebra. You just can not tackle such subjects without expecting it…
Pretty much no sorting algorithm requires mathematical knowledge to work through, nor do many data structure algorithms. Concurrency resolution issues neither.
This is of course, so long as you consider math to be "do stuff with these numbers." Group theory and the like can help guide your results on a more abstract level.
EDIT: what I meant by this is the sort of "number-y" math that people usually mean when saying "warning: Math ahead". I realise that abstract modeling is also a part of mathematics, but that's not what people usually _mean_ when said in the context of what parent post was mentioning
Re: 0x5f3759df and the fast inverse square root (2012)
#5I may be going on rampage here but " It does contain a fair bit of math " really grinds my gears! Of course it does, it is about square roots and inversions. In most of the cases, in order to optimize an algorithm or solve a problem, mathematics will do it for you, and that ranges from simple arithmetic properties to base changing theorems in linear algebra. You just can not tackle such subjects without expecting it…
loads of things do not require math (in the sort of "doing stuff with functions in (R -> R), or multiplications/division). Pretty much no sorting algorithm requires mathematical knowledge to work through, nor do many data structure algorithms. Concurrency resolution issues neither. This is of course, so long as you consider math to be "do stuff with these numbers." Group theory and the like can help guide your result…
This is not what math is. It's more what calculus is and math is a lot more than calculus. Most mathematics is not about numbers at all.
BTW: Interesting results about sorting algorithms (e.g. the lower bound of O(nlogn) complexity for comparison-based sorts) require maths (specifically combinatorics, permutations etc). Concurrency involves math, too. See the famous happens-before relationship which involves notions of sets (of executions), transitivity, partial ordering, etc.
Re: 0x5f3759df and the fast inverse square root (2012)
#6I may be going on rampage here but " It does contain a fair bit of math " really grinds my gears! Of course it does, it is about square roots and inversions. In most of the cases, in order to optimize an algorithm or solve a problem, mathematics will do it for you, and that ranges from simple arithmetic properties to base changing theorems in linear algebra. You just can not tackle such subjects without expecting it…
loads of things do not require math (in the sort of "doing stuff with functions in (R -> R), or multiplications/division). Pretty much no sorting algorithm requires mathematical knowledge to work through, nor do many data structure algorithms. Concurrency resolution issues neither. This is of course, so long as you consider math to be "do stuff with these numbers." Group theory and the like can help guide your result…
I beg to differ on this one. Proving, or at least reasoning about, concurrent algorithm does involve wrapping your head around happened before model, logical clocks, state machines and such. Most of these concepts are grounded in discrete math; group theory, partial ordering and so on.
Re: 0x5f3759df and the fast inverse square root (2012)
#7Earlier quoted context omitted.
loads of things do not require math (in the sort of "doing stuff with functions in (R -> R), or multiplications/division). Pretty much no sorting algorithm requires mathematical knowledge to work through, nor do many data structure algorithms. Concurrency resolution issues neither. This is of course, so long as you consider math to be "do stuff with these numbers." Group theory and the like can help guide your result…
> ...math (in the sort of "doing stuff with functions in (R -> R), or multiplications/division") This is not what math is. It's more what calculus is and math is a lot more than calculus. Most mathematics is not about numbers at all. BTW: Interesting results about sorting algorithms (e.g. the lower bound of O(nlogn) complexity for comparison-based sorts) require maths (specifically combinatorics, permutations etc). C…
[OT] What's the probability of two comments with very similar views appearing at the same time :-). I too did comment almost exactly same thing!
PS: Ducks from down-votes.
Re: 0x5f3759df and the fast inverse square root (2012)
#8I may be going on rampage here but " It does contain a fair bit of math " really grinds my gears! Of course it does, it is about square roots and inversions. In most of the cases, in order to optimize an algorithm or solve a problem, mathematics will do it for you, and that ranges from simple arithmetic properties to base changing theorems in linear algebra. You just can not tackle such subjects without expecting it…
It's not always weird bit-level arithmetic, but if you aren't using math at some level, you're not programming; you're just futzing around with a text editor.