mathametical expression in obj c
please see the formula below

its the solution to a circle chord problem where A is the arc length and C is the chord length.
i want to find the Radius r

the formula below uses factorials and powers etc which i don't know how to express in obj C

can somebody help by converting the formula into objective C language

many thanks



    a = A² – C²
    b = -2A^4/4!
    c = 2A^6/6!
    d = -2A^8/8!

    //Let:
    f=c/a-b²/(3a²)

    g=d/a+2b³/(27a³)-bc/(3a²)

    x=cuberoot(-g/2 + sqrt(g²/4+f³/27)) – cuberoot(g/2 + sqrt(g²/4+f³/27))-b/(3a)

    r = sqrt(x)
mathametical expression in obj c
===

please see the formula below

its the solution to a circle chord problem where A is the arc length and C is the chord length.
i want to find the Radius r

the formula below uses factorials and powers etc which i don't know how to express in obj C

can somebody help by converting the formula into objective C language

many thanks



    a = A² – C²
    b = -2A^4/4!
    c = 2A^6/6!
    d = -2A^8/8!

    //Let:
    f=c/a-b²/(3a²)

    g=d/a+2b³/(27a³)-bc/(3a²)

    x=cuberoot(-g/2 + sqrt(g²/4+f³/27)) – cuberoot(g/2 + sqrt(g²/4+f³/27))-b/(3a)

    r = sqrt(x)