_logb, _logbl

Aus RAD Studio
Wechseln zu: Navigation, Suche

Nach oben zu float.h - Index


Header-Datei

float.h

Kategorie

Mathematische Routinen

Prototyp

double _logb(double d);

long double _logbl(long double ld);

Beschreibung

Extrahiert den Exponentialwert eines Gleitkommawerts mit doppelter Genauigkeit, der als Argument übergeben wird. Wenn das Argument ein denormalisierter Wert ist, wird es so behandelt, als sei es normalisiert.

_logbl ist die long double-Version. Sie benötigt ein Argument vom Typ long double und gibt ein Ergebnis vom Typ long double zurück.

Rückgabewert

Gibt den unverfälschten Exponenten des übergebenen Werts zurück.

Beispiel

#include <math.h>
#include <stdio.h>

int main(void)
{
  double result;
  double x = 8.6872;

  result = _logb(x);

  printf("The natural log of %lf is %lf\n", x, result);
  return 0;
}

Portabilität

POSIX Win32 ANSI C ANSI C++

_logb

+

_logbl

+