{"route":"/en-US-v0.13.1/reference/math/frac/","title":"Fraction","description":"Documentation for the `frac` function.","part":null,"outline":[{"id":"summary","name":"Summary","children":[]},{"id":"example","name":"Example","children":[]},{"id":"syntax","name":"Syntax","children":[]},{"id":"parameters","name":"Parameters","children":[{"id":"parameters-num","name":"num","children":[]},{"id":"parameters-denom","name":"denom","children":[]}]}],"body":{"kind":"func","content":{"path":["math"],"name":"frac","title":"Fraction","keywords":[],"oneliner":"A mathematical fraction.","element":true,"contextual":false,"deprecation":null,"details":"<p>A mathematical fraction.</p>\n<h2 id=\"example\">Example</h2>\n<div class=\"previewed-code\"><pre><code><span class=\"typ-math-delim\">$</span> 1<span class=\"typ-math-op\">/</span>2 &lt; <span class=\"typ-punct\">(</span>x+1<span class=\"typ-punct\">)</span><span class=\"typ-math-op\">/</span>2 <span class=\"typ-math-delim\">$</span>\n<span class=\"typ-math-delim\">$</span> <span class=\"typ-punct\">(</span>(x+1)<span class=\"typ-punct\">)</span> <span class=\"typ-math-op\">/</span> 2 = <span class=\"typ-func\">frac</span><span class=\"typ-punct\">(</span>a<span class=\"typ-punct\">,</span> b<span class=\"typ-punct\">)</span> <span class=\"typ-math-delim\">$</span>\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.13.1/assets/f5116cafe55239b89e94f6f836bafecd.png\" alt=\"Preview\"></div></div>\n<h2 id=\"syntax\">Syntax</h2>\n<p>This function also has dedicated syntax: Use a slash to turn neighbouring\nexpressions into a fraction. Multiple atoms can be grouped into a single\nexpression using round grouping parenthesis. Such parentheses are removed\nfrom the output, but you can nest multiple to force them.</p>","example":null,"self":false,"params":[{"name":"num","details":"<p>The fraction's numerator.</p>","example":null,"types":["content"],"strings":[],"default":null,"positional":true,"named":false,"required":true,"variadic":false,"settable":false},{"name":"denom","details":"<p>The fraction's denominator.</p>","example":null,"types":["content"],"strings":[],"default":null,"positional":true,"named":false,"required":true,"variadic":false,"settable":false}],"returns":["content"],"scope":[]}}}