X-Git-Url: https://pd.if.org/git/?p=pdclib;a=blobdiff_plain;f=functions%2Fmath%2Fexp.c;h=37033d227e744a702fe46aa10afaaaebc023da5d;hp=19d35a58c4001d6153b759b107f5513fe135530e;hb=refs%2Ftags%2FOLD;hpb=34893ecc2200dc7017c36a54cb6c5f4c2378b5ec diff --git a/functions/math/exp.c b/functions/math/exp.c index 19d35a5..37033d2 100644 --- a/functions/math/exp.c +++ b/functions/math/exp.c @@ -1,36 +1,27 @@ -// ---------------------------------------------------------------------------- -// $Id$ -// ---------------------------------------------------------------------------- -// Public Domain C Library - http://pdclib.sourceforge.net -// This code is Public Domain. Use, modify, and redistribute at will. -// ---------------------------------------------------------------------------- - -// ---------------------------------------------------------------------------- -// C++ - -float exp( float x ) { /* TODO */ }; -long double exp( long double x ) { /* TODO */ }; - -float exp2( float x ) { /* TODO */ }; -long double exp2( long double x ) { /* TODO */ }; - -float expm1( float x ) { /* TODO */ }; -long double expm1( long double x ) { /* TODO */ }; - -float frexp( float x, int * exponent ) { /* TODO */ }; -long double frexp( long double x, int * exponent ) { /* TODO */ }; - -float ldexp( float x, int exponent ) { /* TODO */ }; -long double ldexp( long double x, int exponent ) { /* TODO */ }; - -// ---------------------------------------------------------------------------- -// Standard C +/* ---------------------------------------------------------------------------- + * $Id$ + * ---------------------------------------------------------------------------- + * Public Domain C Library - http://pdclib.sourceforge.net + * This code is Public Domain. Use, modify, and redistribute at will. + * --------------------------------------------------------------------------*/ double exp( double x ) { /* TODO */ }; float expf( float x ) { /* TODO */ }; long double expl( long double x ) { /* TODO */ }; double exp2( double x ) { /* TODO */ }; + +/* Therx code +{ + double value = 1; + for( int i = 1; i <= x; i++ ) + { + value *= 2; + } + return value; +} +*/ + float exp2f( float x ) { /* TODO */ }; long double exp2l( long double x ) { /* TODO */ }; @@ -44,4 +35,4 @@ long double frexpl( long double x, int * exp ) { /* TODO */ }; double ldexp( double x, int exp ) { /* TODO */ }; float ldexpf( float x, int exp ) { /* TODO */ }; -long double ldexpl( long double x, int exp ) { /* TODO */ }; \ No newline at end of file +long double ldexpl( long double x, int exp ) { /* TODO */ };