Template:Abs

50px Template documentation[view] [edit] [history] [purge]

This template evaluates its numeric parameter and returns its absolute value. If the parameter is empty or missing, it returns an empty string. The parameter may also be a numeric expression that will be evaluated before testing its sign.

Syntax:
{{Abs|value}}
Examples with a simple number:
{{Abs|100}} = 100.
{{Abs|0.1}} = 0.1.
{{Abs|0}} = 0.
{{Abs|-0.1}} = 0.1.
{{Abs|-100}} = 100.
Examples where the parameter is evaluated:
{{Abs|01}} = 1.
{{Abs|00}} = 0.
{{Abs|0.}} = 0.
{{Abs|0.0}} = 0.
{{Abs|-0}} = -0.
{{Abs|3-4}} = 1.
{{Abs|-4*2}} = 8.
Examples with an empty (or missing) parameter:
{{Abs|}} = .
{{Abs}} = .ar:قالب:مطلق

az:Şablon:Abs be:Шаблон:Abs ca:Plantilla:Abs et:Mall:Abs fr:Modèle:Abs hi:साँचा:Abs id:Templat:Abs jv:Cithakan:Abs ka:თარგი:აბს kk:Үлгі:Abs lt:Šablonas:Abs nl:Sjabloon:Abs ne:ढाँचा:Abs no:Mal:Abs oc:Modèl:Abs ru:Шаблон:Abs sl:Predloga:Abs sq:Stampa:Abs su:Citakan:Abs sv:Mall:Abs th:แม่แบบ:Abs tl:Padron:Abs vi:Bản mẫu:Abs zh-classical:Template:Math.abs zh-yue:Template:Abs