*BSD News Article 17231


Return to BSD News archive

Newsgroups: comp.os.386bsd.questions
Path: sserve!newshost.anu.edu.au!munnari.oz.au!constellation!osuunx.ucc.okstate.edu!moe.ksu.ksu.edu!ux1.cso.uiuc.edu!uchinews!raistlin!runyon.cim.cdc.com!pbd
From: pbd@runyon.cim.cdc.com (Paul Dokas)
Subject: Re: perl pl36
Organization: ICEM Systems, Inc.
Date: Wed, 16 Jun 1993 18:58:42 GMT
Message-ID: <C8qA1v.69w@raistlin.udev.cdc.com>
References: <1vfi5hINNg80@xs4all.hacktic.nl> <1993Jun16.141721.10321@craycos.com> <1vnmrvINN7oi@xs4all.hacktic.nl>
Sender: usenet@raistlin.udev.cdc.com (News poster)
Lines: 44

In article <1vnmrvINN7oi@xs4all.hacktic.nl>, cor@hacktic.nl (Cor) writes:
|> scott@craycos.com (Scott Bolte) writes:
|> Perhaps some people with perl on their 386bsd boxes (patchlevel 36 is what
|> im using) could try it? Its really annoying, cause I cant be sure a script
|> written on another machine will work, cause it may rely on integers being
|> truncated. And yes..ive already had to change scripts cause of it.
|> Hmm..actually..i'll try and compile perl with gcc in a sec :)

I've got perl pl36 on my machine and it returns 2.

Here's an interesting test that I just did.

take this program:
-------------------------------------------------
#include <stdio.h>
#include <stdlib.h>

void main()
{
  float a = 1.9;

  printf("(int) d = %d\n", (int) d);
}
-------------------------------------------------

compiled with the old c compiler (gcc 1.39), the result is:

(int) d = 2

but compiled with the new compiler (gcc 2.4.3.1), the result is:

(int) d = 1

I believe that this points to gcc 1.39 as the rounding culprit.

Now, the strange thing is that I thought that I compiled my perl with
gcc 2.4.3.1...  I'll go double check.

-paul
-- 
#include <std.disclaimer>
#define FULL_NAME                          "Paul Dokas"
#define EMAIL                              "pbd@runyon.cim.cdc.com"
/*                Mustang Sally changed my life.                 */