delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/02/28/23:13:38

From: Prashant Ramachandra <rprash AT wilco-int DOT com>
To: "'djgpp AT delorie DOT com'" <djgpp AT delorie DOT com>
Message-ID: <5BF60CD649EDD411A04600B0D049F53A09249F@hydmail02.hyd.wilco-int.com>
Subject: RE: Fortran / C compiler precision and code pack
Date: Thu, 1 Mar 2001 09:32:34 +0530
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)
Reply-To: djgpp AT delorie DOT com

On Thursday, March 01, 2001 9:14 AM, Mr. Veli Suorsa
[SMTP:VJSuorsa AT Surfeu DOT Fi] wrote:
| I test Gnu Fortran compiler, g77 (g772952b : gcc-2.95.2) with a
| little program
| like this:
| 
| ---
|       PROGRAM PAY
| C
| C  A program to calculate the nett pay of a British worker
| C  (pay3_4.for)
| ...
| ...
|       PRINT *, ' '
|       PRINT *, 'Nett pay       : ', NETTPAY
|       STOP
|       END
| ---
| 
| Compiler seems to work correctly, but...
| 
| When you give 1600 
| to gross pay, print is:
| 
|  Gross pay      : 1600
|  Superannuation : 96.
|  Tax            : 376.
|  Insurance      : 14.3999996
|  
|  Nett pay       : 1113.59998
| 
| Did I everything right, because insurance (real) was different from
| 14.4?
| 
| Or is there a bug in Fortran / C compiler precision.

Don't know about this. Sorry.

| Another thing, that bothers me is size of exe- code (about 150 KB
| and when pkzipped
| about 50 KB). Is there any way or switch to pack/ optimise code?

You probably forgot to strip it. Use

strip filename.exe

and see the difference.

| P.S. Does Gnu Pascal compiler exist and is there any user online for
| a little
| sort test?

It doesn't IIRC.
--
Prashant TR <tr AT midpec DOT com>
Web: http://www.midpec.com/


----------------------------------------------------------------------------------------------------------------------------
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential 
and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon,
this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please 
contact the sender and delete the material from any computer.
----------------------------------------------------------------------------------------------------------------------------

- Raw text -


  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019