Difference between revisions of "Template:DEC/workpage"
Jump to navigation
Jump to search
| Line 43: | Line 43: | ||
</pre> | </pre> | ||
{{#if: -13.26 < 0 | − }}{{#expr: abs (trunc -13.26)}}"{{#if: {{#expr: (abs -13.26) - (abs (trunc -13.26)) }} > 0 | {{str right|{{#expr: (abs -13.26) - (abs (trunc -13.26)) }}|1}} }} | {{#if: -13.26 < 0 | − }}{{#expr: abs (trunc -13.26)}}"{{#if: {{#expr: (abs -13.26) - (abs (trunc -13.26)) }} > 0 | {{str right|{{#expr: (abs -13.26) - (abs (trunc -13.26)) }}|1}} }} | ||
| + | |||
| + | ;complete | ||
| + | <pre> | ||
| + | {{#if: -13.26 < 0 | &minus; }}{{#if: {{#expr: (abs (trunc -13.26)) < 10 }} | {{padleft:{{#expr: (abs (trunc -13.26))}}|2|0}} | {{#expr: (abs (trunc -13.26))}} }}"{{#if: {{#expr: (abs -13.26) - (abs (trunc -13.26)) }} > 0 | {{str right|{{#expr: (abs -13.26) - (abs (trunc -13.26)) }}|1}} }} | ||
| + | </pre> | ||
| + | {{#if: -13.26 < 0 | − }}{{#if: {{#expr: (abs (trunc -13.26)) < 10 }} | {{padleft:{{#expr: (abs (trunc -13.26))}}|2|0}} | {{#expr: (abs (trunc -13.26))}} }}"{{#if: {{#expr: (abs -13.26) - (abs (trunc -13.26)) }} > 0 | {{str right|{{#expr: (abs -13.26) - (abs (trunc -13.26)) }}|1}} }} | ||
Revision as of 07:52, 29 June 2012
Template:NobotsTemplate:Workpage
Try to extract fractional part
{{#expr: {{#expr: abs -13.26 }} mod {{#expr: abs {{#expr: trunc -13.26}} }} }}
0
{{#expr: (abs -13.26) - (abs (trunc -13.26)) }}
0.26
{{#explode:{{#expr: (abs -13.26) - (abs (trunc -13.26)) }}|.|1}}
{{#explode:0.26|.|1}}
{{explode:{{#expr: (abs -13.26) - (abs (trunc -13.26)) }}|.|1}}
{{str right|{{#expr: (abs -13.26) - (abs (trunc -13.26)) }}|1}}
.26
{{#if: {{#expr: (abs -13.26) - (abs (trunc -13.26)) }} > 0 | {{str right|{{#expr: (abs -13.26) - (abs (trunc -13.26)) }}|1}} }}
.26
- check negative
{{#if: -13.26 < 0 | − }}
−
- pull together
{{#if: -13.26 < 0 | − }}{{#expr: abs (trunc -13.26)}}"{{#if: {{#expr: (abs -13.26) - (abs (trunc -13.26)) }} > 0 | {{str right|{{#expr: (abs -13.26) - (abs (trunc -13.26)) }}|1}} }}
−13".26
- complete
{{#if: -13.26 < 0 | − }}{{#if: {{#expr: (abs (trunc -13.26)) < 10 }} | {{padleft:{{#expr: (abs (trunc -13.26))}}|2|0}} | {{#expr: (abs (trunc -13.26))}} }}"{{#if: {{#expr: (abs -13.26) - (abs (trunc -13.26)) }} > 0 | {{str right|{{#expr: (abs -13.26) - (abs (trunc -13.26)) }}|1}} }}
−13".26