yes its correct... try inputting
you'll get output as 1 (2^3 = 8)
(1.5)^(2.5) =2.75567596063(as per my calculator)
So your code is returning 0 because double has no fixed representation like integers do.
The code is syntactically correct but won't work as expected. double and float numbers can't be compared with == because they have no fixed representation like integers. Instead they contain small differences from rounding the result. For example 3.0 might actually be stored as 2.9999998 because the binary format can't directly store decimal numbers. Therefore using == on doubles or floats will almost always return false.
P. S. in the bool function you could return true and false instead of 1 and 0. But that's just for better readability.
With your help I repair it, so I use floor function on both side of == operatant. If I use floor only on left side it won't be right. I am satisfied because it makes it. One more lesson I learn.