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 #27932 is a reply to message #27878] Tue, 13 November 2001 17:57 Go 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">
Yes, it was a rhetorical question. The reason why you can't take the log
of zero is simple. Best described&nbsp; by an example.
<br>given,
<br>y = 10 ^ x
<p>than,
<br>log_base_10 both sides gives
<p>log(y) = x
<p>if x = 0, than, in the first equation y = 1,
<p>if y = 0,&nbsp; x is not defined.&nbsp; (i.e. there is no power of 10
that can give you y = 0)
<p>Therefore, log (0) does not exist.&nbsp;&nbsp;
<p>As for what you do with zeros, I usually set a limit on my arrays.
<p>If array[i] less than limit,
<br>than array[i] equal limit.
<p>Usually I set limit equal to 10^(-6). But it depends on your array values.
Best thing to do is normalize array before setting limit, than scale back
to orginal values.
<p>You can use the "where" function for quick search of array.
<p>Cheers
<br>Paul M.
<p>Logan Lindquist wrote:
<blockquote TYPE=CITE><style></style>
<font face="Arial"><font size=-1>Paul,</font></font>&nbsp;<font face="Arial"><font size=-1>As
far as I know :) The log[base 10] of zero and the log[base 0] do not exist.
I am not qualified to give you an mathmatical rule or proof that proves
the reason behind this. I think of it as another of those rules in mathmatics
that are just because. I do think that it has something to do with how
logs [plural of the mathmatical term and not the wooden kind] describe
the curve of lines occuring in a coordinate system. Thus a zero would indicate
that no line exists.</font></font>&nbsp;<font face="Arial"><font size=-1>If
you question was meant to make me aware of the reason behind my error in
IDL, I thank you. I figured this out last week and now I am working on
a solution to solve it. Any suggestions to what I should do with the zero's
in my array would be helpful!</font></font>&nbsp;<font face="Arial"><font size=-1>Regards,</font></font>&nbsp;<font face="Arial"><font size=-1>Logan</font></font>&nbsp;
<blockquote
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">"Paul
Manusiu" &lt;<a href="mailto:phpvm@alinga.newcastle.edu.au">phpvm@alinga.newcastle.edu.au</a>>
wrote in message <a href="news:3BEB6874.8305BCD@alinga.newcastle.edu.au">news:3BEB6874.8305BCD@alinga.newcastle.edu.au</a>...What
is the log of zero ??</blockquote>
</blockquote>

<p>--
<br> ------------------------------------------------------------ --
<br>Tapu'osi Paul Manusiu Loto'aniu&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& amp;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Tel: +61 0249 215566
<br>CRC for Satellite Systems&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&am p;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&am p;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Fax: +61 0249 216907
<br>Space Physics Group
<br>School of Mathematical and Physical Sciences
<br>University Of Newcastle, Australia
<br> ------------------------------------------------------------ --
<br>"The greatness of a nation and its moral progress can be judged
<br>by the way its animals are treated".
<br>- GANDHI
<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: Tue Oct 14 05:34:44 PDT 2025

Total time taken to generate the page: 0.72081 seconds