{"id":13812807,"url":"https://github.com/jgaeddert/liquid-fpm","last_synced_at":"2025-05-14T22:31:08.863Z","repository":{"id":900002,"uuid":"655595","full_name":"jgaeddert/liquid-fpm","owner":"jgaeddert","description":"fixed-point math library for embedded signal processing","archived":false,"fork":false,"pushed_at":"2015-09-01T21:00:59.000Z","size":709,"stargazers_count":59,"open_issues_count":4,"forks_count":20,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-11-19T07:39:20.803Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://liquidsdr.org","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jgaeddert.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-05-07T20:23:14.000Z","updated_at":"2024-06-03T01:10:07.000Z","dependencies_parsed_at":"2022-07-18T16:31:35.321Z","dependency_job_id":null,"html_url":"https://github.com/jgaeddert/liquid-fpm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgaeddert%2Fliquid-fpm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgaeddert%2Fliquid-fpm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgaeddert%2Fliquid-fpm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgaeddert%2Fliquid-fpm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jgaeddert","download_url":"https://codeload.github.com/jgaeddert/liquid-fpm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254239500,"owners_count":22037716,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T04:00:55.655Z","updated_at":"2025-05-14T22:31:03.777Z","avatar_url":"https://github.com/jgaeddert.png","language":"C","funding_links":[],"categories":["Data processing"],"sub_categories":["Math"],"readme":"\nliquid-fpm : Software-Defined Radio Fixed-Point Math Library\n============================================================\n\n*NOTE:* This repository has been incorporated as a branch in the main\nliquid-dsp repository here:\n[https://github.com/jgaeddert/liquid-dsp](https://github.com/jgaeddert/liquid-dsp)\n\n\nliquidfpm is a flexible fixed-point math library developed for efficient\ncomputational software-defined radio.\n\nBuild:\n\n    $ ./bootstrap.sh\n    $ ./configure\n    $ make\n\nInstall:\n\n    # make install\n\nRun tests:\n\n    $ make test\n\nRun benchmarks:\n\n    $ make bench\n\n\n## ANGULAR REPRESENTATION ##\n\n## INTERFACES ##\n\nReference\n\n    N : total number of bits in the data type (e.g. 32)\n    I : total number of integer bits, including sign\n    F : total number of fractional bits\n\nRegular constants\n\n    name                value                   description\n    qtype_min                                   minimum representable value\n    qtype_max                                   maximum representable value\n    qtype_one           1                       one\n    qtype_pi                                    pi (angular)\n    qtype_2pi                                   2*pi (angular)\n    qtype_pi_by_2                               pi/2 (angular)\n    qtype_angle_scalarf 3.14159 / 2^(I-2)       angular \u003c-\u003e scalar relationship\n\nMathematical constants (genlib/genlib.constants.c)\n\n    name                value                   description\n    qtype_E             2.71828182845905        e\n    qtype_LOG2E         1.44269504088896        log2(e)\n    qtype_LOG10E        0.434294481903252       log10(e)\n    qtype_LN2           0.693147180559945       log(2)\n    qtype_LN10          2.30258509299405        log(10)\n    qtype_PI            3.14159265358979        pi (actual)\n    qtype_PI_2          1.57079632679490        pi/2\n    qtype_PI_4          0.785398163397448       pi/4\n    qtype_1_PI          0.318309886183791       1/pi\n    qtype_2_PI          0.636619772367581       2/pi\n    qtype_2_SQRTPI      1.12837916709551        2/sqrt(pi)\n    qtype_SQRT2         1.41421356237310        sqrt(2)\n    qtype_SQRT1_2       0.707106781186547       1/sqrt(2)\n\nFixed-point/Floating-point conversion\n\n    qtype_fixed_to_float            convert fixed-point value to floating-point value\n    qtype_float_to_fixed            convert floating-point value to fixed-point value\n    qtype_angle_fixed_to_float      convert fixed-point angle to floating-point angle\n    qtype_angle_float_to_fixed      convert floating-point value to fixed-point angle\n\nBasic arithmetic functions\n\n    qtype_sign(x)       sign of x = x / |x|\n    qtype_abs(x)        |x|\n    qtype_add(x,y)      x+y\n    qtype_sub(x,y)      x-y\n    qtype_mul(x,y)      x*y\n    qtype_div(x,y)      x/y\n    qtype_inv(x,n)      1/x with n iterations\n    qtype_ratio(a,b,n)  integer ratio a/b with n iterations\n\nPre-C99 functions\n\n    qtype_acos\n    qtype_atan\n    qtype_atan2\n    qtype_ceil\n    qtype_cos\n    qtype_cosh\n    qtype_exp\n    qtype_fabs\n    qtype_floor\n    qtype_fmod\n    qtype_frexp\n    qtype_ldexp\n    qtype_log\n    qtype_log10\n    qtype_modf\n    qtype_pow\n    qtype_sin\n    qtype_sinh\n    qtype_sqrt\n    qtype_tan\n    qtype_tanh\n\nC99 functions\n\n    qtype_acosh\n    qtype_asinh\n    qtype_atanh\n    qtype_cbrt\n    qtype_copysign\n    qtype_erf\n    qtype_erfc\n    qtype_exp2\n    qtype_expm1\n    qtype_fdim\n    qtype_fma\n    qtype_fmax\n    qtype_fmin\n    qtype_hypot\n    qtype_ilogb\n    qtype_lgamma\n    qtype_llrint\n    qtype_lrint\n    qtype_llround\n    qtype_lround\n    qtype_log1p\n    qtype_log2\n    qtype_logb\n    qtype_nan\n    qtype_nearbyint\n    qtype_nextafter\n    qtype_nexttoward\n    qtype_remainder\n    qtype_remquo\n    qtype_rint\n    qtype_round\n    qtype_scalbln\n    qtype_scalbn\n    qtype_tgamma\n    qtype_trunc\n\nAdditional functions\n\n    qtype_lngamma\n    qtype_besseli0\n    qtype_besselj0\n    qtype_sinc\n    qtype_kaiser\n\nComplex arithmetic\n\n    cqtype_add(x,y)         x+y\n    cqtype_sub(x,y)         x-y\n    cqtype_mul(x,y)         x*y\n    cqtype_mul_scalar(x,c)  x*c\n    cqtype_div(x,y)         x/y\n    cqtype_div_scalar(x,c)  x/c\n    cqtype_inv(x)           1/x\n\nComplex trig\n\n    cqtype_cabs\n    cqtype_cacos\n    cqtype_cacosh\n    cqtype_carg\n    cqtype_casin\n    cqtype_casinh\n    cqtype_catan\n    cqtype_catanh\n    cqtype_ccos\n    cqtype_ccosh\n    cqtype_cexp\n    cqtype_cimag\n    cqtype_clog\n    cqtype_conj\n    cqtype_cpow\n    cqtype_cproj\n    cqtype_creal\n    cqtype_csin\n    cqtype_csinh\n    cqtype_csqrt\n    cqtype_ctan\n    cqtype_ctanh\n\n * Function declaration exists but no function definition (not yet implemented)\n\n## Build Description ##\n\ngentab (auto-generated tables)\nSome of the algorithms in liquid-fpm (such as the CORDICs) use tables\nwhich are automatically generated at build-time.\nThese are located in the gentab/ subdirectory.\n\nFor example,\n\n    script:     gentab/gentab.sincos.cordic.c\n    program:    gentab/gentab.sincos.cordic\n    source:     gentab/sincos.cordic.$(qtype).c\n    object:     gentab/sincos.cordic.$(qtype).o\n\nwhere the makefile key $(qtype) is given by configure.ac (default is \"q32\")\n\ngenlib (auto-generated assembly objects)\nSeveral of the low-level arithmetic functions (such as multiplication\nof two fixed-point numbers) can be computed faster by taking advantage\nof architecture-specific hardware instructions.\nThese functions are generated automatically given the precision...\n\n## Configuring Precision ##\n\nThe bit-precision of the fixed-point type is defined in two places:\n\nconfigure.ac\n    QTYPE                   : name of variables (e.g. \"q32\")\n    QTYPE_INTBITS           : number of bits in integer component (e.g. \"7\")\n    QTYPE_FRACBITS          : number of bits in fractional component (e.g. \"25\")\ninclude/liquidfpm.h\n    LIQUIDFPM_MANGLE        : name-mangling macro (e.g. LIQUIDFPM_CONCAT(q32,name))\n    LIQUIDFPM_DEFINE_API    : interface macro\n\nThe default name for the data types are:\n    q32_t   : fixed-point 32-bit data type\n    cq32_t  : complex 2-valued (real,imag) 32-bit data type\n    q32f_t  : floating-point 2-valued (base,frac) data type (internal use)\n\nLimitations:\nDue to some arithmetic constants required for computation in certain\nalgorithms, not all precisions are possible.  For example, the sinh|cosh\nCORDIC requires initialization on kp_inv=1.207497... which needs at least 2\ninteger bits representation (not including the sign bit).  As a result, this\nexcludes data types such as Q1.31 format from running properly for these\nfunctions. The library will configure and compile for such precisions, however\nthe unit tests might (and probaby will) fail.\n\n## Specific Build Targets ##\n\nHere is a list of the specific build targets\n\n    all             :   everything: libliquidfpm shared object library\n    check           :   generate autotest program and execute\n    bench           :   generate benchmark program and execute\n\n    distclean       :   clean everything, including configuration headers, and makefile\n    clean           :   clean all ojbect files and shared library\n    clean-genlib    :   clean only the auto-generated assembly sources and objects\n    clean-gentab    :   clean only the auto-generated table sources and objects\n    clean-bench     :   clean only the benchmark files\n    clean-autotest  :   clean only the autotest files\n\n    test            :   generate debugging test and execute\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjgaeddert%2Fliquid-fpm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjgaeddert%2Fliquid-fpm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjgaeddert%2Fliquid-fpm/lists"}