diff --git a/indra/llmath/llcalc.cpp b/indra/llmath/llcalc.cpp
index f399463a47c5659d4a01ccbbdc9a37eec943b07d..f16dbec63f5a6a2e76e37f45721442a84c7ea08f 100644
--- a/indra/llmath/llcalc.cpp
+++ b/indra/llmath/llcalc.cpp
@@ -62,7 +62,9 @@ LLCalc::LLCalc() : mLastErrorPos(0)
 	(*mConstants)["PI"] = F_PI;
 	(*mConstants)["TWO_PI"] = F_TWO_PI;
 	(*mConstants)["PI_BY_TWO"] = F_PI_BY_TWO;
+	(*mConstants)["SQRT_TWO_PI"] = F_SQRT_TWO_PI;
 	(*mConstants)["SQRT2"] = F_SQRT2;
+	(*mConstants)["SQRT3"] = F_SQRT3;
 	(*mConstants)["DEG_TO_RAD"] = DEG_TO_RAD;
 	(*mConstants)["RAD_TO_DEG"] = RAD_TO_DEG;
 	(*mConstants)["GRAVITY"] = GRAVITY;
diff --git a/indra/llmath/llcalcparser.h b/indra/llmath/llcalcparser.h
index a759a35710307fe6c3cec6759c1135dc5a0aef75..600e17366107c9279badc2001341424dc506e07e 100644
--- a/indra/llmath/llcalcparser.h
+++ b/indra/llmath/llcalcparser.h
@@ -73,7 +73,9 @@ struct LLCalcParser : grammar<LLCalcParser>
 				 (str_p("SQRT") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_sqrt)(self,arg1)]) |
 				 (str_p("LOG") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_log)(self,arg1)]) |
 				 (str_p("EXP") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_exp)(self,arg1)]) |
-				 (str_p("ABS") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_fabs)(self,arg1)])
+				 (str_p("ABS") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_fabs)(self,arg1)]) |
+				 (str_p("FLR") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_floor)(self,arg1)]) |
+				 (str_p("CEIL") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_ceil)(self,arg1)])
 				) >> assert_syntax(ch_p(')'))
 			;
 			
@@ -118,7 +120,8 @@ struct LLCalcParser : grammar<LLCalcParser>
 			term =
 				power[term.value = arg1] >>
 				*(('*' >> assert_syntax(power[term.value *= arg1])) |
-				  ('/' >> assert_syntax(power[term.value /= arg1]))
+				  ('/' >> assert_syntax(power[term.value /= arg1])) |
+				  ('%' >> assert_syntax(power[term.value = bind(&fmodf)(term.value, arg1)]))
 				)
 			;
 			
@@ -153,7 +156,9 @@ struct LLCalcParser : grammar<LLCalcParser>
 	F32 _sqrt(const F32& a) const { return sqrt(a); }
 	F32 _log(const F32& a) const { return log(a); }
 	F32 _exp(const F32& a) const { return exp(a); }
-	F32 _fabs(const F32& a) const { return fabs(a) * RAD_TO_DEG; }
+	F32 _fabs(const F32& a) const { return fabs(a); }
+	F32 _floor(const F32& a) const { return llfloor(a); }
+	F32 _ceil(const F32& a) const { return llceil(a); }
 
 	F32 _atan2(const F32& a,const F32& b) const { return atan2(a,b); }