comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Divide By Zero error
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Divide By Zero error [message #27904 is a reply to message #27901] Thu, 08 November 2001 21:24 Go to previous messageGo to previous message
Paul Manusiu is currently offline  Paul Manusiu
Messages: 8
Registered: October 2001
Junior Member
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<body bgcolor="#FFFFFF">
What is the log of zero ??
<p>Logan Lindquist wrote:
<blockquote TYPE=CITE><style></style>
<font face="Arial"><font size=-1>I
got another one for all you math whiz's!</font></font>&nbsp;<font face="Arial"><font size=-1>Here
is the error</font></font><font face="Arial"><font size=-1>*****</font></font><font size=-2>IDL>
.STEP</font><font size=-2>% Program caused arithmetic error: Floating divide
by 0</font><font size=-2>% Program caused arithmetic error: Floating illegal
operand</font>&nbsp;<font face="Arial"><font size=-1>&nbsp;Caused by second
statement [log]</font></font><font face="Arial"><font size=-1>****</font></font><font face="Arial"><font size=-1>f
= fft(tempfft, -1)</font></font><font face="Arial"><font size=-1>power
= -alog10(double(f))</font></font>&nbsp;&nbsp;<font face="Arial"><font size=-1>I
tried a bunch of different things trying to isolate the error and get it
to stop. That is why the code looks that way and not all nice and compact.
I don't understand exactly why it's givng me invalid numbers and so this
is why I shall include the output data:</font></font>&nbsp;<font face="Arial"><font size=-1>print,
f</font></font><font face="Arial"><font size=-1>*****</font></font><font size=-2>(
55.0313, 0.000000)( 0.378331, 1.10309)( -0.281250, 0.312500)( -0.284581,
0.134343)( -0.281250, 0.000000)( -0.284581, -0.134343)</font><font size=-2>(
-0.281250, -0.312500)( 0.378331, -1.10309)</font><font size=-2>( 0.467505,
0.265950)( 0.117743, -0.359700)( 0.0514515, -0.0800206)( 0.0514515, -0.0175206)(
0.0643956, -0.00457645)( 0.0735485, 0.00457646)</font><font size=-2>( 0.0643956,
0.0396177)( 0.139840, 0.0266735)</font><font size=-2>( -0.234375, 0.265625)(
0.0312500, -0.0845971)( -0.0156250, -0.0156250)( -0.0129442, -0.0533471)(
0.0156250, -0.0468750)( 0.0312500, -0.0404029)</font><font size=-2>( -0.0156250,
-0.0156250)( 0.0754442, -0.00915291)</font><font size=-2>( -0.217505, 0.109700)(
0.0735485, -0.0487706)( -0.00189563, 0.0708677)( 0.00725728, -0.0159502)(
-0.00189563, 0.0266735)( -0.0148398, -0.00457646)</font><font size=-2>(
0.0735485, 0.0137294)( 0.0514515, -0.0266735)</font><font size=-2>( -0.187500,
0.000000)( 0.0377221, -0.0156250)( 0.000000, 0.000000)( -0.00647209, 0.0156250)(
0.000000, 0.000000)( -0.00647209, -0.0156250)</font><font size=-2>( 0.000000,
0.000000)( 0.0377221, 0.0156250)</font><font size=-2>( -0.217505, -0.109700)(
0.0514515, 0.0266735)( 0.0735485, -0.0137294)( -0.0148398, 0.00457646)(
-0.00189563, -0.0266735)( 0.00725728, 0.0159502)</font><font size=-2>(
-0.00189563, -0.0708677)( 0.0735485, 0.0487706)</font><font size=-2>( -0.234375,
-0.265625)( 0.0754442, 0.00915291)( -0.0156250, 0.0156250)( 0.0312500,
0.0404029)( 0.0156250, 0.0468750)( -0.0129442, 0.0533471)</font><font size=-2>(
-0.0156250, 0.0156250)( 0.0312500, 0.0845971)</font><font size=-2>( 0.467505,
-0.265950)( 0.139840, -0.0266735)( 0.0643956, -0.0396177)( 0.0735485, -0.00457646)(
0.0643956, 0.00457645)( 0.0514515, 0.0175206)</font><font size=-2>( 0.0514515,
0.0800206)( 0.117743, 0.359700)</font>&nbsp;<font face="Arial"><font size=-1>print,
power</font></font><font face="Arial"><font size=-1>*****</font></font><font size=-2>IDL>
print, power</font><font size=-2>-1.7406094 0.42212772 NaN NaN NaN NaN
NaN 0.42212772</font><font size=-2>0.33021387 0.92906595 1.2886023 1.2886023
1.1911436 1.1334259 1.1911436 0.85436921</font><font size=-2>NaN 1.5051500
NaN NaN 1.8061800 1.5051500 NaN 1.1223743</font><font size=-2>NaN 1.1334259
NaN 2.1392261 NaN NaN 1.1334259 1.2886024</font><font size=-2>NaN 1.4234043
Infinity NaN Infinity NaN Infinity 1.4234043</font><font size=-2>NaN 1.2886024
1.1334259 NaN NaN 2.1392261 NaN 1.1334259</font><font size=-2>NaN 1.1223743
NaN 1.5051500 1.8061800 NaN NaN 1.5051500</font><font size=-2>0.33021387
0.85436921 1.1911436 1.1334259 1.1911436 1.2886023 1.2886023 0.92906595</font>&nbsp;&nbsp;<font face="Arial"><font size=-1>What
is this NaN business and why am I getting Infinity? Arg :)</font></font>&nbsp;<font face="Arial"><font size=-1>Thanks
to the math geeks,</font></font><font face="Arial"><font size=-1>Logan</font></font></blockquote>

<br>&nbsp;
<br>&nbsp;
</body>
</html>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: dumb question--floating
Next Topic: Re: dumb question--floating

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 20:15:08 PDT 2025

Total time taken to generate the page: 0.00306 seconds