Assignment in Gradient Descent Algorithm

Today i learn about Gradient Descent Algorithm. There is something interesting in that equation that very common use in Computer Science.

“=”

My lecturer in university never said that in programming language like Java, C, or Python this sign is for assignment not an equals.

But in Math the sign “=” is used to check that value from left side is equals to hand side. Just like :

a = b (this is means that value of variable a and value of variable b is equals)

5x^2 + 2x + 3 = 0 ( this is means that equation in the left is equals to zero)

But in programming we use this sccript :

a = a + 1 ( this is means, value of variable a is value variable a + 1) 

And in math we use this notation :

a := a+1 (ovveride new value of a with equation in the right hand side)
 
2
Kudos
 
2
Kudos

Now read this

Fast inverse square root

Fast inverse square root in hexadecimal 0x5f3759df is used to count the x The code implementation is from Quake III Arena source code : float Q_rsqrt( float number ) { long i; float x2, y; const float threehalfs = 1.5F; x2 = number *... Continue →