Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Usage  



1.1  Examples  







2 TemplateData  





3 Maintenance categories  





4 See also  














Template:Round






Afrikaans
Ænglisc
العربية

Azərbaycanca
تۆرکجه
Basa Bali

 / Bân-lâm-gú
Basa Banyumasan
Беларуская
Беларуская (тарашкевіца)

Boarisch
Bosanski
Brezhoneg
Буряад
Català
Čeština
Chavacano de Zamboanga
ChiShona
Cymraeg
Dansk
الدارجة

Eesti
Ελληνικά
Euskara
فارسی
Fiji Hindi
Føroyskt
Français
Galego
گیلکی

/Hak-kâ-ngî

Հայերեն
ि
Bahasa Hulontalo
Ilokano
Bahasa Indonesia
IsiXhosa
IsiZulu
Íslenska
עברית
Jawa
Ikinyarwanda
Kongo
Kurdî
Кыргызча
Ladin

Latviešu
Li Niha
Magyar
Madhurâ
ि
Македонски
Māori

مصرى

Bahasa Melayu
Minangkabau
 / Mìng-dĕ̤ng-nḡ
Монгол

Na Vosa Vakaviti


Norfuk / Pitkern
Norsk bokmål
Novial
ି
Oʻzbekcha / ўзбекча

Pangasinan

پښتو

Tok Pisin
Português
Română
Русский
Gagana Samoa

Scots

Simple English
Slovenčina
Slovenščina
کوردی
Српски / srpski
Srpskohrvatski / српскохрватски
Sunda
Svenska
Tagalog
ி
Татарча / tatarça
 


Tsetsêhestâhese
Türkçe
Basa Ugi
Українська
اردو
Tiếng Vit
Yorùbá

Zazaki

Batak Toba
 

Edit links
 









Template
Talk
 

















Read
View source
View history
 








Tools
   


Actions  



Read
View source
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 




In other projects  



Wikibooks
Wikiversity
 
















Appearance
   

 





Permanently protected template

From Wikipedia, the free encyclopedia
 


Usage

This template rounds parameter 1 by parameter 2 decimal places (goes the other way for negative rounding) and includes trailing zeros.

For example, rounding by 1 gives 1 decimal digit, rounding by 0 gives integers, or rounding by -2 gives the amount in hundreds. Scientific notation is displayed for numbers greater than or equal to 1×109, or less than 1×10−4.

Examples

As with #expr, the total number of significant digits is not more than 14:

The second parameter, precision, should be an integer. Non-integer may give unexpected result.
Non-numeric input will result in an error message.

TemplateData

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Round in articles based on its TemplateData.

TemplateData for Round

Rounds (parameter 1) by (parameter 2) decimal places, and formats. Scientific notation is used for numbers greater than 1×10^9, or less than 1×10^−4.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
number1

The number to be rounded

Numberrequired
decimal places2

The number of decimal places, if negative the number is rounded so the last (parameter 2) digits are zero

Numbersuggested

Maintenance categories

See also


Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Round&oldid=1097157852"

Categories: 
Templates based on the Math Lua module
Mathematical function templates
Hidden categories: 
Wikipedia template-protected templates
Templates using TemplateData
Templates that add a tracking category
 



This page was last edited on 9 July 2022, at 01:53 (UTC).

Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



Privacy policy

About Wikipedia

Disclaimers

Contact Wikipedia

Code of Conduct

Developers

Statistics

Cookie statement

Mobile view



Wikimedia Foundation
Powered by MediaWiki