Solved

qube root

Posted on 2000-03-03
3
157 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
ID: 2582038
e-mail jlyle@greco.com
0
 
LVL 22

Accepted Solution

by:
nietod earned 50 total points
ID: 2582232
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
ID: 2582541
Would you need the function to return an exact value for cbrt(-1000)?
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

773 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