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
Re: Divide By Zero error [message #27955 is a reply to message #27906] Mon, 12 November 2001 15:03 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
Stein Vidar Hagfors Haugan <shaugan@esa.nascom.nasa.gov> writes:

> Nigel Wade <nmw@ion.le.ac.uk> writes:
>
>> Paul Manusiu wrote:
>>
>>> What is the log of zero ??
>>>
>>> Logan Lindquist wrote:
>>>
>>> What is this NaN
>>>> business and why am I getting Infinity?
>>
>> Also, what is the log of a negative number?
>>
>> --
>> -----------------------------------------------------------
>> Nigel Wade, System Administrator, Space Plasma Physics Group
>
> Hey, someone else in the Space Plasma Physics dept might tell you
> that alog(-1) should return complex(0,+/-!PI) !
>
> e^(-i pi) + 1 = 0

Which agrees with the result of IDL, allowing for round-off errors:

IDL> print, exp(-dcomplex(0,!dpi)) + 1d
( 0.0000000, -1.2246064e-16)

Craig


--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
[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: Sun Oct 12 06:02:15 PDT 2025

Total time taken to generate the page: 2.55732 seconds