"ढाँचा:Precision" का संशोधनहरू बिचको अन्तर
Content deleted Content added
सा Protected Template:Getprecision: Used by protected template {{convert|nn|°F|°C}} ([edit=sysop] (indefinite) [move=sysop] (indefinite)) |
apply User:Wikid77's changes to fix values between 0 and 1 as per editrequest. |
||
पङ्क्ति ११:
-->|<!--else determine the
precision-->{{#expr: {{str_len|{{{1|15.1230}}}}} <!--
--> - {{ordomag|{{{1|15.1230}}} round 0}} - 1 <!--
--> {{#ifexpr: {{{1|15.1230}}}={{{1|15.1230}}}0 | - 1}}<!--
--> {{#ifexpr: {{{1|15.1230}}} < 0| - 1}} }}<!--endexpr#
पङ्क्ति २४:
-- not an integer, minus 1 if negative.
--
--NOTE
--
-- decimal, then the value is unchanged by appending 0 at
-- the end: so 5.23 = 5.230 is true, whereas for whole
-- integers, it would be: 5 = 50 as false, due to values
-- becoming n*10 for integer n. So, for integer n, the
-- check rejects: n = n0 as false; hence n is integer.
--
--NOTE Z3: The check on zero for any .00000 compares adding 1
-- to the amount, versus appending "1" at the end: if the
-- amount is a decimal, then adding 1 will be larger than
-- appending 1 at the end: 0.00 + 1 > 0.001, whereas for
-- whole zero, it would be
-- value
--
--
--
Line ३९ ⟶ ४७:
--15Aug10 Put HISTORY comments to log major changes.
--18Aug10 Fixed to handle zero: 0 as 0, 0.000 as 3, etc.
--04Sep10 Fixed to handle decimals between 0~1 (by round 0).
--04Sep10 Updated NOTES to explain the check appending 0 or 1.
--
-->{{documentation}}</noinclude>
|