Re: Re: 0**0

by scain (Curate)
 on Jan 16, 2003 at 16:16 UTC Need Help??

I disagree. Yes, there are situations where 0^0 should be undefined, but there are also several cases where it should be 1. Given that, I don't want my numerical methods package to be crashing all the time because Perl thinks it should be undef.

The fact is, the coder should know which case he is interested in (1 or undef as the answer); I think it is better from a coding perspective to check for the undef case, and just allow the 0^0 == 1 case without special checking.

Now, who the heck is writing numerical methods packages in Perl--FORTRAN is the way to go :-)

Scott
Project coordinator of the Generic Model Organism Database Project

Replies are listed 'Best First'.
Re^3: 0**0
by JaWi (Hermit) on Jan 16, 2003 at 16:27 UTC
Ok, I see your point. However, if you would define 0**0 as being 1, you're making an exception "just because it is so darn handy while programming". In that case, you would need to handle other exceptions like, for example, sqrt(-1) as well, since this would be handy as well...

-- JaWi

"A chicken is an egg's way of producing more eggs."

No, not because it is 'so darn handy', because sometimes it is right. See the link I posted under my first response; I trust mine more than yours since it is derived from sci.math FAQs.

Scott
Project coordinator of the Generic Model Organism Database Project

Ok, having read to quickly through your posted link, I discovered the statement made in the last sentence: <quote>... Consensus has recently been built around setting the value of 0^0 = 1...</quote>.

So, this statement would annihilate my earlier arguments... I'm convinced: 0**0 = 1.

-- JaWi

"A chicken is an egg's way of producing more eggs."

Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://227405]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?