GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • home
  • posts
  • projects
  • about
  • GitHub
  • Download
  • Announcement Post

This view

  • Original page
  • New address

GeezerVison is showing codeplea.com — C Math Evaluation Library: TinyExpr - Code Plea

CodePlea icon
CodePlea
Random thoughts on programming
  • home
  • posts
  • projects
  • about
  • rss feed icon

C Math Evaluation Library: TinyExpr


Summary

Fork me on GitHub

TinyExpr Logo

TinyExpr is a very small parser and evaluation library for evaluating math expressions from C. It's open-source, free, and self-contained in a single C code file and header file. TinyExpr is extremely easy to use.

Code Sample

#include "tinyexpr.h"
#include <stdio.h>

int main(int argc, char *argv[])
{
    const char *expression = "sqrt(3^2+4^2)";
    printf("Result: %f\n", te_interp(expression, 0));
    return 0;
}

Features

  • ANSI C with no dependencies.
  • Contained in a single source code and header file.
  • Simple, fast, thread-safe, easily extendible.
  • Implements standard operator precedence and standard math functions.
  • Includes examples and test suite.
  • Released under the zlib license - free for nearly any use.

Links

  • GitHub
  • Download
  • Documentation
  • Announcement Post
© Lewis Van Winkle 2009-2026
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.