MFMathLib
A mathematical library providing basic math operations on data types from 8-bits to 1024-bits with overflow/underflow tracking.
Install / Use
/learn @freshcode/MFMathLibREADME
MFMathLib
A mathematical library providing basic math operations on data types from 8-bits to 1024-bits with overflow/underflow tracking.
Standard C operations such as multiply and divide do not properly track overflow, underflow and remainders. As an example, multiplying two unsigned char values of 100 together will produce a result larger than could be stored in a resulting unsigned char without any warning at runtime.
All functions defined in this library provide all the parameters and returned values necessary to ensure mathematical accuracy for all supported data types.
Licensing
Public Domain
by Freshcode, Cutting edge Mac, iPhone, iPad & Android software development. http://madefresh.ca/
Originally created by Dave Poirier on 2013-02-01.
Compatibility
C compiler with support for 32-bit unsigned integers
Performance
This library has NOT yet been optimized for performance. While its development is in its early stage priority has been put into ensuring mathematical accuracy rather than execution speed. All performance improvement contributions are welcome.
Dependencies
For the library files mfmathlib.c/.h:
- none
For the test framework:
- standard OSX environment
- Accelerate framework
- 'bc' command line tool.
Limitations
The library currently only support unsigned integer operations
Related Skills
node-connect
347.6kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.6kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.6kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
