Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Integration qpint
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Gompie  
View profile  
 More options Aug 12 2012, 1:42 pm
Newsgroups: comp.lang.idl-pvwave
From: Gompie <gompiemat...@gmail.com>
Date: Sun, 12 Aug 2012 10:42:57 -0700 (PDT)
Local: Sun, Aug 12 2012 1:42 pm
Subject: Integration qpint
Hi
Can anyone help. I am using qpint1d to integrate but i get
"Program caused arithmetic error: Floating overflow:"

The code is
C1 = 1.1910427E-12
c2=1.43883
T=300
c=c1*(c2^(-4))*T^4
llimit=c2*2380/T
ulimit=c2*2940/T
print,"X=",llimit,ulimit
lin= c*qpint1d('x^3/(EXP(X)-1)', llimit, +inf, /expr)
rin=c*qpint1d('x^3/(EXP(X)-1)', ulimit, +inf, /expr)
print,abs(lin-rin)
end

This outputs a number ( i am not sure if it is correct) but it also says floating point error.
Thanks in advance
Gompie


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Craig Markwardt  
View profile  
 More options Aug 13 2012, 5:00 am
Newsgroups: comp.lang.idl-pvwave
From: Craig Markwardt <craig.markwa...@gmail.com>
Date: Mon, 13 Aug 2012 02:00:07 -0700 (PDT)
Local: Mon, Aug 13 2012 5:00 am
Subject: Re: Integration qpint

Check the status variable.  It's not an error.  You can verify this yourself by

IDL reports *any* overflow or underflow that occurs.  That's not necessarily bad.

What do you think happens when you try to evaluate EXP(+inf)?  Or EXP(+3000)?  Your user function generates an overflow, that's what happens.  IDL is warning you that it is treating EXP(+3000) equivalent to +infinity.  That is what happens when IDL cannot evaluate the full range of your user function with full precision.  EXP(+3000) simply cannot be represented on a modern computer.  

If you don't want overflow errors, then rewrite your expression to use EXP(-X) instead.  Of course, then you will get underflow errors.  Life sucks, doesn't it?  :-)

If you really don't want overflow errors for this function, then you must avoid using +inf as your upper bound.

Craig Markwardt


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Helder  
View profile  
 More options Aug 13 2012, 5:01 am
Newsgroups: comp.lang.idl-pvwave
From: Helder <hel...@marchetto.de>
Date: Mon, 13 Aug 2012 02:01:51 -0700 (PDT)
Local: Mon, Aug 13 2012 5:01 am
Subject: Re: Integration qpint

Hi Gompie,
I didn't go through the whole of your code, but you define T as an integer.
Try rerunning your code substituting this to the line where you define T:

T=300.0

Doing this, the value of c changes from 3.48598e-009 (T is integer) to 0.00225099 (T is floating point).

Maybe also change the definitions of llimit and ulimit to:
llimit=c2*2380.0/T
ulimit=c2*2940.0/T

This might help. But I have not tried the integration.

Cheers,
h


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gompie  
View profile  
 More options Aug 13 2012, 8:30 am
Newsgroups: comp.lang.idl-pvwave
From: Gompie <gompiemat...@gmail.com>
Date: Mon, 13 Aug 2012 05:30:20 -0700 (PDT)
Local: Mon, Aug 13 2012 8:30 am
Subject: Re: Integration qpint
Hi Craig , Helder
Thanks a lot for helping me out with this incredibly useful function.
Gompie

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »