两款 Linux 桌面端可用的科学计算器
计算器

> 
> 如果你想找个高级的桌面计算器的话，你可以看看开源软件，以及一些其它有趣的工具。
> 
> 
> 


![](/data/attachment/album/201805/15/102710qilkuv3eaiysdfyg.jpg)


每个 Linux 桌面环境都至少带有一个功能简单的桌面计算器，但大多数计算器只能进行一些简单的计算。


幸运的是，还是有例外的：不仅可以做得比开平方根和一些三角函数还多，而且还很简单。这里将介绍两款强大的计算器，外加一大堆额外的功能。


### SpeedCrunch


[SpeedCrunch](http://speedcrunch.org/index.html) 是一款高精度科学计算器，有着简明的 Qt5 图像界面，并且强烈依赖键盘。


![SpeedCrunch graphical interface](/data/attachment/album/201805/15/102725rxsac00x8y1so2oz.png "SpeedCrunch graphical interface")


*SpeedCrunch 运行中*


它支持单位，并且可用在所有函数中。


例如，



```
2 * 10^6 newton / (meter^2)

```

你可以得到：



```
= 2000000 pascal

```

SpeedCrunch 会默认地将结果转化为国际标准单位，但还是可以用 `in` 命令转换：


例如：



```
3*10^8 meter / second in kilo meter / hour

```

结果是：



```
= 1080000000 kilo meter / hour

```

`F5` 键可以将所有结果转为科学计数法（`1.08e9 kilo meter / hour`），`F2` 键可以只将那些很大的数或很小的数转为科学计数法。更多选项可以在配置页面找到。


可用的函数的列表看上去非常壮观。它可以用在 Linux 、 Windows、macOS。许可证是 GPLv2，你可以在 [Bitbucket](https://bitbucket.org/heldercorreia/speedcrunch) 上得到它的源码。


### Qalculate!


[Qalculate!](https://qalculate.github.io/)（有感叹号）有一段长而复杂的历史。


这个项目给了我们一个强大的库，而这个库可以被其它程序使用（在 Plasma 桌面中，krunner 可以用它来计算），以及一个用 GTK3 搭建的图形界面。它允许你转换单位，处理物理常量，创建图像，使用复数，矩阵以及向量，选择任意精度，等等。


![Qalculate! Interface](/data/attachment/album/201805/15/102726moffos25nibeii0p.png "Qalculate! Interface")


*在 Qalculate! 中查看物理常量*


在单位的使用方面，Qalculate! 会比 SppedCrunch 更加直观，而且可以识别一些常用前缀。你有听说过 exapascal 压力吗？反正我没有（太阳的中心大概在 `~26 PPa`），但 Qalculate! ，可以准确 `1 EPa` 的意思。同时，Qalculate! 可以更加灵活地处理语法错误，所以你不需要担心打括号：如果没有歧义，Qalculate! 会直接给出正确答案。


一段时间之后这个项目看上去被遗弃了。但在 2016 年，它又变得强大了，在一年里更新了 10 个版本。它的许可证是 GPLv2 （源码在 [GitHub](https://github.com/Qalculate) 上），提供Linux 、Windows 、macOS的版本。


### 更多计算器


#### ConvertAll


好吧，这不是“计算器”，但这个程序非常好用。


大部分单位转换器只是一个大的基本单位列表以及一大堆基本组合，但 [ConvertAll](http://convertall.bellz.org/) 与它们不一样。有试过把“天文单位每年”转换为“英尺每秒”吗？不管它们说不说得通，只要你想转换任何种类的单位，ConvertAll 就是你要的工具。


只需要在相应的输入框内输入转换前和转换后的单位：如果单位相容，你会直接得到答案。


主程序是在 PyQt5 上搭建的，但也有 [JavaScript 的在线版本](http://convertall.bellz.org/js/)。


#### 带有单位包的 (wx)Maxima


有时候（好吧，很多时候）一款桌面计算器时候不够你用的，然后你需要更多的原力。


[Maxima](http://maxima.sourceforge.net/) 是一款计算机代数系统（LCTT 译注：进行符号运算的软件。这种系统的要件是数学表示式的符号运算），你可以用它计算导数、积分、方程、特征值和特征向量、泰勒级数、拉普拉斯变换与傅立叶变换，以及任意精度的数字计算、二维或三维图像··· ···列出这些都够我们写几页纸的了。


[wxMaxima](https://andrejv.github.io/wxmaxima/) 是一个设计精湛的 Maxima 的图形前端，它简化了许多 Maxima 的选项，但并不会影响其它。在 Maxima 的基础上，wxMaxima 还允许你创建 “笔记本”，你可以在上面写一些笔记，保存你的图像等。其中一项 (wx)Maxima 最惊艳的功能是它可以处理尺寸单位。


在提示符只需要输入：



```
load("unit")

```

按 `Shift+Enter`，等几秒钟的时间，然后你就可以开始了。


默认地，单位包可以用基本的 MKS 单位，但如果你喜欢，例如，你可以用 `N` 为单位而不是 `kg*m/s2`，你只需要输入：`setunits(N)`。


Maxima 的帮助（也可以在 wxMaxima 的帮助菜单中找到）会给你更多信息。


你使用这些程序吗？你知道还有其它好的科学、工程用途的桌面计算器或者其它相关的计算器吗？在评论区里告诉我们吧！




---


via: <https://opensource.com/article/18/1/scientific-calculators-linux>


作者：[Ricardo Berlasso](https://opensource.com/users/rgb-es) 译者：[zyk2290](https://github.com/zyk2290) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
Every Linux desktop environment comes with at least a simple desktop calculator, but most of those simple calculators are just that: a simple tool for simple calculations.


Fortunately, there are exceptions; programs that go far beyond square roots and a couple of trigonometric functions, yet are still easy to use. Here are two powerful calculator tools for Linux, plus a couple of bonus options.

## SpeedCrunch

[SpeedCrunch](http://speedcrunch.org/index.html) is a high-precision scientific calculator with a simple Qt5 graphical interface and strong focus on the keyboard.

![SpeedCrunch graphical interface](https://opensource.com/sites/default/files/u128651/speedcrunch.png)

opensource.com

It supports working with units and comes loaded with all kinds of functions.

For example, by writing:

`2 * 10^6 newton / (meter^2)`


you get:

`= 2000000 pascal`


By default, SpeedCrunch delivers its results in the international unit system, but units can be transformed with the "in" instruction.

For example:

`3*10^8 meter / second in kilo meter / hour`


produces:

`= 1080000000 kilo meter / hour`


With the `F5`

key, all results will turn into scientific notation (`1.08e9 kilo meter / hour`

), while with `F2`

only numbers that are small enough or big enough will change. More options are available on the Configuration menu.

The list of available functions is really impressive. It works on Linux, Windows, and MacOS, and it's licensed under GPLv2; you can access its source code on [Bitbucket](https://bitbucket.org/heldercorreia/speedcrunch).

## Qalculate!

[Qalculate!](https://qalculate.github.io/) (with the exclamation point) has a long and complex history.

The project offers a powerful library that can be used by other programs (the Plasma desktop can use it to perform calculations from krunner) and a graphical interface built on GTK3. It allows you to work with units, handle physical constants, create graphics, use complex numbers, matrices, and vectors, choose arbitrary precision, and more.

![Qalculate! Interface](https://opensource.com/sites/default/files/u128651/qalculate-600.png)

opensource.com

Its use of units is far more intuitive than SpeedCrunch's and it understands common prefixes without problem. Have you heard of an exapascal pressure? I hadn't (the Sun's core stops at `~26 PPa`

), but Qalculate! has no problem understanding the meaning of `1 EPa`

. Also, Qalculate! is more flexible with syntax errors, so you don't need to worry about closing all those parentheses: if there is no ambiguity, Qalculate! will give you the right answer.

After a long period on which the project seemed orphaned, it came back to life in 2016 and has been going strong since, with more than 10 versions in just one year. It's licensed under GPLv2 (with source code on [GitHub](https://github.com/Qalculate)) and offers versions for Linux and Windows, as well as a MacOS port.

## Bonus calculators

### ConvertAll

OK, it's not a "calculator," yet this simple application is incredibly useful.

Most unit converters stop at a long list of basic units and a bunch of common combinations, but not [ConvertAll](http://convertall.bellz.org/). Trying to convert from astronomical units per year into inches per second? It doesn't matter if it makes sense or not, if you need to transform a unit of any kind, ConvertAll is the tool for you.

Just write the starting unit and the final unit in the corresponding boxes; if the units are compatible, you'll get the transformation without protest.

The main application is written in PyQt5, but there is also an [online version written in JavaScript](http://convertall.bellz.org/js/).

### (wx)Maxima with the units package

Sometimes (OK, many times) a desktop calculator is not enough and you need more raw power.

[Maxima](http://maxima.sourceforge.net/) is a computer algebra system (CAS) with which you can do derivatives, integrals, series, equations, eigenvectors and eigenvalues, Taylor series, Laplace and Fourier transformations, as well as numerical calculations with arbitrary precision, graph on two and three dimensions… we could fill several pages just listing its capabilities.

[wxMaxima](https://andrejv.github.io/wxmaxima/) is a well-designed graphical frontend for Maxima that simplifies the use of many Maxima options without compromising others. On top of the full power of Maxima, wxMaxima allows you to create "notebooks" on which you write comments, keep your graphics with your math, etc. One of the (wx)Maxima combo's most impressive features is that it works with dimension units.

On the prompt, just type:

`load("unit")`


press Shift+Enter, wait a few seconds, and you'll be ready to work.

By default, the unit package works with the basic MKS units, but if you prefer, for instance, to get `N`

instead of `kg*m/s2`

, you just need to type:

`setunits(N)`


Maxima's help (which is also available from wxMaxima's help menu) will give you more information.

Do you use these programs? Do you know another great desktop calculator for scientists and engineers or another related tool? Tell us about them in the comments!

## 6 Comments