*** src/eval.c.bram	Sat Aug 09 11:28:58 2008
--- src/eval.c	Sat Aug 09 23:50:33 2008
***************
*** 466,471 ****
--- 466,486 ----
  
  #ifdef FEAT_FLOAT
  static void f_abs __ARGS((typval_T *argvars, typval_T *rettv));
+ 
+ /* Below are the 10 added FP functions - I've kept then together  */
+ /* here and in their definitions later on.  Because the funtion[] */
+ /* table must be in ASCII order, they are scattered there - WJMc  */
+ 
+ static void f_acos __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_asin __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_atan2 __ARGS((typval_T *argvars, typval_T *rettv)); /* 2 args */
+ static void f_cosh __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_exp __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_fmod __ARGS((typval_T *argvars, typval_T *rettv));  /* 2 args */
+ static void f_log __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_sinh __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_tan __ARGS((typval_T *argvars, typval_T *rettv));
+ static void f_tanh __ARGS((typval_T *argvars, typval_T *rettv));
  #endif
  static void f_add __ARGS((typval_T *argvars, typval_T *rettv));
  static void f_append __ARGS((typval_T *argvars, typval_T *rettv));
***************
*** 7421,7426 ****
--- 7436,7442 ----
  {
  #ifdef FEAT_FLOAT
      {"abs",		1, 1, f_abs},
+     {"acos",		1, 1, f_acos},	/* WJMc */
  #endif
      {"add",		2, 2, f_add},
      {"append",		2, 2, f_append},
***************
*** 7428,7434 ****
--- 7444,7452 ----
      {"argidx",		0, 0, f_argidx},
      {"argv",		0, 1, f_argv},
  #ifdef FEAT_FLOAT
+     {"asin",		1, 1, f_asin},	/* WJMc */
      {"atan",		1, 1, f_atan},
+     {"atan2",		2, 2, f_atan2},	/* WJMc */
  #endif
      {"browse",		4, 4, f_browse},
      {"browsedir",	2, 2, f_browsedir},
***************
*** 7461,7466 ****
--- 7479,7485 ----
      {"copy",		1, 1, f_copy},
  #ifdef FEAT_FLOAT
      {"cos",		1, 1, f_cos},
+     {"cosh",		1, 1, f_cosh},	/* WJMc */
  #endif
      {"count",		2, 4, f_count},
      {"cscope_connection",0,3, f_cscope_connection},
***************
*** 7476,7481 ****
--- 7495,7503 ----
      {"eventhandler",	0, 0, f_eventhandler},
      {"executable",	1, 1, f_executable},
      {"exists",		1, 1, f_exists},
+ #ifdef FEAT_FLOAT
+     {"exp",		1, 1, f_exp},	/* WJMc */
+ #endif
      {"expand",		1, 2, f_expand},
      {"extend",		2, 3, f_extend},
      {"feedkeys",	1, 2, f_feedkeys},
***************
*** 7488,7493 ****
--- 7510,7516 ----
  #ifdef FEAT_FLOAT
      {"float2nr",	1, 1, f_float2nr},
      {"floor",		1, 1, f_floor},
+     {"fmod",		2, 2, f_fmod},	/* WJMc */
  #endif
      {"fnameescape",	1, 1, f_fnameescape},
      {"fnamemodify",	2, 2, f_fnamemodify},
***************
*** 7564,7569 ****
--- 7587,7593 ----
      {"lispindent",	1, 1, f_lispindent},
      {"localtime",	0, 0, f_localtime},
  #ifdef FEAT_FLOAT
+     {"log",		1, 1, f_log},	/* WJMc */
      {"log10",		1, 1, f_log10},
  #endif
      {"map",		2, 2, f_map},
***************
*** 7629,7634 ****
--- 7653,7659 ----
      {"simplify",	1, 1, f_simplify},
  #ifdef FEAT_FLOAT
      {"sin",		1, 1, f_sin},
+     {"sinh",		1, 1, f_sinh},	/* WJMc */
  #endif
      {"sort",		1, 2, f_sort},
      {"soundfold",	1, 1, f_soundfold},
***************
*** 7661,7666 ****
--- 7686,7693 ----
      {"tabpagewinnr",	1, 2, f_tabpagewinnr},
      {"tagfiles",	0, 0, f_tagfiles},
      {"taglist",		1, 1, f_taglist},
+     {"tan",		1, 1, f_tan},	/* WJMc */
+     {"tanh",		1, 1, f_tanh},	/* WJMc */
      {"tempname",	0, 0, f_tempname},
      {"test",		1, 1, f_test},
      {"tolower",		1, 1, f_tolower},
***************
*** 8127,8132 ****
--- 8154,8160 ----
   */
  
  #ifdef FEAT_FLOAT
+ 
  /*
   * "abs(expr)" function
   */
***************
*** 8309,8314 ****
--- 8337,8518 ----
      EMSG(_("E808: Number or Float required"));
      return FAIL;
  }
+ 
+ /* The 10 added FP functions are defined immediately before atan() - WJMc */
+ 
+ /*
+  * "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;
+ }
+ 
+ /*
+  * "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;
+ }
+ 
+ /*
+  * "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;
+ }
+ 
+ /*
+  * "cosh()" function
+  */
+     static void
+ f_cosh(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 = cosh(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;
+ }
+ 
+ /*
+  * "fmod()" function
+  */
+     static void
+ f_fmod(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 = fmod(fx, fy);
+     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;
+ }
+ 
+ /*
+  * "sinh()" function
+  */
+     static void
+ f_sinh(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 = sinh(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;
+ }
+ 
+ /*
+  * "tanh()" function
+  */
+     static void
+ f_tanh(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 = tanh(f);
+     else
+ 	rettv->vval.v_float = 0.0;
+ }
+ 
+ /* End of the 10 added FP functions - WJMc */
  
  /*
   * "atan()" function
