Home | History | Annotate | Download | only in mips64

Lines Matching refs:rounded

1175 bool Simulator::set_fcsr_round_error(double original, double rounded) {
1180 if (!std::isfinite(original) || !std::isfinite(rounded)) {
1185 if (original != rounded) {
1189 if (rounded < DBL_MIN && rounded > -DBL_MIN && rounded != 0) {
1194 if (rounded > max_int32 || rounded < min_int32) {
1207 bool Simulator::set_fcsr_round64_error(double original, double rounded) {
1214 if (!std::isfinite(original) || !std::isfinite(rounded)) {
1219 if (original != rounded) {
1223 if (rounded < DBL_MIN && rounded > -DBL_MIN && rounded != 0) {
1228 if (rounded >= max_int64 || rounded < min_int64) {
1241 bool Simulator::set_fcsr_round_error(float original, float rounded) {
1246 if (!std::isfinite(original) || !std::isfinite(rounded)) {
1251 if (original != rounded) {
1255 if (rounded < FLT_MIN && rounded > -FLT_MIN && rounded != 0) {
1260 if (rounded > max_int32 || rounded < min_int32) {
1271 float rounded) {
1277 } else if (rounded > max_int32) {
1279 } else if (rounded < min_int32) {
1290 void Simulator::set_fpu_register_invalid_result(float original, float rounded) {
1296 } else if (rounded > max_int32) {
1298 } else if (rounded < min_int32) {
1310 float rounded) {
1318 } else if (rounded >= max_int64) {
1320 } else if (rounded < min_int64) {
1332 double rounded) {
1338 } else if (rounded > max_int32) {
1340 } else if (rounded < min_int32) {
1352 double rounded) {
1358 } else if (rounded > max_int32) {
1360 } else if (rounded < min_int32) {
1372 double rounded) {
1380 } else if (rounded >= max_int64) {
1382 } else if (rounded < min_int64) {
1395 bool Simulator::set_fcsr_round64_error(float original, float rounded) {
1402 if (!std::isfinite(original) || !std::isfinite(rounded)) {
1407 if (original != rounded) {
1411 if (rounded < FLT_MIN && rounded > -FLT_MIN && rounded != 0) {
1416 if (rounded >= max_int64 || rounded < min_int64) {
1428 void Simulator::round_according_to_fcsr(double toRound, double& rounded,
1445 rounded = std::floor(fs + 0.5);
1446 rounded_int = static_cast<int32_t>(rounded);
1454 rounded = trunc(fs);
1455 rounded_int = static_cast<int32_t>(rounded);
1458 rounded = std::ceil(fs);
1459 rounded_int = static_cast<int32_t>(rounded);
1462 rounded = std::floor(fs);
1463 rounded_int = static_cast<int32_t>(rounded);
1469 void Simulator::round64_according_to_fcsr(double toRound, double& rounded,
1486 rounded = std::floor(fs + 0.5);
1487 rounded_int = static_cast<int64_t>(rounded);
1495 rounded = trunc(fs);
1496 rounded_int = static_cast<int64_t>(rounded);
1499 rounded = std::ceil(fs);
1500 rounded_int = static_cast<int64_t>(rounded);
1503 rounded = std::floor(fs);
1504 rounded_int = static_cast<int64_t>(rounded);
1511 void Simulator::round_according_to_fcsr(float toRound, float& rounded,
1528 rounded = std::floor(fs + 0.5);
1529 rounded_int = static_cast<int32_t>(rounded);
1537 rounded = trunc(fs);
1538 rounded_int = static_cast<int32_t>(rounded);
1541 rounded = std::ceil(fs);
1542 rounded_int = static_cast<int32_t>(rounded);
1545 rounded = std::floor(fs);
1546 rounded_int = static_cast<int32_t>(rounded);
1552 void Simulator::round64_according_to_fcsr(float toRound, float& rounded,
1569 rounded = std::floor(fs + 0.5);
1570 rounded_int = static_cast<int64_t>(rounded);
1578 rounded = trunc(fs);
1579 rounded_int = static_cast<int64_t>(rounded);
1582 rounded = std::ceil(fs);
1583 rounded_int = static_cast<int64_t>(rounded);
1586 rounded = std::floor(fs);
1587 rounded_int = static_cast<int64_t>(rounded);
2617 float rounded;
2619 round64_according_to_fcsr(fs, rounded, result, fs);
2621 if (set_fcsr_round64_error(fs, rounded)) {
2622 set_fpu_register_invalid_result64(fs, rounded);
2627 float rounded;
2629 round_according_to_fcsr(fs, rounded, result, fs);
2631 if (set_fcsr_round_error(fs, rounded)) {
2632 set_fpu_register_word_invalid_result(fs, rounded);
2637 float rounded = trunc(fs);
2638 int32_t result = static_cast<int32_t>(rounded);
2640 if (set_fcsr_round_error(fs, rounded)) {
2641 set_fpu_register_word_invalid_result(fs, rounded);
2645 float rounded = trunc(fs);
2646 int64_t result = static_cast<int64_t>(rounded);
2648 if (set_fcsr_round64_error(fs, rounded)) {
2649 set_fpu_register_invalid_result64(fs, rounded);
2654 float rounded = std::floor(fs + 0.5);
2655 int32_t result = static_cast<int32_t>(rounded);
2662 if (set_fcsr_round_error(fs, rounded)) {
2663 set_fpu_register_word_invalid_result(fs, rounded);
2668 float rounded = std::floor(fs + 0.5);
2669 int64_t result = static_cast<int64_t>(rounded);
2677 if (set_fcsr_round64_error(fs, rounded)) {
2678 set_fpu_register_invalid_result64(fs, rounded);
2683 float rounded = floor(fs);
2684 int64_t result = static_cast<int64_t>(rounded);
2686 if (set_fcsr_round64_error(fs, rounded)) {
2687 set_fpu_register_invalid_result64(fs, rounded);
2693 float rounded = std::floor(fs);
2694 int32_t result = static_cast<int32_t>(rounded);
2696 if (set_fcsr_round_error(fs, rounded)) {
2697 set_fpu_register_word_invalid_result(fs, rounded);
2702 float rounded = std::ceil(fs);
2703 int32_t result = static_cast<int32_t>(rounded);
2705 if (set_fcsr_round_error(fs, rounded)) {
2706 set_fpu_register_invalid_result(fs, rounded);
2710 float rounded = ceil(fs);
2711 int64_t result = static_cast<int64_t>(rounded);
2713 if (set_fcsr_round64_error(fs, rounded)) {
2714 set_fpu_register_invalid_result64(fs, rounded);
2972 double rounded;
2974 round_according_to_fcsr(fs, rounded, result, fs);
2976 if (set_fcsr_round_error(fs, rounded)) {
2977 set_fpu_register_word_invalid_result(fs, rounded);
2983 double rounded = std::floor(fs + 0.5);
2984 int32_t result = static_cast<int32_t>(rounded);
2991 if (set_fcsr_round_error(fs, rounded)) {
2992 set_fpu_register_invalid_result(fs, rounded);
2997 double rounded = trunc(fs);
2998 int32_t result = static_cast<int32_t>(rounded);
3000 if (set_fcsr_round_error(fs, rounded)) {
3001 set_fpu_register_invalid_result(fs, rounded);
3006 double rounded = std::floor(fs);
3007 int32_t result = static_cast<int32_t>(rounded);
3009 if (set_fcsr_round_error(fs, rounded)) {
3010 set_fpu_register_invalid_result(fs, rounded);
3015 double rounded = std::ceil(fs);
3016 int32_t result = static_cast<int32_t>(rounded);
3018 if (set_fcsr_round_error(fs, rounded)) {
3019 set_fpu_register_invalid_result(fs, rounded);
3026 double rounded;
3028 round64_according_to_fcsr(fs, rounded, result, fs);
3030 if (set_fcsr_round64_error(fs, rounded)) {
3031 set_fpu_register_invalid_result64(fs, rounded);
3036 double rounded = std::floor(fs + 0.5);
3037 int64_t result = static_cast<int64_t>(rounded);
3045 if (set_fcsr_round64_error(fs, rounded)) {
3046 set_fpu_register_invalid_result64(fs, rounded);
3051 double rounded = trunc(fs);
3052 int64_t result = static_cast<int64_t>(rounded);
3054 if (set_fcsr_round64_error(fs, rounded)) {
3055 set_fpu_register_invalid_result64(fs, rounded);
3060 double rounded = floor(fs);
3061 int64_t result = static_cast<int64_t>(rounded);
3063 if (set_fcsr_round64_error(fs, rounded)) {
3064 set_fpu_register_invalid_result64(fs, rounded);
3069 double rounded = ceil(fs);
3070 int64_t result = static_cast<int64_t>(rounded);
3072 if (set_fcsr_round64_error(fs, rounded)) {
3073 set_fpu_register_invalid_result64(fs, rounded);