Math-Intensive Reports with GNU Emacs and Calc, Part 1
Notice that my example kept track of units. It's able to do so because Calc also can perform symbolic algebra (a subject far too large for this small article) and treats the symbol "in" (inches) as an undetermined factor. Special operations are available to convert units. Calc knows about units and their conversion. For example, how many pints does a lake having 11,000 acre-feet of water contain? To find out, I first write out the volume in the given units:
$ WaterVolume := 11000. acre ft $
Now, if I type the expression WaterVolume => and evaluate it, I get this:
$ WaterVolume => 11000. acre ft $
Exactly what I typed in. Next, by putting the cursor over the acre unit, selecting (with j s and <codej m commands) the units expression (11000. acre ft) and invoking u c (units-convert), Calc will ask me what type of unit should be used in the conversion. I respond pt. Then Calc immediately changes the previous expression to this:
$ WaterVolume => 28674925714.3 pt $
Obviously, Calc knows how to convert an acre-foot to pints, and doing so is much quicker than describing it.
You don't have to use units at all if you don't want to. If you carefully define all your units up front and use them consistently throughout your report, Calc won't have to do any units munging. But it is useful for converting weird commercial units; it can be handy for converting, say, gas pipeline flow rates in MMSCFD into pounds mass per second.
More examples of Emacs/Calc magic will be presented in Part 2 of this article.
General description: www.gnu.org/software/software.html
FTP mirror list & instructions for downloading: www.gnu.org/order/ftp.html
Emacs Wiki: www.emacswiki.org/cgi-bin/wiki.pl
The Emacs Lisp Archive: archive.cis.ohio-state.edu/pub/emacs-lisp
The Emacs Lisp List: thalamus.wustl.edu/wonglab/stephen/ell/ell.html
Download code and documentation: mirrors.sunsite.dk/auctex/www/auctex
Download code and documentation: www.octave.org
|Contrast Security's Contrast Enterprise||Aug 30, 2016|
|illusive networks' Deceptions Everywhere||Aug 29, 2016|
|Happy Birthday Linux||Aug 25, 2016|
|ContainerCon Vendors Offer Flexible Solutions for Managing All Your New Micro-VMs||Aug 24, 2016|
|Updates from LinuxCon and ContainerCon, Toronto, August 2016||Aug 23, 2016|
|NVMe over Fabrics Support Coming to the Linux 4.8 Kernel||Aug 22, 2016|
- Contrast Security's Contrast Enterprise
- Download "Linux Management with Red Hat Satellite: Measuring Business Impact and ROI"
- illusive networks' Deceptions Everywhere
- Happy Birthday Linux
- What I Wish I’d Known When I Was an Embedded Linux Newbie
- New Version of GParted
- ContainerCon Vendors Offer Flexible Solutions for Managing All Your New Micro-VMs
- Tech Tip: Really Simple HTTP Server with Python
- All about printf
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide