double operator ^(double a, double b) {
return ...;
}
this might not work, because compiler may not be able to differetiate this with its normal meaning - Bitwise Exclusive OR Operator: ^. try it by yourself with the compiler.
Remember to do cast before the actual prarameter, or it will be just Bitwise Exclusive OR Operator if it happend both operands are of int type.