Giter VIP home page Giter VIP logo

Comments (6)

sc0w avatar sc0w commented on August 21, 2024

confirmed in mate-calc 1.20.3

2019-04-24_18-00

from mate-calc.

willysr avatar willysr commented on August 21, 2024

Confirmed in 1.22.0 as well

from mate-calc.

sc0w avatar sc0w commented on August 21, 2024

It doesn't work in gnome-calculator 3.11.90

It works in gnome-calculator 3.12.0

from mate-calc.

sc0w avatar sc0w commented on August 21, 2024

seems it was fixed for gnome-calculator with one of these commits, (or both):

Fix precision loss of ln(e^1) (fixes bug 711766)
https://gitlab.gnome.org/GNOME/gnome-calculator/commit/e1ba299acfe4cf6631de4d457b9451471171ee39

Use double instead of float for better precision ln (fixes bug 702817).
https://gitlab.gnome.org/GNOME/gnome-calculator/commit/6eb0f2b5e6df456a97a796b35d811376a69679e0

from mate-calc.

sc0w avatar sc0w commented on August 21, 2024

It seems to be related the function mp_ln_real in /src/mp.c

from mate-calc.

rbuj avatar rbuj commented on August 21, 2024

Preferences -> Calculator -> Angle Units -> Radians

e^(i*π) = cos(π) + sin(π)i = -1 + 0i = -1 [WORKS]
ln(-1) = ln(-(-1)) + πi = ln(1) + πi = 0 + πi = πi [WORKS]

Fails on parse.

(gdb) backtrace                                                                                                                                          
#0  0x000000000041f0c4 in mp_set_from_float (rx=<optimized out>, z=z@entry=0x7fffcd7e8060) at mp-convert.c:54
#1  0x000000000041df60 in mp_ln_real (x=x@entry=0x7fffcd7f1d20, z=z@entry=0x7fffcd7f5bc0) at mp.c:1256
#2  0x000000000041e31e in mp_ln (x=x@entry=0x7fffd0013bf0, z=z@entry=0x7fffd0011c90) at mp.c:1297
#3  0x00000000004206d6 in get_function (state=0x7fffd000fcd0, name=0x7fffd00015c0 "ln", x=0x7fffd0013bf0, z=0x7fffd0011c90) at mp-equation.c:173
#4  0x0000000000427962 in pf_apply_func (self=0x7fffd0004e10) at parserfunc.c:306
#5  0x0000000000429b1b in p_parse (state=state@entry=0x7fffd000fcd0) at parser.c:276
#6  0x0000000000421139 in mp_equation_parse (expression=expression@entry=0xd9ccc0 "ln(e^(i×π))", options=options@entry=0x7fffcd7f7be0, result=result@entry=0x7fffcd7f7c30, error_token=error_token@entry=0x7fffcd7f7bd8) at mp-equation.c:266
#7  0x0000000000415ec1 in parse (error_token=0x7fffcd7f7bd8, z=0x7fffcd7f7c30, text=<optimized out>, equation=0x4faa90) at math-equation.c:1184
#8  0x0000000000415ec1 in math_equation_solve_real (data=<optimized out>) at math-equation.c:1219
#9  0x00007ffff716f752 in  () at /lib64/libglib-2.0.so.0
#10 0x00007ffff6f975a2 in start_thread () at /lib64/libpthread.so.0
#11 0x00007ffff6ec4023 in clone () at /lib64/libc.so.6

from mate-calc.

Related Issues (20)

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.