The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Bug: Log() isn't always log10(), it's also ln()
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

SteffenG

Germany
Posts

Posted - 06/28/2005 :  06:23:59 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (7.5G SR5):
Operating System: Win XP pro

Hi,

in my current work I want to fit some data with a simple expression.
The expression is y=A+B*log(x) - really simple, I know.
If i use the NLSF-tool I can specify new fitting function and I can also check a little box to use Origin-C to compile the function for speed improvements. But with checking the box the fitting results were changed. The parameter A was equal to the unchecked version of results but the parameter B changed from unchecked to checked version of results with a factor of 2.30. So there seems to be a difference between the two results of parameter B of ln(10).
For my understanding the log-function without checking is the logarithm to base 10 but if I check the Origin-C option the log-function is the logarithm to base e (in other words it is ln).

My suggestion is that a warning should come up if a function with log in it is compiled in Origin-C to inform the user about the change of the mathematical meaning. Or the Origin-C-Code should be able to handle the log as log10 and not ln.

Kind regards,
Steffen

Mike

USA
357 Posts

Posted - 06/28/2005 :  09:50:05 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Steffen,

You are correct, and -- YES, ABSOLUTELY -- we should warn NLSF users of this. Documentation of this can be found in the Origin C Language Reference section of the Programming Help file (Help:Programming) under the the topic Function: ln, but the average NLSF user wouldn't think to look here.

Thank your for pointing this problem out to us. We will enter an item in our bug-tracking database, straight away. Sorry for the confusion.

P.S. I should say that in OC, logarithm of base 10 is log10( )
P.P.S. I entered a note under database item = QA 7085 and referenced your forum post.

Mike
OriginLab

Edited by - Mike on 06/28/2005 09:54:35 AM

Edited by - Mike on 06/28/2005 10:55:00 AM
Go to Top of Page

SteffenG

Germany
Posts

Posted - 06/29/2005 :  05:12:57 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Mike,

thanks for your reply. If this issue will be fixed everything will be fine.

BTW: I am highly pleased to work with Origin. It is a very good program and if you do a Mac OS X version my satisfaction will be much higher ;-) I know up to now OriginLab said NO to a Mac OS X version but with the next generation of Intel-based Macs I hope OriginLab will change their opinion.

Best regards,
Steffen
Go to Top of Page

greg

USA
1379 Posts

Posted - 06/29/2005 :  10:17:54 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Please understand that this is NOT a bug and nothing will be fixed. This is standard ANSI C and users who are transitioning from LabTalk to OriginC need to be aware of the differences.

Mike's point was that we should try to warn users at appropriate times, which we already try to do with comments in the NLSF fitter (which you will not see unless you scroll up in Code Builder view).


Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000