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
 Problems with computer precision?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

biotecDD

Germany
Posts

Posted - 05/28/2004 :  10:23:48 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Dear sirs,

I need to fit my data with the following function:
(1-erf(sqrt(1+x)))*exp(1+x)/sqrt(1+x)
According to the analysis, this should be a continuous positive decreasing function of positive argument. However, for arguments x<~30, Origin computes reasonable values, whereas for x>30 the values computed are exactly 0.
Obviously, this is related to the limited precision of computer arithmetic.
In principle it is possible to approximate this funtion for x>~10 by an asymptotic series, which will not converge well for small x (say, for x~1).
Is it possible to combine in one fitting function the analytical expression for x<10 and series expansion for x>10?
Or could you please suggest another solution for this problem?

easwar

USA
1964 Posts

Posted - 05/28/2004 :  10:40:21 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:


Is it possible to combine in one fitting function the analytical expression for x<10 and series expansion for x>10?
Or could you please suggest another solution for this problem?



Hi,

You can certainly define the fitting function to be different above and below a certain x, such as:

if ( x < 10 ) y = <expression1>;
else y = <expression2>;


This appears to be the only way since erf() converges to 1 at low x.

Easwar
OriginLab




Edited by - easwar on 05/28/2004 10:41:41 AM
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