diff options
author | Nicholas Noll <nbnoll@eml.cc> | 2021-12-05 16:16:21 -0800 |
---|---|---|
committer | Nicholas Noll <nbnoll@eml.cc> | 2021-12-05 16:16:21 -0800 |
commit | 07e77936d535e58b0aeb4f2a11400c1050556739 (patch) | |
tree | fb50fad6436ecbc159505bee73a92cd289b99a07 /src/libbio | |
parent | b48327d357e0818d1a6ae2a064cfa7d1567e1242 (diff) |
Feat: added math library
Used Plan9's libc as starting point. This cleans up dangling references
due to loss of libc.
Diffstat (limited to 'src/libbio')
-rw-r--r-- | src/libbio/newick.c | 2 | ||||
-rw-r--r-- | src/libbio/phylo.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/libbio/newick.c b/src/libbio/newick.c index a555379..6071c1e 100644 --- a/src/libbio/newick.c +++ b/src/libbio/newick.c @@ -118,7 +118,7 @@ lex(io·Peeker s, void* fp) *c = 0; tok.kind = tok·number; - tok.lit.x = atof(b); + tok.lit.x = str·atof(b); return tok; case '\"': diff --git a/src/libbio/phylo.c b/src/libbio/phylo.c index 1b0ae59..2343e23 100644 --- a/src/libbio/phylo.c +++ b/src/libbio/phylo.c @@ -393,10 +393,10 @@ phylo·reroot(bio·Tree *tree, bio·Node *node, double d) // TODO: should check that node is part of this tree? // TODO: should we check if node->parent != nil? - if(fabs(d) < PREC){ + if(math·fabs(d) < PREC){ new = node; rotateparent(node->parent, node); - }else if(fabs(d-node->dist) < PREC){ + }else if(math·fabs(d-node->dist) < PREC){ new = node->parent; if (new->parent->parent) { rotateparent(new->parent->parent, new->parent); |