Skip to content

IEEE-754 recommended functions #6148

@simonbyrne

Description

@simonbyrne

As I was enjoying the entertaining read that is the IEEE-754 standard for floating point arithmetic, I noticed they recommend some functions (section 9.2), of which we currently lack:

  • exp2m1: 2^x-1
  • exp10m1: 10^x-1
  • log2p1: log2(1+x) (might want to call this log21p, to match log1p?)
  • log10p1: log10(1+x) (similarly, log101p?)
  • rsqrt: 1/sqrt(x)
  • compound: (1+x)^n (pow1p?)
  • rootn: x^(1/n)
  • various inverse trig-pi functions, e.g. atanpi: atan(x)/pi (somewhat confusingly, not all of these are mentioned in the table, although they are referred to in the text below).

There's also three different "pow" functions: pown for integer exponents, two for handling floating-point exponents pow and powr which seem to differ mostly in how signals are raised, so we could probably wait until #2976 is completed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureIndicates new feature / enhancement requestshelp wantedIndicates that a maintainer wants help on an issue or pull requestmathsMathematical functions

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions