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
On armv7hl architecture, number->string converts scientific notation to decimal notation #181
Comments
Note: the test case source file actually specifies 9.765625e-4 but the output is misleading because, in this case, number->string itself returns the wrong result. |
This is not easy to debug without access to the platform. What is your setup? Are you using an emulator? Could you try evaluating:
|
On 02/22/2016 03:08 PM, Marc Feeley wrote:
I'll do this tonight when I get home on my Raspberry Pi. The bug shows ./configure 'CC=gcc-4.8 -mcpu=cortex-a7 -mfpu=neon-vfpv4 You should get a Raspberry Pi 2 Model B, Marc, it's about $60 loaded Brad |
I find
The line in the test file is (check-equal? (number->string 9.765625e-4) "9.765625e-4") Brad |
How about |
Didn't I just report that one too?
|
You gave two calls to
|
will check when I get home (in 9 hours or so); I have access to some Fedora test servers (beefy ARM machines with 4GB RAM) but my SSH key is on my home machines. |
|
Could you trace the execution of
? By "trace" I mean add pps at appropriate places in its logic. |
So far I'm getting identical results on ARM and on x86_64: ARM:
x86_64:
Is there a patch I can try to do the tracing? I'm afraid I'm not that familiar with Gambit internals yet. |
In
add
|
added that to |
The information should be printed when you call |
Whoa. It's seems to be in ##flonum->fixnum. I had to get around some problems that I couldn't print out (pp (list scale: r: r in scale. If I replace
with
The problem goes away. Brad On X86-64:
on Arm:
|
On 02/23/2016 09:47 PM, Bradley Lucier wrote:
Here is what that ##flonum->fixnum expands to:
I think you want to have instead ___r1=(((int)(((unsigned int)((int)(___F64V3)))<<2))); |
… the argument is negative (bug was introduced in commit fa1940a)
Nice catch Brad! I've just learned something today... for reference see: http://stackoverflow.com/questions/10541200/is-the-behaviour-of-casting-a-negative-double-to-unsigned-int-defined-in-the-c-s So I changed the definition of
Please confirm that it fixes the issue on ARM. |
This happens on Fedora build servers for both the stable Fedora 23 release and the development tree that will become Fedora 24. The other unit tests pass, and the failing test succeeds on x86_64 and i686.
see complete log for build options and compilation logs
gambit-4.8.4-armv7hl-build.txt
The text was updated successfully, but these errors were encountered: