Skip to Content
author's profile photo Former Member
Former Member

Third root from a number

Hi ABAPers,

I need to calculate the third root in an ABAP-Programm.

(SAP Release 4.6C)

I know of the SQRT function, but that just returns the square root...

--> 1000 = 10 * 10 * 10

The Third root of 1000 is 10...

Does anybody have an idea?

Thanx in advance!

Greetz,

Pieter

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 03, 2007 at 03:23 PM

    You can try like this:

    data: num type i,

    <b>num1 type f</b>.

    10 ** 3 = 1000

    which implies :

    num1 = 1 / 3.

    1000 ** num1 = 10

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 03, 2007 at 03:08 PM

    hi

    good

    go through this code which ll give you idea about the square root,

    DATA : in TYPE f VALUE 16 ,

    out TYPE f .

    CALL METHOD cl_foev_builtins=>square_root

    EXPORTING

    im_number = in

    IMPORTING

    ex_result = out.

    WRITE out .

    you can try this same for third root.

    reward point if helpful.

    thanks

    mrutyun^

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.