[asterisk-commits] murf: branch 1.4 r74628 - in /branches/1.4: ./ doc/ utils/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Jul 11 13:11:44 CDT 2007
Author: murf
Date: Wed Jul 11 13:11:44 2007
New Revision: 74628
URL: http://svn.digium.com/view/asterisk?view=rev&rev=74628
Log:
further reversion of previously applied floating point stuff for expr2
Modified:
branches/1.4/UPGRADE.txt
branches/1.4/doc/channelvariables.txt
branches/1.4/utils/expr2.testinput
Modified: branches/1.4/UPGRADE.txt
URL: http://svn.digium.com/view/asterisk/branches/1.4/UPGRADE.txt?view=diff&rev=74628&r1=74627&r2=74628
==============================================================================
--- branches/1.4/UPGRADE.txt (original)
+++ branches/1.4/UPGRADE.txt Wed Jul 11 13:11:44 2007
@@ -101,12 +101,6 @@
if your dialplan relies on the ability to 'run off the end' of an extension
and wait for a new extension without using WaitExten() to accomplish that,
you will need set autofallthrough to 'no' in your extensions.conf file.
-
-* The ast_expr2 stuff has been modified to handle floating-point numbers.
- Numbers of the format D.D are now acceptable input for the expr parser,
- Where D is a string of base-10 digits. All math is now done in "long double",
- if it is available on your compiler/architecture. This was half-way between
- a bug-fix (because the MATH func returns fp by default), and an enhancement.
Command Line Interface:
Modified: branches/1.4/doc/channelvariables.txt
URL: http://svn.digium.com/view/asterisk/branches/1.4/doc/channelvariables.txt?view=diff&rev=74628&r1=74627&r2=74628
==============================================================================
--- branches/1.4/doc/channelvariables.txt (original)
+++ branches/1.4/doc/channelvariables.txt Wed Jul 11 13:11:44 2007
@@ -212,19 +212,19 @@
an empty string or zero; otherwise, returns zero.
expr1 {=, >, >=, <, <=, !=} expr2
- Return the results of floating pt. comparison if both arguments are
- numbers; otherwise, returns the results of string comparison
+ Return the results of integer comparison if both arguments are
+ integers; otherwise, returns the results of string comparison
using the locale-specific collation sequence. The result of each
comparison is 1 if the specified relation is true, or 0 if the
relation is false.
expr1 {+, -} expr2
- Return the results of addition or subtraction of
+ Return the results of addition or subtraction of integer-valued
arguments.
expr1 {*, /, %} expr2
- Return the results of multiplication, division, or
- remainder of arguments. (floating point [long double if possible]).
+ Return the results of multiplication, integer division, or
+ remainder of integer-valued arguments.
- expr1
Return the result of subtracting expr1 from 0.
@@ -322,13 +322,10 @@
NUMBERS VS STRINGS
--------------------------
-Tokens consisting only of numbers are converted to long doubles for
-most of the operators (80-128 bits, depending on the compiler/platform/etc).
-This means that overflows can occur when the
+Tokens consisting only of numbers are converted to 64-bit numbers for
+most of the operators. This means that overflows can occur when the
numbers get above 18 digits. Warnings will appear in the logs in this
case.
-If "long double" is not available, then "double" is used (usually 64 bit floating
-point numbers).
___________________________
CONDITIONALS
---------------------------
@@ -486,10 +483,6 @@
is returned as the result. See above for details.
9. Unary operators '-' and '!' were made right associative.
-
-10. All arithmetic operations are now done in floating point (long double
- if possible, plain double otherwise).
-
--------------------------------------------------------
DEBUGGING HINTS FOR $[ ] EXPRESSIONS
Modified: branches/1.4/utils/expr2.testinput
URL: http://svn.digium.com/view/asterisk/branches/1.4/utils/expr2.testinput?view=diff&rev=74628&r1=74627&r2=74628
==============================================================================
--- branches/1.4/utils/expr2.testinput (original)
+++ branches/1.4/utils/expr2.testinput Wed Jul 11 13:11:44 2007
@@ -90,7 +90,3 @@
3
something
043
-2.1+4.2
-1.500003+1.4999999999999898989898989898989898989889898
-1/4
-
More information about the asterisk-commits
mailing list