This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 1.3.12-2 : atof() always returns 0


>>>>> "hlenet" == hlenet  <Herv> writes:

    hlenet> Hi,
    hlenet> The atof() function, compiled with gcc, always returns 0.

    hlenet> Example :

    hlenet> f = atof("123.456");
    hlenet> printf("%f\n", f);

    hlenet> Result :
    hlenet> 0.000000

Hi

I'm wondering wether this is the reason for the failing test of libslang

  o slang-1.4.5 - http://www.s-lang.org/ - ftp://space.mit.edu/pub/davis/slang/v1.4/

Whereas it doesn't fail the test with cygwin-1.3.10.

cd src; make runtests
make[1]: Entering directory `/usr/local/src/slang-1.4.5/src'
cd test; make CC="gcc" CFLAGS="-g -O2  -fno-strength-reduce" TCAPLIB=""
make[2]: Entering directory `/usr/local/src/slang-1.4.5/src/test'

Running tests:

Testing syntax ...Ok
Testing sscanf ...S-Lang Traceback: (Error occurred on line 40)
S-Lang Traceback: test_atof
File: sscanf.sl
  Local Variables:
        $0: Type: Double_Type,  Value:  -1.82703
        $1: Type: Undefined_Type,       Value:  Undefined_Type
        $2: Type: String_Type,  Value:  "-1.8270318497395046097864224066142924129962920000000000000000000000e+00"
        $3: Type: String_Type,  Value:  "-1.8270318497395046097864224066142924129962920000000000000000000000E+00"
S-Lang Traceback: (Error occurred on line 75)
S-Lang Traceback: (Error occurred on line 72)
S-Lang Traceback: loop
S-Lang Traceback: (Error occurred on line 61)
S-Lang Traceback: test_atof_main
File: sscanf.sl
  Local Variables:
        $0: Type: Integer_Type, Value:  1000
        $1: Type: Double_Type,  Value:  -91.5717
        $2: Type: Double_Type,  Value:  -1.70002
        $3: Type: Double_Type,  Value:  -1.82703
S-Lang Error: Internal Error: called from line 81, file: sscanf.sl
Testing looping constructs ...Ok
Testing Arithmetic ...Ok
Testing array functions ...Ok
Testing string functions...Ok
Testing Binary Strings...Ok
Testing pack and unpack functions...Ok
Testing stdio routines...Ok
Testing Associative Arrays ...Ok
Testing recursive function modifications ...Ok
Testing structures ...Ok
Testing NameSpace routines ...Ok
Testing ospath ...Ok
Testing #ifeval ...Ok
Testing Any_Type ...Ok
Testing Matrix Multiplications ...Ok
touch sltest.c
make[2]: Leaving directory `/usr/local/src/slang-1.4.5/src/test'
make[1]: Leaving directory `/usr/local/src/slang-1.4.5/src'


Ciao
  Volker


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]