Giter Club home page Giter Club logo

liquid-fpm's People

Contributors

jgaeddert avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

liquid-fpm's Issues

replacement for libfec?

Running fedora 30 on an AMD system.

sorry for opening an issue but would it be possible to use
libcorrect which fedora provides?

math.h error in makefile

i found an error in the make file while compiling the gen tabs.you forgot to add the -lm flag
i suggest to change the line 166 in Makefile.ini to be like this :

$(gentab_programs) : % : %.c ./include/liquidfpm.h
$(CC) $(INCLUDE_CFLAGS) $(CFLAGS) -lm $^ $(LDFLAGS)-o $@

Question about sin/cos CORDIC algorithm

Hi, I have a question about CORDIC algorithm in liquid-fpm. According to wiki, the basic operations in rotation in CORDIC are showed below:

 x[i+1] = x[i] - d[i] * y[i] * 2^(-i)
 y[i+1] = y[i] + d[i] * x[i] * 2^(-i)
 θ[i+1] = θ[i] − d[i] * α[i]

where d[i] is either 1 or -1. I note that in liquid-fpm, we use XOR operation to deal with the judgment of positive and negative signs.

for (i=0; i<n; i++) {
d = ( z>=0 ) ? 0 : -1;
// d = z >> 31;
tx = x - ((y>>i)^d)-d;
ty = y + ((x>>i)^d)-d;
tz = z - ((Q(_cordic_Ak_tab)[i]^d)-d);
x = tx;
y = ty;
z = tz;

But I suspect there is a bug in the above code. In line 123, there seems to be a missing parenthesis of ((y>>i)^d) -d;. They should be a whole like line 125.

tz = z - ((Q(_cordic_Ak_tab)[i]^d)-d);

Is there a trick here that I don't know about or is this a simple clerical error? Looking forward to your reply.

math library ordered wrong in compile commands

In order to complete the sequence
./bootstrap.sh
./configure
make
successfully, I first had to edit makefile.in so that "-lm" appeared after, not before, "$<" in the compile command lines. Otherwise, math library symbols were not found because the math library was not in line to be searched after the source file. FWIW, this is Ubuntu 18.04.

A corrective patch:
diff --git a/makefile.in b/makefile.in
index 2b8320c..15c3e8f 100644
--- a/makefile.in
+++ b/makefile.in
@@ -180,7 +180,7 @@ gentab_objects = $(patsubst %.c,%.o,$(gentab_targets))

result is a program that generates a source file to be

built for the target system.

$(gentab_programs) : % : %.c ./include/liquidfpm.h

  •   $(CC) $(INCLUDE_CFLAGS) -lm $< -o $@
    
  •   $(CC) $(INCLUDE_CFLAGS) $< -lm -o $@
    

Run the natively-built program to generate the source

file. This file is to be built for the target system.

@@ -312,7 +312,7 @@ install:
@echo " Please report bugs to $(BUGREPORT)"
@echo "---------------------------------------------------------"
@echo ""

TARGET : uninstall - uninstalls the libraries and header files in the host system

@@ -373,7 +373,7 @@ $(benchmark_include): $(benchmarkgen_prog) $(benchmark_headers)
./$(benchmarkgen_prog) $(benchmark_headers) &gt; $@

$(benchmark_prog): bench/bench.c $(benchmark_include) libliquidfpm.a

  •   $(CC) $(BENCH_CFLAGS) -lm $< $(LDFLAGS) libliquidfpm.a -o $@
    
  •   $(CC) $(BENCH_CFLAGS) $< -lm $(LDFLAGS) libliquidfpm.a -o $@
    

bench: $(benchmark_prog)
./$<
@@ -401,7 +401,7 @@ $(autotest_include): $(autotestgen_prog) $(autotest_headers)
./$(autotestgen_prog) $(autotest_headers) &gt; $@

$(autotest_prog): autotest/autotest.c $(autotest_include) libliquidfpm.a

  •   $(CC) $(AUTOTEST_CFLAGS) -lm $< $(LDFLAGS) libliquidfpm.a -o $@
    
  •   $(CC) $(AUTOTEST_CFLAGS) $< -lm $(LDFLAGS) libliquidfpm.a -o $@
    

check: $(autotest_prog)
./$<

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.