<?xml version="1.0" encoding="UTF-8"?>
<!--
 * Scilab ( https://www.scilab.org/ ) - This file is part of Scilab
 * Copyright (C) 2008 - INRIA
 *
 * Copyright (C) 2012 - 2016 - Scilab Enterprises
 *
 * This file is hereby licensed under the terms of the GNU GPL v2.0,
 * pursuant to article 5.3.4 of the CeCILL v.2.1.
 * This file was originally licensed under the terms of the CeCILL v2.1,
 * and continues to be available under such terms.
 * For more information, see the COPYING file which you should have received
 * along with this program.
 *
 -->
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
          xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml"
          xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook"
          xmlns:scilab="http://www.scilab.org" xml:id="nextpow2" xml:lang="ja">
    <refnamediv>
        <refname>nextpow2</refname>
        <refpurpose>指定値を超える2の累乗の最小値</refpurpose>
    </refnamediv>
    <refsynopsisdiv>
        <title>呼び出し手順</title>
        <synopsis>t = nextpow2(x)</synopsis>
    </refsynopsisdiv>
    <refsection>
        <title>引数</title>
        <variablelist>
            <varlistentry>
                <term>x</term>
                <listitem>
                    <para>実数のベクトルまたは行列</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>p</term>
                <listitem>
                    <para>整数のベクトルまたは行列</para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsection>
    <refsection>
        <title>説明</title>
        <para>
            <literal>x</literal> がスカラーの場合, <literal>nextpow2(x)</literal>
            <literal>2^p &gt;=abs(x)</literal>となるような<literal>p</literal>
            を返します.
            <literal>x</literal> がベクトルまたは行列の場合,
            <literal>nextpow2(x)</literal> が要素毎に適用されます.
        </para>
    </refsection>
    <refsection>
        <title>例</title>
        <programlisting role="example"><![CDATA[
nextpow2(127)
nextpow2(128)
nextpow2(0:10)
 ]]></programlisting>
    </refsection>
    <refsection role="see also">
        <title>参照</title>
        <simplelist type="inline">
            <member>
                <link linkend="log2">log2</link>
            </member>
            <member>
                <link linkend="nearfloat">nearfloat</link>
            </member>
            <member>
                <link linkend="bitstring">bitstring</link>
            </member>
        </simplelist>
    </refsection>
</refentry>