Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [day] [month] [year] [list]
Date: Mon, 24 Jun 2013 15:08:22 -0400
From: Rich Felker <>
Subject: ccalc.c for testing math functions

Here is a quick test program I wrote for playing around with musl's
(or any libc/libm's) math functions. It's an RPN calculator that
accepts input in argv[1] or stdin. It's by no means mature, but it's
very simple and usable for the purpose for which it was written
(testing), and the concepts in it could easily be extended to build a
nice infix-notation direct-libm-based floating point expression
evaluator library or utility.

Example usage:

$ ./ccalc '-1 csqrt 1 atan 2 * 3 / * cexp p'
0.866025403784438596588 + i*0.5


View attachment "ccalc.c" of type "text/plain" (5059 bytes)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.