Thread: help calcualting a floar power

  1. #1
    Registered User
    Join Date
    Feb 2008
    Posts
    2

    help calcualting a floar power

    Hi

    I am trying to calculate a power using an integer as a base and a float point number as exponent in C.

    pow in math.h does not work with floating point numbers.


    Does any one know any fast way to do this....

    thanks

  2. #2
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    pow() ONLY works with doubles, so what's the problem?
    http://www.cppreference.com/stdmath/pow.html

  3. #3
    Registered User
    Join Date
    Feb 2008
    Posts
    2
    nevermind....it works now

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem With My Box
    By HaVoX in forum Tech Board
    Replies: 9
    Last Post: 10-15-2005, 07:38 AM
  2. No Power, but power being supplied.
    By jrahhali in forum Tech Board
    Replies: 6
    Last Post: 08-11-2005, 02:50 AM
  3. The destructive power of a nuclear bomb
    By InvariantLoop in forum A Brief History of Cprogramming.com
    Replies: 30
    Last Post: 03-24-2005, 02:46 AM
  4. Power supplies and demanding processors
    By Liger86 in forum Tech Board
    Replies: 12
    Last Post: 03-17-2005, 11:56 AM