Back to index

glibc  2.9
Functions
q_cmpe.c File Reference
#include "soft-fp.h"
#include "quad.h"

Go to the source code of this file.

Functions

int _q_cmpe (const long double a, const long double b)

Function Documentation

int _q_cmpe ( const long double  a,
const long double  b 
)

Definition at line 27 of file q_cmpe.c.

{
  FP_DECL_EX;
  FP_DECL_Q(A); FP_DECL_Q(B);
  int r;

  FP_UNPACK_RAW_Q(A, a);
  FP_UNPACK_RAW_Q(B, b);
  FP_CMP_Q(r, B, A, 3);
  if (r == -1) r = 2;
  if (r == 3)
    FP_SET_EXCEPTION(FP_EX_INVALID);
  FP_HANDLE_EXCEPTIONS;

  return r;
}