साँचा:Val
इस पृष्ठ के स्त्रोत में कोई भी बदलाव करने से पहले नीचे उदाहरण में देखें, प्रयोग करके पूर्वावलोकन करें। अगर आपके बदलाव लुआ त्रुटि या कोई अन्य त्रुटि ना दिखाकर वांक्षित परिणाम दे रहे हैं तभी बदलावों को सहेजें। यह साँचा तमाम गणित संबंधी पृष्ठों पर उपयोग किया जाता है और इसमें होने वाला कोई भी बदलाव सैकणों पृष्ठों पर असर डालता है। इसलिए इसमें कोई भी बदलाव तभी किया जाना चाहिए जब वह बदलाव व उसके परिणाम पूरी तरह जाँच-परख लिया गए हों। नए व कम अनुभवी सदस्य कृप्या कोई बदलाव ना करें।
उपयोग
[संपादित करें]Set of templates that can be used to easily present values in scientific notation, including uncertainty. They have the same look and feel and wrap the entire result in a"nowrap" block, so it never gets broken in seperate pieces at the end of a line.
मानदण्ड
[संपादित करें]There are four ways this template can be used:
{{val|''number''}}
- for displaying values without uncertainty/significance.{{val|''number''|''uncertainty''}}
- for displaying values with uncertainty like so 1,234±56.{{val|''number''|''upper uncertainty''|''lower uncertainty''}}
- for displaying values with uncertainty like so 1,234+56−78.{{val|''number''|(''significance'')}}
- for displaying values with significance like so 1,234(56).
They all take roughly the same arguments
1 | The value (must be a valid number) |
2 | The (upper limit of) uncertainty (must be a valid number) or significance (must be a valid number in parenthesis) |
3 | The lower limit of uncertainty (must be a valid negative number) |
e | The exponent for the power of 10 (optional). This will show up in the result as as " × 10e". |
Values (arguments 1-3 and e) are run through code copied from {{delimitnum}} for readability, except for argument 2 when it is surrounded by parenthesis. This currently causes an error for large numbers, numbers that require high precision and numbers that end in zeros after the decimal point. This last issues is being addressed, the other issues are a caused by a limitation in the wikipedia software for which there currently is no known fix.
| |
u / ul | The units for the number (optional, with/without a link to the page about the unit respectively). |
up / upl | The units per for the units (optional, requires u to be specified, with/without a link to the page about the unit respectively). |
Units (specified by u, ul, up and upl) are replaced by a more esthetically pleasing HTML representation and get a link (ul and upl only, if they are in the list found in {{val/units}} or if they are supported by {{convert}}). You can specify units using just u; a good example is "ul=m/s", which gets translated to "m·s-1", or you can use u and up, as in "u/up"; a good examples if "ul=m|up=s", which gets translated to "m/s".
| |
h | A header for the value (such as ∆, Ø, etc.., optional). |
f | A footer for the value (such as %, optional). |
Headers (specified by h) and footers (specified by f) are put in front of or behind the value as is: this includes spaces. They are inside the nowrap block and will always be on the same line as the value.
|
See {{val/test}} for a list of examples of the correct output of {{val}} and the errors it may return when incorrectly used.
गलतियाँ
[संपादित करें]There is strict checking on the validity of arguments; any incorrect use will result in an error, which is displayed using {{FormattingError}}. Pages that contain incorrect use of this template will show up on Category:Pages with incorrect formatting templates use.
उदाहरण
[संपादित करें]{{val|1234567890}}
→ 1,23,45,67,890 {{val|1.23456789}}
→ 1.23456789 अनिश्चितता/उतार-चढाव {{val|1.234|0.005}}
→ 1.234±0.5 {{val|1.234|+0.005|-0.001}}
→ 1.234+0.5−0.1 {{val|1.234|(5)}}
→ 1.234(5) घातांक/इकाईयाँ {{val|1.234|e=10|u=m}}
→ 1.234×१०10 m {{val|1.234|e=10|ul=m}}
→ 1.234×१०10 m {{val|1.234|0.05|e=5}}
→ 1.234±0.5×१०5 {{val|1.234567|+0.00005|-0.00004|e=-23|ul=m/s}}
→ 1.234567+0.00005−0.00004×१०−23 m/s {{val|1.234567|0.04|e=3|ul=psi}}
→ 1.234567±0.4×१०3 psi {{val|123.4|ul=USgal}}
→ 123.4 USgal {{val|12.34|ul=mpgimp}}
→ 12.34 mpgimp पहले/बाद में {{val|h=Δ |12.34|f=%}}
→ Δ 12.34%
ऊपर दिए गए निर्देश साँचा:Val/doc से लिए गए है।(संपादन | इतिहास) संपादक इस साँचे के प्रयोगस्थल व प्रयोग पन्नों में प्रयोग कर सकते है। sandbox (create) and testcases (create) pages. कृपया /doc उपपृष्ठ पर श्रेणियाँ व विकियों के बिच की कड़ियाँ जोड़े। इस साँचे के उपपृष्ठ। |