Thread: pow and powl etc

  1. #1
    Registered User
    Join Date
    Sep 2011
    Posts
    39

    pow and powl etc

    Is using the long double version of mathematical functions slower than using just the normal (double) versions? Just curious.

  2. #2
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Probably not.... It will likely depend on the compiler and the quality of your code more than on the type of variable.

  3. #3
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Powwow! You could always compare them for your standard library implementation by writing programs.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. usage of powl() function
    By tom1992 in forum C Programming
    Replies: 6
    Last Post: 09-30-2010, 06:05 AM