Open Source: Easily Extensible Objective-C Math Parser Library

Math parsing libraries can be extremely useful whenever you want to evaluate a complex mathematical expression.  In Objective-C you can use NSPredicate.  If you want to extend the functionality of NSPredicate however, this can be extremely difficult.

I came across a math parser that provides many advantages over NSPredicate, and other existing math libraries with in my opinion the key feature being the ease at which you can register new functions.

The library is DDMathParser from DaveDeLong.  The Github for the library can be found here:
https://github.com/davedelong

You can also read Dave’s extensive writeup on the library on his website here:
Parsing Mathematical Expressions

There are many other advantages of using Dave’s library over NSPredicate and other existing math parser’s in his writeup.

Looks like the right choice if you need to go beyond the default functionality provided by NSPredicate.

©2011 iPhone, iOS 4, iPad SDK Development Tutorial and Programming Tips. All Rights Reserved.

.

DeliciousTwitterTechnoratiFacebookLinkedInEmail

Leave a Reply

Your email address will not be published. Required fields are marked *