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

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

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. Michael B. Williams

    Math.pow Question

    Michael B. Williams, May 29, 2004, in forum: Java
    Replies:
    3
    Views:
    4,831
    Chris Smith
    May 29, 2004
  2. Michael B. Williams

    (re;) Math.pow Question

    Michael B. Williams, May 30, 2004, in forum: Java
    Replies:
    1
    Views:
    387
    Sudsy
    May 30, 2004
  3. Clueless Moron

    math.pow vs pow

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

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

    Michel Rouzic, Jun 15, 2005, in forum: C Programming
    Replies:
    52
    Views:
    1,699
    Alan Balmer
    Jun 20, 2005
  5. Saraswati lakki
    Replies:
    0
    Views:
    1,371
    Saraswati lakki
    Jan 6, 2012
Loading...

Share This Page