[gambit-list] Test 5 failed

Paul Wolneykien manowar at altlinux.org
Thu Oct 20 15:28:21 EDT 2011


20.10.2011 22:55, Marc Feeley пишет:
> As far as I can tell it is a problem with the sign of NaN.

  It seems so.

  On my system, an x86 Mac, it seems that NaN has a negative sign:
> 
> % gsc
> Gambit v4.6.1
> 
>> (c#targ-float->exact-exponential-format (/ 0.0 0.0) #f)
> #(16777215 105 -1)
>> (c#targ-float->exact-exponential-format (/ 0.0 0.0) #t)
> #(9007199254740991 972 -1)
> 
> Can you try to evaluate those two expressions with gsc and report the values you get?

> (c#targ-float->exact-exponential-format (/ 0.0 0.0) #f)
#(16777215 105 1)
> (c#targ-float->exact-exponential-format (/ 0.0 0.0) #t)
#(9007199254740991 972 1)

> 
> I think the solution would be to normalize the representation so that on all systems the binary representation of NaN in the generated C code is the same.

  Should the generated C code necessary be portable? IMHO, if it is not
the goal, it isn't critical to have the same things on all platforms in
C. However, the C test for a NaN value should give correct results on
the platform it was compiled.

> 
> Marc
> 
> On 2011-10-19, at 9:52 AM, Paul Wolneykien wrote:
> 
>>
>>  Hi,
>>
>>  When building 4.6.1 on armv5tel platform, `make check` finishes with
>> the following:
>>
>> ------------ TEST 5 (compiler generating C code)
>> rm -f mix.c
>> LD_LIBRARY_PATH=../lib:../gsi:../gsc: ../gsc/gsc
>> -:d-,~~bin=../bin,~~lib=../lib,~~include=../include -f -c mix.scm
>> diff test5.ok mix.c
>> 1781c1781
>> < ___DEF_SUB_FLO(___X17,-0x1L,-0x1L)
>> ---
>>> ___DEF_SUB_FLO(___X17,0x7fffffffL,-0x1L)
>> make: *** [test5] Error 1
>>
>>
>>  Is it critical?
>>
>>
>>    Regards,
>>
>>      Paul.
>>
>> _______________________________________________
>> Gambit-list mailing list
>> Gambit-list at iro.umontreal.ca
>> https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list




More information about the Gambit-list mailing list