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

Home » Public Forums » archive » 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
Divide By Zero error [message #27906] Tue, 06 November 2001 10:10 Go to previous message
Logan Lindquist is currently offline  Logan Lindquist
Messages: 50
Registered: October 2001
Member
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2600.0" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>I got another one for all you math
whiz's!</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Here is the error</FONT></DIV>
<DIV><FONT face=Arial size=2>*****</FONT></DIV><FONT size=1>
<DIV>IDL&gt; .STEP</DIV>
<DIV>% Program caused arithmetic error: Floating divide by 0</DIV>
<DIV>% Program caused arithmetic error: Floating illegal operand</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;Caused by second statement [log]</FONT></DIV>
<DIV><FONT face=Arial size=2>****</FONT></DIV>
<DIV><FONT face=Arial size=2>f = fft(tempfft, -1)</FONT></DIV>
<DIV><FONT face=Arial size=2>power = -alog10(double(f))</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>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.&nbsp;I don't understand exactly why it's givng me
invalid numbers and so this is why I shall include the output data:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>print, f</FONT></DIV>
<DIV><FONT face=Arial size=2>*****</FONT></DIV><FONT size=1>
<DIV>( 55.0313, 0.000000)( 0.378331, 1.10309)( -0.281250, 0.312500)( -0.284581,
0.134343)( -0.281250, 0.000000)( -0.284581, -0.134343)</DIV>
<DIV>( -0.281250, -0.312500)( 0.378331, -1.10309)</DIV>
<DIV>( 0.467505, 0.265950)( 0.117743, -0.359700)( 0.0514515, -0.0800206)(
0.0514515, -0.0175206)( 0.0643956, -0.00457645)( 0.0735485, 0.00457646)</DIV>
<DIV>( 0.0643956, 0.0396177)( 0.139840, 0.0266735)</DIV>
<DIV>( -0.234375, 0.265625)( 0.0312500, -0.0845971)( -0.0156250, -0.0156250)(
-0.0129442, -0.0533471)( 0.0156250, -0.0468750)( 0.0312500, -0.0404029)</DIV>
<DIV>( -0.0156250, -0.0156250)( 0.0754442, -0.00915291)</DIV>
<DIV>( -0.217505, 0.109700)( 0.0735485, -0.0487706)( -0.00189563, 0.0708677)(
0.00725728, -0.0159502)( -0.00189563, 0.0266735)( -0.0148398, -0.00457646)</DIV>
<DIV>( 0.0735485, 0.0137294)( 0.0514515, -0.0266735)</DIV>
<DIV>( -0.187500, 0.000000)( 0.0377221, -0.0156250)( 0.000000, 0.000000)(
-0.00647209, 0.0156250)( 0.000000, 0.000000)( -0.00647209, -0.0156250)</DIV>
<DIV>( 0.000000, 0.000000)( 0.0377221, 0.0156250)</DIV>
<DIV>( -0.217505, -0.109700)( 0.0514515, 0.0266735)( 0.0735485, -0.0137294)(
-0.0148398, 0.00457646)( -0.00189563, -0.0266735)( 0.00725728, 0.0159502)</DIV>
<DIV>( -0.00189563, -0.0708677)( 0.0735485, 0.0487706)</DIV>
<DIV>( -0.234375, -0.265625)( 0.0754442, 0.00915291)( -0.0156250, 0.0156250)(
0.0312500, 0.0404029)( 0.0156250, 0.0468750)( -0.0129442, 0.0533471)</DIV>
<DIV>( -0.0156250, 0.0156250)( 0.0312500, 0.0845971)</DIV>
<DIV>( 0.467505, -0.265950)( 0.139840, -0.0266735)( 0.0643956, -0.0396177)(
0.0735485, -0.00457646)( 0.0643956, 0.00457645)( 0.0514515, 0.0175206)</DIV>
<DIV>( 0.0514515, 0.0800206)( 0.117743, 0.359700)</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>print, power</FONT></DIV>
<DIV><FONT face=Arial size=2>*****</FONT></DIV><FONT size=1>
<DIV>IDL&gt; print, power</DIV>
<DIV>-1.7406094 0.42212772 NaN NaN NaN NaN NaN 0.42212772</DIV>
<DIV>0.33021387 0.92906595 1.2886023 1.2886023 1.1911436 1.1334259 1.1911436
0.85436921</DIV>
<DIV>NaN 1.5051500 NaN NaN 1.8061800 1.5051500 NaN 1.1223743</DIV>
<DIV>NaN 1.1334259 NaN 2.1392261 NaN NaN 1.1334259 1.2886024</DIV>
<DIV>NaN 1.4234043 Infinity NaN Infinity NaN Infinity 1.4234043</DIV>
<DIV>NaN 1.2886024 1.1334259 NaN NaN 2.1392261 NaN 1.1334259</DIV>
<DIV>NaN 1.1223743 NaN 1.5051500 1.8061800 NaN NaN 1.5051500</DIV>
<DIV>0.33021387 0.85436921 1.1911436 1.1334259 1.1911436 1.2886023 1.2886023
0.92906595</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>What is this NaN business and why am I getting
Infinity? Arg :)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Thanks to the math geeks,</FONT></DIV>
<DIV><FONT face=Arial
size=2>Logan</FONT></DIV></FONT></FONT></FONT></BODY> </HTML>
[Message index]
 
Read Message
Read Message
Previous Topic: Re: HASP/ flexLM licensing conflict
Next Topic: Q: Status of Future IDL Supported Platforms

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

Current Time: Fri Oct 10 07:25:48 PDT 2025

Total time taken to generate the page: 0.87961 seconds