[LIBM] Fix ldexp.c / ldexpf.c

This commit is contained in:
Timo Kreuzer 2022-06-24 20:21:17 +02:00
parent 4f348ee971
commit 7277e26944
3 changed files with 30 additions and 6 deletions

View file

@ -25,9 +25,17 @@
*
*/
#include "fn_macros.h"
#include "libm_util_amd.h"
#include "libm_special.h"
#include "libm.h"
#include "libm_util.h"
#include "libm_new.h"
#define FN_PROTOTYPE_REF FN_PROTOTYPE
#define __amd_handle_error _handle_error
#define __amd_ldexp OP_LDEXP
//#include "fn_macros.h"
//#include "libm_util.h"
//#include "libm_special.h"
double FN_PROTOTYPE_REF(ldexp)(double x, int n)
{

View file

@ -25,9 +25,17 @@
*
*/
#include "fn_macros.h"
#include "libm_util_amd.h"
#include "libm_special.h"
#include "libm.h"
#include "libm_util.h"
#include "libm_new.h"
#define FN_PROTOTYPE_REF FN_PROTOTYPE
#define __amd_handle_errorf _handle_errorf
#define __amd_ldexp OP_LDEXP
//#include "fn_macros.h"
//#include "libm_util_amd.h"
//#include "libm_special.h"
float FN_PROTOTYPE_REF(ldexpf)(float x, int n)
{

View file

@ -32,6 +32,14 @@
#include <float.h>
#define MULTIPLIER_SP 24
#define MULTIPLIER_DP 53
static const double VAL_2PMULTIPLIER_DP = 9007199254740992.0;
static const double VAL_2PMMULTIPLIER_DP = 1.1102230246251565404236316680908e-16;
static const float VAL_2PMULTIPLIER_SP = 16777216.0F;
static const float VAL_2PMMULTIPLIER_SP = 5.9604645e-8F;
/* Definitions for double functions on 64 bit machines */
#define SIGNBIT_DP64 0x8000000000000000
#define EXPBITS_DP64 0x7ff0000000000000