Skip to content

Proposal to standardize element-wise elementary mathematical functions #8

Closed
@kgryte

Description

@kgryte

Based on the analysis of array library APIs, we know that evaluating element-wise elementary mathematical functions is both universally implemented and commonly used. Accordingly, this issue proposes to standardize the following elementary mathematical functions:

Special Functions

  • abs (absolute)
  • exp
  • log
  • sqrt

Rounding

  • ceil
  • floor
  • trunc
  • round

Trigonometry

  • sin
  • cos
  • tan
  • asin (arcsin)
  • acos (arccos)
  • atan (arctan)
  • sinh
  • cosh
  • tanh
  • asinh (arcsinh)
  • acosh (arccosh)
  • atanh (arctanh)

Criterion

  1. Commonly implemented across array libraries.
  2. Commonly used by array library consumers.
  3. Operates on a single array (e.g., this criterion excludes atan2).

Questions

  1. Naming conventions? The above is biased toward C naming conventions (e.g., atan vs arctan).
  2. Are there any APIs listed above which should not be standardized?
  3. Are there elementary mathematical functions not listed above which should be standardized? Preferably, any additions should be supported by usage data.
  4. Should the standard mandate a minimum precision to ensure portability? (e.g., JavaScript's lack of minimum precision specification offers a cautionary tale)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions