এই টেমপ্লেটটি স্থানান্তর করা থেকে সুরক্ষিত।
এই টেমপ্লেটটি সুরক্ষিত।

টেমপ্লেট:Val/delimitnum/fraction

উইকিপিডিয়া, মুক্ত বিশ্বকোষ থেকে
টেমপ্লেট নথি[দেখুন] [সম্পাদনা] [ইতিহাস] [শোধন]

Usage

{{Val/delimitnum/fraction |0.123456 |6}}   → ১২৩৫৬

The Template:Val/delimitnum/fraction is used by template {{Val}}. It formats a positive number lower than 1, using a given number of decimal digits after a decimal dot. It does not show the dot ("."), only the digits, in groups of 3 or 4, separated by thin spaces (small gaps).

Parameters

Parameter 1 is the required positive value to display lower than 1 (i.e. the fractional part of a positive real, with no spaces). Note that its value is not restricted in this template, as it is assumed to be valid (see {{Val/delimitnum}} for how it is computed). The amount in {1} could be an entire number (3400.65), but only the decimal portion will be displayed ("65").

Parameter 2 is the number of decimals to display (the count of digits after the decimal dot).

Examples

  • {{Val/delimitnum/fraction|0.12345|5}} → ১২৩
  • {{Val/delimitnum/fraction|0.12345|4}} → ১২৩৪
  • {{Val/delimitnum/fraction|0.54321|8}} → ৫৪৩১০
  • {{Val/delimitnum/fraction|0.98765432101234|14}} → ৯৮৭৫৪২১১২
  • {{Val/delimitnum/fraction|560.123|3}} → ১২৩
  • {{Val/delimitnum/fraction|99000800.7|1}} → ৭

Messages

The following messages might appear:

  • Too many digits. - when parameter 2 > 14.
  • Expression error: Unexpected number. - when invalid spaces in number "0.123 456".
  • Expression error: Unrecognised punctuation...{. - if exceeded expansion depth limit.

Performance impact

Template:Val/delimitnum/fraction limits the count of decimal digits to 14, based on the limit of computer math for the server computers. For higher counts, it shows: Too many digits.. In most uses, within the text of articles, using the template will not restrict performance, but when used inside the wikitext markup of very large templates, there are some restrictions. To display just 1 decimal digit, Val/delimitnum/fraction has an internal expansion depth of 4 levels, adding 1 level for each digit of the decimal portion.

For a 7-digit decimal (such as: 0.1234567), it uses a depth of 10 levels (4+6). At the maximum, for a 14-digit decimal (such as: 0.98765432101234), it uses a depth of 17 levels (4+13). In the rare event of exceeding the expansion depth limit, an expression error will be displayed, such as: Expression error: Unrecognised punctuation character "{". In general usage, most numbers rarely have more than 5 decimal digits (expansion depth of 8 levels).

See also

  • {{Val/delimitnum}} - to format an entire number, including decimal portion
  • {{gaps}} - to insert gaps between multiple numbers or letters
https://bn.wikipedia.org/wiki/%E0%A6%9F%E0%A7%87%E0%A6%AE%E0%A6%AA%E0%A7%8D%E0%A6%B2%E0%A7%87%E0%A6%9F:Val/delimitnum/fraction
bn.wikipedia.org
crawl=CC-MAIN-2021-17
54722
application/http; msgtype=response
sha1:G5HP33GZ4HZKNKQDSIL3673KT5C7GTGP
<urn:uuid:7843540c-ea83-437e-9098-e4262ea30ed5>
2021-04-15T16:30:09Z
208.80.154.224
text/html
sha1:ZOMAF6Q2IXAKSEZ2PNLHHMK7PHTBENV4
<urn:uuid:264af085-bd14-4bbb-a1dd-deea1821b3b0>
https://bn.wikipedia.org/wiki/%E0%A6%9F%E0%A7%87%E0%A6%AE%E0%A6%AA%E0%A7%8D%E0%A6%B2%E0%A7%87%E0%A6%9F:Val/delimitnum/fraction
response
<urn:uuid:dc8eb5bf-d703-4594-a46a-1e3d65b8bf9d>
isPartOf: CC-MAIN-2021-17
publisher: Common Crawl
description: Wide crawl of the web for April 2021
operator: Common Crawl Admin (info@commoncrawl.org)
hostname: ip-10-67-67-36.ec2.internal
software: Apache Nutch 1.18 (modified, https://github.com/commoncrawl/nutch/)
robots: checked via crawler-commons 1.2-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)
format: WARC File Format 1.1
conformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/