Git Product home page Git Product logo

sincos's Introduction

sincos

Efficient implementations of the transcendental functions

Build Status

This algorithm is taken from "Math Toolkit for Real-Time Programming" by Jack Crenshaw.

These versions use the adjusted Chebyshev coefficients on p.120.

isin() and icos() are integer sine and cosine functions. The input angle is in Furmans. (A Furman is 1/65536 of a circle. One degree is ~182 Furmans. One radian is ~10430 Furmans.) The result is a 16-bit signed integer, scaled so that -32767 represents -1.0 and +32767 represents +1.0.

Each implementation is followed by a stand alone test case that outputs sin(x) for all x. These should all match the reference in golden. Script testall builds and confirms all implementations.

Currently there are implementaions for:

  • plain C (sincos.c)
  • ANS Forth with 32-bit or 64-bit cells (forth32.fs)
  • Verilog (sincos.v)
  • Arduino processing (sincos.ino)

sincos's People

Contributors

jamesbowman avatar

Stargazers

 avatar  avatar Ben Newhouse avatar Markus avatar Jim Dalrymple avatar George Camboim avatar james_gu avatar Pranav Maddula avatar Aaron avatar Stuart avatar  avatar Ben Hencke avatar J Farkas avatar Hasjim Williams avatar Mtv Europe avatar John M. Owen avatar Martin Chabot avatar  avatar Corey Minter avatar Arnaud Durand avatar Sven Braun avatar Matthias Thumann avatar Andreas Wagner avatar Starring Forth avatar

Watchers

Hasjim Williams avatar James Cloos avatar  avatar  avatar

sincos's Issues

Have you considered using CORDIC

Hi @jamesbowman nice little library.
Good algorithm when you are running on CPU / FPGA with fast HW multiplier.
As for Verilog implementation, have you considered using CORDIC algorithm.
To my experience it requires way less gates and more pipeline friendly.

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.