-2

Possible Duplicate:
Evaluate math expression in string? (NSString)

Hey i have got this string but how can i make it to at float equation.

5+5*10+(5*2 + sinf(1))

how can i calculate this piece from a string.

NSString *stringvalue = @"5+5*10+(5*2 + sinf(1))";
Community
  • 1
  • 1

1 Answers1

0

As pointed out in this answer you can either use GCMathParser or DDMathParser.

Community
  • 1
  • 1
Gabriele Petronella
  • 106,943
  • 21
  • 217
  • 235