Coder Social home page Coder Social logo

-trigonometry-functions-in-c's Introduction

triglib

C double precision trigonometry functions originally for Tandy Color Computer (CoCo) OS9.

Written by Al Buist, who passed away in 1985. License is Public Domain. In the 90's I used these routines while implementing a floating point emulator. This code is in K&R C, so some changes would need to be made for use with a modern C compiler. Also, if you use this for anything real, I would double check the constants against the magazine listing. I found this code on an FTP site around 15 years ago, but it's disappeared. I have no idea if it came from a digital archive, or if someone typed it in by hand.

Originally published in Rainbow Magazine, April 1986, page 238:

https://archive.org/details/rainbowmagazine-1986-04/page/n239/mode/2up

Note: The CoCo OS9 double format is different from IEEE doubles. The LSB of the low byte (byte offset 0) contains the sign bit, and the highest byte (offset 7) contains the exponent. The rest is the mantissa:

https://colorcomputerarchive.com/repo/Documents/Manuals/Programming/C%20Compiler%20User's%20Guide%20(nitros9).pdf

Due these differences, the original code won't work as expected on modern machines. Ironically, the old CoCo had more precision in its doubles!

-trigonometry-functions-in-c's People

Contributors

richgel999 avatar

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.