round
double round(double);
#define round(a) __TG_FN1(round, (a))
fesetround(int round)
_DIAGASSERT(!(round & ~__SHIFTOUT(FPCR_RMODE, FPCR_RMODE)));
fpcr |= __SHIFTIN(round, FPCR_RMODE);
fesetround(int round)
_DIAGASSERT(!(round & ~__SHIFTOUT(VFP_FPSCR_RMODE, VFP_FPSCR_RMODE)));
fpscr |= __SHIFTIN(round, VFP_FPSCR_RMODE);
fesetround(int round)
_DIAGASSERT((round & ~FE_ROUND_MASK) == 0);
if (round & ~FE_ROUND_MASK)
r |= round;
fesetround(int round)
if (round & ~__X87_ROUND_MASK) {
control |= round;
mxcsr |= round << __SSE_ROUND_SHIFT;
fesetround(int round)
if ((unsigned int)round > FCSR_FRM_RMM) {
fcsr_frm_write(round);
fesetround(int round)
_DIAGASSERT((round & ~_ROUND_MASK) == 0);
if (round & ~_ROUND_MASK)
r |= round << _ROUND_SHIFT;
fesetround(int round)
_DIAGASSERT((round & ~_ROUND_MASK) == 0);
if (round & ~_ROUND_MASK)
r |= round << _ROUND_SHIFT;
fesetround(int round)
if (round & (~_X87_ROUNDING_MASK))
control |= round;
mxcsr |= (round << _SSE_ROUND_SHIFT);
__weak_alias(roundl, round);
fesetround(int round)
fpsetround(__FPR(round));
#define roundit round
#define roundit round
__strong_alias(_roundl, round)
__weak_alias(roundl, round)
round(double x)
if (sign && (round == STRPCT_RTI || round == STRPCT_RAI))
round ^= (STRPCT_RTI ^ STRPCT_RAI);
imax_abs(denominator), digits, round);
size_t digits, uint32_t round)
switch (round & 3) {
if (!(round & 1)) { /* round down */
if (round != 0 ? bignum_ge_u(num, 1) : /* up */
size_t digits, uint32_t round)
DFUNC_DBL(round)
goto round;
round:
goto round;
round:
goto round;
round:
goto round;
round:
WBTEMP_GRS equ LV-40 ;alias wbtemp guard, round, sticky
round_bit equ 0 ;round bit is bit number 0
x_mode equ $00 round to extended
s_mode equ $40 round to single
d_mode equ $80 round to double
rn_mode equ $00 round nearest
rz_mode equ $10 round to zero
rm_mode equ $20 round to minus infinity
rp_mode equ $30 round to plus infinity
rnd_stky_bit equ 29 round/sticky bit of mantissa
x_mode equ $00 round to extended
s_mode equ $40 round to single
d_mode equ $80 round to double
rn_mode equ $00 round nearest
rz_mode equ $10 round to zero
rm_mode equ $20 round to minus infinity
rp_mode equ $30 round to plus infinity
rnd_stky_bit equ 29 round/sticky bit of mantissa
if (round(fe, fp, cx) && fp->fp_mant[3] == SNG_EXP(1)) {
if (round(fe, fp, cx) && fp->fp_mant[3] == SNG_EXP(2))
if (round(fe, fp, cx) && fp->fp_mant[2] == DBL_EXP(1)) {
if (round(fe, fp, cx) && fp->fp_mant[2] == DBL_EXP(2))
static int round(struct fpemu *, struct fpn *, int *);
db_print_riscv_fpround(const char *sep, unsigned round)
switch (round) {
if (round(fe, fp) && fp->fp_mant[3] == SNG_EXP(1))
if (round(fe, fp) && fp->fp_mant[3] == SNG_EXP(2))
if (round(fe, fp) && fp->fp_mant[2] == DBL_EXP(1)) {
if (round(fe, fp) && fp->fp_mant[2] == DBL_EXP(2))
if (round(fe, fp) && fp->fp_mant[0] == EXT_EXP(1)) {
if (round(fe, fp) && fp->fp_mant[0] == EXT_EXP(2))
static int round(struct fpemu *, struct fpn *);
bool round, const char *ddr_type_string, int speed)
if (round) {
#define MIDIPITCH_FROM_FRKEY(frk) ((midipitch_t)round(scalbn((frk),14)))
#define MIDIHZ18_FROM_FRHZ(frh) ((midihz18_t)round(scalbn((frh),18)))
int64_t delta1, delta2, delta3, round;
round = 1;
round = 1000000000;
delta3 = round;
fprintf(stderr, "round=%"PRId64" delta3=%"PRId64"\n", round, delta3);
delta3 /= round;
delta3 *= round;
delta3 /= round;
delta3 *= round;
b = round(a);
c = round(-a);
(long)round(((double)val / frac) * 1000000000.0);