From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3fec9418c677c0c7 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-01-14 17:55:27 PST Path: archiver1.google.com!news2.google.com!fu-berlin.de!cs.tu-berlin.de!uni-duisburg.de!not-for-mail From: Georg Bauhaus Newsgroups: comp.lang.ada Subject: Re: Gnat's Ada.Float_Text_IO.Put problem Date: Thu, 15 Jan 2004 01:55:26 +0000 (UTC) Organization: GMUGHDU Message-ID: References: <8c4gd1-ifb.ln1@beastie.ix.netcom.com> NNTP-Posting-Host: l1-hrz.uni-duisburg.de X-Trace: a1-hrz.uni-duisburg.de 1074131726 26908 134.91.1.34 (15 Jan 2004 01:55:26 GMT) X-Complaints-To: usenet@news.uni-duisburg.de NNTP-Posting-Date: Thu, 15 Jan 2004 01:55:26 +0000 (UTC) User-Agent: tin/1.5.8-20010221 ("Blue Water") (UNIX) (HP-UX/B.11.00 (9000/800)) Xref: archiver1.google.com comp.lang.ada:4420 Date: 2004-01-15T01:55:26+00:00 List-Id: Stefano M. wrote: : ste@sim:~/prove$ ./main : Standard 'put' behaviour from Ada.Float_Text_IO: 10,123 = -0.00000E+00 : : As you can see the problem is still there. : I found this thread on one of the ACT mailing lists which shed some : light on the matter: : http://www.act-europe.fr/mail/chat/2000-07/threads.html#00038 : Seems like I'm not the only one experiencing this kind of problem. Maybe there are two questions to answer: Is there a way to switch floating point modes of your hardware? What do you get for the sample_float value in your object code? The second question can be answered with a simpler program: sonnenregen:/tmp$ cat main.adb procedure Main is Sample_Float : Float := 10.123; begin null; end Main; sonnenregen:/tmp$ gcc -c -gnatp -v main.adb Reading specs from /opt/GCC/34/lib/gcc/i686-pc-linux-gnu/3.4/specs ... sonnenregen:/tmp$ objdump --disassemble main.o main.o: file format elf32-i386 Disassembly of section .text: 00000000 <_ada_main>: 0: 55 push %ebp 1: 89 e5 mov %esp,%ebp 3: 83 ec 04 sub $0x4,%esp 6: b8 cf f7 21 41 mov $0x4121f7cf,%eax <<---- b: 89 45 fc mov %eax,0xfffffffc(%ebp) e: c9 leave f: c3 ret What do you get at <<----? Does it change when you add a few tenths? -- Georg