Coder Social home page Coder Social logo

mate-desktop / mate-calc Goto Github PK

View Code? Open in Web Editor NEW
39.0 39.0 33.0 11.93 MB

Calculator for MATE

Home Page: http://www.mate-desktop.org

License: GNU General Public License v2.0

Shell 0.22% C 91.27% Makefile 3.40% M4 0.52% Lex 1.00% Yacc 1.52% Roff 0.41% Perl 0.65% Meson 1.01%

mate-calc's Introduction

mate-desktop
=============

mate-desktop contains the libmate-desktop library, the mate-about
program as well as some desktop-wide documents.

The libmate-desktop library provides API shared by several applications
on the desktop, but that cannot live in the platform for various
reasons. There is no API or ABI guarantee, although we are doing our
best to provide stability. Documentation for the API is available with
gtk-doc.

The mate-about program helps find which version of MATE is installed.

You may download updates to the package from:

   http://pub.mate-desktop.org/releases/


Installation
============

If you are not using a released version of mate-desktop (for example,
if you checked out the code from git), you first need to run
'./autogen.sh'.


How to report bugs
==================

Bugs should be reported to the MATE bug tracking system:

   https://github.com/mate-desktop/mate-desktop/issues

mate-calc's People

Contributors

alxpl avatar bhull2010 avatar cwendling avatar flexiondotorg avatar hekel avatar hvdijk avatar infirit avatar lukefromdc avatar mbkma avatar monsta avatar perberos avatar piotrdrag avatar raveit65 avatar rbuj avatar rezso avatar rjpower4 avatar rwiggins avatar sc0w avatar shlyakpavel avatar stefanct avatar stefano-k avatar szesch avatar tamplan avatar thomas-nilsson-irfu avatar vaurelios avatar vkareh avatar yetist avatar zhuyaliang 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

Watchers

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

mate-calc's Issues

No spaces between the buttons in many themes

Expected behaviour

mate-calc has spaces between the buttons, like gnome-calculator:

image

Actual behaviour

No spaces between the buttons in many themes, e.g.

Adwaita:
image

BlackMATE:

image

Arc:

image

Materia:

image

Please note that a few themes like Menta already have spaces because they use border-image instead of border for the button spacing.

Steps to reproduce the behaviour

Change the theme.

MATE general version

1.20.1

Package version

1.20.1

Linux Distribution

Ubuntu 18.04

Link to downstream report of your Distribution

This was originally reported here: nana-4/materia-theme#237

Conversion translation error

Expected behaviour

Dropdown entry shows "Volumen"

Actual behaviour

Dropdown entry shows "Datenträger"

MATE general version

1.22.1

Package version

1.22.1-1

Linux Distribution

Manjaro Linux

The dropdown menu for converting units has a wrong machine translation in German. I guess the English original would be volumes for cubic units (m³, litre...) which would be Volumen or Volumina in German - but this was translated according to the meaning of hard-disks, DVDs etc. which is Datenträger (data carrier) in German.

Unfortunately the group for mate-calc is closed on transiflex and I'm unable to comment there.

incorrect parenthesis handling

Expected behaviour

  1. Calculate 6+2,33*sqrt(2,5)+6 (= 6 + 3,68 + 6 = 15,68)
  2. Calculate 6+2,33*ln(2,5)+6 (=6 + 2,13 + 6 = 14,13)

Actual behaviour

  1. Returns 23,664053474 which corresponds to 6+2,33*(sqrt(2,5)+6)
  2. Returns 22,114957405 which corresponds to 6+2,33*(ln(2,5)+6)

Steps to reproduce the behaviour

Just try it

MATE general version

Release 20.04 LTS (Focal Fossa) 64-bit
Kernel Linux 5.4.0-37-generic x86_64

Package version

1.24.0
Default settings:
Number Format Automatic,
Showing 9 decimal places,
Angle units: Degrees,
Word size 64-bit
Mode Basic (same results in other modes)

Linux Distribution

Ubuntu 20.04 Mate

Link to downstream report of your Distribution

Verified wrong results on a second PC using a clean Ubuntu 20.04 in Virtualbox
Verified correct results on a third PC using mate-calc 1.20.1 on Ubuntu 18.04

Warnings when opening in financial mode

Expected behavior

no warnings

Actual behavior

Warnings when opening in financial mode.

[rave@mother ~]$ mate-calc

** (mate-calc:32185): WARNING **: 11:42:56.197: Unknown currency 'Chinese yuan'

** (mate-calc:32185): WARNING **: 11:42:56.197: Unknown currency 'Japanese yen'

** (mate-calc:32185): WARNING **: 11:42:56.197: Unknown currency 'U.K. pound'

** (mate-calc:32185): WARNING **: 11:42:56.197: Unknown currency 'U.S. dollar'

** (mate-calc:32185): WARNING **: 11:42:56.197: Unknown currency 'Algerian dinar'

** (mate-calc:32185): WARNING **: 11:42:56.197: Unknown currency 'Australian dollar'

** (mate-calc:32185): WARNING **: 11:42:56.197: Unknown currency 'Brazilian real'

** (mate-calc:32185): WARNING **: 11:42:56.197: Unknown currency 'Brunei dollar'

** (mate-calc:32185): WARNING **: 11:42:56.197: Unknown currency 'Canadian dollar'

** (mate-calc:32185): WARNING **: 11:42:56.197: Unknown currency 'Chilean peso'

** (mate-calc:32185): WARNING **: 11:42:56.197: Unknown currency 'Colombian peso'

** (mate-calc:32185): WARNING **: 11:42:56.197: Unknown currency 'Czech koruna'

** (mate-calc:32185): WARNING **: 11:42:56.197: Unknown currency 'Danish krone'

** (mate-calc:32185): WARNING **: 11:42:56.197: Unknown currency 'Indian rupee'

** (mate-calc:32185): WARNING **: 11:42:56.198: Unknown currency 'Israeli New Shekel'

** (mate-calc:32185): WARNING **: 11:42:56.198: Unknown currency 'Korean won'

** (mate-calc:32185): WARNING **: 11:42:56.198: Unknown currency 'Kuwaiti dinar'

** (mate-calc:32185): WARNING **: 11:42:56.198: Unknown currency 'Malaysian ringgit'

** (mate-calc:32185): WARNING **: 11:42:56.198: Unknown currency 'Mauritian rupee'

** (mate-calc:32185): WARNING **: 11:42:56.198: Unknown currency 'Mexican peso'

** (mate-calc:32185): WARNING **: 11:42:56.198: Unknown currency 'New Zealand dollar'

** (mate-calc:32185): WARNING **: 11:42:56.198: Unknown currency 'Norwegian krone'

** (mate-calc:32185): WARNING **: 11:42:56.198: Unknown currency 'Omani rial'

** (mate-calc:32185): WARNING **: 11:42:56.198: Unknown currency 'Peruvian sol'

** (mate-calc:32185): WARNING **: 11:42:56.198: Unknown currency 'Philippine peso'

** (mate-calc:32185): WARNING **: 11:42:56.198: Unknown currency 'Polish zloty'

** (mate-calc:32185): WARNING **: 11:42:56.198: Unknown currency 'Qatari riyal'

** (mate-calc:32185): WARNING **: 11:42:56.198: Unknown currency 'Russian ruble'

** (mate-calc:32185): WARNING **: 11:42:56.198: Unknown currency 'Saudi Arabian riyal'

** (mate-calc:32185): WARNING **: 11:42:56.198: Unknown currency 'Singapore dollar'

** (mate-calc:32185): WARNING **: 11:42:56.198: Unknown currency 'South African rand'

** (mate-calc:32185): WARNING **: 11:42:56.198: Unknown currency 'Swedish krona'

** (mate-calc:32185): WARNING **: 11:42:56.198: Unknown currency 'Swiss franc'

** (mate-calc:32185): WARNING **: 11:42:56.198: Unknown currency 'Thai baht'

** (mate-calc:32185): WARNING **: 11:42:56.198: Unknown currency 'Trinidadian dollar'

** (mate-calc:32185): WARNING **: 11:42:56.198: Unknown currency 'U.A.E. dirham'

** (mate-calc:32185): WARNING **: 11:42:56.198: Unknown currency 'Uruguayan peso'

Note , i see that warnings since the project started.

Steps to reproduce the behaviour

  1. choose financial mode
  2. close mate-calc
  3. open mate-calc from terminal

MATE general version

1.22.1

Package version

1.22.0

Linux Distribution

Fedora

Link to downstream report of your Distribution

I don't file out reports against myself ;)

Incorrect result for -ln(x)

-ln(x) is parsed as ln(-1)+ln(x) (somehow), leading silly ludicrous
result such as −ln(1) = πi, or −ln(2) ≈ 0,693147181 + πi.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/14914189-incorrect-result-for-ln-x?utm_campaign=plugin&utm_content=tracker%2F2163668&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F2163668&utm_medium=issues&utm_source=github).

Combobox menus open in wrong position on change from financial mode to advanced mode

Expected behaviour

All combobox menus open over their buttons

Actual behaviour

If a combobox is opened in financial mode and the mode then switched to advanced mode, comboboxes can open in arbitrary locations detached from their buttons. See #55 (comment)
and video posted there
https://www.dropbox.com/s/jf8axx21u4xlhi3/mate-calc.ogv.tar.xz?dl=0

corrupteds_comboboxes

Steps to reproduce the behaviour

Open mate-calc and switch to financial mode. Click on one of the two comboboxes. Now switch to Advanced mode and click on the same combobox, which now has a new label but about the same position. The menu opens in the wrong place.

MATE general version

1.21/1.20 mix from git master

Package version

locally compiled

Linux Distribution

Debian Unstable

Link to downstream report of your Distribution

None as this is a local build

Static analyzer report

Expected behaviour

Code is perfect :D

Actual behaviour

No code is perfect :) Even here in mate

Steps to reproduce the behaviour

Download the code and check it with a static analyzer

MATE general version

I have no mate installed

Package version

Latest git upstream

Linux Distribution

Xubuntu 16.04

Problems found:

  1. Potentially uninitialized variable 'bits' used.
    if (bits & (1LL << (MAXBITS-i-1)))
  2. lower_name is not null-safe. You should better check it against null
    lower_name = strdup(name);
  3. Integer overflow handling seems to be incorrect here
    if (c < 0) {
  4. The expression is always false here. multiplier is set to zero and never modified.
    if (multiplier != 0) {
  5. It is probably more logical to check both x and z instead of checking x twice. Copy-pasting is sometimes dangerous...

    mate-calc/src/unit.c

    Lines 140 to 145 in d0a089f

    unit_convert_from(Unit *unit, const MPNumber *x, MPNumber *z)
    {
    g_return_val_if_fail(unit != NULL, FALSE);
    g_return_val_if_fail(x != NULL, FALSE);
    g_return_val_if_fail(x != NULL, FALSE);
  6. This expression is overcomplicated. Consider making it result!=expected
    if ((result && !expected) || (!result && expected))
  7. Why does one set base to ten and then just reassign it to be binary?
    options.base = 10;
    options.wordlen = 32;
    options.angle_units = MP_DEGREES;
    options.variable_is_defined = variable_is_defined;
    options.get_variable = get_variable;
    options.set_variable = set_variable;
    options.base = 2;
  8. I also do not like these printf here:
    usage(const gchar *progname, gboolean show_application, gboolean show_gtk)

    I would either choose format first or go for puts. The current code here is neither buggy nor vulnerable but it is potentially dangerous if someone decides to modify it in the future.
    Thanks for providing useful and reliable software and have a nice day :)

Size of result view

When I tried compute long term, Ive problem with displaying result. After typo many numbers with operations and push Enter to solve, result is out of text rectangle and cant be scrolled.

mate-calc

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/31414316-size-of-result-view?utm_campaign=plugin&utm_content=tracker%2F2163668&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F2163668&utm_medium=issues&utm_source=github).

configure.ac: small typo AC_WITH([gtk+] ?

The + (plus sign) in AC_ARG_WITH([gtk+] causes issues. Looking at mate-terminal's configure.ac I suspect the + should be removed. Below is the error when I want to pass --with-gtk=2.0. If you need more info let me know.

./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib64 --disable-silent-rules --disable-dependency-tracking --with-gtk=2.0
configure: WARNING: unrecognized options: --with-gtk
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p

1.25.1: test suite is failing with core dump

+ /usr/bin/make -O -j48 V=1 VERBOSE=1 check
Making check in po
make[1]: Nothing to be done for 'check'.
Making check in src
/usr/bin/make  check-am
/usr/bin/make  check-TESTS
make[4]: Entering directory '/home/tkloczko/rpmbuild/BUILD/mate-calc-1.25.1/src'
PASS: test-mp
make[4]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/mate-calc-1.25.1/src'
make[4]: Entering directory '/home/tkloczko/rpmbuild/BUILD/mate-calc-1.25.1/src'
../test-driver: line 107: 2886970 Segmentation fault      (core dumped) "$@" > $log_file 2>&1
FAIL: test-mp-equation
make[4]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/mate-calc-1.25.1/src'
make[4]: Entering directory '/home/tkloczko/rpmbuild/BUILD/mate-calc-1.25.1/src'
==========================================
   mate-calc 1.25.1: src/test-suite.log
==========================================

# TOTAL: 2
# PASS:  1
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

FAIL: test-mp-equation
======================

FAIL test-mp-equation (exit status: 139)

============================================================================
Testsuite summary for mate-calc 1.25.1
============================================================================
# TOTAL: 2
# PASS:  1
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0
============================================================================
See src/test-suite.log
Please report to https://github.com/mate-desktop/mate-calc/issues
============================================================================
make[4]: *** [Makefile:958: test-suite.log] Error 1
make[4]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/mate-calc-1.25.1/src'
make[3]: *** [Makefile:1066: check-TESTS] Error 2
make[2]: *** [Makefile:1146: check-am] Error 2
make[1]: *** [Makefile:1148: check] Error 2
make: *** [Makefile:427: check-recursive] Error 1
[tkloczko@barrel SPECS]$ coredumpctl gdb 2886970
           PID: 2886970 (test-mp-equatio)
           UID: 1000 (tkloczko)
           GID: 1000 (tkloczko)
        Signal: 11 (SEGV)
     Timestamp: Sun 2021-05-30 16:56:29 BST (5min ago)
  Command Line: ./test-mp-equation
    Executable: /home/tkloczko/rpmbuild/BUILD/mate-calc-1.25.1/src/test-mp-equation
 Control Group: /user.slice/user-1000.slice/session-3664.scope
          Unit: session-3664.scope
         Slice: user-1000.slice
       Session: 3664
     Owner UID: 1000 (tkloczko)
       Boot ID: bee09df31ca9472cae32a4cda486d4ec
    Machine ID: d033f66b249a4ec09acfa81ac205554f
      Hostname: barrel
       Storage: /var/lib/systemd/coredump/core.test-mp-equatio.1000.bee09df31ca9472cae32a4cda486d4ec.2886970.1622390189000000.zst
       Message: Process 2886970 (test-mp-equatio) of user 1000 dumped core.

                Stack trace of thread 2886970:
                #0  0x00007f3481e9b601 g_type_fundamental (libgobject-2.0.so.0 + 0x1c601)
                #1  0x00007f3481eaec9e g_param_spec_enum (libgobject-2.0.so.0 + 0x2fc9e)
                #2  0x0000561a0f2e1d83 n/a (/home/tkloczko/rpmbuild/BUILD/mate-calc-1.25.1/src/test-mp-equation + 0xdd83)

GNU gdb (GDB) Fedora 9.0.50.20191119-2.fc32
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/tkloczko/rpmbuild/BUILD/mate-calc-1.25.1/src/test-mp-equation...

warning: core file may not match specified executable file.
[New LWP 2886970]
Warning: couldn't activate thread debugging using libthread_db: Cannot find new threads: generic error

warning: File "/usr/lib64/libthread_db-1.0.so" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load:/usr/lib/golang/src/runtime/runtime-gdb.py".
To enable execution of this file add
        add-auto-load-safe-path /usr/lib64/libthread_db-1.0.so
line to your configuration file "/home/tkloczko/.gdbinit".
To completely disable this security protection add
        set auto-load safe-path /
line to your configuration file "/home/tkloczko/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
        info "(gdb)Auto-loading safe path"

warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `./test-mp-equation'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f3481e9b601 in g_type_fundamental () from /lib64/libgobject-2.0.so.0
 glib2-2.68.2-4.fc35.x86_64 glibc-2.33.9000-2.fc35.x86_64 gmp-6.2.1-2.3.fc35.x86_64 libblkid-2.37-0.2.rc2.fc35.x86_64 libffi-3.2.1-2.3.fc35.x86_64 libmount-2.37-0.2.rc2.fc35.x86_64 libmpc-1.2.1-3.fc35.x86_64 libselinux-3.2-2.fc35.x86_64 libxml2-2.9.12-5.fc35.x86_64 mpfr-4.1.0-8.fc35.x86_64 pcre2-10.36-5.fc35.x86_64 xz-libs-5.2.5-7.fc35.x86_64 zlib-1.2.11-27.fc35.x86_64
(gdb) bt full
Missing separate debuginfos, use: dnf debuginfo-install#0  0x00007f3481e9b601 in g_type_fundamental () at /lib64/libgobject-2.0.so.0
#1  0x00007f3481eaec9e in g_param_spec_enum () at /lib64/libgobject-2.0.so.0
#2  0x0000561a0f2e1d83 in mp_serializer_class_init (klass=<optimized out>) at /home/tkloczko/rpmbuild/BUILD/mate-calc-1.25.1/src/mp-serializer.c:619
        object_class = 0x561a0f551570
#3  mp_serializer_class_intern_init (klass=<optimized out>) at /home/tkloczko/rpmbuild/BUILD/mate-calc-1.25.1/src/mp-serializer.c:45
#4  0x00007f3481eaccc7 in g_type_class_ref () at /lib64/libgobject-2.0.so.0
#5  0x00007f3481eba658 in g_object_new_with_properties () at /lib64/libgobject-2.0.so.0
#6  0x00007f3481ebaff1 in g_object_new () at /lib64/libgobject-2.0.so.0
#7  0x0000561a0f2e1bc2 in mp_serializer_new (format=MP_DISPLAY_FORMAT_AUTOMATIC, base=10, trailing_digits=2)
    at /home/tkloczko/rpmbuild/BUILD/mate-calc-1.25.1/src/mp-serializer.c:50
Python Exception <class 'gdb.error'> dwarf2_find_location_expression: Corrupted DWARF expression.:
#8  0x0000561a0f2e533d in unit_init (unit=0x561a0f541a80) at /home/tkloczko/rpmbuild/BUILD/mate-calc-1.25.1/src/unit.c:209
#9  0x00007f3481ead08a in g_type_create_instance () at /lib64/libgobject-2.0.so.0
#10 0x00007f3481eba00d in g_object_new_internal () at /lib64/libgobject-2.0.so.0
#11 0x00007f3481eba51d in g_object_new_with_properties () at /lib64/libgobject-2.0.so.0
#12 0x00007f3481ebaff1 in g_object_new () at /lib64/libgobject-2.0.so.0
#13 0x0000561a0f2e22b0 in unit_new
    (name=0x561a0f2eb864 "degree", display_name=0x561a0f2eb86b "Degrees", format=0x561a0f2eb873 "%s degrees", from_function=0x561a0f2eb87e "π*x/180", to_function=0x561a0f2eb887 "180x/π", symbols=0x561a0f2eb88f "degree,degrees,deg") at /home/tkloczko/rpmbuild/BUILD/mate-calc-1.25.1/src/unit.c:30
        unit = <optimized out>
        symbol_names = <optimized out>
        i = <optimized out>
#14 0x0000561a0f2e3953 in unit_manager_get_default () at /home/tkloczko/rpmbuild/BUILD/mate-calc-1.25.1/src/unit-manager.c:120
        category = 0x561a0f54e820
        currencies = <optimized out>
        iter = <optimized out>
        i = 0
        units =
            {{category = 0x561a0f2eb85e "angle", name = 0x561a0f2eb864 "degree", display_name = 0x561a0f2eb86b "Degrees", format = 0x561a0f2eb873 "%s degrees", from_function = 0x561a0f2eb87e "π*x/180", to_function = 0x561a0f2eb887 "180x/π", symbols = 0x561a0f2eb88f "degree,degrees,deg"}, {category = 0x0, name = 0x561a0f2eb8c9 "radian", display_name = 0x561a0f2eb8a2 "Radians", format = 0x561a0f2eb8aa "%s radians", from_function = 0x561a0f2eb939 "x", to_function = 0x561a0f2eb939 "x", symbols = 0x561a0f2eb8b5 "radian,radians,rad"}, {category = 0x0, name = 0x561a0f2eb8c8 "gradian", display_name = 0x561a0f2eb8d0 "Gradians", format = 0x561a0f2eb8d9 "%s gradians", from_function = 0x561a0f2eb8e5 "π*x/200", to_function = 0x561a0f2eb8ee "200x/π", symbols = 0x561a0f2eb8f6 "gradian,gradians,grad"}, {category = 0x561a0f2eb90c "length", name = 0x561a0f2eb913 "parsec", display_name = 0x561a0f2eb91a "Parsecs", format = 0x561a0f2eb922 "%s pc", from_function = 0x561a0f2eb928 "30857", '0' <repeats 12 times>, "x", to_function = 0x561a0f2eb93b "x/30857", '0' <repeats 12 times>, symbols = 0x561a0f2eb94f "parsec,parsecs,pc"}, {category = 0x0, name = 0x561a0f2eb961 "lightyear", display_name = 0x561a0f2eb96b "Light Years", format = 0x561a0f2eb977 "%s ly", from_function = 0x561a0f2eb97d "9460730472580800x", to_function = 0x561a0f2eb98f "x/9460730472580800", symbols = 0x561a0f2eb9a2 "lightyear,lightyears,ly"}, {category = 0x0, name = 0x561a0f2eb9ba "astronomical-unit", display_name = 0x561a0f2eb9cc "Astronomical Units", format = 0x561a0f2eb9df "%s au", from_function = 0x561a0f2eb9e5 "149597870700x", to_function = 0x561a0f2eb9f3 "x/149597870700", symbols = 0x561a0f2eb9e2 "au"}, {category = 0x0, name = 0x561a0f2eba02 "nautical-mile", display_name = 0x561a0f2eba10 "Nautical Miles", format = 0x561a0f2eba1f "%s nmi", from_function = 0x561a0f2eba26 "1852x", to_function = 0x561a0f2eba2c "x/1852", symbols = 0x561a0f2eba22 "nmi"}, {category = 0x0, name = 0x561a0f2eba0b "mile", display_name = 0x561a0f2eba19 "Miles", format = 0x561a0f2eba33 "%s mi", from_function = 0x561a0f2eba39 "1609.344x", to_function = 0x561a0f2eba43 "x/1609.344", symbols = 0x561a0f2eba4e "mile,miles,mi"}, {category = 0x0, name = 0x561a0f2eba5c "kilometer", display_name = 0x561a0f2eba66 "Kilometers", format = 0x561a0f2eba71 "%s km", from_function = 0x561a0f2eba77 "1000x", to_function = 0x561a0f2eba7d "x/1000", symbols = 0x561a0f2eba84 "kilometer,kilometers,km,kms"}, {category = 0x0, name = 0x561a0f2ebaa0 "cable", display_name = 0x561a0f2ebaa6 "Cables", format = 0x561a0f2ebaad "%s cb", from_function = 0x561a0f2ebab3 "219.456x", to_function = 0x561a0f2ebabc "x/219.456", symbols = 0x561a0f2ebac6 "cable,cables,cb"}, {category = 0x0, name = 0x561a0f2ebad6 "fathom", display_name = 0x561a0f2ebadd "Fathoms", format = 0x561a0f2ebae5 "%s ftm", from_function = 0x561a0f2ebaec "1.8288x", to_function = 0x561a0f2ebaf4 "x/1.8288", symbols = 0x561a0f2ebafd "fathom,fathoms,ftm"}, {category = 0x0, name = 0x561a0f2ebdb0 "meter", display_name = 0x561a0f2ebdbc "Meters", format = 0x561a0f2ebb10 "%s m", from_function = 0x561a0f2eb939 "x", to_function = 0x561a0f2eb939 "x", symbols = 0x561a0f2ebb15 "meter,meters,m"}, {category = 0x0, name = 0x561a0f2ebb24 "yard", display_name = 0x561a0f2ebb29 "Yards", format = 0x561a0f2ebb2f "%s yd", from_function = 0x561a0f2ebb35 "0.9144x", to_function = 0x561a0f2ebb3d "x/0.9144", symbols = 0x561a0f2ebb46 "yard,yards,yd"}, {category = 0x0, name = 0x561a0f2ebb54 "foot", display_name = 0x561a0f2ebb59 "Feet", format = 0x561a0f2ebb5e "%s ft", from_function = 0x561a0f2ebb64 "0.3048x", to_function = 0x561a0f2ebb6c "x/0.3048", symbols = 0x561a0f2ebb75 "foot,feet,ft"}, {category = 0x0, name = 0x561a0f2ebb82 "inch", display_name = 0x561a0f2ebb87 "Inches", format = 0x561a0f2ebb8e "%s in", from_function = 0x561a0f2ebb94 "0.0254x", to_function = 0x561a0f2ebb9c "x/0.0254", symbols = 0x561a0f2ebba5 "inch,inches,in"}, {category = 0x0, name = 0x561a0f2ebd3e "centimeter", display_name = 0x561a0f2ebd50 "Centimeters", format = 0x561a0f2ebbb4 "%s cm", from_function = 0x561a0f2ebbba "x/100", to_function = 0x561a0f2ebbc0 "100x", symbols = 0x561a0f2ebbc5 "centimeter,centimeters,cm,cms"}, {category = 0x0, name = 0x561a0f2ebd73 "millimeter", display_name = 0x561a0f2ebd85 "Millimeters", format = 0x561a0f2ebbe3 "%s mm", from_function = 0x561a0f2eba7d "x/1000", to_function = 0x561a0f2eba77 "1000x", symbols = 0x561a0f2ebbe9 "millimeter,millimeters,mm"}, {category = 0x0, name = 0x561a0f2ebc03 "micrometer", display_name = 0x561a0f2ebc0e "Micrometers", format = 0x561a0f2ebc1a "%s μm", from_function = 0x561a0f2ebc21 "x/1000000", to_function = 0x561a0f2ebc2b "1000000x", symbols = 0x561a0f2ebc34 "micrometer,micrometers,um"}, {category = 0x0, name = 0x561a0f2ebc4e "nanometer", display_name = 0x561a0f2ebc58 "Nanomet--Type <RET> for more, q to quit, c to continue without paging--
ers", format = 0x561a0f2ebc63 "%s nm", from_function = 0x561a0f2ebc69 "x/1000000000", to_function = 0x561a0f2ebc76 "1000000000x", symbols = 0x561a0f2ebc82 "nanometer,nanometers,nm"}, {category = 0x561a0f2ebc9a "area", name = 0x561a0f2ebc9f "hectare", display_name = 0x561a0f2ebca7 "Hectares", format = 0x561a0f2ebcb0 "%s ha", from_function = 0x561a0f2ebcb6 "10000x", to_function = 0x561a0f2ebcbd "x/10000", symbols = 0x561a0f2ebcc5 "hectare,hectares,ha"}, {category = 0x0, name = 0x561a0f2ebcd9 "acre", display_name = 0x561a0f2ebcde "Acres", format = 0x561a0f2ebce4 "%s acres", from_function = 0x561a0f2ebced "4046.8564224x", to_function = 0x561a0f2ebcfb "x/4046.8564224", symbols = 0x561a0f2ebd0a "acre,acres"}, {category = 0x0, name = 0x561a0f2ebd15 "square-meter", display_name = 0x561a0f2ebd22 "Square Meters", format = 0x561a0f2ebd30 "%s m²", from_function = 0x561a0f2eb939 "x", to_function = 0x561a0f2eb939 "x", symbols = 0x561a0f2ebd33 "m²"}, {category = 0x0, name = 0x561a0f2ebd37 "square-centimeter", display_name = 0x561a0f2ebd49 "Square Centimeters", format = 0x561a0f2ebd5c "%s cm²", from_function = 0x561a0f2ebd64 "0.0001x", to_function = 0x561a0f2ebcb6 "10000x", symbols = 0x561a0f2ebd5f "cm²"}, {category = 0x0, name = 0x561a0f2ebd6c "square-millimeter", display_name = 0x561a0f2ebd7e "Square Millimeters", format = 0x561a0f2ebd91 "%s mm²", from_function = 0x561a0f2ebd99 "0.000001x", to_function = 0x561a0f2ebc2b "1000000x", symbols = 0x561a0f2ed30a "mm²"}, {category = 0x561a0f2ebda3 "volume", name = 0x561a0f2ebdaa "cubic-meter", display_name = 0x561a0f2ebdb6 "Cubic Meters", format = 0x561a0f2ebdc3 "%s m³", from_function = 0x561a0f2eba77 "1000x", to_function = 0x561a0f2eba7d "x/1000", symbols = 0x561a0f2ebdc6 "m³"}, {category = 0x0, name = 0x561a0f2ebdca "gallon", display_name = 0x561a0f2ebdd1 "Gallons", format = 0x561a0f2ebdd9 "%s gal", from_function = 0x561a0f2ebde0 "3.785412x", to_function = 0x561a0f2ebdea "x/3.785412", symbols = 0x561a0f2ebdf5 "gallon,gallons,gal"}, {category = 0x0, name = 0x561a0f2ebea5 "litre", display_name = 0x561a0f2ebe08 "Litres", format = 0x561a0f2ebe0f "%s L", from_function = 0x561a0f2eb939 "x", to_function = 0x561a0f2eb939 "x", symbols = 0x561a0f2ebe14 "litre,litres,liter,liters,L"}, {category = 0x0, name = 0x561a0f2ebe30 "quart", display_name = 0x561a0f2ebe36 "Quarts", format = 0x561a0f2ebe3d "%s qt", from_function = 0x561a0f2ebe43 "0.9463529x", to_function = 0x561a0f2ebe4e "x/0.9463529", symbols = 0x561a0f2ebe5a "quart,quarts,qt"}, {category = 0x0, name = 0x561a0f2ebe6a "pint", display_name = 0x561a0f2ebe6f "Pints", format = 0x561a0f2ebe75 "%s pt", from_function = 0x561a0f2ebe7b "0.4731765x", to_function = 0x561a0f2ebe86 "x/0.4731765", symbols = 0x561a0f2ebe92 "pint,pints,pt"}, {category = 0x0, name = 0x561a0f2ebea0 "millilitre", display_name = 0x561a0f2ebeab "Millilitres", format = 0x561a0f2ebeb7 "%s mL", from_function = 0x561a0f2ebebd "0.001x", to_function = 0x561a0f2eba77 "1000x", symbols = 0x561a0f2ebec4 "millilitre,millilitres,milliliter,milliliters,mL,cm³"}, {category = 0x0, name = 0x561a0f2ebefa "microlitre", display_name = 0x561a0f2ebf05 "Microlitres", format = 0x561a0f2ebf11 "%s μL", from_function = 0x561a0f2ebd99 "0.000001x", to_function = 0x561a0f2ebc2b "1000000x", symbols = 0x561a0f2ebf18 "mm³,μL,uL"}, {category = 0x561a0f2ebf24 "weight", name = 0x561a0f2ebf2b "tonne", display_name = 0x561a0f2ebf31 "Tonnes", format = 0x561a0f2ebf38 "%s T", from_function = 0x561a0f2eba77 "1000x", to_function = 0x561a0f2eba7d "x/1000", symbols = 0x561a0f2ebf3d "tonne,tonnes"}, {category = 0x0, name = 0x561a0f2ebf4a "kilograms", display_name = 0x561a0f2ebf54 "Kilograms", format = 0x561a0f2ebf5e "%s kg", from_function = 0x561a0f2eb939 "x", to_function = 0x561a0f2eb939 "x", symbols = 0x561a0f2ebf64 "kilogram,kilograms,kilogramme,kilogrammes,kg,kgs"}, {category = 0x0, name = 0x561a0f2eca23 "pound", display_name = 0x561a0f2ebf95 "Pounds", format = 0x561a0f2ebf9c "%s lb", from_function = 0x561a0f2ebfa2 "0.45359237x", to_function = 0x561a0f2ebfae "x/0.45359237", symbols = 0x561a0f2ebfbb "pound,pounds,lb"}, {category = 0x0, name = 0x561a0f2ebfcb "ounce", display_name = 0x561a0f2ebfd1 "Ounces", format = 0x561a0f2ebfd8 "%s oz", from_function = 0x561a0f2ebfde "0.02834952x", to_function = 0x561a0f2ebfea "x/0.02834952", symbols = 0x561a0f2ebff7 "ounce,ounces,oz"}, {category = 0x0, name = 0x561a0f2ec007 "gram", display_name = 0x561a0f2ec00c "Grams", format = 0x561a0f2ec012 "%s g", from_function = 0x561a0f2ebebd "0.001x", to_function = 0x561a0f2eba77 "1000x", symbols = 0x561a0f2ec017 "gram,grams,gramme,grammes,g"}, {category = 0x561a0f2ec033 "duration", name = 0x561a0f2eb966 "year", display_name = 0x561a0f2eb971 "Years", format = 0x561a0f2ec03c "%s years", from_function = 0x561a0f2ec045 "31557600x", to_function = 0x561a0f2ec04f "x/31557600", symbols = 0x561a0f2ec05a "year,years"}, {category = 0x0, name = 0x561a0f2ec065 "day", display_name = 0x561a0f2ec069 "Days", format = 0x561a0f2ec06e "%s days", from_function = 0x561a0f2ec076 "86400x", to_function = 0x561a0f2ec07d "x/86400", symbols = 0x561a0f2ec085 "day,days"}, {category = 0x0, name = 0x561a0f2ec08e "hour", display_name = 0x561a0f2ec093 "Hours", format = 0x561a0f2ec099 "%s hours", from_function = 0x561a0f2ec0a2 "3600x", to_function = 0x561a0f2ec0a8 "x/3600", symbols = 0x561a0f2ec0af "hour,hours"}, {category = 0x0, name = 0x561a0f2ec0ba "minute", display_name = 0x561a0f2ec0c1 "Minutes", format = 0x561a0f2ec0c9 "%s minutes", from_function = 0x561a0f2ec0d4 "60x", to_function = 0x561a0f2ec0d8 "x/60", symbols = 0x561a0f2ec0dd "minute,minutes"}, {category = 0x0, name = 0x561a0f2ec10f "second", display_name = 0x561a0f2ec0ec "Seconds", format = 0x561a0f2ec0f4 "%s s", from_function = 0x561a0f2eb939 "x", to_function = 0x561a0f2eb939 "x", symbols = 0x561a0f2ec0f9 "second,seconds,s"}, {category = 0x0, name = 0x561a0f2ec10a "millisecond", display_name = 0x561a0f2ec116 "Milliseconds", format = 0x561a0f2ec123 "%s ms", from_function = 0x561a0f2ebebd "0.001x", to_function = 0x561a0f2eba77 "1000x", symbols = 0x561a0f2ec129 "millisecond,milliseconds,ms"}, {category = 0x0, name = 0x561a0f2ec145 "microsecond", display_name = 0x561a0f2ec151 "Microseconds", format = 0x561a0f2ec15e "%s μs", from_function = 0x561a0f2ebd99 "0.000001x", to_function = 0x561a0f2ebc2b "1000000x", symbols = 0x561a0f2ec165 "microsecond,microseconds,us,μs"}, {category = 0x561a0f2ec185 "temperature", name = 0x561a0f2ec191 "degree-celcius", display_name = 0x561a0f2ec1a0 "Celsius", format = 0x561a0f2ec1a8 "%s ˚C", from_function = 0x561a0f2ec1af "x+273.15", to_function = 0x561a0f2ec1b8 "x-273.15", symbols = 0x561a0f2ec1c1 "degC,˚C"}, {category = 0x0, name = 0x561a0f2ec1ca "degree-farenheit", display_name = 0x561a0f2ec1db "Farenheit", format = 0x561a0f2ec1e5 "%s ˚F", from_function = 0x561a0f2ec1ec "(x+459.67)*5/9", to_function = 0x561a0f2ec1fb "x*9/5-459.67", symbols = 0x561a0f2ec208 "degF,˚F"}, {category = 0x0, name = 0x561a0f2ec211 "degree-kelvin", display_name = 0x561a0f2ec21f "Kelvin", format = 0x561a0f2ec226 "%s K", from_function = 0x561a0f2eb939 "x", to_function = 0x561a0f2eb939 "x", symbols = 0x561a0f2ec229 "K"}, {category = 0x0, name = 0x561a0f2ec22b "degree-rankine", display_name = 0x561a0f2ec23a "Rankine", format = 0x561a0f2ec242 "%s ˚R", from_function = 0x561a0f2ec249 "x*5/9", to_function = 0x561a0f2ec24f "x*9/5", symbols = 0x561a0f2ec255 "degR,˚R,˚Ra"}, {category = 0x0, name = 0x0, display_name = 0x0, format = 0x0, from_function = 0x0, to_function = 0x0, symbols = 0x0}}
#15 0x0000561a0f2e8830 in do_convert (x=0x7ffd1b285c58, x_units=0x561a0f54cf90 "gradians", z_units=0x561a0f54d100 "degrees", z=0x561a0f546be0, data=<optimized out>)
    at /home/tkloczko/rpmbuild/BUILD/mate-calc-1.25.1/src/test-mp-equation.c:120
#16 0x0000561a0f2e80a3 in pf_convert_number (self=0x561a0f546eb0) at /home/tkloczko/rpmbuild/BUILD/mate-calc-1.25.1/src/parserfunc.c:78
Python Exception <class 'gdb.error'> dwarf2_find_location_expression: Corrupted DWARF expression.:
#17 0x0000561a0f2e7e33 in p_parse (state=0x561a0f54b740) at /home/tkloczko/rpmbuild/BUILD/mate-calc-1.25.1/src/parser.c:276
        ret = <optimized out>
        token = <optimized out>
        ans = <optimized out>
        ret = <optimized out>
Python Exception <class 'gdb.error'> dwarf2_find_location_expression: Corrupted DWARF expression.:
#18 mp_equation_parse (expression=<optimized out>, options=0x561a0f2f40e0 <options>, result=0x7ffd1b285d98, error_token=0x7ffd1b285d90)
    at /home/tkloczko/rpmbuild/BUILD/mate-calc-1.25.1/src/mp-equation.c:313
        ret = <optimized out>
Python Exception <class 'gdb.error'> dwarf2_find_location_expression: Corrupted DWARF expression.:
--Type <RET> for more, q to quit, c to continue without paging--
#19 0x0000561a0f2e9611 in Test (expression=0x561a0f2ed2c1 "100 gradians in degrees", expected=0x561a0f2ede95 "90", expected_error=0, trailing_digits=9)
    at /home/tkloczko/rpmbuild/BUILD/mate-calc-1.25.1/src/test-mp-equation.c:83
        error = <optimized out>
        error_token = 0x0
        result =
                  {num = {{re = {{_mpfr_prec = 1000, _mpfr_sign = 1, _mpfr_exp = -9223372036854775806, _mpfr_d = 0x561a0f547ec8}}, im = {{_mpfr_prec = 1000, _mpfr_sign = 1, _mpfr_exp = -9223372036854775806, _mpfr_d = 0x561a0f547a98}}}}}
#20 0x0000561a0f2dd5ec in test_conversions () at /home/tkloczko/rpmbuild/BUILD/mate-calc-1.25.1/src/test-mp-equation.c:135
#21 main () at /home/tkloczko/rpmbuild/BUILD/mate-calc-1.25.1/src/test-mp-equation.c:690

Please let me know if you will need more details.

Feature Request: History panel

Having a history panel where you could go back to old equations or copy the expression/result would be super handy. An idea for implementation could be like the this example (http://www.eeweb.com/toolbox/calculator)

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/29684942-feature-request-history-panel?utm_campaign=plugin&utm_content=tracker%2F2163668&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F2163668&utm_medium=issues&utm_source=github).

Incorrect result for 2^(-55)

Incorrect result for 2^(-55).

mate-calc result = 0
expected result = 2.7755575615628914e-17

Upon further investigation:
2^-30 results in 0.000000001
2^-31 results in 0

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/5019403-incorrect-result-for-2-55?utm_campaign=plugin&utm_content=tracker%2F2163668&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F2163668&utm_medium=issues&utm_source=github).

Can't change menu shortcut

Hello

It appear that with mate-calc 1.8.0-0+qiana (i don't found the debian package...) I can't change accels in menu (for eaxample o remove F1 for Help).

Can mate-calc honor "can-change-accels" from dconf?

Perhaps unused functions shift_left/right_cb

I was working on code for fix deprecated functions call and i get in popup_button_menu that is called by shift_left/right_cb, and searched and can't found where shift_left/right_cb is used, are they unused?

Ability to hide menu

Expected behaviour

Ability to hide menu

Actual behaviour

Regarding UI

Steps to reproduce the behaviour

MATE general version

Package version

Linux Distribution

Link to downstream report of your Distribution

Prime factorization is not displayed in history view

Expected behaviour

Prime factorization is displayed in history view

Actual behaviour

it isn't

Steps to reproduce the behaviour

enable history-view (view->history), enter a number, hit ctrl+f, factorization will not be shown in the history-view widget

MATE general version

1.20

Package version

master

Linux Distribution

debian 10

Link to downstream report of your Distribution

none

Error loading button UI

mate-calc-1.21:
Error loading button UI: /usr/share/mate-calc/buttons-programming.ui:38:41 Object with ID image1 not found

ln(e^(i*π)) doesn't calculate

Expected result

πi

Actual behaviour

It calculates forever.
It seems to be an infinite loop. Probably somewhere in mp.c where ln() is defined.

MATE general version

1.20.1

Package version

1.22.0

Linux Distribution

Ubuntu Mate 18.04

Do not work thousands separators in mate-calc

When I check "Show thousands separators" checkbox in mate-calc I do not see any changes in work. All numbers are displayed without separators. I use Mate 1.4.0 (latest version) on Ubuntu 12.04.

Convergence issue with the ln function

Expected behaviour

ln(1/2) should output -ln(2) which is about -0.693

Actual behaviour

Gives error message: ERROR OCCURRED IN MP_LNS, NEWTON ITERATION NOT CONVERGING PROPERLY

Steps to reproduce the behaviour

Just type into the app

MATE general version

1.24

Package version

1.24-1

Linux Distribution

Xubuntu LTS 20.04

Link to bugreport of your Distribution (requirement)

https://launchpad.net/ubuntu/+bugs

App consuming 100% of CPU with common usage

Expected behaviour

Average (close to none) CPU consumption when using the calculator.

Actual behaviour

Once I do any calculation the CPU usage spikes to 100% or very close to that percentage.

Steps to reproduce the behaviour

Type any calculation (at times not even a calculation, just numbers). It's irrelevant the type of calculation for what I have tested.

Example:

2+2+1

That'll do the work, 80 to 100% just for doing that. And the CPU usage keeps like that for about 10 seconds after the calculation.

MATE general version

MATE 1.20.1

Package version

1.20.1

Linux Distribution

Ubuntu-Mate 18.04.4 LTS (Bionic Beaver) 64-bit

Link to downstream report of your Distribution

n/a

image

Incorrect result for 1/10^10

mate-calc result = 0
expected result = 1e-10

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/5019465-incorrect-result-for-1-10-10?utm_campaign=plugin&utm_content=tracker%2F2163668&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F2163668&utm_medium=issues&utm_source=github).

Mate-calc going away? Galculator lacks financial and programmer features.

Wasn't sure where to put this but I just read that mate-calc is going away and will be replaced with Galculator in mate-desktop 1.10. I have made use of the programming and financial functions in mate-calc. Galculator lacks those features, so this basically amounts to a feature loss in mate-desktop 1.10, which will become an issue in the near future. Or, will the code for these functions be added to the codebase of Galculator to integrate those features into Galculator? Please advise.

Window all cut off on Librem 5/small screen

Expected behaviour

All modes should work, all features should work.

Actual behaviour

Only BASIC mode works and only in Landscape mode, on the Librem 5 phone. On Pinephone and others it will probably be the same issue. I wrote up how I was able to fix this type of issue on a posting here: https://howtotrainyourrobot.com/building-an-amateur-radio-app-for-librem-phone-part-3/

Steps to reproduce the behaviour

Install MATE calculator. Try different modes.

MATE general version

Mate-calc 1.20.3

Package version

Mate-calc 1.20.3

Linux Distribution

PureOS

Link to bugreport of your Distribution (requirement)

https://source.puri.sm/Librem5/phosh/-/issues/550

Programmer mode binary display is incorrect with negative numbers

Expected behavior:
When the result is a negative number, I would expect the binary display to show an accurate representation of that number as stored by the computer. e.g. -47 should show up as 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1101 0001 on an x86-64 machine.
Alternately, though I think it would be far less useful for a programmer (though making some mathematicians happy), it could just display a signed binary number: -47 would be -101111.

Actual behavior:
Negative results show up as all 0s in the binary display.

Steps to reproduce the behavior:
Make sure it's set to Programming mode. Enter a negative number or calculation with a negative result.

MATE general version 1.22
Package version: 1.22.2-1
Linux Distribution: Manjaro x86-64

mp-convert.c:487: wrong version of abs ?

mp-convert.c:487:43: warning: using integer absolute value function 'abs' when argument is of floating point type [-Wabsolute-value]

if (ret_val <= 0. ||
    ((d__1 = (double) ((float) x->exponent) - (log(ret_val) / log((double)
            ((float) MP_BASE)) + .5), abs(d__1)) > .6)) {

Maybe

if (ret_val <= 0. ||
    ((d__1 = (double) ((float) x->exponent) - (log(ret_val) / log((double)
            ((float) MP_BASE)) + .5), fabs(d__1)) > .6)) {

Multiline screen display

Expected behaviour

Viewing old results of earlier calculation with scrolling multi line. Old results are Non-editable.

Actual behaviour

Steps to reproduce the behaviour

MATE general version

Package version

Linux Distribution

Link to downstream report of your Distribution

Calculation order error

Expected behaviour

Input:
6*cos(45) +1
Correct answer is 5.2426406... (assuming working in degrees)

Actual behaviour

6cos(45) +1
yields:
10,242640687
However, this is the correct answer for
6
(cos(45)+1)
(in degrees), so clearly there are problems with calculation order here. Similar errors occur for 6*cos(45)+sin(45) (which gives a number over 8, clearly wrong as the absolute value of both sine and cosine is less than or equal to 1)

Steps to reproduce the behaviour

Just typing it in to the calculator.

MATE general version

1.24.0

Package version

1.24.0-1

Linux Distribution

Xubuntu 20.04.1 LTS (Focal Fossa)

Link to downstream report of your Distribution

Results could be pasteable into other applications

HOW TO REPRODUCE:

  1. Make an operation which result is negative.
  2. Copy the result into a LibreOffice Calc box.

RESULT:

  • LibreOffice doesn't understand the pasted number because of the minus sign being a dash, not an actual minus.

Missing symbols

This while using some fonts as system font (like Noto Sans), but not with others (like Liberation Sans) .

Not any other application shows the behavior, including Pluma. They all show the symbols.

segmentation fault on "NOT ffffffffffffffffffea"

Expected behaviour

its 15

Actual behaviour

it segfaults:
stacktrace when compiled with address sanitizer:

mp-convert.c:176:5: runtime error: null pointer passed as argument 1, which is declared to never be null
AddressSanitizer:DEADLYSIGNAL
=================================================================
==7216==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7fe7b743db0d bp 0x7fe7adc53fb0 sp 0x7fe7adc53738 T6)
==7216==The signal is caused by a WRITE memory access.
==7216==Hint: address points to the zero page.
    #0 0x7fe7b743db0c  (/lib/x86_64-linux-gnu/libc.so.6+0x15cb0c)
    #1 0x7fe7b90b8db5  (/lib/x86_64-linux-gnu/libasan.so.5+0xa8db5)
    #2 0x555ae140bb3b in mp_set_from_integer /home/j/test/mate-calc/src/mp-convert.c:176
    #3 0x555ae1409e39 in mp_bitwise /home/j/test/mate-calc/src/mp-binary.c:66
    #4 0x555ae140a87f in mp_not /home/j/test/mate-calc/src/mp-binary.c:160
    #5 0x555ae143a72d in pf_do_not /home/j/test/mate-calc/src/parserfunc.c:871
    #6 0x555ae143d8f9 in p_parse /home/j/test/mate-calc/src/parser.c:276
    #7 0x555ae1416eb0 in mp_equation_parse /home/j/test/mate-calc/src/mp-equation.c:308
    #8 0x555ae13e1f5d in parse /home/j/test/mate-calc/src/math-equation.c:1184
    #9 0x555ae13e23c6 in math_equation_solve_real /home/j/test/mate-calc/src/math-equation.c:1219
    #10 0x7fe7b81de414  (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x76414)
    #11 0x7fe7b74a9fa2 in start_thread /build/glibc-vjB4T1/glibc-2.28/nptl/pthread_create.c:486
    #12 0x7fe7b73da4ce in clone (/lib/x86_64-linux-gnu/libc.so.6+0xf94ce)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (/lib/x86_64-linux-gnu/libc.so.6+0x15cb0c) 
Thread T6 created by T0 here:
    #0 0x7fe7b9060db0 in __interceptor_pthread_create (/lib/x86_64-linux-gnu/libasan.so.5+0x50db0)
    #1 0x7fe7b81ffc3f  (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x97c3f)

==7216==ABORTING

Steps to reproduce the behaviour

type NOT and an large (>2**64) integer value

MATE general version

1.20.3 or 1.23.0

Package version

1.20.3

Linux Distribution

debian unstable, ubuntu 18.04, compiled from source

Eulers identity gives no (blank) result

Expected behaviour

e^iπ+1=0

Actual behaviour

e^iπ+1= (Blank)

Steps to reproduce the behaviour

Enter e^iπ+1

MATE general version

1.20.4

Package version

1.20.3 & in master

Linux Distribution

Debian buster

Link to downstream report of your Distribution

none

Reorganise, replace,relocate buttons for better experience ergonomics

Expected behaviour

Most actual: Increase plus button, change color and size of symbol.

Actual behaviour

Not changed significantly for a long time

Steps to reproduce the behaviour

Just UI of BASIC mode

MATE general version

1.18, 1.19

Package version

latest

Linux Distribution

any

Link to downstream report of your Distribution

Example of ergonomic convenient buttons locaton
ac46
calculator-de-buzunar-truly-319a-8-709-4

a85e

Keyboard shortcuts for base digit and wordsize changing

When in Programming mode, gcalctool 5.28 allowed changing of base digits (bin, oct, dec, hex) with a keypress of Alt+{bodx). These corresponded with radio buttons underneath the number window.

There are also radio buttons for wordsize (64/32/16-bit) with shortcuts Alt+{631}.

In mate-calc 1.6.1 (and various other versions) the base digit selection has been changed to a dropdown with no keyboard shortcut. Wordsize is even further away in the Preferences menu.

Please consider adding Alt+{bodx) keyboard shortcuts to change base digits and wordsize. If you wished to revert to the radio buttons instead of the dropdown/Preferences, that would be ideal.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/7652630-keyboard-shortcuts-for-base-digit-and-wordsize-changing?utm_campaign=plugin&utm_content=tracker%2F2163668&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F2163668&utm_medium=issues&utm_source=github).

Allow display of more than 9 decimal places

The maximum settable number of decimal places is 9. Any number smaller than 5e-10 is truncated to 0 in the display, although the correct value is held internally (confirm by multiplying the '0' result so that the new result will be > 5e-10).
As numbers less than 5e-10 occur regularly in calculations it would be good to allow an increase in the number of decimal places to be displayed.
From a quick check the 'accuracy' range needs to be changed in the file:
data/org.mate.calc.gschema.xml.in
(but is that all???)


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

mpc is required, but not searched

src/mp.h requires mpc.h, but this header not checked by configure.
mpfr not depends on mpc, so this I think, checking for mpc.h is required.

warnings in terminal [GLib-GObject-CRITICAL **:]

Expected behaviour

no warnings running in terminal

Actual behaviour

I see in terminal:

$ mate-calc

(process:20851): GLib-GObject-CRITICAL **: g_param_spec_boxed: assertion 'G_TYPE_IS_BOXED (boxed_type)' failed

(process:20851): GLib-GObject-CRITICAL **: validate_pspec_to_install: assertion 'G_IS_PARAM_SPEC (pspec)' failed

(process:20851): GLib-GObject-CRITICAL **: g_param_spec_boxed: assertion 'G_TYPE_IS_BOXED (boxed_type)' failed

(process:20851): GLib-GObject-CRITICAL **: validate_pspec_to_install: assertion 'G_IS_PARAM_SPEC (pspec)' failed

(process:20851): GLib-GObject-CRITICAL **: g_param_spec_boxed: assertion 'G_TYPE_IS_BOXED (boxed_type)' failed

(process:20851): GLib-GObject-CRITICAL **: validate_pspec_to_install: assertion 'G_IS_PARAM_SPEC (pspec)' failed

MATE general version

1.18.0

Package version

mate-calc 1.18.1 and git master

Linux Distribution

debian testing

warnings in terminal [GLib-GIO-WARNING ]

Expected behaviour

No warning messages.

Actual behaviour

Warning-message:

(mate-calc:3881): GLib-GIO-WARNING **: 22:58:34.261: g_settings_set_value: value for key 'accuracy' in schema 'org.mate.calc' is outside of valid range

Steps to reproduce the behaviour

I noticed the above message in mate-calc when run from command line and setting the decimal places greater than 9 in preferences dialog. Most certainly caused by #86.

MATE general version

mate-calc git master

Package version

locally compiled

Linux Distribution

UM 18.04

Link to downstream report of your Distribution

wrong result for (535^125x125^854) mod 1283

Expected behaviour

(535^125x125^854) mod 1283 = 756

Actual behaviour

(535^125x125^854) mod 1283 = 7.31869466x10^1830

Steps to reproduce the behaviour

Enter (535^125x125^854) mod 1283

To verify the correct result in python console enter:

>>> 535**125*125**854 % 1283
756

MATE general version

1.20

Package version

master

Linux Distribution

debian 10

Link to downstream report of your Distribution

none

History View

Expected behaviour

The History View should locate above the entry box and be designed to show previous calculations in the form of a scrollable list that can be clicked and scrolled through using a mouse or even navigated and selected using the arrow keys on a keyboard.
Once an entry has been selected, it will immediately show up in the entry box for to manipulate and use.
Finally, there is no upper limit on the number of calculations that can show up in the list for use.

Actual behaviour

We can only access history in the MATE Calculator using the kayboard shortcut Undo command (Ctrl+Z)

Steps to reproduce the behaviour

Open MATE Calculator and do some calculations.

Package version

mate-calc 1.20.3

Linux Distribution

Debian 10.1

Option to display exponents in results

Would be great to have an option to display exponents in results, especially for very large and very small numbers. Ideally there would also be an option to switch between scientific notation (arbitrary exponents) and engineering notation (exponent always a multiple of 3).
The display of exponents would solve issues like #25 and #26.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

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.