downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Our source is open

The syntax highlighted source is automatically generated by PHP from the plaintext script. If you're interested in what's behind the several functions we used, you can always take a look at the source of the following files:

Of course, if you want to see the source of this page, we have it available. You can also browse the SVN repository for this website on svn.php.net.

Source of: /manual/en/function.expm1.php

<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$PARENTS = array();
include_once
dirname(__FILE__) ."/toc/ref.math.inc";
$setup = array (
 
'home' =>
  array (
   
0 => 'index.php',
   
1 => 'PHP Manual',
  ),
 
'head' =>
  array (
   
0 => 'UTF-8',
   
1 => 'en',
  ),
 
'this' =>
  array (
   
0 => 'function.expm1.php',
   
1 => 'expm1',
  ),
 
'up' =>
  array (
   
0 => 'ref.math.php',
   
1 => 'Math Functions',
  ),
 
'prev' =>
  array (
   
0 => 'function.exp.php',
   
1 => 'exp',
  ),
 
'next' =>
  array (
   
0 => 'function.floor.php',
   
1 => 'floor',
  ),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);

manual_header();
?>
<div id="function.expm1" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">expm1</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.1.0, PHP 5)</p><p class="refpurpose"><span class="refname">expm1</span> &mdash; <span class="dc-title">
   Returns exp(number) - 1, computed in a way that is accurate even
   when the value of number is close to zero
  </span></p>

 </div>
 <a name="function.expm1.description"></a><div class="refsect1 description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">float</span> <span class="methodname"><b>expm1</b></span>
    ( <span class="methodparam"><span class="type">float</span> <tt class="parameter">$arg</tt></span>
   )</div>

  <div class="warning"><b class="warning">Warning</b><p class="simpara">This function is
<em class="emphasis">EXPERIMENTAL</em>. The behaviour of this function, its name, and
surrounding documentation may change without notice in a future release of PHP.
This function should be used at your own risk.
</p></div>
  <p class="para">
   <b>expm1()</b> returns the equivalent to
   &#039;exp(<i><tt class="parameter">arg</tt></i>
) -  1&#039; computed in a way that is
   accurate even if the value of <i><tt class="parameter">arg</tt></i>
 is near zero,
   a case where &#039;exp (<i><tt class="parameter">arg</tt></i>
) - 1&#039; would be
   inaccurate due to subtraction of two numbers that are nearly equal.
  </p>
 </div>

 <a name="function.expm1.parameters"></a><div class="refsect1 parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   </p><dl>

    <dt class="varlistentry">

     <span class="term"><i><tt class="parameter">arg</tt></i>
</span>

     </dt><dd class="listitem">

      <p class="para">
       The argument to process
      </p>
     </dd>

   
   </dl>
<p>
  </p>
 </div>

 <a name="function.expm1.returnvalues"></a><div class="refsect1 returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   &#039;e&#039; to the power of <i><tt class="parameter">arg</tt></i>
 minus one
  </p>
 </div>

 <a name="function.expm1.changelog"></a><div class="refsect1 changelog">
  <h3 class="title">Changelog</h3>
  <p class="para">
   </p><table class="doctable informaltable">
   
     <thead valign="middle">
      <tr valign="middle">
       <th>Version</th>
       <th>Description</th>
      </tr>

     </thead>

     <tbody valign="middle" class="tbody">
      <tr valign="middle">
       <td align="left">5.3.0</td>
       <td align="left">
         This function is now available on all platforms
       </td>
      </tr>

     </tbody>
   
   </table>
<p>
  </p>
 </div>

 <a name="function.expm1.seealso"></a><div class="refsect1 seealso">
  <h3 class="title">See Also</h3>
  <p class="para">
   </p><ul class="simplelist">
    <li class="member"><a href="function.log1p.php" class="function" rel="rdfs-seeAlso">log1p()</a> - Returns log(1 + number), computed in a way that is accurate even when
   the value of number is close to zero</li>
    <li class="member"><a href="function.exp.php" class="function" rel="rdfs-seeAlso">exp()</a> - Calculates the exponent of e</li>
   </ul><p>
  </p>
 </div>

</div><?php manual_footer(); ?>
 
show source | credits | sitemap | contact | advertising | mirror sites