aboutsummaryrefslogtreecommitdiffstats
path: root/gen
diff options
context:
space:
mode:
authorGavin Howard <yzena.tech@gmail.com>2019-10-29 18:00:19 -0600
committerGavin Howard <yzena.tech@gmail.com>2019-10-29 18:00:19 -0600
commit8c01a7916a0fcb26481e00d729764dc8eba613ca (patch)
tree22bb9dfe5fba70a600d7fb43641abe3e300c424d /gen
parentec4299616bae3c00ccae88b903eaa05ac92d57b3 (diff)
downloadplatform_external_bc-8c01a7916a0fcb26481e00d729764dc8eba613ca.tar.gz
platform_external_bc-8c01a7916a0fcb26481e00d729764dc8eba613ca.tar.bz2
platform_external_bc-8c01a7916a0fcb26481e00d729764dc8eba613ca.zip
Improve the root and cbrt API's
Diffstat (limited to 'gen')
-rw-r--r--gen/lib2.bc1
1 files changed, 1 insertions, 0 deletions
diff --git a/gen/lib2.bc b/gen/lib2.bc
index b757df1c..9665b92e 100644
--- a/gen/lib2.bc
+++ b/gen/lib2.bc
@@ -101,6 +101,7 @@ define l2(x){return log(x,2)}
define l10(x){return log(x,A)}
define root(x,n){
auto s,m,r,q,p
+ if(n<0)sqrt(n)
n=abs(n)$
if(n==0)x/n
if(n==1)return x