Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179
Deprecated: Creation of dynamic property PPDStack::$accum is deprecated in /var/www/cppe.ru/www/includes/parser/Preprocessor_DOM.php on line 803
Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179
Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48
Материал из C\C++ эксперт
frexp: decomposes the num into a mantissa in the range 0.5 to less than 1, and an integer exponent such that num = mantissa * 2^exp
//Declaration: float frexpf(float num, int *exp);
double frexp(double num, int *exp);
long double frexpl(long double num, int *exp);
//Return: The mantissa is returned by the function, and the exponent is stored at the variable pointed to by exp.
#include <math.h>
#include <stdio.h>
int main(void)
{
int e;
double f;
f = frexp(10.0, &e);
printf("%f %d", f, e);
}
/*
0.625000 4
*/