Skip to content

Commit

Permalink
Removed setjmp inclusion
Browse files Browse the repository at this point in the history
  • Loading branch information
laurentbartholdi committed Feb 6, 2017
1 parent c41077a commit 5b18acd
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions TODO
Expand Up @@ -10,3 +10,4 @@ These are the things I'll get to do when I get to do them:

* "prenucleus" using just the states, not the action to compare. possibly return also the relations that are needed to make it a nucleus, something like the "triangles".
* abstract triangulations: just work with pairs/triples of conjugacy classes. do the lifting symbolically. train tracks.
* submachines, esp. with subalphabets
2 changes: 1 addition & 1 deletion src/cpoly.C
Expand Up @@ -46,7 +46,7 @@ static xcomplex cauchy(const int deg, xcomplex *P)
dx = x;

// Do Newton iteration until x converges to two decimal places
while(fabs(dx / x) > 0.005) {
while(fabsl(dx / x) > 0.005) {
f = tmp[0];
df = 0.0;
for(int i = 1; i <= deg; i++){
Expand Down
10 changes: 7 additions & 3 deletions src/img_dll.c
Expand Up @@ -31,7 +31,9 @@ static void baby_please_dont_go (void) {
}

/* in code:
...
#include <setjmp.h>
...
atexit (baby_please_dont_go);
if (setjmp(e_t_go_home))
return __result;
Expand Down Expand Up @@ -176,7 +178,9 @@ static Obj REAL_ROOTS (Obj self, Obj coeffs)
p = INT_INTOBJ(ELM_PLIST(negind,-v)); \
}

#define EXP_LETTER(v) (INT_INTOBJ(ELM_PLIST(exp,abs(v))))
Int Intabs(Int v) { return v > 0 ? v : -v; }

#define EXP_LETTER(v) (INT_INTOBJ(ELM_PLIST(exp,Intabs(v))))

#define FIND_MATCH(match,matchlen) { \
matchlen = 1; \
Expand Down Expand Up @@ -230,7 +234,7 @@ static Obj NFFUNCTION(Obj self, Obj rel, Obj exp, Obj dir, Obj word)
*/
Int vi = INT_INTOBJ(ELM_PLIST(word,i));
if (EXP_LETTER(vi)==2)
vi = abs(vi);
vi = Intabs(vi);
Int idle;

if (vi == -vlast) { /* pop letter */
Expand Down
2 changes: 0 additions & 2 deletions src/img_dll.h
Expand Up @@ -12,11 +12,9 @@

#undef VERY_LONG_DOUBLES

/* #define sigjmp_buf int */
#include <stdlib.h>
#include <math.h>
#include <float.h>
#include <setjmp.h>
#include "src/compiled.h"
#include "src/macfloat.h"
#include "poly.h"
Expand Down

0 comments on commit 5b18acd

Please sign in to comment.