Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  math_h.c

  Sprache: C
 

// Copyright (C) 2017 The Android Open Source Project
// SPDX-License-Identifier: BSD-2-Clause

#include <math.h>

#include "header_checks.h"

static void math_h() {
  TYPE(float_t);
  TYPE(double_t);

#if !defined(fpclassify)
#error fpclassify
#endif
#if !defined(isfinite)
#error isfinite
#endif
#if !defined(isgreater)
#error isgreater
#endif
#if !defined(isgreaterequal)
#error isgreaterequal
#endif
#if !defined(isinf)
#error isinf
#endif
#if !defined(isless)
#error isless
#endif
#if !defined(islessequal)
#error islessequal
#endif
#if !defined(islessgreater)
#error islessgreater
#endif
#if !defined(isnan)
#error isnan
#endif
#if !defined(isnormal)
#error isnormal
#endif
#if !defined(isunordered)
#error isunordered
#endif
#if !defined(signbit)
#error signbit
#endif

  MACRO(M_E);
  // TODO: MACRO(M_EGAMMA);
  MACRO(M_LOG2E);
  MACRO(M_LOG10E);
  MACRO(M_LN2);
  MACRO(M_LN10);
  // TODO: MACRO(M_PHI);
  MACRO(M_PI);
  MACRO(M_PI_2);
  MACRO(M_PI_4);
  MACRO(M_1_PI);
  // TODO: MACRO(M_1_SQRTPI);
  MACRO(M_2_PI);
  MACRO(M_2_SQRTPI);
  MACRO(M_SQRT2);
  // TODO: MACRO(M_SQRT3);
  MACRO(M_SQRT1_2);
  // TODO: MACRO(M_SQRT1_3);

#if !defined(__GLIBC__) // glibc hasn't updated to POSIX 2024 yet.
  MACRO(M_El);
  // TODO: MACRO(M_EGAMMAl);
  MACRO(M_LOG2El);
  MACRO(M_LOG10El);
  MACRO(M_LN2l);
  MACRO(M_LN10l);
  // TODO: MACRO(M_PHIl);
  MACRO(M_PIl);
  MACRO(M_PI_2l);
  MACRO(M_PI_4l);
  MACRO(M_1_PIl);
  // TODO: MACRO(M_1_SQRTPIl);
  MACRO(M_2_PIl);
  MACRO(M_2_SQRTPIl);
  MACRO(M_SQRT2l);
  // TODO: MACRO(M_SQRT3l);
  MACRO(M_SQRT1_2l);
  // TODO: MACRO(M_SQRT1_3l);
#endif

  MACRO(MAXFLOAT);

  MACRO(HUGE_VAL);
  MACRO(HUGE_VALF);
  MACRO(HUGE_VALL);
  MACRO(INFINITY);
  MACRO(NAN);

  MACRO(FP_INFINITE);
  MACRO(FP_NAN);
  MACRO(FP_NORMAL);
  MACRO(FP_SUBNORMAL);
  MACRO(FP_ZERO);

#if defined(FP_FAST_FMA) && FP_FAST_FMA != 1
#error FP_FAST_FMA
#endif
#if defined(FP_FAST_FMAF) && FP_FAST_FMAF != 1
#error FP_FAST_FMAF
#endif
#if defined(FP_FAST_FMAL) && FP_FAST_FMAL != 1
#error FP_FAST_FMAL
#endif

  MACRO(FP_ILOGB0);
  MACRO(FP_ILOGBNAN);

  MACRO_VALUE(MATH_ERRNO, 1);
  MACRO_VALUE(MATH_ERREXCEPT, 2);

#if !defined(math_errhandling)
#error math_errhandling
#endif
  MACRO_TYPE(int, math_errhandling);

  FUNCTION(acos, double (*f)(double));
  FUNCTION(acosf, float (*f)(float));
  FUNCTION(acosh, double (*f)(double));
  FUNCTION(acoshf, float (*f)(float));
  FUNCTION(acoshl, long double (*f)(long double));
  FUNCTION(acosl, long double (*f)(long double));

  FUNCTION(asin, double (*f)(double));
  FUNCTION(asinf, float (*f)(float));
  FUNCTION(asinh, double (*f)(double));
  FUNCTION(asinhf, float (*f)(float));
  FUNCTION(asinhl, long double (*f)(long double));
  FUNCTION(asinl, long double (*f)(long double));

  FUNCTION(atan, double (*f)(double));
  FUNCTION(atan2, double (*f)(doubledouble));
  FUNCTION(atan2f, float (*f)(floatfloat));
  FUNCTION(atan2l, long double (*f)(long doublelong double));
  FUNCTION(atanf, float (*f)(float));
  FUNCTION(atanh, double (*f)(double));
  FUNCTION(atanhf, float (*f)(float));
  FUNCTION(atanhl, long double (*f)(long double));
  FUNCTION(atanl, long double (*f)(long double));

  FUNCTION(cbrt, double (*f)(double));
  FUNCTION(cbrtf, float (*f)(float));
  FUNCTION(cbrtl, long double (*f)(long double));

  FUNCTION(ceil, double (*f)(double));
  FUNCTION(ceilf, float (*f)(float));
  FUNCTION(ceill, long double (*f)(long double));

  FUNCTION(copysign, double (*f)(doubledouble));
  FUNCTION(copysignf, float (*f)(floatfloat));
  FUNCTION(copysignl, long double (*f)(long doublelong double));

  FUNCTION(cos, double (*f)(double));
  FUNCTION(cosf, float (*f)(float));
  FUNCTION(cosh, double (*f)(double));
  FUNCTION(coshf, float (*f)(float));
  FUNCTION(coshl, long double (*f)(long double));
  FUNCTION(cosl, long double (*f)(long double));

  FUNCTION(erf, double (*f)(double));
  FUNCTION(erfc, double (*f)(double));
  FUNCTION(erfcf, float (*f)(float));
  FUNCTION(erfcl, long double (*f)(long double));
  FUNCTION(erff, float (*f)(float));
  FUNCTION(erfl, long double (*f)(long double));

  FUNCTION(exp, double (*f)(double));
  FUNCTION(exp2, double (*f)(double));
  FUNCTION(exp2f, float (*f)(float));
  FUNCTION(exp2l, long double (*f)(long double));
  FUNCTION(expf, float (*f)(float));
  FUNCTION(expl, long double (*f)(long double));
  FUNCTION(expm1, double (*f)(double));
  FUNCTION(expm1f, float (*f)(float));
  FUNCTION(expm1l, long double (*f)(long double));

  FUNCTION(fabs, double (*f)(double));
  FUNCTION(fabsf, float (*f)(float));
  FUNCTION(fabsl, long double (*f)(long double));

  FUNCTION(fdim, double (*f)(doubledouble));
  FUNCTION(fdimf, float (*f)(floatfloat));
  FUNCTION(fdiml, long double (*f)(long doublelong double));

  FUNCTION(floor, double (*f)(double));
  FUNCTION(floorf, float (*f)(float));
  FUNCTION(floorl, long double (*f)(long double));

  FUNCTION(fma, double (*f)(doubledoubledouble));
  FUNCTION(fmaf, float (*f)(floatfloatfloat));
  FUNCTION(fmal, long double (*f)(long doublelong doublelong double));

  FUNCTION(fmax, double (*f)(doubledouble));
  FUNCTION(fmaxf, float (*f)(floatfloat));
  FUNCTION(fmaxl, long double (*f)(long doublelong double));

  FUNCTION(fmin, double (*f)(doubledouble));
  FUNCTION(fminf, float (*f)(floatfloat));
  FUNCTION(fminl, long double (*f)(long doublelong double));

  FUNCTION(fmod, double (*f)(doubledouble));
  FUNCTION(fmodf, float (*f)(floatfloat));
  FUNCTION(fmodl, long double (*f)(long doublelong double));

  FUNCTION(frexp, double (*f)(doubleint*));
  FUNCTION(frexpf, float (*f)(floatint*));
  FUNCTION(frexpl, long double (*f)(long doubleint*));

  FUNCTION(hypot, double (*f)(doubledouble));
  FUNCTION(hypotf, float (*f)(floatfloat));
  FUNCTION(hypotl, long double (*f)(long doublelong double));

  FUNCTION(ilogb, int (*f)(double));
  FUNCTION(ilogbf, int (*f)(float));
  FUNCTION(ilogbl, int (*f)(long double));

  FUNCTION(j0, double (*f)(double));
  FUNCTION(j1, double (*f)(double));
  FUNCTION(jn, double (*f)(intdouble));

  FUNCTION(ldexp, double (*f)(doubleint));
  FUNCTION(ldexpf, float (*f)(floatint));
  FUNCTION(ldexpl, long double (*f)(long doubleint));

  FUNCTION(lgamma, double (*f)(double));
  FUNCTION(lgammaf, float (*f)(float));
  FUNCTION(lgammal, long double (*f)(long double));

  FUNCTION(llrint, long long (*f)(double));
  FUNCTION(llrintf, long long (*f)(float));
  FUNCTION(llrintl, long long (*f)(long double));

  FUNCTION(llround, long long (*f)(double));
  FUNCTION(llroundf, long long (*f)(float));
  FUNCTION(llroundl, long long (*f)(long double));

  FUNCTION(log, double (*f)(double));
  FUNCTION(log10, double (*f)(double));
  FUNCTION(log10f, float (*f)(float));
  FUNCTION(log10l, long double (*f)(long double));
  FUNCTION(log1p, double (*f)(double));
  FUNCTION(log1pf, float (*f)(float));
  FUNCTION(log1pl, long double (*f)(long double));
  FUNCTION(log2, double (*f)(double));
  FUNCTION(log2f, float (*f)(float));
  FUNCTION(log2l, long double (*f)(long double));
  FUNCTION(logb, double (*f)(double));
  FUNCTION(logbf, float (*f)(float));
  FUNCTION(logbl, long double (*f)(long double));
  FUNCTION(logf, float (*f)(float));
  FUNCTION(logl, long double (*f)(long double));

  FUNCTION(lrint, long (*f)(double));
  FUNCTION(lrintf, long (*f)(float));
  FUNCTION(lrintl, long (*f)(long double));

  FUNCTION(lround, long (*f)(double));
  FUNCTION(lroundf, long (*f)(float));
  FUNCTION(lroundl, long (*f)(long double));

  FUNCTION(modf, double (*f)(doubledouble*));
  FUNCTION(modff, float (*f)(floatfloat*));
  FUNCTION(modfl, long double (*f)(long doublelong double*));

  FUNCTION(nan, double (*f)(const char*));
  FUNCTION(nanf, float (*f)(const char*));
  FUNCTION(nanl, long double (*f)(const char*));

  FUNCTION(nearbyint, double (*f)(double));
  FUNCTION(nearbyintf, float (*f)(float));
  FUNCTION(nearbyintl, long double (*f)(long double));

  FUNCTION(nextafter, double (*f)(doubledouble));
  FUNCTION(nextafterf, float (*f)(floatfloat));
  FUNCTION(nextafterl, long double (*f)(long doublelong double));

  FUNCTION(nexttoward, double (*f)(doublelong double));
  FUNCTION(nexttowardf, float (*f)(floatlong double));
  FUNCTION(nexttowardl, long double (*f)(long doublelong double));

  FUNCTION(pow, double (*f)(doubledouble));
  FUNCTION(powf, float (*f)(floatfloat));
  FUNCTION(powl, long double (*f)(long doublelong double));

  FUNCTION(remainder, double (*f)(doubledouble));
  FUNCTION(remainderf, float (*f)(floatfloat));
  FUNCTION(remainderl, long double (*f)(long doublelong double));

  FUNCTION(remquo, double (*f)(doubledoubleint*));
  FUNCTION(remquof, float (*f)(floatfloatint*));
  FUNCTION(remquol, long double (*f)(long doublelong doubleint*));

  FUNCTION(rint, double (*f)(double));
  FUNCTION(rintf, float (*f)(float));
  FUNCTION(rintl, long double (*f)(long double));

  FUNCTION(round, double (*f)(double));
  FUNCTION(roundf, float (*f)(float));
  FUNCTION(roundl, long double (*f)(long double));

  FUNCTION(scalbln, double (*f)(doublelong));
  FUNCTION(scalblnf, float (*f)(floatlong));
  FUNCTION(scalblnl, long double (*f)(long doublelong));

  FUNCTION(scalbn, double (*f)(doubleint));
  FUNCTION(scalbnf, float (*f)(floatint));
  FUNCTION(scalbnl, long double (*f)(long doubleint));

  FUNCTION(sin, double (*f)(double));
  FUNCTION(sinf, float (*f)(float));
  FUNCTION(sinh, double (*f)(double));
  FUNCTION(sinhf, float (*f)(float));
  FUNCTION(sinhl, long double (*f)(long double));
  FUNCTION(sinl, long double (*f)(long double));

  FUNCTION(sqrt, double (*f)(double));
  FUNCTION(sqrtf, float (*f)(float));
  FUNCTION(sqrtl, long double (*f)(long double));

  FUNCTION(tan, double (*f)(double));
  FUNCTION(tanf, float (*f)(float));
  FUNCTION(tanh, double (*f)(double));
  FUNCTION(tanhf, float (*f)(float));
  FUNCTION(tanhl, long double (*f)(long double));
  FUNCTION(tanl, long double (*f)(long double));

  FUNCTION(tgamma, double (*f)(double));
  FUNCTION(tgammaf, float (*f)(float));
  FUNCTION(tgammal, long double (*f)(long double));

  FUNCTION(trunc, double (*f)(double));
  FUNCTION(truncf, float (*f)(float));
  FUNCTION(truncl, long double (*f)(long double));

  FUNCTION(y0, double (*f)(double));
  FUNCTION(y1, double (*f)(double));
  FUNCTION(yn, double (*f)(intdouble));

  int s = signgam;
}

Messung V0.5 in Prozent
C=79 H=100 G=90

¤ Dauer der Verarbeitung: 0.12 Sekunden  (vorverarbeitet am  2026-06-28) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik