Template:GEPT/doc: Difference between revisions
(Created page with "{{documentation}} {{invokes|Exchange}} {{t|GEPT}} displays values entered into the Grand Exchange Market Watch pages with GE tax applied to them, that can be used to help perform profit calculations. This template is useful primarily in profit calculations because it avoids calculation errors caused by rounding when simply multiplying by {{GETax}}, especially on high quantities of low-cost items. For example, cleaning 1000 Grimy guam leaf that are bought at {{C...") |
No edit summary Tag: Reverted |
||
Line 2: | Line 2: | ||
{{invokes|Exchange}} |
{{invokes|Exchange}} |
||
{{t|GEPT}} displays values entered into the [[Grand Exchange Market Watch]] pages with GE tax applied to them, that can be used to help perform profit calculations. |
{{t|GEPT}} displays values entered into the [[Grand Exchange Market Watch]] mw.pages with GE tax applied to them, that can be used to help perform profit calculations. |
||
This template is useful primarily in profit calculations because it avoids calculation errors caused by rounding when simply multiplying by {{GETax}}, especially on high quantities of low-cost items. For example, cleaning 1000 [[Grimy guam leaf]] that are bought at {{Coins|{{GEP|Grimy guam leaf|1000}}}}, cleaned and sold at {{Coins|{{GEPT|Guam leaf|1000}}}} would generate a profit of {{Coins|{{GEPT|Guam leaf|1000}}-{{GEP|Grimy guam leaf|1000}}}}. However, if a naive multiplication by {{GETax}} is used to calculate the profit, it is reduced to {{Coins|{{GEP|Guam leaf|1000}}*{{GETax}}-{{GEP|Grimy guam leaf|1000}}}}. |
This template is useful primarily in profit calculations because it avoids calculation errors caused by rounding when simply multiplying by {{GETax}}, especially on high quantities of low-cost items. For example, cleaning 1000 [[Grimy guam leaf]] that are bought at {{Coins|{{GEP|Grimy guam leaf|1000}}}}, cleaned and sold at {{Coins|{{GEPT|Guam leaf|1000}}}} would generate a profit of {{Coins|{{GEPT|Guam leaf|1000}}-{{GEP|Grimy guam leaf|1000}}}}. However, if a naive multiplication by {{GETax}} is used to calculate the profit, it is reduced to {{Coins|{{GEP|Guam leaf|1000}}*{{GETax}}-{{GEP|Grimy guam leaf|1000}}}}. |
Revision as of 00:29, 17 October 2024
{{GEPT}}
displays values entered into the Grand Exchange Market Watch mw.pages with GE tax applied to them, that can be used to help perform profit calculations.
This template is useful primarily in profit calculations because it avoids calculation errors caused by rounding when simply multiplying by 0.99, especially on high quantities of low-cost items. For example, cleaning 1000 Grimy guam leaf that are bought at 8,000, cleaned and sold at 14,000 would generate a profit of 6,000. However, if a naive multiplication by 0.99 is used to calculate the profit, it is reduced to 5,860.00.
Usage
{{GEPT|Blue partyhat}}
will display as:
54450000
{{GEPT|Blue partyhat|5}}
will show the taxed price of 5 Blue partyhats: 272250000.
To round the output to a specified number of decimal places, use the round
parameter:
{{GEPT|Blue partyhat|1.33|round=2}}
will display as:
72418500
Default
If you specify an item name that does not exist on the Grand Exchange, a script error is thrown. You can set the dflt
to a value that will be returned instead of an error. (NB: if you are looking up prices for a historical GE item, this will return the default before checking if the item is historical.) You could set this to a string to detect the error, or to a number like 0 to allow calculations to continue, ignoring the non-GE item.
{{GEPT|Rainbow partyhat|dflt=error}} {{GEPT|Rainbow partyhat|dflt=0}}
74250000
74250000
See also
- Template:Coins
- Template:GEItem
- Template:GEP (same as Template:GEPT but without GE tax applied)
- Template:GEPrice (same as Template:GEP but with the commas)
- Template:GEInfo