예제 #1
0
long double _Q_sub(const long double a, const long double b)
{
  FP_DECL_EX;
  FP_DECL_Q(A); FP_DECL_Q(B); FP_DECL_Q(C);
  long double c;

  FP_INIT_ROUNDMODE;
  FP_UNPACK_SEMIRAW_Q(A, a);
  FP_UNPACK_SEMIRAW_Q(B, b);
  FP_SUB_Q(C, A, B);
  FP_PACK_SEMIRAW_Q(c, C);
  FP_HANDLE_EXCEPTIONS;
  return c;
}
예제 #2
0
파일: addtf3.c 프로젝트: ChaosJohn/gcc
TFtype __addtf3(TFtype a, TFtype b)
{
  FP_DECL_EX;
  FP_DECL_Q(A); FP_DECL_Q(B); FP_DECL_Q(R);
  TFtype r;

  FP_INIT_ROUNDMODE;
  FP_UNPACK_SEMIRAW_Q(A, a);
  FP_UNPACK_SEMIRAW_Q(B, b);
  FP_ADD_Q(R, A, B);
  FP_PACK_SEMIRAW_Q(r, R);
  FP_HANDLE_EXCEPTIONS;

  return r;
}