diff options
author | Karen Sargsyan <karsar@ibms.sinica.edu.tw> | 2016-05-21 18:00:59 +0800 |
---|---|---|
committer | Karen Sargsyan <karsar@ibms.sinica.edu.tw> | 2016-05-21 18:00:59 +0800 |
commit | 22527df1714c83e968913dabba4ba3ec81adc20c (patch) | |
tree | 9dafbbb36b0d25200b70a92e1aca8f6f0ae2f583 /src/c | |
parent | 02724f709fcafa9f4e854c271df6c2f79fd9cfa6 (diff) |
Some basic math functions: pow, sqrt, sin, cos, log, exp are added to work at client and server sides
Diffstat (limited to 'src/c')
-rw-r--r-- | src/c/urweb.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/c/urweb.c b/src/c/urweb.c index c23366fb..edf55f21 100644 --- a/src/c/urweb.c +++ b/src/c/urweb.c @@ -4517,6 +4517,30 @@ uw_Basis_int uw_Basis_round(uw_context ctx, uw_Basis_float n) { return round(n); } +uw_Basis_float uw_Basis_pow(uw_context ctx, uw_Basis_float n, uw_Basis_float m) { + return pow(n,m); +} + +uw_Basis_float uw_Basis_sqrt(uw_context ctx, uw_Basis_float n) { + return sqrt(n); +} + +uw_Basis_float uw_Basis_sin(uw_context ctx, uw_Basis_float n) { + return sin(n); +} + +uw_Basis_float uw_Basis_cos(uw_context ctx, uw_Basis_float n) { + return cos(n); +} + +uw_Basis_float uw_Basis_log(uw_context ctx, uw_Basis_float n) { + return log(n); +} + +uw_Basis_float uw_Basis_exp(uw_context ctx, uw_Basis_float n) { + return exp(n); +} + uw_Basis_string uw_Basis_atom(uw_context ctx, uw_Basis_string s) { char *p; |