Template:Simplified fraction/doc: Difference between revisions

From Xenharmonic Wiki
Jump to navigation Jump to search
Tristanbay (talk | contribs)
messed around with params
Tristanbay (talk | contribs)
No edit summary
Line 7: Line 7:
* mixed: whether the fraction is mixed or not if it's more than 1
* mixed: whether the fraction is mixed or not if it's more than 1


{{{{ROOTPAGENAME}}|n=24|d=15|mixed=0}}
{{{{ROOTPAGENAME}}|n=24|d=15|mixed=false}}


{{{{ROOTPAGENAME}}|n=44|d=14|mixed=1}}
{{{{ROOTPAGENAME}}|n=44|d=14|mixed=true}}


{{{{ROOTPAGENAME}}|n=75|d=15|mixed=0}}
{{{{ROOTPAGENAME}}|n=75|d=15|mixed=false}}


{{{{ROOTPAGENAME}}|n=100|d=5|mixed=1}}
{{{{ROOTPAGENAME}}|n=100|d=5|mixed=true}}

Revision as of 08:33, 12 October 2025

This template has a corresponding Lua module Module:Simplified fraction, but does not invoke its functions.
This template invokes the following functions: simfrac from Reduced fraction.

This template is for creating fractions that are automatically reduced to their simplest form. It is meant to come in handy for automated template modules that use Lua to generate fractional numbers in a loop.

There are 3 parameters:

  • n: the numerator
  • d: the denominator
  • mixed: whether the fraction is mixed or not if it's more than 1

Lua error in Module:Simplified_fraction at line 4: bad argument #1 to 'max' (number expected, got string).

Lua error in Module:Simplified_fraction at line 4: bad argument #1 to 'max' (number expected, got string).

Lua error in Module:Simplified_fraction at line 4: bad argument #1 to 'max' (number expected, got string).

Lua error in Module:Simplified_fraction at line 4: bad argument #1 to 'max' (number expected, got string).