import v1.1.0_RC2 | 2009-09-20

This commit is contained in:
2019-07-17 22:19:00 +02:00
parent 3b7ba80568
commit 38c146901c
2504 changed files with 101817 additions and 62316 deletions

View File

@ -14,8 +14,8 @@
*
* @category Zend
* @package Zend_Locale
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @version $Id: Exception.php 8064 2008-02-16 10:58:39Z thomas $
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @version $Id: Exception.php 17083 2009-07-25 21:34:30Z thomas $
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
@ -23,16 +23,16 @@
/**
* Zend_Exception
*/
require_once 'Zend/Exception.php';
require_once 'Zend/Locale/Exception.php';
/**
* @category Zend
* @package Zend_Locale
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Locale_Math_Exception extends Zend_Exception
class Zend_Locale_Math_Exception extends Zend_Locale_Exception
{
protected $op1 = null;
protected $op2 = null;

View File

@ -14,9 +14,9 @@
*
* @category Zend
* @package Zend_Locale
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: PhpMath.php 12514 2008-11-10 16:30:24Z matthew $
* @version $Id: PhpMath.php 16221 2009-06-21 19:49:59Z thomas $
*/
@ -28,7 +28,7 @@
*
* @category Zend
* @package Zend_Locale
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Locale_Math_PhpMath extends Zend_Locale_Math
@ -45,7 +45,7 @@ class Zend_Locale_Math_PhpMath extends Zend_Locale_Math
self::$sqrt = array('Zend_Locale_Math_PhpMath', 'Sqrt');
self::$mod = array('Zend_Locale_Math_PhpMath', 'Mod');
self::$scale = array('Zend_Locale_Math_PhpMath', 'Scale');
self::$defaultScale = 0;
self::$defaultPrecision = 1;
}
@ -53,7 +53,7 @@ class Zend_Locale_Math_PhpMath extends Zend_Locale_Math
public static $defaultScale;
public static $defaultPrecision;
public static function Add($op1, $op2, $scale = null)
{
if ($scale === null) {
@ -105,14 +105,14 @@ class Zend_Locale_Math_PhpMath extends Zend_Locale_Math
if ($scale === null) {
$scale = Zend_Locale_Math_PhpMath::$defaultScale;
}
$op1 = self::normalize($op1);
$op2 = self::normalize($op2);
// BCMath extension doesn't use decimal part of the power
// Provide the same behavior
// Provide the same behavior
$op2 = ($op2 > 0) ? floor($op2) : ceil($op2);
$result = pow($op1, $op2);
if (is_infinite($result) or is_nan($result)) {
require_once 'Zend/Locale/Math/Exception.php';
@ -211,7 +211,7 @@ class Zend_Locale_Math_PhpMath extends Zend_Locale_Math
if ($scale === null) {
$scale = Zend_Locale_Math_PhpMath::$defaultScale;
}
if (empty($op1)) {
$op1 = 0;
}