Update of /cvsroot/monetdb/pathfinder/compiler/semantics
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv14873/compiler/semantics
Modified Files:
xquery_fo.c
Log Message:
The XQuery functions and operators lack several mathematical functions. I added
natural logarithm (log) and square root (sqrt) as part of the "pf" namespace.
Index: xquery_fo.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/semantics/xquery_fo.c,v
retrieving revision 1.126
retrieving revision 1.127
diff -u -d -r1.126 -r1.127
--- xquery_fo.c 10 May 2007 09:26:06 -0000 1.126
+++ xquery_fo.c 24 May 2007 09:59:09 -0000 1.127
@@ -1900,6 +1900,46 @@
.arity = 1, .sig_count = 1, .sigs = { {
.par_ty = (PFty_t[]) { PFty_xs_anyNode () },
.ret_ty = PFty_xs_string () } } }
+ , /* pf:log (decimal) as decimal */
+ { .ns = PFns_lib, .loc = "log",
+ .arity = 1, .sig_count = 1, .sigs = { {
+ .par_ty = (PFty_t[]) { PFty_xs_decimal () },
+ .ret_ty = PFty_xs_decimal () } } }
+ , /* pf:log (double) as double */
+ { .ns = PFns_lib, .loc = "log",
+ .arity = 1, .sig_count = 1, .sigs = { {
+ .par_ty = (PFty_t[]) { PFty_xs_double () },
+ .ret_ty = PFty_xs_double () } } }
+ , /* pf:log (decimal?) as decimal? */
+ { .ns = PFns_lib, .loc = "log",
+ .arity = 1, .sig_count = 1, .sigs = { {
+ .par_ty = (PFty_t[]) { PFty_opt (PFty_xs_decimal ()) },
+ .ret_ty = PFty_opt (PFty_xs_decimal ()) } } }
+ , /* pf:log (double?) as double? */
+ { .ns = PFns_lib, .loc = "log",
+ .arity = 1, .sig_count = 1, .sigs = { {
+ .par_ty = (PFty_t[]) { PFty_opt (PFty_xs_double ()) },
+ .ret_ty = PFty_opt (PFty_xs_double ()) } } }
+ , /* pf:sqrt (decimal) as decimal */
+ { .ns = PFns_lib, .loc = "sqrt",
+ .arity = 1, .sig_count = 1, .sigs = { {
+ .par_ty = (PFty_t[]) { PFty_xs_decimal () },
+ .ret_ty = PFty_xs_decimal () } } }
+ , /* pf:sqrt (double) as double */
+ { .ns = PFns_lib, .loc = "sqrt",
+ .arity = 1, .sig_count = 1, .sigs = { {
+ .par_ty = (PFty_t[]) { PFty_xs_double () },
+ .ret_ty = PFty_xs_double () } } }
+ , /* pf:sqrt (decimal?) as decimal? */
+ { .ns = PFns_lib, .loc = "sqrt",
+ .arity = 1, .sig_count = 1, .sigs = { {
+ .par_ty = (PFty_t[]) { PFty_opt (PFty_xs_decimal ()) },
+ .ret_ty = PFty_opt (PFty_xs_decimal ()) } } }
+ , /* pf:sqrt (double?) as double? */
+ { .ns = PFns_lib, .loc = "sqrt",
+ .arity = 1, .sig_count = 1, .sigs = { {
+ .par_ty = (PFty_t[]) { PFty_opt (PFty_xs_double ()) },
+ .ret_ty = PFty_opt (PFty_xs_double ()) } } }
/* #3. UPDATE FUNCTIONS */
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins