Skip to content

Fixed bline test on i386 - #2618

Open
ice0 wants to merge 1 commit into
synfig:masterfrom
ice0:fix-float4
Open

ice0 wants to merge 1 commit into
synfig:masterfrom
ice0:fix-float4

Conversation

@ice0

@ice0 ice0 commented Apr 24, 2022

Copy link
Copy Markdown
Collaborator

find_distance in ETL/_bezier.h actually returns a float.

_bezier.h

typedef float distance_type;
...
distance_type find_distance(time_type r, time_type s, int steps=7)const

Floating point precision is between 6 and 9 decimal digits, so I just reduced precision requirement for test to the lowest possible precision.

https://en.wikipedia.org/wiki/Single-precision_floating-point_format

Fix #2606

`find_distance` in `ETL/_bezier.h` actually returns a float.

_bezier.h
```
typedef float distance_type;
...
distance_type find_distance(time_type r, time_type s, int steps=7)const
```

Floating point precision is between 6 and 9 decimal digits, so I just reduced precision requirement for test to the lowest possible precision.

https://en.wikipedia.org/wiki/Single-precision_floating-point_format

Fix synfig#2606
@ice0
ice0 requested a review from rodolforg April 24, 2022 03:01
@rodolforg

Copy link
Copy Markdown
Contributor

What about making find_distance() return Real/double?

@ice0

ice0 commented Apr 24, 2022

Copy link
Copy Markdown
Collaborator Author

What about making find_distance() return Real/double?

This fix is for the 1.5.1 branch only, so I tried to keep it as small as possible.

Making find_distance to return Real requires bigger changes in bezier class, which I will make next week.

@rodolforg

Copy link
Copy Markdown
Contributor

As we didn't branch out from master, I propose to change the PR to master branch.

@ice0
ice0 changed the base branch from v1.5.x to master April 25, 2022 01:55
@ice0

ice0 commented Apr 25, 2022

Copy link
Copy Markdown
Collaborator Author

As we didn't branch out from master, I propose to change the PR to master branch.

I'm not sure if this is a good idea, because these changes need to be rolled back after the changes in the bezier class, but ok.

@onlyjob

onlyjob commented Apr 27, 2022

Copy link
Copy Markdown
Contributor

Looks good: fixes problem on i686 and did not cause regression on amd64. Thanks.

@rodolforg

Copy link
Copy Markdown
Contributor

I'm not sure if this is a good idea, because these changes need to be rolled back after the changes in the bezier class, but ok.

I don't see it as a problem.
IMO, it will be worse to branch out 1.5.x now ;)

@onlyjob

onlyjob commented Apr 27, 2022

Copy link
Copy Markdown
Contributor

I don't see it as a problem.

Downstream in Debian FTBFS is a serious problem preventing migration of Synfig to "testing".
I had to apply the proposed patch to address it.

@rodolforg

Copy link
Copy Markdown
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FTBFS on i686: "test_bline_length:98 - expected 2, but got 2"

3 participants