Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Re: 0**0

by scain (Curate)
on Jan 16, 2003 at 16:16 UTC ( [id://227405]=note: print w/replies, xml ) Need Help??


in reply to Re: 0**0
in thread 0**0

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."

Log In?
Username:
Password:

What's my password?
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?
Others chanting in the Monastery: (6)
As of 2024-03-28 20:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found