Bug 328192 - Configure default base of "log" (vs. "lg" / "ln")
Summary: Configure default base of "log" (vs. "lg" / "ln")
Status: RESOLVED NOT A BUG
Alias: None
Product: kmplot
Classification: Applications
Component: general (show other bugs)
Version: 1.2.1
Platform: Ubuntu Linux
: NOR wishlist
Target Milestone: ---
Assignee: Klaus-Dieter M
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-29 00:42 UTC by Dave B
Modified: 2024-06-22 01:52 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dave B 2013-11-29 00:42:28 UTC
I was working my way though a calculus book and found a discrepancy between my answer and the graph in KM Plot. Generally KM Plot seems to work except in the case when functions are of the form...
log(x + y) + log (x - z) ; such that x,y,z are real numbers; 

Note that I did not check the cases where y,z were negatives.

The concrete example that I encountered was when graphing log(x)+log(x−1).
The problem was log(x)+log(x−1) = 1.

I have also produced similarly incorrect results when trying other functions of that form.

Check it out on Wolfram...
http://www.wolframalpha.com/input/?i=ln%28x%29%2Bln%28x-1%29%3D1&lk=4&num=1

Also, try and do the math... it doesn't add up. :(

The y=1 intercept should be around 2.2229 but KMPlot puts it around 3.7.

Pretty serious bug.

I hope this issue gets fixed because this is the first I have encounter so far and I have used KMPlot off and on over two years. 

My first Bug! Nice program by the way. 

Reproducible: Always

Steps to Reproduce:
1. f(x) = log(x)+log(x−1) 
2. Look to the location where the function equals 1
3. Do the math, and check an alternate graphing program
Actual Results:  
The things I described in the bug report...

Expected Results:  
Drawn the correct graph
Comment 1 Christoph Feck 2013-11-29 01:17:36 UTC
Use "ln" for natural logarithm (base e), and "log" for Briggs' logarithm (base 10). This is the same convention used on standard school calculators, e.g. Casio FX, and also on KCalc.
Comment 2 Christoph Feck 2013-11-29 01:35:14 UTC
This is also mentioned in the documentation, and KAlgebra uses the same convention.

Wikipedia suggests to avoid using the "log" name, because of its ambiguity, and use "ln" and "lg" for base "e" and "10" respectively. We cannot ban the name "log", because existing .fkt files would fail to load. What we can do, however, is optionally support the "lg" name, and/or make "log" default base configurable.

In either case, this would be a feature request.
Comment 3 Dave B 2013-11-29 11:16:57 UTC
Thank your for your prompt response... I will look into this in the morning.  I use about 5-7 different programs depending on the OS I am using... KMPlot is one of my favorites.  It was later in the night when I noticed... early in the morn when I responded.

Really weird...  it was likely my notation. I have will double check my notation. Sorry for bothering you.  

The strange thing is that I entered the formulas multiple times but when I entered "ln" nothing would appear at all in the graph so I assumed the program required a log expression to indicate a log with base e.  Perhaps I got confused between programs. I thought that I read that that was the correct syntax. 

I am so sorry for the distraction. 

*sheeish*... but happy that KMPlot is ok. 

I agree with your comments regarding notation between natural logs and standard logs. It is a pretty frustrating thing.... 

Like for example, the other day I worked out a question and double checked it in Scheme... the natural number e is (exp 1).  I had too look around for an inordinate amount of time to find the syntax to express my calculation. The documentation is not very well organized.

I think with mathematical software the greatest advantage would be documentation that was sort of intelligent regarding user's inquires. It would save a lot of developer time in the long run. I

I think these things are often overlooked by the initiated. The learning process of the expected usered is just as important as the developer's process.  We need a holistic process. Much Respect though.

Anyways, thanks for your input. 

> From: christoph@maxiom.de
> To: thecooperativeproject@live.ca
> Subject: [kmplot] [Bug 328192] Configure default base of "log" (vs. "lg" / "ln")
> Date: Fri, 29 Nov 2013 01:35:14 +0000
> 
> https://bugs.kde.org/show_bug.cgi?id=328192
> 
> Christoph Feck <christoph@maxiom.de> changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>             Summary|Incorrect Graph Results for |Configure default base of
>                    |Functions Involving Natural |"log" (vs. "lg" / "ln")
>                    |Logs Containing Variables   |
>            Severity|major                       |wishlist
> 
> --- Comment #2 from Christoph Feck <christoph@maxiom.de> ---
> This is also mentioned in the documentation, and KAlgebra uses the same
> convention.
> 
> Wikipedia suggests to avoid using the "log" name, because of its ambiguity, and
> use "ln" and "lg" for base "e" and "10" respectively. We cannot ban the name
> "log", because existing .fkt files would fail to load. What we can do, however,
> is optionally support the "lg" name, and/or make "log" default base
> configurable.
> 
> In either case, this would be a feature request.
> 
> -- 
> You are receiving this mail because:
> You reported the bug.