<?xml version="1.0" encoding="utf-8"?>
<page xmlns="http://projectmallard.org/1.0/" type="guide" id="function" xml:lang="zh-CN">

    <info>
        <link type="guide" xref="index#equation"/>
    
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>Christopher Meng</mal:name>
      <mal:email>i@cicku.me</mal:email>
      <mal:years>2012-2013</mal:years>
    </mal:credit>
  
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>ravix</mal:name>
      <mal:email>dr.neemous@gmail.com</mal:email>
      <mal:years>2013</mal:years>
    </mal:credit>
  
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>Dianjin Wang</mal:name>
      <mal:email>1132321739qq@gmail.com</mal:email>
      <mal:years>2012</mal:years>
    </mal:credit>
  
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>Cravix</mal:name>
      <mal:email>dr.neemous@gmail.com</mal:email>
      <mal:years>2013</mal:years>
    </mal:credit>
  
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>nyanyh</mal:name>
      <mal:email>rebuilty@gmail.com</mal:email>
      <mal:years>2013</mal:years>
    </mal:credit>
  
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>liulitchi</mal:name>
      <mal:email>xingzuo88@qq.com</mal:email>
      <mal:years>2013</mal:years>
    </mal:credit>
  
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>玉堂白鹤</mal:name>
      <mal:email>yjwork@qq.com</mal:email>
      <mal:years>2015</mal:years>
    </mal:credit>
  
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>Mingye Wang</mal:name>
      <mal:email>arthur200126@gmail.com</mal:email>
      <mal:years>2015-2016</mal:years>
    </mal:credit>
  
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>白铭骢</mal:name>
      <mal:email>jeffbai@aosc.xyz</mal:email>
      <mal:years>2015-2016</mal:years>
    </mal:credit>
  
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>刘子兴</mal:name>
      <mal:email>liushuyu@aosc.xyz</mal:email>
      <mal:years>2015-2016</mal:years>
    </mal:credit>
  
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>Mingtian Yang</mal:name>
      <mal:email>i@skylee.xyz</mal:email>
      <mal:years>2020</mal:years>
    </mal:credit>
  </info>

	<title>函数</title>
    
    <p>
    Functions can be used by inserting the name of the function followed by the function argument.
    If the argument is not a number or <link xref="variable">variable</link> then use parenthesis around the argument.
    </p>
    <example>
    <p>
    sin 30
    </p>
    <p>
    abs (5−9)
    </p>
    </example>
    <p>
    The following functions are defined.
    </p>
    <table>
    <tr>
    <td><p>abs</p></td>
    <td><p><link xref="absolute">Absolute Value</link></p></td>
    </tr>
    <tr>
    <td><p>cos</p></td>
    <td><p><link xref="trigonometry">Cosine</link></p></td>
    </tr>
    <tr>
    <td><p>cosh</p></td>
    <td><p><link xref="trigonometry">Hyperbolic Cosine</link></p></td>
    </tr>
    <tr>
    <td><p>frac</p></td>
    <td><p>小数部分</p></td>
    </tr>
    <tr>
    <td><p>int</p></td>
    <td><p>整数部分</p></td>
    </tr>
    <tr>
    <td><p>ln</p></td>
    <td><p><link xref="logarithm">Natural Logarithm</link></p></td>
    </tr>
    <tr>
    <td><p>log</p></td>
    <td><p><link xref="logarithm">Logarithm</link></p></td>
    </tr>
    <tr>
    <td><p>not</p></td>
    <td><p><link xref="boolean">Boolean NOT</link></p></td>
    </tr>
    <tr>
    <td><p>ones</p></td>
    <td><p>Ones complement</p></td>
    </tr>
    <tr>
    <td><p>sin</p></td>
    <td><p><link xref="trigonometry">Sine</link></p></td>
    </tr>
    <tr>
    <td><p>sinh</p></td>
    <td><p><link xref="trigonometry">Hyperbolic Sine</link></p></td>
    </tr>
    <tr>
    <td><p>sqrt</p></td>
    <td><p><link xref="power">Square Root</link></p></td>
    </tr>
    <tr>
    <td><p>tan</p></td>
    <td><p><link xref="trigonometry">Tangent</link></p></td>
    </tr>
    <tr>
    <td><p>tanh</p></td>
    <td><p><link xref="trigonometry">Hyperbolic Tangent</link></p></td>
    </tr>
    <tr>
    <td><p>twos</p></td>
    <td><p>Twos complement</p></td>
    </tr>
    </table>
    <p>
    <app>MATE Calculator</app> does not support user-defined functions.
    </p>
</page>
