Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tracking] unnecessary use of floating point arithmetic #19614

Open
7 of 19 tasks
maribu opened this issue May 18, 2023 · 1 comment
Open
7 of 19 tasks

[tracking] unnecessary use of floating point arithmetic #19614

maribu opened this issue May 18, 2023 · 1 comment
Labels
Community: help wanted The contributors require help from other members of the community Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Type: tracking The issue tracks and organizes the sub-tasks of a larger effort

Comments

@maribu
Copy link
Member

maribu commented May 18, 2023

Description

There have been a number of issues (#17486 and #12045 are still open) on use of floating point arithmetic. This tries to bundle the effort in a single place

List of offenders: use float and or double

without the double / float keyword using \d.\d

@maribu maribu added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Type: tracking The issue tracks and organizes the sub-tasks of a larger effort Community: help wanted The contributors require help from other members of the community labels May 18, 2023
@kfessel
Copy link
Contributor

kfessel commented May 23, 2023

rg -e '\d\.\d' |rg -iv license | rg -ive ':\s*/?\*'

bors bot added a commit that referenced this issue May 24, 2023
19662: driver/lc709203f: remove unnecessary use of float r=maribu a=kfessel

### Contribution description

removes a unnecessary use of float

### Testing procedure

read and test if you got that hardware (I don't)

### Issues/PRs references

#19614 

Co-authored-by: Karl Fessel <karl.fessel@ovgu.de>
bors bot added a commit that referenced this issue May 24, 2023
19556: tools/mspdebug: fix `make debug` and `make debugserver` r=aabadie a=maribu

### Contribution description

The semantics of `make debug` and `make debugserver` have changed in the years since the MSP430 integration. This brings the implementation back into line with the current semantics

- `make debug` now starts both mspdebug and GDB, no need to run `make debugserver` prior to `make debug` anymore
- `make debug` no longer flashes the target to not waste flash erase cycles
- GDB mutliarch support is added
- support for selecting a debug adapter by its serial is added


19662: driver/lc709203f: remove unnecessary use of float r=aabadie a=kfessel

### Contribution description

removes a unnecessary use of float

### Testing procedure

read and test if you got that hardware (I don't)

### Issues/PRs references

#19614 

Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
Co-authored-by: Karl Fessel <karl.fessel@ovgu.de>
bors bot added a commit that referenced this issue Jun 5, 2023
19693: sys/color: extend unittest and fix module r=kfessel a=kfessel

### Contribution description

this extends the unittest for sys_color testing more colors 

### Testing procedure

```
RIOT_tree/tests/unittests$ make tests-color test
```
will fail since our `rgb2hsv` implementation is wrong (or is using an other colorspace than hsv2rgb (without documenting))

the new `hsv2rgb` test will succeed

### Issues/PRs references

#19614  was the reason i had a look at this 

#1315 added the rgb2hsv and hsv2rgb function

#9940 added the test for black special case

https://www.vagrearg.org/content/hsvrgb << some optimization for that function (avoiding float)


Co-authored-by: Karl Fessel <karl.fessel@ovgu.de>
bors bot added a commit that referenced this issue Jun 5, 2023
19378: sys: add common imath module mv isin() form test/driver_dac_dds r=kfessel a=benpicco



19693: sys/color: extend unittest and fix module r=kfessel a=kfessel

### Contribution description

this extends the unittest for sys_color testing more colors 

### Testing procedure

```
RIOT_tree/tests/unittests$ make tests-color test
```
will fail since our `rgb2hsv` implementation is wrong (or is using an other colorspace than hsv2rgb (without documenting))

the new `hsv2rgb` test will succeed

### Issues/PRs references

#19614  was the reason i had a look at this 

#1315 added the rgb2hsv and hsv2rgb function

#9940 added the test for black special case

https://www.vagrearg.org/content/hsvrgb << some optimization for that function (avoiding float)


Co-authored-by: Benjamin Valentin <benpicco@beuth-hochschule.de>
Co-authored-by: Karl Fessel <karl.fessel@ovgu.de>
bors bot added a commit that referenced this issue Jun 5, 2023
19378: sys: add common imath module mv isin() form test/driver_dac_dds r=maribu a=benpicco



19693: sys/color: extend unittest and fix module r=kfessel a=kfessel

### Contribution description

this extends the unittest for sys_color testing more colors 

### Testing procedure

```
RIOT_tree/tests/unittests$ make tests-color test
```
will fail since our `rgb2hsv` implementation is wrong (or is using an other colorspace than hsv2rgb (without documenting))

the new `hsv2rgb` test will succeed

### Issues/PRs references

#19614  was the reason i had a look at this 

#1315 added the rgb2hsv and hsv2rgb function

#9940 added the test for black special case

https://www.vagrearg.org/content/hsvrgb << some optimization for that function (avoiding float)


Co-authored-by: Benjamin Valentin <benpicco@beuth-hochschule.de>
Co-authored-by: Karl Fessel <karl.fessel@ovgu.de>
bors bot added a commit that referenced this issue Jun 5, 2023
19693: sys/color: extend unittest and fix module r=kfessel a=kfessel

### Contribution description

this extends the unittest for sys_color testing more colors 

### Testing procedure

```
RIOT_tree/tests/unittests$ make tests-color test
```
will fail since our `rgb2hsv` implementation is wrong (or is using an other colorspace than hsv2rgb (without documenting))

the new `hsv2rgb` test will succeed

### Issues/PRs references

#19614  was the reason i had a look at this 

#1315 added the rgb2hsv and hsv2rgb function

#9940 added the test for black special case

https://www.vagrearg.org/content/hsvrgb << some optimization for that function (avoiding float)


Co-authored-by: Karl Fessel <karl.fessel@ovgu.de>
bors bot added a commit that referenced this issue Jun 6, 2023
19693: sys/color: extend unittest and fix module r=maribu a=kfessel

### Contribution description

this extends the unittest for sys_color testing more colors 

### Testing procedure

```
RIOT_tree/tests/unittests$ make tests-color test
```
will fail since our `rgb2hsv` implementation is wrong (or is using an other colorspace than hsv2rgb (without documenting))

the new `hsv2rgb` test will succeed

### Issues/PRs references

#19614  was the reason i had a look at this 

#1315 added the rgb2hsv and hsv2rgb function

#9940 added the test for black special case

https://www.vagrearg.org/content/hsvrgb << some optimization for that function (avoiding float)


Co-authored-by: Karl Fessel <karl.fessel@ovgu.de>
@maribu maribu changed the title [tracking] unnessesary use of floating point arithmetics [tracking] unnessesary use of floating point arithmetic Apr 30, 2024
@maribu maribu changed the title [tracking] unnessesary use of floating point arithmetic [tracking] unnecessary use of floating point arithmetic Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Community: help wanted The contributors require help from other members of the community Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Type: tracking The issue tracks and organizes the sub-tasks of a larger effort
Projects
None yet
Development

No branches or pull requests

2 participants