*** eval.c.old	Fri Jun 20 16:47:13 2008
--- eval.c	Fri Jun 20 23:33:00 2008
***************
*** 596,601 ****
--- 596,609 ----
  static void f_localtime __ARGS((typval_T *argvars, typval_T *rettv));
  #ifdef FEAT_FLOAT
  static void f_log10 __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_log __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_exp __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_sin __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_cos __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_tan __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_asin __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_acos __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_atan __ARGS((typval_T *argvars, typval_T *rettv));
  #endif
  static void f_map __ARGS((typval_T *argvars, typval_T *rettv));
  static void f_maparg __ARGS((typval_T *argvars, typval_T *rettv));
***************
*** 618,623 ****
--- 626,632 ----
  static void f_pathshorten __ARGS((typval_T *argvars, typval_T *rettv));
  #ifdef FEAT_FLOAT
  static void f_pow __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_atan2 __ARGS((typval_T *argvars, typval_T *rettv));
  #endif
  static void f_prevnonblank __ARGS((typval_T *argvars, typval_T *rettv));
  static void f_printf __ARGS((typval_T *argvars, typval_T *rettv));
***************
*** 7384,7394 ****
--- 7393,7411 ----
  				/* implementation of function */
  } functions[] =
  {
+ #ifdef FEAT_FLOAT
+     {"acos",		1, 1, f_acos},
+ #endif
      {"add",		2, 2, f_add},
      {"append",		2, 2, f_append},
      {"argc",		0, 0, f_argc},
      {"argidx",		0, 0, f_argidx},
      {"argv",		0, 1, f_argv},
+ #ifdef FEAT_FLOAT
+     {"asin",		1, 1, f_asin},
+     {"atan",		1, 1, f_atan},
+     {"atan2",		2, 2, f_atan2},
+ #endif
      {"browse",		4, 4, f_browse},
      {"browsedir",	2, 2, f_browsedir},
      {"bufexists",	1, 1, f_bufexists},
***************
*** 7418,7423 ****
--- 7435,7443 ----
  #endif
      {"confirm",		1, 4, f_confirm},
      {"copy",		1, 1, f_copy},
+ #ifdef FEAT_FLOAT
+     {"cos",		1, 1, f_cos},
+ #endif
      {"count",		2, 4, f_count},
      {"cscope_connection",0,3, f_cscope_connection},
      {"cursor",		1, 3, f_cursor},
***************
*** 7432,7437 ****
--- 7452,7460 ----
      {"eventhandler",	0, 0, f_eventhandler},
      {"executable",	1, 1, f_executable},
      {"exists",		1, 1, f_exists},
+ #ifdef FEAT_FLOAT
+     {"exp",		1, 1, f_exp},
+ #endif
      {"expand",		1, 2, f_expand},
      {"extend",		2, 3, f_extend},
      {"feedkeys",	1, 2, f_feedkeys},
***************
*** 7520,7525 ****
--- 7543,7549 ----
      {"lispindent",	1, 1, f_lispindent},
      {"localtime",	0, 0, f_localtime},
  #ifdef FEAT_FLOAT
+     {"log",		1, 1, f_log},
      {"log10",		1, 1, f_log10},
  #endif
      {"map",		2, 2, f_map},
***************
*** 7583,7588 ****
--- 7607,7615 ----
      {"setwinvar",	3, 3, f_setwinvar},
      {"shellescape",	1, 1, f_shellescape},
      {"simplify",	1, 1, f_simplify},
+ #ifdef FEAT_FLOAT
+     {"sin",		1, 1, f_sin},
+ #endif
      {"sort",		1, 2, f_sort},
      {"soundfold",	1, 1, f_soundfold},
      {"spellbadword",	0, 1, f_spellbadword},
***************
*** 7614,7619 ****
--- 7641,7649 ----
      {"tabpagewinnr",	1, 2, f_tabpagewinnr},
      {"tagfiles",	0, 0, f_tagfiles},
      {"taglist",		1, 1, f_taglist},
+ #ifdef FEAT_FLOAT
+     {"tan",		1, 1, f_tan},
+ #endif
      {"tempname",	0, 0, f_tempname},
      {"test",		1, 1, f_test},
      {"tolower",		1, 1, f_tolower},
***************
*** 12809,12814 ****
--- 12839,12980 ----
      else
  	rettv->vval.v_float = 0.0;
  }
+ 
+ /*
+  * "log()" function
+  */
+     static void
+ f_log(argvars, rettv)
+     typval_T	*argvars;
+     typval_T	*rettv;
+ {
+     float_T	f;
+ 
+     rettv->v_type = VAR_FLOAT;
+     if (get_float_arg(argvars, &f) == OK)
+ 	rettv->vval.v_float = log(f);
+     else
+ 	rettv->vval.v_float = 0.0;
+ }
+ 
+ /*
+  * "exp()" function
+  */
+     static void
+ f_exp(argvars, rettv)
+     typval_T	*argvars;
+     typval_T	*rettv;
+ {
+     float_T	f;
+ 
+     rettv->v_type = VAR_FLOAT;
+     if (get_float_arg(argvars, &f) == OK)
+ 	rettv->vval.v_float = exp(f);
+     else
+ 	rettv->vval.v_float = 0.0;
+ }
+ 
+ /*
+  * "sin()" function
+  */
+     static void
+ f_sin(argvars, rettv)
+     typval_T	*argvars;
+     typval_T	*rettv;
+ {
+     float_T	f;
+ 
+     rettv->v_type = VAR_FLOAT;
+     if (get_float_arg(argvars, &f) == OK)
+ 	rettv->vval.v_float = sin(f);
+     else
+ 	rettv->vval.v_float = 0.0;
+ }
+ 
+ /*
+  * "cos()" function
+  */
+     static void
+ f_cos(argvars, rettv)
+     typval_T	*argvars;
+     typval_T	*rettv;
+ {
+     float_T	f;
+ 
+     rettv->v_type = VAR_FLOAT;
+     if (get_float_arg(argvars, &f) == OK)
+ 	rettv->vval.v_float = cos(f);
+     else
+ 	rettv->vval.v_float = 0.0;
+ }
+ 
+ /*
+  * "tan()" function
+  */
+     static void
+ f_tan(argvars, rettv)
+     typval_T	*argvars;
+     typval_T	*rettv;
+ {
+     float_T	f;
+ 
+     rettv->v_type = VAR_FLOAT;
+     if (get_float_arg(argvars, &f) == OK)
+ 	rettv->vval.v_float = tan(f);
+     else
+ 	rettv->vval.v_float = 0.0;
+ }
+ 
+ /*
+  * "asin()" function
+  */
+     static void
+ f_asin(argvars, rettv)
+     typval_T	*argvars;
+     typval_T	*rettv;
+ {
+     float_T	f;
+ 
+     rettv->v_type = VAR_FLOAT;
+     if (get_float_arg(argvars, &f) == OK)
+ 	rettv->vval.v_float = asin(f);
+     else
+ 	rettv->vval.v_float = 0.0;
+ }
+ 
+ /*
+  * "acos()" function
+  */
+     static void
+ f_acos(argvars, rettv)
+     typval_T	*argvars;
+     typval_T	*rettv;
+ {
+     float_T	f;
+ 
+     rettv->v_type = VAR_FLOAT;
+     if (get_float_arg(argvars, &f) == OK)
+ 	rettv->vval.v_float = acos(f);
+     else
+ 	rettv->vval.v_float = 0.0;
+ }
+ 
+ /*
+  * "atan()" function
+  */
+     static void
+ f_atan(argvars, rettv)
+     typval_T	*argvars;
+     typval_T	*rettv;
+ {
+     float_T	f;
+ 
+     rettv->v_type = VAR_FLOAT;
+     if (get_float_arg(argvars, &f) == OK)
+ 	rettv->vval.v_float = atan(f);
+     else
+ 	rettv->vval.v_float = 0.0;
+ }
  #endif
  
  /*
***************
*** 13434,13439 ****
--- 13600,13623 ----
      if (get_float_arg(argvars, &fx) == OK
  				     && get_float_arg(&argvars[1], &fy) == OK)
  	rettv->vval.v_float = pow(fx, fy);
+     else
+ 	rettv->vval.v_float = 0.0;
+ }
+ 
+ /*
+  * "atan2()" function
+  */
+     static void
+ f_atan2(argvars, rettv)
+     typval_T	*argvars;
+     typval_T	*rettv;
+ {
+     float_T	fx, fy;
+ 
+     rettv->v_type = VAR_FLOAT;
+     if (get_float_arg(argvars, &fx) == OK
+ 				     && get_float_arg(&argvars[1], &fy) == OK)
+ 	rettv->vval.v_float = atan2(fx, fy);
      else
  	rettv->vval.v_float = 0.0;
  }
