JuliaLang/julia

IEEE-754 recommended functions

Open

#6 148 ouverte le 13 mars 2014

Voir sur GitHub
 (9 commentaires) (3 réactions) (0 assignés)Julia (5 773 forks)batch import
featurehelp wantedmaths

Métriques du dépôt

Stars
 (48 709 stars)
Métriques de merge PR
 (Merge moyen 20j 6h) (157 PRs mergées en 30 j)

Description

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.

Guide contributeur