aboutsummaryrefslogtreecommitdiffstats
path: root/funcs/func_math.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-06-04 23:41:49 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-06-04 23:41:49 +0000
commit57a13eaab1c6707d90f1a2a5b594bb7b312e6ed2 (patch)
treec06facb5edcdf9e99fad2af72a20cdcef0b9f9e6 /funcs/func_math.c
parentfbd44b24a6625634dddcc25e3b81d2da298ffeb6 (diff)
According to MATH, 0+1181000386 = 1181000448. Oops.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@67161 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'funcs/func_math.c')
-rw-r--r--funcs/func_math.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/funcs/func_math.c b/funcs/func_math.c
index a838e4f99..4795efcc6 100644
--- a/funcs/func_math.c
+++ b/funcs/func_math.c
@@ -67,9 +67,9 @@ static char *builtin_function_math(struct ast_channel *chan, char *cmd, char *da
int argc;
char *argv[2];
char *args;
- float fnum1;
- float fnum2;
- float ftmp = 0;
+ double fnum1;
+ double fnum2;
+ double ftmp = 0;
char *op;
int iaction=-1;
int type_of_result=FLOAT_RESULT;
@@ -159,12 +159,12 @@ static char *builtin_function_math(struct ast_channel *chan, char *cmd, char *da
return NULL;
}
- if (sscanf(mvalue1, "%f", &fnum1) != 1) {
+ if (sscanf(mvalue1, "%lf", &fnum1) != 1) {
ast_log(LOG_WARNING, "'%s' is not a valid number\n", mvalue1);
return NULL;
}
- if (sscanf(mvalue2, "%f", &fnum2) != 1) {
+ if (sscanf(mvalue2, "%lf", &fnum2) != 1) {
ast_log(LOG_WARNING, "'%s' is not a valid number\n", mvalue2);
return NULL;
}