Lines Matching defs:rounded
1305 float rounded) {
1311 } else if (rounded > max_int32) {
1313 } else if (rounded < min_int32) {
1324 void Simulator::set_fpu_register_invalid_result(float original, float rounded) {
1330 } else if (rounded > max_int32) {
1332 } else if (rounded < min_int32) {
1344 float rounded) {
1352 } else if (rounded >= max_int64) {
1354 } else if (rounded < min_int64) {
1366 double rounded) {
1372 } else if (rounded > max_int32) {
1374 } else if (rounded < min_int32) {
1386 double rounded) {
1392 } else if (rounded > max_int32) {
1394 } else if (rounded < min_int32) {
1406 double rounded) {
1414 } else if (rounded >= max_int64) {
1416 } else if (rounded < min_int64) {
1429 bool Simulator::set_fcsr_round_error(double original, double rounded) {
1434 if (!std::isfinite(original) || !std::isfinite(rounded)) {
1439 if (original != rounded) {
1443 if (rounded < DBL_MIN && rounded > -DBL_MIN && rounded != 0) {
1448 if (rounded > max_int32 || rounded < min_int32) {
1461 bool Simulator::set_fcsr_round64_error(double original, double rounded) {
1468 if (!std::isfinite(original) || !std::isfinite(rounded)) {
1473 if (original != rounded) {
1477 if (rounded < DBL_MIN && rounded > -DBL_MIN && rounded != 0) {
1482 if (rounded >= max_int64 || rounded < min_int64) {
1495 bool Simulator::set_fcsr_round_error(float original, float rounded) {
1500 if (!std::isfinite(original) || !std::isfinite(rounded)) {
1505 if (original != rounded) {
1509 if (rounded < FLT_MIN && rounded > -FLT_MIN && rounded != 0) {
1514 if (rounded > max_int32 || rounded < min_int32) {
1527 bool Simulator::set_fcsr_round64_error(float original, float rounded) {
1534 if (!std::isfinite(original) || !std::isfinite(rounded)) {
1539 if (original != rounded) {
1543 if (rounded < FLT_MIN && rounded > -FLT_MIN && rounded != 0) {
1548 if (rounded >= max_int64 || rounded < min_int64) {
1559 void Simulator::round_according_to_fcsr(double toRound, double& rounded,
1576 rounded = std::floor(fs + 0.5);
1577 rounded_int = static_cast<int32_t>(rounded);
1585 rounded = trunc(fs);
1586 rounded_int = static_cast<int32_t>(rounded);
1589 rounded = std::ceil(fs);
1590 rounded_int = static_cast<int32_t>(rounded);
1593 rounded = std::floor(fs);
1594 rounded_int = static_cast<int32_t>(rounded);
1600 void Simulator::round_according_to_fcsr(float toRound, float& rounded,
1617 rounded = std::floor(fs + 0.5);
1618 rounded_int = static_cast<int32_t>(rounded);
1626 rounded = trunc(fs);
1627 rounded_int = static_cast<int32_t>(rounded);
1630 rounded = std::ceil(fs);
1631 rounded_int = static_cast<int32_t>(rounded);
1634 rounded = std::floor(fs);
1635 rounded_int = static_cast<int32_t>(rounded);
1641 void Simulator::round64_according_to_fcsr(double toRound, double& rounded,
1658 rounded = std::floor(fs + 0.5);
1659 rounded_int = static_cast<int64_t>(rounded);
1667 rounded = trunc(fs);
1668 rounded_int = static_cast<int64_t>(rounded);
1671 rounded = std::ceil(fs);
1672 rounded_int = static_cast<int64_t>(rounded);
1675 rounded = std::floor(fs);
1676 rounded_int = static_cast<int64_t>(rounded);
1682 void Simulator::round64_according_to_fcsr(float toRound, float& rounded,
1699 rounded = std::floor(fs + 0.5);
1700 rounded_int = static_cast<int64_t>(rounded);
1708 rounded = trunc(fs);
1709 rounded_int = static_cast<int64_t>(rounded);
1712 rounded = std::ceil(fs);
1713 rounded_int = static_cast<int64_t>(rounded);
1716 rounded = std::floor(fs);
1717 rounded_int = static_cast<int64_t>(rounded);
2545 double rounded;
2547 round_according_to_fcsr(fs, rounded, result, fs);
2549 if (set_fcsr_round_error(fs, rounded)) {
2550 set_fpu_register_word_invalid_result(fs, rounded);
2555 double rounded = std::floor(fs + 0.5);
2556 int32_t result = static_cast<int32_t>(rounded);
2563 if (set_fcsr_round_error(fs, rounded)) {
2564 set_fpu_register_word_invalid_result(fs, rounded);
2569 double rounded = trunc(fs);
2570 int32_t result = static_cast<int32_t>(rounded);
2572 if (set_fcsr_round_error(fs, rounded)) {
2573 set_fpu_register_word_invalid_result(fs, rounded);
2578 double rounded = std::floor(fs);
2579 int32_t result = static_cast<int32_t>(rounded);
2581 if (set_fcsr_round_error(fs, rounded)) {
2582 set_fpu_register_word_invalid_result(fs, rounded);
2587 double rounded = std::ceil(fs);
2588 int32_t result = static_cast<int32_t>(rounded);
2590 if (set_fcsr_round_error(fs, rounded)) {
2591 set_fpu_register_word_invalid_result(fs, rounded);
2600 double rounded;
2601 round64_according_to_fcsr(fs, rounded, result, fs);
2603 if (set_fcsr_round64_error(fs, rounded)) {
2604 set_fpu_register_invalid_result64(fs, rounded);
2614 double rounded = trunc(fs);
2615 i64 = static_cast<int64_t>(rounded);
2618 if (set_fcsr_round64_error(fs, rounded)) {
2619 set_fpu_register_invalid_result64(fs, rounded);
2628 double rounded = std::floor(fs + 0.5);
2629 int64_t result = static_cast<int64_t>(rounded);
2638 if (set_fcsr_round64_error(fs, rounded)) {
2639 set_fpu_register_invalid_result64(fs, rounded);
2648 double rounded = std::floor(fs);
2649 int64_t i64 = static_cast<int64_t>(rounded);
2652 if (set_fcsr_round64_error(fs, rounded)) {
2653 set_fpu_register_invalid_result64(fs, rounded);
2662 double rounded = std::ceil(fs);
2663 int64_t i64 = static_cast<int64_t>(rounded);
2666 if (set_fcsr_round64_error(fs, rounded)) {
2667 set_fpu_register_invalid_result64(fs, rounded);
3066 float rounded = trunc(fs);
3067 int32_t result = static_cast<int32_t>(rounded);
3069 if (set_fcsr_round_error(fs, rounded)) {
3070 set_fpu_register_word_invalid_result(fs, rounded);
3075 float rounded = trunc(fs);
3076 int64_t i64 = static_cast<int64_t>(rounded);
3079 if (set_fcsr_round64_error(fs, rounded)) {
3080 set_fpu_register_invalid_result64(fs, rounded);
3089 float rounded = std::floor(fs);
3090 int32_t result = static_cast<int32_t>(rounded);
3092 if (set_fcsr_round_error(fs, rounded)) {
3093 set_fpu_register_word_invalid_result(fs, rounded);
3098 float rounded = std::floor(fs);
3099 int64_t i64 = static_cast<int64_t>(rounded);
3102 if (set_fcsr_round64_error(fs, rounded)) {
3103 set_fpu_register_invalid_result64(fs, rounded);
3111 float rounded = std::floor(fs + 0.5);
3112 int32_t result = static_cast<int32_t>(rounded);
3119 if (set_fcsr_round_error(fs, rounded)) {
3120 set_fpu_register_word_invalid_result(fs, rounded);
3126 float rounded = std::floor(fs + 0.5);
3127 int64_t result = static_cast<int64_t>(rounded);
3136 if (set_fcsr_round64_error(fs, rounded)) {
3137 set_fpu_register_invalid_result64(fs, rounded);
3146 float rounded = std::ceil(fs);
3147 int32_t result = static_cast<int32_t>(rounded);
3149 if (set_fcsr_round_error(fs, rounded)) {
3150 set_fpu_register_word_invalid_result(fs, rounded);
3155 float rounded = std::ceil(fs);
3156 int64_t i64 = static_cast<int64_t>(rounded);
3159 if (set_fcsr_round64_error(fs, rounded)) {
3160 set_fpu_register_invalid_result64(fs, rounded);
3238 float rounded;
3239 round64_according_to_fcsr(fs, rounded, result, fs);
3241 if (set_fcsr_round64_error(fs, rounded)) {
3242 set_fpu_register_invalid_result64(fs, rounded);
3250 float rounded;
3252 round_according_to_fcsr(fs, rounded, result, fs);
3254 if (set_fcsr_round_error(fs, rounded)) {
3255 set_fpu_register_word_invalid_result(fs, rounded);