Cosine Implementation in C

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • musl

    unofficial musl mirror git://git.musl-libc.org/musl (by ifduyue)

  • This is a faster implementation of cosine that utilises six static const double variables (C1, C2, C3, C4, C5, C6) to speed things up. These variables represent the coefficients of a polynomial approximation for the cosine function.

    For the genuine article, check out: https://github.com/ifduyue/musl/blob/master/src/math/cos.c

  • freebsd-src

    The FreeBSD src tree publish-only repository. Experimenting with 'simple' pull requests....

  • Why does he link to his lame fork of musl for the official FreeBSD sources for libm, taken from Sun, used by musl?

    https://github.com/freebsd/freebsd-src/blob/main/lib/msun/sr...

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • q

    A fixed point library (Signed Q16.16) for embedded systems. (by howerj)

  • Personally I like Universal CORDIC, you can calculate much more than Cosine, but it tends to be slower. See https://en.wikibooks.org/wiki/Digital_Circuits/CORDIC#The_Un... and a somewhat janky fixed point library that implements it https://github.com/howerj/q

  • FastTrig

    Arduino library with interpolated lookup for sin() and cos()

  • Bessels.jl

    Bessel functions for real arguments and orders

  • https://github.com/JuliaMath/Bessels.jl/blob/master/src/bess...

    Thanks! I love it, so easy to understand and follow.

    My favourite work on the subject is Fredrik Johansson's:

    https://github.com/fredrik-johansson/arb

    Whenever I feel down and without energy I just read something in there

  • arb

    Arb has been merged into FLINT -- use https://github.com/flintlib/flint/ instead

  • https://github.com/JuliaMath/Bessels.jl/blob/master/src/bess...

    Thanks! I love it, so easy to understand and follow.

    My favourite work on the subject is Fredrik Johansson's:

    https://github.com/fredrik-johansson/arb

    Whenever I feel down and without energy I just read something in there

  • The-RLIBM-Project

    A combined repository for all RLIBM prototypes

  • - The RLIBM project: https://github.com/rutgers-apl/The-RLIBM-Project/blob/main/l...

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • llvm-project

    The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts