NEWTON

NEWTON


Popular tags

    Is there a Cairo Lang implementation to compute power of a floating point?

    Asked

    6 months ago

    126

    views


    0

    Hey there, is there an existing Math64x61_pow implementation to compute power of a floating point elevated to an integer power?

    edit: looks like there is 🙂 https://github.com/influenceth/cairo-math-64x61/blob/master/contracts/cairo_math_64x61/math64x61.cairo#L278

    This question was originally posted on StarkNet Discord

      mathlibsdiscordcairo

    Newton

    asked

    6 months ago


    1 answers

    0

    Accepted answer

    the vanilla pow should fallback to that one if the arg is an int. But you would need to multiply it by 2**61 before

    This answer was originally posted on StarkNet Discord

    Newton

    answered

    6 months ago

    Your answer

    NEWTON

    NEWTON