Minggu, 22 November 2026
00:23 WIB
TERKINI
Bandar Lampung Pengangguran Bandar Lampung Turun Signifikan, Tetapi Puluhan Ribu Warga Masih Mencari Kerja Lampung Selatan Bakauheni Makin Ketat: Sinergi Aparat Berantas Narkoba Lintas Sumatera-Jawa Bandar Lampung UMP Lampung 2027 Resmi Naik 7,79 Persen, Lampaui Jakarta Bandar Lampung UMP Lampung 2027 Ditetapkan, Buruh Anggap Jauh dari Kebutuhan Hidup Layak Bandar Lampung Dosen Unila Peringatkan Potensi PHK Massal Akibat Kenaikan UMP Lampung 7,79% Bandar Lampung Jaksa Ungkap Dana Tantiem Mengalir ke Politisi di Kasus Korupsi Migas Lampung Pringsewu Anggota DPRD Pringsewu Pantau Ketat Perbaikan Jalan Raden Intan Wonodadi Pesawaran Pesawaran Prioritaskan Kesehatan Atlet di Porprov X Lampung 2026 dengan Tim Medis Khusus Tanggamus Polres Tanggamus Ungkap Pembobolan Rumah Rp45 Juta, Satu Pelaku Ditangkap di Wonosobo Nasional Era Baru Pemberantasan Korupsi: RUU Perampasan Aset Resmi Jadi Undang-Undang Bandar Lampung Pengangguran Bandar Lampung Turun Signifikan, Tetapi Puluhan Ribu Warga Masih Mencari Kerja Lampung Selatan Bakauheni Makin Ketat: Sinergi Aparat Berantas Narkoba Lintas Sumatera-Jawa Bandar Lampung UMP Lampung 2027 Resmi Naik 7,79 Persen, Lampaui Jakarta Bandar Lampung UMP Lampung 2027 Ditetapkan, Buruh Anggap Jauh dari Kebutuhan Hidup Layak Bandar Lampung Dosen Unila Peringatkan Potensi PHK Massal Akibat Kenaikan UMP Lampung 7,79% Bandar Lampung Jaksa Ungkap Dana Tantiem Mengalir ke Politisi di Kasus Korupsi Migas Lampung Pringsewu Anggota DPRD Pringsewu Pantau Ketat Perbaikan Jalan Raden Intan Wonodadi Pesawaran Pesawaran Prioritaskan Kesehatan Atlet di Porprov X Lampung 2026 dengan Tim Medis Khusus Tanggamus Polres Tanggamus Ungkap Pembobolan Rumah Rp45 Juta, Satu Pelaku Ditangkap di Wonosobo Nasional Era Baru Pemberantasan Korupsi: RUU Perampasan Aset Resmi Jadi Undang-Undang

Templat:Rnd

templat Wikimedia

Bagikan:
Dokumentasi templatlihatsuntingriwayatsegarkan

This templates rounds parameter 1 to the number of digits after the point optionally given as parameter 2. If parameter 2 is negative, rounding is to a multiple of 10. If parameter 2 is undefined, numbers with 4 digits before the point are rounded to integers, numbers with 3 digits before the point are rounded to 1 digit after the point, numbers with 2 digits before the point are rounded to 2 digits after the point, and numbers with 1 digit before the point or none are rounded to 3 digits after the point.

In other words, if parameter 2 is undefined, rounding is to 4 significant digits, except that it is not cruder than rounding to an integer and not finer than rounding to three digits after the decimal point.

Examples:

  • "{{round|123.456|4}}" gives "123,4560"
  • "{{round|123.456|3}}" gives "123,456"
  • "{{round|123.456|2}}" gives "123,46"
  • "{{round|123.456|1}}" gives "123,5"
  • "{{round|123.456|0}}" gives "123"
  • "{{round|123.456|-1}}" gives "120"
  • "{{round|123.456|-2}}" gives "100"
  • "{{round|123.456|-3}}" gives "0"
  • "{{round|123456.789}}" → "123.457"
  • "{{round|12345.6789}}" → "12.346"
  • "{{round|1234.56789}}" → "1.235"
  • "{{round|123.456789}}" → "123"
  • "{{round|12.3456789}}" → "12"
  • "{{round|1.23456789}}" → "1"
  • "{{round|.123456789}}" → "0"
  • "{{round|.0123456789}}" → "0"
  • "{{round|.00123456789}}" → "0"

Note that trailing zeros are not shown, so rounding can seem cruder than has actually been applied:

  • "{{round|123.04}}" → "123"
  • "{{round|12.304}}" → "12"
  • "{{round|1.2304}}" → "1"

While this is a limitation of the template (normally there would be trailing zeros to show the precision), there is also the general problem that if a number is an integer with trailing zeros, then the precision is not clear:

  • "{{round|1230.4}}" → "1.230"

See also

  • {{roundup}}
  • {{rounddown}}
  • {{decimals}} – acts like rounding but displays trailing zeros after the decimal point
  • {{precision}} – handles rounding of large numbers, too, like "349,030,293" → "349,030,000", "349,000,000", or "350,000,000"

TemplateData

Ini adalah TemplateData untuk templat ini yang digunakan oleh TemplateWizard, VisualEditor dan alat-alat lainnya. Lihat laporan penggunaan parameter bulanan untuk Template:Rnd.

TemplateData untuk Rnd

This templates rounds a value to the optionally given number of digits after the point.

Parameter templat

ParameterKeteranganJenisStatusValue1

The value to be rounded

Contoh
3.14159265
Angkawajib diisiNumber of digits2

Number of digits after the point. If negative, rounding is to a multiple of 10. If undefined, numbers with 4 digits before the point are rounded to integers, numbers with 3 digits before the point are rounded to 1 digit after the point, numbers with 2 digits before the point are rounded to 2 digits after the point, and numbers with 1 digit before the point or none are rounded to 3 digits after the point.

Contoh
2
Angkaopsional
Dokumentasi di atas ditransklusikan dari Templat:Rnd/doc. (sunting | riwayat)
Penyunting dapat melakukan uji coba pada halaman bak pasir (buat | cermin) dan kasus uji (buat) templat ini.
Mohon tambahkan kategori pada subhalaman /doc. Subhalaman templat ini.
Konten disalin dari Wikipedia Bahasa Indonesia (lisensi CC BY-SA) Lihat versi asli di Wikipedia

Rekomendasi Pilihan