User Tools

Site Tools


dcalcunix

This is an old revision of the document!


gdcalc

a Financial, Scientific, Statistical & Programming calculator for GTK+ (since 1999!)

gdcalc is a financial, statistics, scientific and programmers calculator for Unix and Linux. The GUI was written with glade(1) and uses the Gtk-2 toolkit - so it may well be compatible with themes and other whiz-bang features of those systems. gdcalc provides both Algebraic notation (ie. conventional, TI or Casio style) and Reverse Polish Notation (RPN or Hewlett-Packard style). If you've not heard of RPN before, you are probably familiar with algebraic calculators. Very briefly, while simpler and more natural to use, RPN calculators may need some study eg. they have an Enter key instead of the equals key and are based on the use of a stack.

gdcalc is based on my venerable dcalc RPN calculator which I wrote about a million years ago to learn C and curses - about 1983, I suppose.

The original dcalc for curses (Unix console) is at dcalcCurses

If you want to know more about RPN calculators (and why they are more intuitive than algebraic calculators) take a look at http://www.hpcalc.org

Note: if you are using a locale other than English, please make sure you run gdcalc with the following command (thanks to Gösta):

LC_NUMERIC=en_US gdcalc &

Major modes

All functions are available in both algebraic and RPN modes:

  • Financial mode - compound interest, present value, final value, interest, number of payments etc - these all work in the same way as in the HP calculators. Annuities can be set for the start or the end of the compounding period. Days between dates.
  • Scientific mode - Sin, Cos, Tan, Sinh, Cosh, Tanh, log, ln, etc and their inverses
  • Statistics mode - Sum, Sum-, mean, std dev, factorial, Permutations & combinations, Linear regression
  • Programming mode - Bin, Oct, Dec, Hex, Ascii and Internet Address (IP) displays. AND OR NOT MOD and shift operations. Prime factors.

Conversions

There is a full set of unit conversions including:

  • length - mm, cm, m, km, in, feet, mile, nautical mile etc etc
  • area - acre, hectare, sq. m, sq. mm, sq. in., sq. foot etc etc
  • volume - gallons, pints, litres, cu. m, cu. feet etc etc
  • mass - kg, pound, ton, tonne, gram etc etc
  • speed - kph, mph. ft/s, m/s etc
  • fuel consumption - mpg, litres/100 km
  • pressure - atmospheres, mmHg, pounds/sq.in., Pascals etc
  • temperature - centigrade, fahrenheit, Kelvin
  • … and anything else that units(1) can cope with.

Metric, US and British units are supported - e.g. a US gallon is a measly 3.78 litres as opposed to the much more generous British gallon at 4.54 litres.

Extending gdcalc

gdcalc is fully programmable (you've got the source, ninny) and I've left loads of blank keys on the GUI for you to add in your favourites. If you add functions that you think would be interesting for the world at large, please let me have the diffs and I'll put them in. Fixes also welcome … upgrade ideas tolerated.

Screenshots

Algebraic (Casio/TI), financial mode

RPN (HP), scientific mode

Programming mode

Statistics mode

Version history

  • 2.18 2013-05-01 - fixed interface to units(1) (it no longer accepts -o%20g), fixed convert→reverse, clear message buffer before convert in case of 'cancel'
  • 2.17 2013-04-30 - fixed to compile on Fedora-18
  • 2.16.1 2012-03-18 - moved to Sourceforge
  • 2.16 March 2012 - moved to google code
  • 2.15 Jan 6th 2007 - change register label width X Y Z T L
  • 2.14 Jan 1st 2007 - change to gtk-2
  • 2.13 Jul 19th 2002 - more improvements to interest rate calculation
  • 2.12-2 Jun 19th 2002 - fixed conflict with kdelibs
  • 2.12 Jun 16th 2002 - tidy up rpm build, provide source rpm, integrate with gnome desktop, KDE, destroy signal processing fixed (gdcalc was not terminating on “delete” signal)
  • 2.11 May 25th 2002 - much more robust interest rate calculations, copy & paste for X
  • 2.9.2 Jan 19th 2002 - RCL can now be used in algebraic expressions
  • 2.9.1 Nov 24th 2001 - more fixes
  • 2.9 Nov 12th 2001 - fixes many more keyboard mappings
  • 2.8.1 Oct 25th 2001 - fixes enter key not working, IP display
  • 2.8 Oct 21st 2001 - algebraic interface (a la Casio/TI), support of resource file for font selection
  • 2.7 March 17th 2001 - new GUI, added Linear Regression, float/engineering, IP, Days between dates, compound interest at start of period (rentals), clickable registers (exchange with X), heaps of bug fixes & small improvements
  • 2.6.3 Nov 12th 2000 - fix to bug in h.ms and r→p conversion; add permutations, combinations, percent & prime factors
  • 2.6.1 Apr 26th 2000 - fixes to ASCII mode, version numbering
  • 2.6 Apr 24th 2000 - GTK+ version (gdcalc)
  • 2.5 Mar 8th 2000 - bug in interest calculation squashed
  • 2.4 Feb 25 1999 - rpm source changed to tarball

Download

Source

Source code downloads and svn(1) repository is at Sourceforge

Binaries

These were compiled on Fedora-22 but may well work on any recent linux.

Unless you want to pick apart the tarball and install files manually, you can use stow(1) to install these.

Install using stow(1) with:

mkdir -p /usr/local/stow
cd /usr/local/stow
download_dir= # path to the tarball
arch=x86_64 # or i386
tar xzf $download_dir/gdcalc-$arch.tgz
stow gdcalc

Copyright (C) 1997-2012 Bob Hepple This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

Contact

For corrections/additions/suggestions for this page, please send email to: bob dot hepple at gmail dot com

Copyright © 1997-2015 Bob Hepple. All rights reserved.

dcalcunix.1450454761.txt.gz · Last modified: 2015/12/18 09:06 by admin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki