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

Fails to build on many archs #33

Closed
TinoDidriksen opened this issue Oct 19, 2018 · 5 comments
Closed

Fails to build on many archs #33

TinoDidriksen opened this issue Oct 19, 2018 · 5 comments
Labels
bug Something isn't working

Comments

@TinoDidriksen
Copy link
Member

From Debian:

Fails to build/test on all ARMs, PPC, and s390x.

Maybe related to whatever #30 was.

@TinoDidriksen
Copy link
Member Author

- ^cat/cat+n<W:10.178184>/cat+v<W:11.209916>$[][
+ ^cat/cat+n<W:9.353620>/cat+v<W:10.385352>$[][
- 3     4       \u03b5  +       0.000000
+ 3     4       \u03b5  +       -0.824564
- 5     0.000000
+ 5     -0.525487

Curiously, the cat difference is the same 0.82: 9.353620 - 10.178184 = 10.385352 - 11.209916 = -0.824564.

The hex representation is -0.824564 = 0xbfea62d40aaeafab, 0.824564 = 0x3fea62d40aaeafab, -0.525487 = 0xbfe0d0ca1cef2410, 0.525487 = 0x3fe0d0ca1cef2410.

@TinoDidriksen TinoDidriksen added the bug Something isn't working label Oct 19, 2018
@TinoDidriksen
Copy link
Member Author

https://github.com/apertium/lttoolbox/blob/master/lttoolbox/compression.cc#L310 is where things go wrong.

Working archs: -0.525487 becomes 3730729927 0, and -0.824564 becomes 3409598443 0

Buggy archs: Everything negative yields 0 0

@TinoDidriksen
Copy link
Member Author

@Techievena where did you get that floating point serialization code? It's quite bizarre.

@kartikm
Copy link
Member

kartikm commented Oct 31, 2018

@TinoDidriksen Should we push this patch to Debian soon?

@TinoDidriksen
Copy link
Member Author

I guess so. There are some segfaults I would've liked to fix in the same push, but they don't seem like critical blockers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants