Giter VIP home page Giter VIP logo

qalculate-gtk's Introduction

Qalculate! GTK UI

Qalculate! is a multi-purpose cross-platform desktop calculator. It is simple to use but provides power and versatility normally reserved for complicated math packages, as well as useful tools for everyday needs (such as currency conversion and percent calculation). Features include a large library of customizable functions, unit calculations and conversion, symbolic calculations (including integrals and equations), arbitrary precision, uncertainty propagation, interval arithmetic, plotting, and a user-friendly interface (GTK, Qt, and CLI).

Requirements

  • GTK (>= 3.10)
  • libqalculate (>= 5.1.0)

Installation

Instructions and download links for installers, binaries packages, and the source code of released versions of Qalculate! are available at https://qalculate.github.io/downloads.html.

In a terminal window in the top source code directory run

  • ./autogen.sh (not required if using a release source tarball, only if using the git version)
  • ./configure
  • make
  • make install (as root, e.g. sudo make install)

If libqalculate has been installed in the default /usr/local path you it might be necessary to specify the pkgconfig path when running configure: PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./configure

The resulting executable is named qalculate-gtk.

Features

Features specific to qalculate-gtk:

  • Graphical user interfaces implemented using GTK 3
  • Flexible expression entry with customizable completion, hints, and continious display of parsed expression
  • Optional calculate-as-you-type mode
  • Small and ... not so small mode
  • Calculation history which allows the user to access the text and value of and apply operations to previous expressions and result
  • Optional traditional calculator keypad, with quick access to most features, and a programming mode
  • Practical menus give fast access to all advanced features
  • Customizable meta modes for quickly switching between different settings
  • Dialogs for management of and easy access to functions, variables and units (with quick conversion)
  • User friendly dialogs for functions, with description and entries for arguments
  • Create/edit functions, variables and units
  • Easy editing of matrices and vectors
  • Various tools for fast conversion between number bases, floating point conversion, calendar conversion, and percentage calculation, and a period table
  • Convenient interface to gnuplot
  • Configurable keyboard shortcuts
  • and more...

Features from libqalculate:

  • Calculation and parsing:
    • Basic operations and operators: + - * / mod ^ E () && || ! < > >= <= != ~ & | << >> xor
    • Fault-tolerant parsing of strings: log 5 / 2 .5 (3) + (2( 3 +5 = ln(5) / (2.5 * 3) + 2 * (3 + 5)
    • Expressions may contain any combination of numbers, functions, units, variables, vectors and matrices, and dates
    • Supports complex and infinite numbers
    • Propagation of uncertainty
    • Interval arithmetic (for determination of the number of significant digits or direct calculation with intervals of numbers)
    • Supports all common number bases, as well as negative and non-integer radices, sexagesimal numbers, time format, and roman numerals
    • Ability to disable functions, variables, units or unknown variables for less confusion: e.g. when you do not want (a+b)^2 to mean (are+barn)^2 but ("a"+"b")^2
    • Controllable implicit multiplication
    • Matrices and vectors, and related operations (determinants etc.)
    • Verbose error messages
    • Arbitrary precision
    • RPN mode
  • Result display:
    • Supports all common number bases, as well as negative and non-integer radices, sexagesimal numbers, time format, and roman numerals
    • Many customization options: precision, max/min decimals, complex form, multiplication sign, etc.
    • Exact or approximate: sqrt(32) returns 4 * sqrt(2) or 5.66
    • Simple and mixed fractions: 4 / 6 * 2 = 1.333... = 4/3 = 1 + 1/3
  • Symbolic calculation:
    • E.g. (x + y)^2 = x^2 + 2xy + y^2; 4 "apples" + 3 "oranges"
    • Factorization and simplification
    • Differentiation and integration
    • Can solve most equations and inequalities
    • Customizable assumptions give different results (e.g. ln(2x) = ln(2) + ln(x) if x is assumed positive)
  • Functions:
    • Hundreds of flexible functions: trigonometry, exponents and logarithms, combinatorics, geometry, calculus, statistics, finance, time and date, etc.
    • Can easily be created, edited and saved to a standard XML file
  • Units:
    • Supports all SI units and prefixes (including binary), as well as imperial and other unit systems
    • Automatic conversion: ft + yd + m = 2.2192 m
    • Explicit conversion: 5 m/s to mi/h = 11.18 miles/hour
    • Smart conversion: automatically converts 5 kg*m/s^2 to 5 N
    • Currency conversion with retrieval of daily exchange rates
    • Different name forms: abbreviation, singular, plural (m, meter, meters)
    • Can easily be created, edited and saved to a standard XML file
  • Variables and constants:
    • Basic constants: pi, e, etc.
    • Lots of physical constants (with or without units) and properties of chemical element
    • CSV file import and export
    • Can easily be created, edited and saved to a standard XML file
    • Flexible - may contain simple numbers, units, or whole expressions
    • Data sets with objects and associated properties in database-like structure
  • Plotting:
    • Uses Gnuplot
    • Can plot functions or data (matrices and vectors)
    • Ability to save plot to PNG image, postscript, etc.
    • Several customization options
  • and more...

For more details about the syntax, and available functions, units, and variables, please consult the manual (https://qalculate.github.io/manual/)

Examples (expressions)

Note that semicolon can be replaced with comma in function arguments, if comma is not used as decimal or thousands separator.

Basic functions and operators

sqrt 4 = sqrt(4) = 4^(0.5) = 4^(1/2) = 2

sqrt(25; 16; 9; 4) = [5 4 3 2]

sqrt(32) = 4 × √(2) (in exact mode)

cbrt(−27) = root(-27; 3) = −3 (real root)

(−27)^(1/3) ≈ 1.5 + 2.5980762i (principal root)

ln 25 = log(25; e) ≈ 3.2188758

log2(4)/log10(100) = log(4; 2)/log(100; 10) = 1

5! = 1 × 2 × 3 × 4 × 5 = 120

5\2 = 5//2 = trunc(5 / 2) = 2 (integer division)

5 mod 3 = mod(5; 3) = 2

52 to factors = 2^2 × 13

25/4 × 3/5 to fraction = 3 + 3/4

gcd(63; 27) = 9

sin(pi/2) − cos(pi) = sin(90 deg) − cos(180 deg) = 2

sum(x; 1; 5) = 1 + 2 + 3 + 4 + 5 = 15

sum(\i^2+sin(\i); 1; 5; \i) = 1^2 + sin(1) + 2^2 + sin(2) + ... ≈ 55.176162

product(x; 1; 5) = 1 × 2 × 3 × 4 × 5 = 120

var1:=5 (stores value 5 in variable var1) var1 × 2 = 10

5^2 #this is a comment = 25

sinh(0.5) where sinh()=cosh() = cosh(0.5) ≈ 1.1276260

plot(x^2; −5; 5) (plots the function y=x^2 from -5 to 5)

Units

5 dm3 to L = 5 dm^3 to L = 5 L

20 miles / 2h to km/h = 16.09344 km/h

1.74 to ft = 1.74 m to ft ≈ 5 ft + 8.5039370 in

1.74 m to -ft ≈ 5.7086614 ft

100 lbf × 60 mph to hp ≈ 16 hp

50 Ω × 2 A = 100 V

50 Ω × 2 A to base = 100 kg·m²/(s³·A)

10 N / 5 Pa = (10 N)/(5 Pa) = 2 m²

5 m/s to s/m = 0.2 s/m

500 € − 20% to $ ≈ $451.04

500 megabit/s × 2 h to b?byte ≈ 419.09516 gibibytes

Physical constants

k_e / G × a_0 = (coulombs_constant / newtonian_constant) × bohr_radius ≈ 7.126e9 kg·H·m^−1

ℎ / (λ_C × c) = planck ∕ (compton_wavelength × speed_of_light) ≈ 9.1093837e-31 kg

5 ns × rydberg to c ≈ 6.0793194E-8c

atom(Hg; weight) + atom(C; weight) × 4 to g ≈ 4.129e-22 g

(G × planet(earth; mass) × planet(mars; mass))/(54.6e6 km)^2 ≈ 8.58e16 N (gravitational attraction between earth and mars)

Uncertainty and interval arithmetic

"±" can be replaced with "+/-"; result with interval arithmetic activated is shown in parenthesis

sin(5±0.2)^2/2±0.3 ≈ 0.460±0.088 (0.46±0.12)

(2±0.02 J)/(523±5 W) ≈ 3.824±0.053 ms (3.825±0.075 ms)

interval(−2; 5)^2 ≈ intervall(−8.2500000; 12.750000) (intervall(0; 25))

Algebra

(5x^2 + 2)/(x − 3) = 5x + 15 + 47/(x − 3)

(\a + \b)(\a − \b) = ("a" + "b")("a" − "b") = 'a'^2 − 'b'^2

(x + 2)(x − 3)^3 = x^4 − 7x^3 + 9x^2 + 27x − 54

factorize x^4 − 7x^3 + 9x^2 + 27x − 54 = x^4 − 7x^3 + 9x^2 + 27x − 54 to factors = (x + 2)(x − 3)^3

cos(x)+3y^2 where x=pi and y=2 = 11

gcd(25x; 5x^2) = 5x

1/(x^2+2x−3) to partial fraction = 1/(4x − 4) − 1/(4x + 12)

x+x^2+4 = 16 = (x = 3 or x = −4)

x^2/(5 m) − hypot(x; 4 m) = 2 m where x > 0 = (x ≈ 7.1340411 m)

cylinder(20cm; x) = 20L (calculates the height of a 20 L cylinder with radius of 20 cm) = (x = (1 / (2π)) m) = (x ≈ 16 cm)

asin(sqrt(x)) = 0.2 = (x = sin(0.2)^2) = (x ≈ 0.039469503)

x^2 > 25x = (x > 25 or x < 0)

solve(x = y+ln(y); y) = lambertw(e^x)

solve2(5x=2y^2; sqrt(y)=2; x; y) = 32/5

multisolve([5x=2y+32, y=2z, z=2x]; [x, y, z]) = [−32/3 −128/3 −64/3]

dsolve(diff(y; x) − 2y = 4x; 5) = 6e^(2x) − 2x − 1

Calculus

diff(6x^2) = 12x

diff(sinh(x^2)/(5x) + 3xy/sqrt(x)) = (2/5) × cosh(x^2) − sinh(x^2)/(5x^2) + (3y)/(2 × √(x))

integrate(6x^2) = 2x^3 + C

integrate(6x^2; 1; 5) = 248

integrate(sinh(x^2)/(5x) + 3xy/sqrt(x)) = 2x × √(x) × y + Shi(x^2) / 10 + C

integrate(sinh(x^2)/(5x) + 3xy/sqrt(x); 1; 2) ≈ 3.6568542y + 0.87600760

limit(ln(1 + 4x)/(3^x − 1); 0) = 4 / ln(3)

Matrices and vectors

[1, 2, 3; 4, 5, 6] = ((1; 2; 3); (4; 5; 6)) = [1 2 3; 4 5 6] (2×3 matrix)

1...5 = (1:5) = (1:1:5) = [1 2 3 4 5]

(1; 2; 3) × 2 − 2 = [(1 × 2 − 2), (2 × 2 − 2), (3 × 2 − 2)] = [0 2 4]

[1 2 3].[4 5 6] = dot([1 2 3]; [4 5 6]) = 32 (dot product)

cross([1 2 3]; [4 5 6]) = [−3 6 −3] (cross product)

[1 2 3; 4 5 6].×[7 8 9; 10 11 12] = hadamard([1 2 3; 4 5 6]; [7 8 9; 10 11 12]) = [7 16 27; 40 55 72] (hadamard product)

[1 2 3; 4 5 6] × [7 8; 9 10; 11 12] = [58 64; 139 154] (matrix multiplication)

[1 2; 3 4]^-1 = inverse([1 2; 3 4]) = [−2 1; 1.5 −0.5]

Statistics

mean(5; 6; 4; 2; 3; 7) = 4.5

stdev(5; 6; 4; 2; 3; 7) ≈ 1.87

quartile([5 6 4 2 3 7]; 1) = percentile((5; 6; 4; 2; 3; 7); 25) ≈ 2.9166667

normdist(7; 5) ≈ 0.053990967

spearman(column(load(test.csv); 1); column(load(test.csv); 2)) ≈ −0.33737388 (depends on the data in the CSV file)

Time and date

10:31 + 8:30 to time = 19:01

10h 31min + 8h 30min to time = 19:01

now to utc = "2020-07-10T07:50:40Z"

"2020-07-10T07:50CET" to utc+8 = "2020-07-10T14:50:00+08:00"

"2020-05-20" + 523d = addDays(2020-05-20; 523) = "2021-10-25"

today − 5 days = "2020-07-05"

"2020-10-05" − today = days(today; 2020-10-05) = 87 d

timestamp(2020-05-20) = 1 589 925 600

stamptodate(1 589 925 600) = "2020-05-20T00:00:00"

"2020-05-20" to calendars (returns date in Hebrew, Islamic, Persian, Indian, Chinese, Julian, Coptic, and Ethiopian calendars)

Number bases

52 to bin = 0011 0100

52 to bin16 = 0000 0000 0011 0100

52 to oct = 064

52 to hex = 0x34

0x34 = hex(34) = base(34; 16) = 52

523<<2&250 to bin = 0010 1000

52.345 to float ≈ 0100 0010 0101 0001 0110 0001 0100 1000

float(01000010010100010110000101001000) = 1715241/32768 ≈ 52.345001

floatError(52.345) ≈ 1.2207031e-6

52.34 to sexa = 52°20′24″

1978 to roman = MCMLXXVIII

52 to base 32 = 1K

sqrt(32) to base sqrt(2) ≈ 100000

0xD8 to unicode = Ø

code(Ø) to hex = 0xD8

qalculate-gtk's People

Contributors

akaydev-coder avatar alexhenrie avatar bertronika avatar chengsun avatar fulvio-alves avatar gebner avatar gitoffthelawn avatar h-h-h-h avatar hanna-kn avatar hugok79 avatar idamir avatar jirutka avatar jlu5 avatar kuraga avatar nick87720z avatar nonamedotc avatar polakrity avatar psokol avatar scx avatar tuberry avatar vicsanrope avatar vlegout avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

qalculate-gtk's Issues

Graphics glitch in qalculate-gtk history

Hi

I'm experiencing glitching in qalculate-gtk 2.2.0, but I also had the problem with 2.0.0.

Since video explains it much better than words, I've attached a small clip.
qalc.zip

I've just compiled libqalculate and gtk from the website, so it is the newest.

Let me know how I can help solve it.

Regards,
Claus

build fail with g++ 4.8.6.

error messgae:

interface.cc:812:103: error: cannot pass objects of non-trivially-copyable type ‘class std::basic_string<char>’ through ‘...’
     gtk_list_store_insert_with_values(historystore, &history_iter, -1, 0, inhistory[i], 1, i, 4, 0, -1);

I think it should be changed from

gtk_list_store_insert_with_values(historystore, &history_iter, -1, 0, inhistory[i], 1, i, 4, 0, -1);

to:

gtk_list_store_insert_with_values(historystore, &history_iter, -1, 0, inhistory[i].c_str(), 1, i, 4, 0, -1);

C functions are not acquainted with C++ structures. My gcc version is 4.8.5 (Ubuntu 4.8.5-4ubuntu2)

GDK_AVAILABLE_IN_ALL void gtk_list_store_insert_with_values  (GtkListStore *list_store,
                                                              GtkTreeIter  *iter,
                                                              gint          position,
                                                              ...);

RFE: Use short names for magnetic_constant and electric_constant

In qalculate's GUI, I'd like to see these suggestions while typing:

  1. magnetic_constant: When typing μ (the greek letter) or mu, please suggest completion to magnetic_constant. Also, it would be nice to call it vacuum permeability since that name is more common in some fields.

  2. electric_constant: When typing ε (the greek letter) or eps, please suggest completion to electric_constant. Also, it would be nice to call it vacuum permittivity since that name is more common in some fields.

Non-alpha units detection problem

When I try to convert between °C and °F units get wrongly detected as coulomb/farad.

Can this be fixed so that it can also support feet/inch notation like 6' + 1" ?

erreur d'affichage dans Qalculate

Quand on fait: Functions → Économie → Finance → ...
La première fois le menu s'affiche bien.
Mais si on sort de ce menu et qu'on y retourne, le menu ne s'affiche plus.
Sorry, I speak (write) french.
Yann48

Thank you! :smiley: - Next: Android, please.

A really big THANK YOU! for bringing Qalculate to Windows. This has been the single one piece of software I've been missing the most at work, where I have to use Windows. Now I can use the best calculator ever there as well. Great!

Now, with people using smartphones more often than PCs these days, it would be great to have a port of Qalculate on Android.

Scientific notation should only be used to make reading easier

E.g.:

> 0x823445d

  1.3652899E8 = approx. 1.3652899E8

There's no point to use scientific notation in the example, because the answer is 136528989.

Here's a general rule: if scientific notation makes amount of symbols in the result bigger than the usual print, it should not be used.

E.g. 1000 vs 1e3 — it is justified, 4 vs 3 symbols. 10 vs 1e1 — it is not justified, scientific notation makes it longer.

And why the result is even approximated, I can't get an approximate file size!

thousand separator

thanks much, just discovered this gem, seems to have everything that i need, one thing that bugs me, is there any way to display result with thousand separators? millions and above just makes me cross-eyed, anyway to remedy this basic ui requirement?

RPN arithmetic operators only work on keypad

I prefer RPN mode and started using Qalculate on my PC where it works fine. Installed it on my laptop but I can't use it because I don't have a numeric keypad so when you press the operator, e.g. +, it just echos the character behind the number.

On Arch Linux with libqalculate 2.0.0-1 and qalculate-gtk 2.0.0-1.

qalculate-gtk display error on launch on High-Sierra

Mac OSX - High Sierra, calculate-gtk is a MacPort installed in /opt/local/bin. When I try to launch qalcuate-gtk, this is what happens...

bin $ sudo ./qalculate-gtk
Password:

(qalculate-gtk:46686): Gtk-WARNING **: cannot open display:

[1]+ Stopped sudo env PATH=$PATH ./qalculate-gtk

Ok, so is it working? The answer is yes, since I can get help.

bin $ sudo ./qalculate-gtk --help
Usage:
qalculate-gtk [OPTION…] EXPRESSION

Help Options:
-h, --help Show help options
--help-all Show all help options
--help-gapplication Show GApplication options
--help-gtk Show GTK+ Options

Application Options:
-n, --new-instance Start a new instance of the application
--display=DISPLAY X display to use

But, how do I specify the display or even list what displays are available?

gui hangs up when using tab in File->New->Matrix/Vector menu

When going to File->New->Matrix, selecting a table cell in "Elements" and using tab to cycle through them, when using tab on a cell in the last row, cursor jumps to first row and quickly cycles through them, rendering the GUI unusable.
Same goes for the File->New->Matrix menu

** Error in `qalculate-gtk': corrupted double-linked list: 0x0000000001f5e240 ***

Hi.
Thanks for updating my favorite calculator :)

However, after compiling and installing on Opensuse 42.1, qalculate-gtk produces the error in the headline here and halts.

I have attached a 'strace' of launching qalculate-gtk (not the full strace thought). I hope this helps.
Let me know if I can provide anything else.

/C

mprotect(0x7f0f8a123000, 4096, PROT_READ) = 0 lseek(10, 0, SEEK_SET) = 0 read(10, "\211PNG\r\n\32\n\0\0\0\rIHDR\0\0\0000\0\0\0000\10\6\0\0\0W\2\371"..., 4096) = 3874 futex(0x7f0f937924a8, FUTEX_WAKE_PRIVATE, 2147483647) = 0 futex(0x7f0f937924a8, FUTEX_WAKE_PRIVATE, 2147483647) = 0 futex(0x7f0f937924a8, FUTEX_WAKE_PRIVATE, 2147483647) = 0 close(10) = 0 munmap(0x7f0f95d0a000, 4096) = 0 open("/usr/share/locale-langpack/en_US.UTF-8/LC_MESSAGES/libqalculate.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/libqalculate.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale-bundle/en_US.UTF-8/LC_MESSAGES/libqalculate.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale-langpack/en_US.utf8/LC_MESSAGES/libqalculate.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale/en_US.utf8/LC_MESSAGES/libqalculate.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale-bundle/en_US.utf8/LC_MESSAGES/libqalculate.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale-langpack/en_US/LC_MESSAGES/libqalculate.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale/en_US/LC_MESSAGES/libqalculate.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale-bundle/en_US/LC_MESSAGES/libqalculate.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale-langpack/en.UTF-8/LC_MESSAGES/libqalculate.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale/en.UTF-8/LC_MESSAGES/libqalculate.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale-bundle/en.UTF-8/LC_MESSAGES/libqalculate.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale-langpack/en.utf8/LC_MESSAGES/libqalculate.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale/en.utf8/LC_MESSAGES/libqalculate.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale-bundle/en.utf8/LC_MESSAGES/libqalculate.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale-langpack/en/LC_MESSAGES/libqalculate.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale/en/LC_MESSAGES/libqalculate.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale-bundle/en/LC_MESSAGES/libqalculate.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/dev/tty", O_RDWR|O_NOCTTY|O_NONBLOCK) = 10 writev(10, [{"*** Error in", 14}, {"qalculate-gtk", 13}, {"': ", 3}, {"corrupted double-linked list", 28}, {": 0x", 4}, {"0000000001fca570", 16}, {" _\n", 5}], 7_ Error in qalculate-gtk': corrupted double-linked list: 0x0000000001fca570 *** ) = 83 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f0f95d0a000 futex(0x7f0f91c9b620, FUTEX_WAIT_PRIVATE, 2, NULL

Improvement to currency list

Hello, i'm enjoying the vast amount of features in Qalculate! what a great program.

i have a request to make, can you modify the currency list so that all countries have their currency units ? as it is only a few have their full definition(Indian Rupee, Danish Kroner, Swedish Krona, etc) while the majority of currencies are listed by the countries they are used in(Algeria, Benin, Cuba, etc) or alternately could you show me how to modify this information myself ?

Thank you and keep up the great work on Qalculate.

Bring back launch of multiple instance by default

Hi, Long time user of Qalculate here.

A recent change in Qalculate makes launching only a single instance of the GUI by default.

However, in my usage, I find that some times there is a need to launch multiple Qalculate instances.

Though there is a switch to bring back the old behaviour, Qalculate is almost always launched using 'Application Shortcuts', 'Alt+F2', 'Application Menus', etc. making it difficult to provide that additional switch.

Can you please switch back the DEFAULT behaviour as it was earlier and make the additional switch necessary only in case a single instance is required.

Thanks.

decimal ignored in E notation

1/2.5e-6 which should give 400k. it interprets it as 1/25x10-6 yielding 40k.

see attached photo

I'm using the sudo apt install version that goes with ubuntu 16.04

qalc

sin(), cos(), and friends only display the result if the angle is in radians

If the angle is not in radians, the result is always just ≈ sin(<angle in radians>) (the same is true for cos() and tan()). To get the actual result, I have to specify the angle in radians.

Is there a setting to turn this off, or is this a bug? It used to work just fine in older (< 1.0.0) versions.

"Fetching exchange rates" blocks UI

When I type "42 USD to GBP", there's a blocking popup saying Fetching exchange rates.

It'd be really nice if, instead, we just got the result right away using cached/possibly stale exchange rates, but with a notice that Exchange rates are being updated in the background, sit tight and your result will be updated once they're fetched.

0.9.11: compile error with gcc 4.8.5

When compiling qalculate-gtk 0.9.11 with g++-4.8.5 (openSUSE Leap 42.2), I get the following error message:

interface.cc: In function ‘void create_main_window()’:
interface.cc:812:103: error: cannot pass objects of non-trivially-copyable type ‘class std::basic_string<char>’ through ‘...’
gtk_list_store_insert_with_values(historystore, &history_iter, -1, 0, inhistory[i], 1, i, 4, 0, -1);
^
Makefile:482: recipe for target 'interface.o' failed
make[2]: *** [interface.o] Error 1

I'm no programmer at all, so I googled around and got the code compiling by changing interface.cc line 812:
gtk_list_store_insert_with_values(historystore, &history_iter, -1, 0, inhistory[i], 1, i, 4, 0, -1);
to
gtk_list_store_insert_with_values(historystore, &history_iter, -1, 0, inhistory[i].c_str(), 1, i, 4, 0, -1);

It compiles with g++-4.8.5 and g++-6.2.1

Uncontrollable aspect ratio in gnuplot

I noticed issue, which may be either pros or cons, depending on what you want. I have qalculate 2.2.0 with gnuplot. When it renders specified x range, it seems to warp image to fit into square, and this leads to different units for axis. To better understand, what is it about, try to render something like 1/x - or anything with infinity 'y' in selected range. Image gets stretched vertically so, that while x has units like 1,2,3, 'y' will have like '0,50,100, for some functions even 0,5000,10000 and more.

It also seems to depend on selected points density - the more points you use - the more part of y axis will be occupied and took into account by stretch.

I found this discussion, which seems to be common gnuplot problem:
https://stackoverflow.com/questions/38616925/how-to-determine-axes-aspect-ration-in-gnuplot#38631837

plotting - better vertical fidelity

Plotting by stepping only x values has one problem, that fidelity is limited - when i set too high values (like 0,0005 as step size with even -8..8 range), it gives error about too high number of points.

However, it could use somewhat more robust way for drawing:

  • instead of watching for only dx, it could watch for sqrt(dx^2+xy^2). There may be two ways: either get coordinates for each next point by this formula, or just step in x, but check distance to new point, and if too high, just insert point between them.

This may have problem due to another issue: y range is unlimited, and when combined with this way, could cause qalculate to just fail on places wiht infinite 'y'.

qalculate-kde doesn't show choices for "Mode" pop up

  1. Who, if anyone, is maintaining qalculate-kde
  2. In any case, clicking on "Mode" in the title bar creates a pop-up showing various items: "Number Base", "Numerical Display", ... However hovering over or clicking on an item doesn't show the menu of choices for the item, so it can't be set; the pop-up works correctly for other title bar choices. Editing the corresponding item in ~/.qalculate/qalculate-kde.cfg has the desired effect, so I have been able to use qalculate-kde successfully, for at least a few calculations.

why auto exchange rates are put as -1 value ?

Dear upstream,

I was trying/fiddling around with qalculate and came across the config file in ~/.config/qalculate where this is what is says about getting updated exchange rates -

~/.config/qalculate$ cat qalculate-gtk.cfg | grep auto_update_exchange_rates
auto_update_exchange_rates=-1

This is somewhat related to #49 but not really.

Use default gnuplot style or allow to configure it, instead of hardcoded style settings.

I compared lines look in qalculate-gtk plot with raw gnuplot. Difference appears both for wxt and qt.
In raw gnuplot, by default, lines have width=1, and when zoomed out, don't lose quality. But in qalculate-gtk lines are initially thicker - nearly 2 pix. When zoomed out, some aliasing appears, and visually line begin to seem thicker, if not really. It is obvious, that there is different style. But when i tried to tune styles in gnuplot, "$ set style line 1 linewidth 3.0 pointsize 3.0 color '#444444' " did not work, so i don't know, how to reproduce it. However, i can ran "test" to see current style, and i can say, it is better.

As variant, there may be universal way to setup gnuplot not only for look, by running custom gnuplot commands, for experts.

Fuctions bin(), oct() and hex()

These functions work the opposite way as expected.
From Hex(10) I would expect 0xA to be the result and not 16. Like for sin() where I expect the sine as result I would expect hex() has the hex-digit as result

Limit 'y' range for plotting

Currently plotting functions like 1/x, arcsin, arccos or tg causes plot to be stretched vertically , to fit in square window.

How to enable night/dark mode?

One of your screenshots has the calculator in a night theme, i was wondering how to apply that as i can't find the option in the menu.

Portable version for Windows

It would be great to have a portable version of Qalculate for Windows:

  • No installation, simply unzip and run
  • Settings are saved to the folder with executable and neither Windows registry nor system/user account folders are used

Wrong tool tip

qalculate-gtk, v0.9.9 :
The tool tip of the STO key says "Delete", which is probably wrong, should be "Store to variable" or smtg similar.

Keeps overriding primary selection

Whenever Qualculate 0.9.9 gains focus, it seems to put the current input field contents into X11's primary selection (middle click buffer). This makes transferring copy and pasting via middle click pretty much impossible.

Accuracy lose in some certain cases

When i try to build elliptise as second order curve, supplying it as two functions for lower/upper arc, even with samples 50000 ends appear like straight.
screenshot_2018-01-23_09-03-02
While doing in gnuplot:

gnuplot> set samples 10000
gnuplot> plot -sqrt(2-(x**2)/2)-2, sqrt(2-(x**2)/2)-2

I get clear arc (setting samples to 100000 almost makes invisible gaps in end, though also slowdowns gnuplot itself).

Upd. When building qalcualte data with external gnuplot, it is as amazing, as just building funcs in gnuplot:
screenshot_gnuplot-data

error from callbacks.cc on Mac

Compiling on Mac (Yosemite; likely for other flavors):

In file included from callbacks.cc:27: In file included from ./callbacks.h:27: In file included from ./main.h:33: In file included from /opt/local/include/libqalculate/qalculate.h:15: In file included from /opt/local/include/libqalculate/includes.h:21: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/vector:265: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__bit_reference:15: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:702:71: error: invalid operands to binary expression ('const tree_struct' and 'const tree_struct') bool operator()(const _T1& __x, const _T1& __y) const {return __x < __y;} ~~~ ^ ~~~

problem in history redraw

After start and after resize it is always ok. But when mouse hovers history item, each redraw showes area from much lower areas. Thus, to get it more clear, it is better to move pointer down. For example:

  • Entering item nearly at middle (from side), it drawes item separator in the middle.
    • while moving towards upper separator, bold result appears under above separator
    • while moving towards lower separator, formula from lower history item appears above this border.

It seems, that redraw is broken rather on resize, creation, or other cases, requiring complete redraw, while on hover it is ok. Because when i move pointer to one text, and another one appears under pointer, then if i paste it by double click, appeared text gets into entry, instead of what was before.

Last successful build was from 94f91d5.
When i detected issue, i tried to rebuild latest code, but it fails, probably after commit from yesterday:
with errors: error: ‘recursiveMakeDir’ was not declared in this scope
at main.cc:347:34, callbacks.cc:11687:34, callbacks.cc:11710:26, callbacks.cc:12970:32

When calculation a resistance via V/A the default unit is W/A² instead of ohmes

Hi, I experience the above issue when I use any calculation x V/y Ai get W/A² which is not wrong (I assume haven't actually checked) but not common and rather confusing since ohm is the common unit, but this is only shown when I force it with to ohm.
However, I'm not shure if this bug belongs here or into the lib repo. I'm using Qalculate V0.9.7 on Ubuntu 16.10.

Segfault when using Names Details button in New Variable dialog

When defining a new variable (Edit menu -> Manage Variables option -> New button -OR- File menu -> New submenu -> Variable option), if you click the Names Details button, the program crashes with a segmentation fault.

I'm using the v2.1.0 tagged branches of both libqalculate and qalculate-gtk on Ubuntu 16.04.

Enter should re-push last RPN value to stack, not enter a zero

Most (all?) RPN calculators allow you to press enter/return to push the current value to the RPN stack
which duplicates the value in top 2 stack positions. Qalculate instead pushes a 0 to the top of the stack which precludes many of the normal use cases of an RPN calculator. You can use the Copy function but that is inconvenient and awkward.

Please consider changing this so that Qalculate works like other RPN calculators.

Make a way to resize the output

Sometimes, when dealing with complex matrices, there is a need of a lot of vertical space in the output. In that moment I don't need the keypad at all, so it would be nice to be able to give more vertical space to the output, removing it from the keypad area.
Thank you.

Another plot mode, using x11 terminal.

I prefer create separate issues, so that if some is done, it may be closed without waiting others.

There i propose to utilize x11 terminal, which is default, when gnuplot is started by command line. It is not smoothed, but lines are printed properly, to not look like with unexpectedly failed smoothing.
And closely reason, to proposed it, is that it allowes to see, what is out of initially specified window scope.
Also, when i tried in this mode, combining of range -10..10 with sampe rate 1000 did not even make it slow, unlike current variant, used in qalculate.

Thus, there may be choice between available backends, each with its trong sides (really infinite range for x11 and antialiasing/alpha for pngcairo). This of course, should be disabled with non-x11 systems, like win, mac, or simply wayland env.

Qalculate won't play nice with Hz

Dear maintainer

Something has been bugging me about Qalculate(which is amazing on ALL other aspects, much great, such wow! many congrats!). It always prefers s^-1 in stead of Hz, as a Telecommunication Engineer, this really is a pet peeve for me. Also, the UI used to have a button next to the result where you could choose your unit, but that's gone and I really miss it, could you please give it back or set some option in the preferences for this? That and/or adding support for Hz if at all possible?

Thanks!

Plot using pngcairo

During play with raw gnuplot i tried pngcairo terminal type.
With command "set term pngcairo transparent" - it is possible to get fully antialiased, yet transparent image, which then may be placed in plot window over default gtk background, specified by theme.

Currently rendering result is not smoothed, looking weird.

upd, p.s.: What is current term mode used? Comparing with x11, it makes me to thing, that most trouble in current backend is in drawing. I suppose, pngcairo should be much faster. Though i'm not sure about non-linux platforms. Need to test pngcairo speed eventually :) .

Restart gnuplot when it crashes

I got gnuplot crash due to double free, which happened, when i tried to get normal 1x1 aspect with usable scale, after entering cos(x)^x, without setting y limits. During zoom window disappeared, and did not appear on following update requests, until qalculate-gtk restarted.

Allow multiple independent instances

Right now, when I try to open a second qalculate it will just give focus to the first, but having multiple independent instances would be much more useful to me instead of forcing a global one.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.