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);
2699 float rounded;
2701 round64_according_to_fcsr(fs, rounded, result, fs);
2703 if (set_fcsr_round64_error(fs, rounded)) {
2704 set_fpu_register_invalid_result64(fs, rounded);
2709 float rounded;
2711 round_according_to_fcsr(fs, rounded, result, fs);
2713 if (set_fcsr_round_error(fs, rounded)) {
2714 set_fpu_register_word_invalid_result(fs, rounded);
2719 float rounded = trunc(fs);
2720 int32_t result = static_cast<int32_t>(rounded);
2722 if (set_fcsr_round_error(fs, rounded)) {
2723 set_fpu_register_word_invalid_result(fs, rounded);
2727 float rounded = trunc(fs);
2728 int64_t result = static_cast<int64_t>(rounded);
2730 if (set_fcsr_round64_error(fs, rounded)) {
2731 set_fpu_register_invalid_result64(fs, rounded);
2736 float rounded = std::floor(fs + 0.5);
2737 int32_t result = static_cast<int32_t>(rounded);
2744 if (set_fcsr_round_error(fs, rounded)) {
2745 set_fpu_register_word_invalid_result(fs, rounded);
2750 float rounded = std::floor(fs + 0.5);
2751 int64_t result = static_cast<int64_t>(rounded);
2759 if (set_fcsr_round64_error(fs, rounded)) {
2760 set_fpu_register_invalid_result64(fs, rounded);
2765 float rounded = floor(fs);
2766 int64_t result = static_cast<int64_t>(rounded);
2768 if (set_fcsr_round64_error(fs, rounded)) {
2769 set_fpu_register_invalid_result64(fs, rounded);
2775 float rounded = std::floor(fs);
2776 int32_t result = static_cast<int32_t>(rounded);
2778 if (set_fcsr_round_error(fs, rounded)) {
2779 set_fpu_register_word_invalid_result(fs, rounded);
2784 float rounded = std::ceil(fs);
2785 int32_t result = static_cast<int32_t>(rounded);
2787 if (set_fcsr_round_error(fs, rounded)) {
2788 set_fpu_register_invalid_result(fs, rounded);
2792 float rounded = ceil(fs);
2793 int64_t result = static_cast<int64_t>(rounded);
2795 if (set_fcsr_round64_error(fs, rounded)) {
2796 set_fpu_register_invalid_result64(fs, rounded);
3060 double rounded;
3062 round_according_to_fcsr(fs, rounded, result, fs);
3064 if (set_fcsr_round_error(fs, rounded)) {
3065 set_fpu_register_word_invalid_result(fs, rounded);
3071 double rounded = std::floor(fs + 0.5);
3072 int32_t result = static_cast<int32_t>(rounded);
3079 if (set_fcsr_round_error(fs, rounded)) {
3080 set_fpu_register_invalid_result(fs, rounded);
3085 double rounded = trunc(fs);
3086 int32_t result = static_cast<int32_t>(rounded);
3088 if (set_fcsr_round_error(fs, rounded)) {
3089 set_fpu_register_invalid_result(fs, rounded);
3094 double rounded = std::floor(fs);
3095 int32_t result = static_cast<int32_t>(rounded);
3097 if (set_fcsr_round_error(fs, rounded)) {
3098 set_fpu_register_invalid_result(fs, rounded);
3103 double rounded = std::ceil(fs);
3104 int32_t result = static_cast<int32_t>(rounded);
3106 if (set_fcsr_round_error(fs, rounded)) {
3107 set_fpu_register_invalid_result(fs, rounded);
3114 double rounded;
3116 round64_according_to_fcsr(fs, rounded, result, fs);
3118 if (set_fcsr_round64_error(fs, rounded)) {
3119 set_fpu_register_invalid_result64(fs, rounded);
3124 double rounded = std::floor(fs + 0.5);
3125 int64_t result = static_cast<int64_t>(rounded);
3133 if (set_fcsr_round64_error(fs, rounded)) {
3134 set_fpu_register_invalid_result64(fs, rounded);
3139 double rounded = trunc(fs);
3140 int64_t result = static_cast<int64_t>(rounded);
3142 if (set_fcsr_round64_error(fs, rounded)) {
3143 set_fpu_register_invalid_result64(fs, rounded);
3148 double rounded = floor(fs);
3149 int64_t result = static_cast<int64_t>(rounded);
3151 if (set_fcsr_round64_error(fs, rounded)) {
3152 set_fpu_register_invalid_result64(fs, rounded);
3157 double rounded = ceil(fs);
3158 int64_t result = static_cast<int64_t>(rounded);
3160 if (set_fcsr_round64_error(fs, rounded)) {
3161 set_fpu_register_invalid_result64(fs, rounded);