2013-09-30 11:22:41 -04:00
|
|
|
|
2021-01-29 06:31:58 -05:00
|
|
|
[![Arduino CI](https://github.com/RobTillaart/IEEE754tools/workflows/Arduino%20CI/badge.svg)](https://github.com/marketplace/actions/arduino_ci)
|
2021-11-05 12:24:10 -04:00
|
|
|
[![Arduino-lint](https://github.com/RobTillaart/IEEE754tools/actions/workflows/arduino-lint.yml/badge.svg)](https://github.com/RobTillaart/IEEE754tools/actions/workflows/arduino-lint.yml)
|
|
|
|
[![JSON check](https://github.com/RobTillaart/IEEE754tools/actions/workflows/jsoncheck.yml/badge.svg)](https://github.com/RobTillaart/IEEE754tools/actions/workflows/jsoncheck.yml)
|
2021-01-29 06:31:58 -05:00
|
|
|
[![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/RobTillaart/IEEE754tools/blob/master/LICENSE)
|
|
|
|
[![GitHub release](https://img.shields.io/github/release/RobTillaart/IEEE754tools.svg?maxAge=3600)](https://github.com/RobTillaart/IEEE754tools/releases)
|
|
|
|
|
|
|
|
|
|
|
|
# IEEE754tools
|
2020-11-27 05:16:22 -05:00
|
|
|
|
|
|
|
Arduino library to manipulate IEEE754 float numbers fast.
|
|
|
|
|
2021-11-05 12:24:10 -04:00
|
|
|
|
2020-11-27 05:16:22 -05:00
|
|
|
## Description
|
|
|
|
|
2021-11-05 12:24:10 -04:00
|
|
|
IEEE754tools.h contains a collection of experimental bit-hacks to speed up
|
|
|
|
a number of operations on floating point numbers on the **Arduino UNO**.
|
|
|
|
These bit-hacks started in 2010 (oldest code found), maybe even earlier.
|
2020-11-27 05:16:22 -05:00
|
|
|
|
|
|
|
http://en.wikipedia.org/wiki/Double_precision
|
|
|
|
|
|
|
|
http://en.wikipedia.org/wiki/Single-precision_floating-point_format
|
|
|
|
|
|
|
|
|
|
|
|
## WARNING
|
2021-01-29 06:31:58 -05:00
|
|
|
|
2021-11-05 12:24:10 -04:00
|
|
|
- **do not use** this lib for production code unless you verified the correctness.
|
|
|
|
Code is experimental, so use with care at your own risk.
|
|
|
|
- If you don't need micro-second speed ups **do not use** these code snippets.
|
|
|
|
- **do not use for ESP32** ESP32 does things differently ==> not all code works.
|
|
|
|
|
|
|
|
|
|
|
|
## Test results examples
|
|
|
|
|
|
|
|
updated for 0.2.2
|
|
|
|
|
|
|
|
| example | UNO | ESP32 |
|
|
|
|
|:--------------|:------:|:-------:|
|
|
|
|
| fastNegate | Y | Y |
|
|
|
|
| float2Double | Y | N |
|
|
|
|
| IEEE754_equal | Y | N |
|
|
|
|
|
|
|
|
|
|
|
|
ESP32 - needs investigation as UNO verified code fails.
|
|
|
|
(something for a long winter)
|
|
|
|
|
2020-11-27 05:16:22 -05:00
|
|
|
|
2022-11-13 03:47:33 -05:00
|
|
|
## Operations
|
|
|
|
|
|
|
|
See examples
|
|
|
|
|
|
|
|
|
2020-11-27 05:16:22 -05:00
|
|
|
## Future
|
|
|
|
|
2022-11-13 03:47:33 -05:00
|
|
|
#### must
|
2021-01-29 06:31:58 -05:00
|
|
|
- test with double
|
2021-11-05 12:24:10 -04:00
|
|
|
- test on ESP23
|
2022-11-13 03:47:33 -05:00
|
|
|
|
|
|
|
#### should
|
2021-11-05 12:24:10 -04:00
|
|
|
- investigate other speed ups
|
2022-11-13 03:47:33 -05:00
|
|
|
- bring more structure in this library.
|
|
|
|
|
|
|
|
#### could
|
2021-11-05 12:24:10 -04:00
|
|
|
- write more examples
|
2021-12-20 02:09:14 -05:00
|
|
|
- example binary transfer over Serial
|
|
|
|
- example binary transfer over Ethernet
|
|
|
|
- link to float16 in documentation
|
2021-11-05 12:24:10 -04:00
|
|
|
|
2020-11-27 05:16:22 -05:00
|
|
|
|
|
|
|
|