Solved

qube root

Posted on 2000-03-03
3
152 Views
Last Modified: 2010-04-10
In C++ how do you use or create the function quberoot?
0
Comment
Question by:jlyle
3 Comments
 

Author Comment

by:jlyle
Comment Utility
e-mail jlyle@greco.com
0
 
LVL 22

Accepted Solution

by:
nietod earned 50 total points
Comment Utility
You can use the pow() function defined in math.h.  pow(x,y )This computes the value of x to the power of y (x^y).

The cube root of something is simply that thing to the power of 1/3 so you just need to use pow(x,1.0/3.0)

Let me know if you have any questions.
0
 
LVL 84

Expert Comment

by:ozo
Comment Utility
Would you need the function to return an exact value for cbrt(-1000)?
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now