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

WIP: 64bit long double tests #24

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

WIP: 64bit long double tests #24

wants to merge 1 commit into from

Conversation

Blackhex
Copy link
Member

@Blackhex Blackhex commented Oct 29, 2023

Tests accompanying Windows-on-ARM-Experiments/gcc-woarm64#3. So far %q* and %Q* printf formats do not work, but I am not sure they actually should. Further investigation of this is ongoing.

The tests output:

expected: sizeof(float) == 4
actual: sizeof(float) == 4
expected: sizeof(double) == 8
actual: sizeof(double) == 8
expected: sizeof(long double) == 8
actual: sizeof(long double) == 8
expected: float %f => 1.234560
actual: float %f => 1.234560
expected: float %F => 1.234560
actual: float %F => 1.234560
expected: float %e => 1.234560e+00
actual: float %e => 1.234560e+00
expected: float %E => 1.234560E+00
actual: float %E => 1.234560E+00
expected: float %g => 1.23456
actual: float %g => 1.23456
expected: float %G => 1.23456
actual: float %G => 1.23456
expected: float %a => 0x1.3c0c2p+0
actual: float %a => 0x1.3c0c2p+0
expected: float %A => 0X1.3C0C2P+0
actual: float %A => 0X1.3C0C2P+0
expected: double %f => 1.234560
actual: double %f => 1.234560
expected: double %F => 1.234560
actual: double %F => 1.234560
expected: double %e => 1.234560e+00
actual: double %e => 1.234560e+00
expected: double %E => 1.234560E+00
actual: double %E => 1.234560E+00
expected: double %g => 1.23456
actual: double %g => 1.23456
expected: double %G => 1.23456
actual: double %G => 1.23456
expected: double %a => 0x1.3c0c1fc8f3238p+0
actual: double %a => 0x1.3c0c1fc8f3238p+0
expected: double %A => 0X1.3C0C1FC8F3238P+0
actual: double %A => 0X1.3C0C1FC8F3238P+0
expected: long double %f => 2.718282
actual: long double %f => 2.718282
expected: long double %F => 2.718282
actual: long double %F => 2.718282
expected: long double %e => 2.718282e+00
actual: long double %e => 2.718282e+00
expected: long double %E => 2.718282E+00
actual: long double %E => 2.718282E+00
expected: long double %g => 2.71828
actual: long double %g => 2.71828
expected: long double %G => 2.71828
actual: long double %G => 2.71828
expected: long double %a => 0x1.5bf0a8b145769p+1
actual: long double %a => 0x1.5bf0a8b145769p+1
expected: long double %A => 0X1.5BF0A8B145769P+1
actual: long double %A => 0X1.5BF0A8B145769P+1
expected: long double %Lf => 2.718282
actual: long double %Lf => 2.718282
expected: long double %LF => 2.718282
actual: long double %LF => 2.718282
expected: long double %Le => 2.718282e+00
actual: long double %Le => 2.718282e+00
expected: long double %LE => 2.718282E+00
actual: long double %LE => 2.718282E+00
expected: long double %Lg => 2.71828
actual: long double %Lg => 2.71828
expected: long double %LG => 2.71828
actual: long double %LG => 2.71828
expected: long double %La => 0x1.5bf0a8b145769p+1
actual: long double %La => 0x1.5bf0a8b145769p+1
expected: long double %LA => 0X1.5BF0A8B145769P+1
actual: long double %LA => 0X1.5BF0A8B145769P+1
expected: long double %lf => 2.718282
actual: long double %lf => 2.718282
expected: long double %lF => 2.718282
actual: long double %lF => 2.718282
expected: long double %le => 2.718282e+00
actual: long double %le => 2.718282e+00
expected: long double %lE => 2.718282E+00
actual: long double %lE => 2.718282E+00
expected: long double %lg => 2.71828
actual: long double %lg => 2.71828
expected: long double %lG => 2.71828
actual: long double %lG => 2.71828
expected: long double %la => 0x1.5bf0a8b145769p+1
actual: long double %la => 0x1.5bf0a8b145769p+1
expected: long double %lA => 0X1.5BF0A8B145769P+1
actual: long double %lA => 0X1.5BF0A8B145769P+1
expected: long double %llf => 2.718282
actual: long double %llf => 2.718282
expected: long double %llF => 2.718282
actual: long double %llF => 2.718282
expected: long double %lle => 2.718282e+00
actual: long double %lle => 2.718282e+00
expected: long double %llE => 2.718282E+00
actual: long double %llE => 2.718282E+00
expected: long double %llg => 2.71828
actual: long double %llg => 2.71828
expected: long double %llG => 2.71828
actual: long double %llG => 2.71828
expected: long double %lla => 0x1.5bf0a8b145769p+1
actual: long double %lla => 0x1.5bf0a8b145769p+1
expected: long double %llA => 0X1.5BF0A8B145769P+1
actual: long double %llA => 0X1.5BF0A8B145769P+1
expected: long double %Qf => 2.718282
actual: long double %Qf => %Qf
Assertion failed: strncmp (expected, actual, SIZE) == 0, file test-math.c, line 27

@Blackhex Blackhex requested a review from ZacWalk October 29, 2023 19:00
@Blackhex Blackhex force-pushed the long-double-64 branch 2 times, most recently from b09d61a to 73c46d7 Compare October 29, 2023 19:57
@ZacWalk
Copy link
Member

ZacWalk commented Oct 30, 2023

This PR looks good to me just wondering about the .c thing.
I like this thorough testing as opposed to just an exe that builds or not.

@Blackhex
Copy link
Member Author

This PR looks good to me just wondering about the .c thing. I like this thorough testing as opposed to just an exe that builds or not.

Thank you. I've just unified the naming convention of the executables produced by the tests. Please, let me know if I misunderstood the convention or if we should move this change to a separate PR.

@ZacWalk
Copy link
Member

ZacWalk commented Oct 30, 2023

I would prefer not to have the '.c' or '.cpp' in the test output files.
Originally there were some naming conflicts but I don't think there should be any more.

@Blackhex Blackhex marked this pull request as draft November 2, 2023 11:02
@Blackhex Blackhex changed the title 64bit long double tests WIP: 64bit long double tests Nov 2, 2023
@Blackhex
Copy link
Member Author

Blackhex commented Nov 2, 2023

Moving to Draft mode until it will be known whether %q, %Q should be supported and tested.

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.

2 participants