“Exponentiation of a negative value.”
So is this actually a bug? Isn’t there any existing function in AX that can calculate a power of negative real numbers? I know I can always create a global function which will work just fine, but I’m a little bit disappointed in AX. Maybe it works like this because AX isn’t created for solving mathematical problems? Anyway, it’s really strange.
Yes, it sounds like a bug to me. A workaround would be to negate both the input and the output value: power(x, y) → **-power(-**x, y).
If these functions were used heavily in AX, somebody would have noticed this problem much earlier. They aren’t. It’s also possible that somebody already ran into the same problem but didn’t report it to Microsoft, so they don’t know that there is something they should fix.
If I wanted to solve mathematical problems, I surely wouldn’t choose AX / X++ for that. Nevertheless the power() function really isn’t anything advanced and if it’s included in AX, it should work correctly.
I actually found a thread about this problem on some forum. Someone found it in AX 4.0 and AX 2009 and was hoping that Microsoft would fix it. Thank you for the answer, I’ll report it to Microsoft.