"Fossies" - the Fresh Open Source Software Archive

Member "wcalc-2.5/README" (29 Dec 2014, 5805 Bytes) of package /linux/privat/wcalc-2.5.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "README": 2.4.1_vs_2.5.

    1 Hello!
    2 
    3 This is Wcalc 2.5!
    4 
    5 1. What's New
    6 2. Intro
    7 3. Installation
    8 4. License
    9 5. Known Bugs
   10 6. Contact Info
   11 
   12 **************
   13 * What's New *
   14 **************
   15 
   16 CHANGES:
   17  - Color support!
   18  - Generic SI unit conversion!
   19 
   20 IMPROVEMENTS:
   21  - Improved documentation
   22  - Increased precision for e constant
   23  - More robust prefs parsing
   24  - Prettier list output
   25  - Better detection of libreadline variants
   26  - Support for newer versions of autotools
   27  - Support for \assert command
   28  - Automatic testing infrastructure (via `make check`)
   29 
   30 BUGFIXES:
   31  - Fix 0 parsing bug (2.4.1 regression; thanks Arun Prakash Jana!)
   32  - Plugged memory leaks
   33  - Fixed segfault when parsing hierarchical expressions
   34  - Fixed handling of Euler constant
   35 
   36 *********
   37 * INTRO *
   38 *********
   39 
   40 Wcalc started as a project written for my C++ class at Ohio University (CS 240B), way back on January 14th, 2000. I made it to be a "natural language" calculator - in that it would successfully interpret any valid mathematical expression. As you can imagine, being a beginner programmer, the code was rather heinous, to say the least!
   41 
   42 I reworked it after learning lex and yacc (powerful string parsing tools for C programmers - if you're a C programmer and you don't know them... go google!) in November 2001. Then I thought to myself - I have MacOS X, the standard calculator leaves something to be desired, and they say Cocoa programming is easy... what the heck, I'll give it a shot. Wcalc, the GUI version, turned out to be a pretty neat calculator. The GUI version, however, has been abandoned in favor of the CLI.
   43 
   44 Wcalc takes "expressions" and calculates the answer. My goal was to make the expressions relatively intutive - no reverse polish, or anything like that. So, by way of a record, here is what Wcalc can do:
   45 
   46 **********
   47 * Syntax *
   48 **********
   49 
   50 Wcalc recognizes the following symbols:
   51 + (plus)
   52 - (minus)
   53 * (multiply)
   54 / (divide)
   55 % (modulo (read: the remainder when integers are divided))
   56 ! (factorial or boolean NOT)
   57 ^ (exponent. four squared is 4^2)
   58 < (less than)
   59 > (greater than)
   60 <= (less than or equal to)
   61 >= (greater than or equal to)
   62 == (equal)
   63 != (not equal)
   64 && (logical and)
   65 || (logical or)
   66 << (bitshift left)
   67 >> (bitshift right)
   68 | (bitwise or)
   69 ~ (bitwise not)
   70 & (bitwise and)
   71 
   72 Wcalc also allows you to group operations with parenthesis (), brackets [], and braces {}.
   73 
   74 Wcalc supports the following functions:
   75 sin cos tan cot asin acos atan acot
   76 sinh cosh tanh coth asinh acosh atanh acoth
   77 log ln logtwo round abs ceil floor sqrt cbrt comp
   78 Gamma lnGamma zeta sinc
   79 
   80 Wcalc has a few built-in constants:
   81 e pi Na k Cc ec R G g Me Mp Mn Md u amu c h mu0 epsilon0
   82 muB muN b a0 F Vm NAk eV sigma alpha gamma re Kj Rk Rinf
   83 Eh Gf Mmu Mt Mh Malpha n0 c1 c2 G0 Phi0 K
   84 random irandom rand irand
   85 
   86 Wcalc supports user-defined variables. You define a variable like this:
   87 mynewvariable=5
   88 Then you can use it in an expression like this: 1+3*mynewvariable/4
   89 
   90 You can also define "active" variables. When you assign a variable, put it in single-quotes, like this:
   91 twicepreviousanswer='a * 2'
   92 In expressions, these work just like regular variables, except the value is calculated when it's used, not when it's defined.
   93 
   94 Some special notes about variables - two letters are reserved:
   95 a - this variable represents the last answer, and may be used in expressions.
   96 q - this variable is reserved in the command-line version (it means quit), and cannot be used in expressions.
   97 Also, built-in constants cannot be re-defined, although they are treated as variables in all other cases.
   98 
   99 *********
  100 * Bases *
  101 *********
  102 
  103 When you type a number into Wcalc, the number is normally assumed to be in decimal form. However, if the number has a prefix, it may be interpreted as a different form number. Specifically:
  104 
  105 0x - this means "the following is a hexadecimal"
  106 0 - this means "the following is octal"
  107 0b - this means "the following is binary"
  108 
  109 This prefix affects only the number it prefixes, and none of the other numbers in the expression.
  110 
  111 Answers are, by default, displayed in decimal form. This can be changed in the preferences window - and display of the prefixes can be toggled in the preferences window as well. You can also change the display using the \hex, \oct, \bin, or \dec commands.
  112 
  113 You can, however, print a number in any base (without a prefix) by using the \base command.
  114 
  115 ****************
  116 * Installation *
  117 ****************
  118 
  119 There are pre-built packages available for download for several Linux and BSD  distributions. Otherwise, the source for Wcalc is available on SourceForge from the Wcalc home page. Install as you would usually install from source. If you're really new to this sort of thing, there's some information in the INSTALL file.
  120 
  121 ***********
  122 * License *
  123 ***********
  124 
  125 Wcalc is made available under the GNU Public License (GPL), version 2, or (at
  126 your option) any later version of that license. The full text of the License is
  127 in the file titled COPYING as distributed with the source, or is available
  128 here: http://www.gnu.org/copyleft/gpl.html
  129 
  130 The general gist of the GPL is this: This program is free. You may do as you like with it, including sell the binaries, as long as you don't modify the program or use it as part of another program. If, however, you download the source code of this program and either modify the source (and give it to people) or use pieces of the source in your own program (and give THAT to people), you must distribute that program and its source code under the GPL as well.
  131 
  132 **************
  133 * Known Bugs *
  134 **************
  135 
  136 The grammar has too many shift/reduce conflicts.
  137 Leaks memory when there's a parse error.
  138 
  139 If you find more bugs, please LET ME KNOW!
  140 
  141 ****************
  142 * Contact Info *
  143 ****************
  144 
  145 The Wcalc homepage is http://w-calc.sourceforge.net/
  146 
  147 Contact me at kyle-wcalc-sf@memoryhole.net