hey guys am having a problem with my power function that calculates power it works properly with exponents that are intergers but crashes with exponents that are double type please help thanx in advance
From math we know that pow(x, n) = exp(n * log(x))
Now you need to implement exp and log functions. There is many ways to do that (either by using naive approach with Tailor series or doing something smarter), but I will suggest to jusr use tandard functions. If you still want to make your own functions, there is reference log() implementation: http://www.netlib.org/fdlibm/e_log.c
Actually for perfomance math functions are often implemented directly in assembly.