Skip to content

RFC: add cbrt #590

@steff456

Description

@steff456

This RFC requests to include a new API in the array API specification for the purpose of computing the cube root.

Overview

Based on array comparison data, the API is available in the majority of libraries in the PyData ecosystem.

The Array API Specification currently includes pow and sqrt, but does not include the IEEE 754 function cbrt.

While the cube root could be implemented in terms of pow, this is not desirable as the rational 1/3 is not typically equal to 1.0/3.0 due to limited floating-point precision. Cube root implementations are generally more accurate than the equivalent operation via pow.

Prior art

Proposal:

def cbrt(x: array, /) -> array

cc @kgryte

Metadata

Metadata

Assignees

No one assigned

    Labels

    API extensionAdds new functions or objects to the API.Needs DiscussionNeeds further discussion.RFCRequest for comments. Feature requests and proposed changes.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy