So, im making an app that solves quadratic equations. The main interface simply asks the user to input the values of A, B, and C. The problem is, I'm not getting the right answer. Here's the code:
NSString *intStringa = [NSString stringWithFormat:@"%@", a.text];
int aa = [intStringa intValue];
NSString *intStringb = [NSString stringWithFormat:@"%@", b.text];
int bb = [intStringb intValue];
NSString *intStringc = [NSString stringWithFormat:@"%@", c.text];
int cc = [intStringc intValue];
double d = ( -(bb) + ( (bb)^2 - (4*aa*cc) ) ^0,5 ) / (2*aa);
double e = ( -(bb) - ( (bb)^2 - (4*aa*cc) ) ^0.5 ) / (2*aa);
label1.text = [NSString stringWithFormat:@"%lf", d];
label2.text = [NSString stringWithFormat:@"%lf", e];
Any ideas? Thanks!!!