Download Latest Version crunch_beta-0.3.7.zip (37.5 kB)
Email in envelope

Get an email when there's a new version of Note Cruncher

Home / alpha-0.0.2
Name Modified Size InfoDownloads / Week
Parent folder
README.txt 2011-06-15 4.0 kB
main.c 2011-06-15 10.8 kB
Changelog.txt 2011-06-15 271 Bytes
fastcalc.cbp 2011-06-15 794 Bytes
Totals: 4 Items   15.9 kB 0
CRUNCH README

June 13, 2011
This calculator spawned from a desire to have a commandline calculator that starts instantly and doesn't require you to type the full word "quit" to quit.  Simply start the program, do a few calcs, and 'q' is enough to get out.  The main goal is to make this calculator cross-platform, depending only on c standard libraries so you don't have to install any dependencies, thus building from source is really quick and simple, not to mention the tool can be used easily on about any system.

This is the "WOL" Wide Open License software.  You can take it, do anything with it, use it in commercial and non-commercial projects alike, assimilate it into larger projects, use it for educational purposes, or whatever else constitutes as software use, copying and distribution -- But I must attach some stipulations to cover my @77:
This software comes with NO WARRANTY of any kind, implied or otherwise.
I am not responsible for anything you do with it.  Once you take the code, you assume responsibility for all consequences related to its use.
I am not responsible for anything it does to you.  I have personal incentive to make it as accurate and bug-free as possible, but I have no obligation to do so.


Of course, as can be seen this is very alpha, but the basic functionality is complete.

Right now it does not support parentheses order of operations, but code is in place so I can slowly chip away at it.  

I have included the Windows executable "fastcalc.exe" which you can simply download and double-click to run, should be good to go there.
Copy it to whatever folder you want.  You may also wish to make a shortcut and assign an icon to it.

For Linux, I am uncertain whether a binary compiled on Win for Win would do, so I recommend building from source...which is really really simple.

Just copy main.C into whatever directory you want to and do the following from that directory:
$ g++ main.c -o crunch

//if you feel the need to add compiler options, feel free, but at this time the program is so simple I don't see much need for any optimisation
//However, you may find some other options need to be included to make it compile successfully on your system.

If you want to launch it without the full directory name,  you want it in your $PATH, then as root (or using sudo),

# cp crunch /usr/sbin

or similar directory in your $PATH


Simply execute the file.

Once it's running, things are very straight-forward.  Right now it supports the following operations:
Operator	Function
--------	--------
+		ADD
-		SUBTRACT
*		MULTIPLY
/		DIVIDE
%		MODULO (Performs floating-point modulo, so it's good for both integers and the rest of the real numbers)
^		POWER (Example: 2^4 is 2 raised to the 4rth power)

Invoke "M*10^N" notation in the folowing manner:
MeN 
For Example, to represent 10 times 10 to the 6th,  "1e6" is the proper notation.  This is pretty standard, so not likely anybody will have trouble here.

The constant 'e' is also supported, for example, e^4 will return e raised to the power of 4.

ORDER OF OPERATIONS
-------------------
Proper mathematical order of operations is not yet supported:

By default it executes operations from left to right and accumulates as it goes, for example:
[ crunch ] $ 3 + 4 + 2/6

Will actually be evaluated in this manner:
(3 + 4 + 2)/6

Another example:
[ crunch ] $ 2/7 + 5 * 3

Will be evaluated like this:
((2/7) + 5)*3

I will plan to change this in future releases, but for now it's very primitive.


There is a CodeBlocks project file in the directory for anybody using Code::Blocks IDE.  If any collaborators join, I will not require any dependency on the Code::Blocks project and it will become a purely GNU & make style project with no dependency on fancy programs for building.  Then you could use text editor or IDE of your choice.

Comments, Suggestions and collaboration are all welcome:
ryjobil@gmail.com


 
Source: README.txt, updated 2011-06-15