0

Hello

I have a number from maximum 255 digits. I must compute the cube root of this number with 10 decimals.
Time of execution is 1 second

Could you help me ?

10x

5
Contributors
7
Replies
10
Views
12 Years
Discussion Span
Last Post by vegaseat
0

Have you written any code yourself to acheive this aim?

Usually, we like to see if we can't help you troubleshoot your logic, or your syntax, rather than give you a shove in the particular direction.

0

Have you written any code yourself to acheive this aim?

Usually, we like to see if we can't help you troubleshoot your logic, or your syntax, rather than give you a shove in the particular direction.

I have'n write any code. I have no ideea how to write it. Sorry :cry:

0

Man, this gets my rusty brain working.

exp(1/3*(ln(x))) gives you the cuberoot of x

ln(x) can be found to the nth degree of accuracy via binary expansion and exp() via continued fraction expansion. This is a hint, go at it tiger!

0

Man, this gets my rusty brain working.

exp(1/3*(ln(x))) gives you the cuberoot of x

ln(x) can be found to the nth degree of accuracy via binary expansion and exp() via continued fraction expansion. This is a hint, go at it tiger!

ln(x) doesn't work in BC 3.1 and what type shold have x because my number can have 255 digits.

Thanks

0

>ln(x) doesn't work in BC 3.1
Neither does 1/3. Maybe, just maybe vegaseat was using mathematical notation rather than valid C++ code. :rolleyes: Get a reference and figure out what the equivalent functions are. It's really not that difficult.

0

Sorry, exp(1/3*(ln(x))) is math notation in textform.

Many compilers have log(x) for the natural logarithm and log10(x) for base 10 logarithms. How to do "one third" I leave to your genius!

A hint: long double is commonly 80 bits

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.