Skip to content

Commit

Permalink
Reorganize a bit.
Browse files Browse the repository at this point in the history
  • Loading branch information
cnlohr committed Jun 19, 2024
1 parent 9782756 commit b511caf
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ Single-file headers I wrote:
| [rtgz-tinf-util](https://github.com/cnlohr/rtgz-tinf-util) | Custom deflate decompressor, and custom compressor for targeting tiny decode windows | [tinf_sf.h](https://raw.githubusercontent.com/cnlohr/rtgz-tinf-util/master/tinf_sf.h) |
| [csgp4](https://github.com/cnlohr/csgp4) | SGP4 Orbital Mechanics Header-Only file (portable to HLSL) for computing satellite positions at times | [csgp4.h](https://raw.githubusercontent.com/cnlohr/csgp4/master/csgp4.h) |

## Concepts

TODO
* Two's Compliemnt
* Floating Point

## Embedded / C

Expand Down Expand Up @@ -115,7 +120,7 @@ void ProductDemoPrecise()
// result down by 16 to get your final answer in the
// same fixed-point system you're in.

int a = 132345; // 2.019424438 (number / 65536 (or 2^16))
int a = 132345; // 2.019424438
int b = 7491; // 0.114303589

int product = (a * b + 32768)>>16;
Expand All @@ -128,7 +133,7 @@ void ProductDemoPrecise()

void ProductDemoOverflow()
{
int a = 132345; // 2.019424438 (number / 65536 (or 2^16))
int a = 132345; // 2.019424438
int big_b = 4442414; //67.785858154
int product2 = (a * big_b)>>16; // This will overflow.

Expand All @@ -145,7 +150,7 @@ void ProductDemoOverflow()

void FixedNatural()
{
int a = 132345; // 2.019424438 (number / 65536 (or 2^16))
int a = 132345; // 2.019424438
int multiplyby = 18;

int product = a * multiplyby;
Expand Down Expand Up @@ -179,12 +184,6 @@ int main()
}
```

## Concepts

TODO
* Two's Compliemnt
* Floating Point

## DSP

### Goertzel's Sinewave
Expand Down

0 comments on commit b511caf

Please sign in to comment.