what's the point of pow()?

Discussion in 'Python' started by richyjsm@gmail.com, Aug 9, 2007.

  1. Guest

    it's a serious question: why does the builtin pow function exist?

    for two argument pow we've got **. there's no add() for + or mul()
    for *....

    and three argument pow-with-modulo seems like specilaist usage that
    belongs in the standard lib, not in the core. I know about crypto and
    number theory uses. are there others?

    it's obviously useful for something or else it would be slated for
    removal in python 3000, surely?

    Richard
     
    , Aug 9, 2007
    #1
    1. Advertisements

  2. Paul Rubin Guest

    writes:
    > it's a serious question: why does the builtin pow function exist?
    > for two argument pow we've got **. there's no add() for + or mul()
    > for *....


    They are in the operator module and maybe pow could go there too.

    Actually there's a math.pow function that works differently from
    the builtin function. Some cleanup might be in order.
     
    Paul Rubin, Aug 9, 2007
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gopi

    point to point protocol

    Gopi, Jul 13, 2004, in forum: VHDL
    Replies:
    1
    Views:
    626
    Mike Treseler
    Jul 13, 2004
  2. H aka N
    Replies:
    15
    Views:
    16,684
    Ben Jones
    Mar 2, 2006
  3. Motaz Saad
    Replies:
    7
    Views:
    6,812
  4. USCode
    Replies:
    7
    Views:
    619
    jeffc
    Jul 9, 2004
  5. Clueless Moron

    math.pow vs pow

    Clueless Moron, Nov 27, 2003, in forum: Python
    Replies:
    5
    Views:
    1,182
    John J. Lee
    Nov 28, 2003
  6. Michel Rouzic

    pow(2, 1/2) != pow(2, 0.5) problem

    Michel Rouzic, Jun 15, 2005, in forum: C Programming
    Replies:
    52
    Views:
    2,167
    Alan Balmer
    Jun 20, 2005
  7. Replies:
    4
    Views:
    1,495
    Default User
    Feb 22, 2006
  8. Saraswati lakki
    Replies:
    0
    Views:
    1,667
    Saraswati lakki
    Jan 6, 2012
Loading...