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

    <info>
        <link type="guide" xref="index#equation"/>
    
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>赤星　柔充</mal:name>
      <mal:email>yasumichi@vinelinux.org</mal:email>
      <mal:years>2012</mal:years>
    </mal:credit>
  </info>

	<title>関数</title>
    
    <p>
    Functions can be used by inserting the name of the function followed by function arguments. <app>Calculator</app> also support user-defined functions.
    If the argument is not a number or <link xref="variable">a single variable</link> then write each argument separated by semicolon and use parenthesis around the argument list.
    </p>
    <example>
    <p>sin 30</p>
    <p>abs (5−9)</p>
    <p>
    fun (9;10)
    </p>
    </example>
    <p>
    To add a new function type the function in the format as given below. A function name and arguments must only contain upper or lower case characters. The part after @ is the function description which is optional.
    </p>
    <example>
    <p>
    SimpleInterest (principal; rate; time) = principal * rate * time @ Simple Interest formula
    </p>
    </example>
    <p>
    Functions can also be added and inserted using the f(x) button.
    </p>
    <example>
    <p>
    Click on f(x). Type the function name in the box, choose the number of arguments and click on the plus sign button next to it. On the calculator screen type the function expression and press <key>Enter</key>.
    </p>
    </example>
    <example>
    <p>
    Click on f(x). Choose the function and click on it.
    </p>
    </example>
    <p>以下の関数が定義されています。</p>
    <table>
    <tr>
    <td><p>abs</p></td>
    <td><p><link xref="absolute">絶対値</link></p></td>
    </tr>
    <tr>
    <td><p>cos</p></td>
    <td><p><link xref="trigonometry">余弦</link></p></td>
    </tr>
    <tr>
    <td><p>cosh</p></td>
    <td><p><link xref="trigonometry">双曲線余弦</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">自然対数</link></p></td>
    </tr>
    <tr>
    <td><p>log</p></td>
    <td><p><link xref="logarithm">対数</link></p></td>
    </tr>
    <tr>
    <td><p>not</p></td>
    <td><p><link xref="boolean">ブール演算 NOT</link></p></td>
    </tr>
    <tr>
    <td><p>ones</p></td>
    <td><p>1 の補数</p></td>
    </tr>
    <tr>
    <td><p>sin</p></td>
    <td><p><link xref="trigonometry">正弦</link></p></td>
    </tr>
    <tr>
    <td><p>sinh</p></td>
    <td><p><link xref="trigonometry">双曲線正弦</link></p></td>
    </tr>
    <tr>
    <td><p>sqrt</p></td>
    <td><p><link xref="power">平方根</link></p></td>
    </tr>
    <tr>
    <td><p>tan</p></td>
    <td><p><link xref="trigonometry">正接</link></p></td>
    </tr>
    <tr>
    <td><p>tanh</p></td>
    <td><p><link xref="trigonometry">双曲線正接</link></p></td>
    </tr>
    <tr>
    <td><p>twos</p></td>
    <td><p>2 の補数</p></td>
    </tr>
    </table>
</page>
