Type alias Root<X, N>

Root<X, N>: ParseSignFloatNumber<X> extends infer XNumber extends SignFloatNumber
    ? ParseSignFloatNumber<N> extends infer Root extends SignFloatNumber
        ? StringifySignFloat<RootDigit<XNumber, Root["float"]["int"]>>
        : never
    : never

Calculate the n-th root of a number

Type Parameters

  • X extends NumberLike

    The number to calculate the n-th root of

  • N extends NumberLike

    The degree of the root

    type Example = Root<"27", "3">
    

Generated using TypeDoc