စက်တင်ဘာလ
နံပါတ်ကို ဆယ်လုံးနေရာများ အပေါ်သို့ သို့မဟုတ် အောက်သို့ စက်ဝိုင်းဖြတ်ပါ
သင်ရိုက်ထည့်သလိုရလဒ်များကို update လုပ်ပါ
ဤဂဏန်းတွက်စက်အကြောင်း
you want to roundanumber to two decimal places, you can use the standard nearest-value rounding. The standard nearest-value rounding looks at the digit just past the cut-off — 5 or more rounds up, less than 5 rounds down — so 3.14159 to two decimal places is 3.14. The other columns forceadirectional mode: for 2.673 the nearest and floor both give 2.67 while the ceiling gives 2.68, and truncation simply drops the extra
မေးလေ့ရှိသောမေးခွန်းများ
ဆယ်လီဂဏန်းများသို့ လည်ပတ်ခြင်းသည် ဘယ်လိုအလုပ်လုပ်သလဲ။
ရိုးရှင်းစွာ cut-off လွန်ခဲ့တဲ့နံပါတ်ကိုကြည့်ပါ:5သို့မဟုတ်ပိုမို rounds up ကို, ထက်နည်း5rounds down ကို. နှစ်ခုနေရာများ 3.14159 3.14 ဖြစ်ပါတယ်။
ဆယ်လီဂဏန်းနေရာများ၏အပျက်သဘောဆောင်သောအရေအတွက်ကဘာလဲ?
၎င်းသည်ဆယ်ပုံတစ်ပုံ၏ ဘယ်ဘက်သို့လှည့်သည်: −1 သည် အနီးကပ်ဆုံးဆယ်အထိလှည့်သည်၊ −2 သည် အနီးကပ်ဆုံးတစ်ရာအထိလှည့်သည်။ ၃၄၅၇ သည် −၂ နေရာများမှာ ၃၅၀၀ ဖြစ်သည်။
အပေါ်နှင့်အောက် rounding အကြားခြားနားချက်ကဘာလဲ?
rounding up (စင်ကြယ်သော) အမြဲတမ်းအသေးစားမှကြီးမားတဲ့တန်ဖိုးနှင့် rounding down ကို (ကြမ်းပြင်) ပြောင်းရွှေ့, မည်သူမဆိုနီးကပ်စွာ picks စဉ်. For 2.673 to two places, closest and down give 2.67 but up gives 2.68.
ဖြတ်တောက်ထားသောရလဒ်က ဘာကိုပြသသလဲ။
2.673 နှစ်ဆယ်ရာခိုင်နှုန်းနေရာများသို့ truncated 2.67 ဖြစ်ပါတယ်။, အနီးဆုံး rounding လည်းပေးသော်လည်း 2.67 ဒီမှာနှင့် 2.678 2.68 ဖို့ rounding စဉ် 2.67 ဖို့ truncate လိမ့်မယ်.
ငါဆယ်ပုံတစ်ပုံနေရာများအစားသိသာထင်ရှားသောနံပါတ်များသို့ round လုပ်ဖို့ဘယ်လိုလဲ?
အရေးပါသောပုံရိပ်တွေမှဆယ်ပုံတစ်ပုံနေရာများမှ mode ကို switch.3၏တိကျမှုနောက်ဆုံးသုံးအဓိပ္ပာယ်ရှိသောဂဏန်းများကိုထိန်းသိမ်းထားသည်, ဒါကြောင့် 0.0045213 0.00452 ဖြစ်ပါသည်.
နံပါတ်ကို ကြီးမားစေရန် လုံးဝ ပတ်ခြင်းကို ပြုလုပ်ပါသလား။
positive numbers များအတွက်သာ။ rounding up means toward positive infinity, so −2.7 rounded up toafull number is −2, which is larger, not smaller.
API ကို — code ကိုမှဤဂဏန်းတွက်စက်ကိုအသုံးပြု
အခမဲ့ JSON endpoint အဖြစ်ဤဂဏန်းတွက်စက်ကိုခေါ် - လိုအပ်သော key ကိုမရှိ. query parameters တွေကိုသို့မဟုတ် JSON အဖြစ်အောက်ပါ Field Values ကိုပို့. ပြည့်စုံသော API ကိုစာရွက်စာတမ်းများကိုဖတ်ပါ →
အဆုံးသတ်ချက်
GET https://calculator.free/api/v1/rounding/
curl
curl "https://calculator.free/api/v1/rounding/?number=3.14159&places=2&mode=decimals"
JavaScript fetch()
const r = await fetch(
"https://calculator.free/api/v1/rounding/?" + new URLSearchParams({
"number": "3.14159",
"places": "2",
"mode": "decimals"
}));
const data = await r.json();
console.log(data.results);
ရလဒ်များသာယေဘုယျလမ်းညွှန်မှုများအတွက်ခန့်မှန်းချက်ဖြစ်ကြသည်, မငွေကြေး, ဆေးဘက်ဆိုင်ရာသို့မဟုတ်အခွန်အကြံပေးချက်.