You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
+
5
+
## Overview
6
+
7
+
FR_Math is a C language fixed-point math library for embedded systems. It provides integer-based math operations using fixed radix (binary point) representations, allowing fractional calculations without floating-point support.
8
+
9
+
## Building and Testing
10
+
11
+
### Build Commands
12
+
13
+
```bash
14
+
# Build example program
15
+
make FR_math_example1.exe
16
+
17
+
# Build and run tests with coverage
18
+
make FR_math_test.exe && ./FR_math_test.exe
19
+
20
+
# Clean build artifacts
21
+
make clean
22
+
23
+
# Clean all files including backups
24
+
make cleanall
25
+
```
26
+
27
+
### Compilation Flags
28
+
The library uses `-Wall -Os -ftest-coverage -fprofile-arcs` for testing builds with coverage support.
29
+
30
+
## Architecture
31
+
32
+
### Core Components
33
+
34
+
1.**FR_defs.h** - Type definitions and platform abstractions
35
+
- Defines `s8`, `s16`, `s32` for signed integers
36
+
- Defines `u8`, `u16`, `u32` for unsigned integers
37
+
38
+
2.**FR_math.h/c** - Core fixed-radix math operations
39
+
- Macros for basic operations (add, multiply, conversions)
0 commit comments