by kens · 6y ago · 0 comments
We really like like to pretend that the integers are a subset of the real numbers. As such, we really like to pretend that the function pow : real X int -> real is a restriction of the function pow : real X real -> real.
Speaking as a programmer, I really expect the effect of casting between numeric types is only precision.
If pow(0f,0) != pow (0f, 0f), then you break both of these assumptions.
(Const 0)^(var 0) is 0.
(Var 0)^(const 0) is 1.
(Const 0)^(const 0) is undefined.
(Var 0)^(var 0) is defined based on the functions that define those variables.
pow(0.0f, 0.0f) == (float)pow(0, 0)
If one is defined then so should the other. (At least, for developers’ benefit.)