www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/08/18:53:12

From: bevinst AT vicksburg DOT com (Tommy Bevins)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: double precision in g77
Date: Sat, 08 Feb 1997 17:20:33 GMT
Organization: INTERNET AMERICA
Lines: 26
Message-ID: <32fda7a3.53053781@library.airnews.net>
References: <32FB9812 DOT 6836 AT pe DOT net>
NNTP-Posting-Host: com56.vicksburg.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Gordon Talge <gtalge AT pe DOT net> wrote:

>Does anyone know how to get g77 to print double precision number
>using the standard D instead of E? Is there some kind of format 
>command to do this?

This looks like a bug in g77. The small code below will write the
number in D format on an SGI, but uses the E format under DJGPP/G77.
It writes the number as a double precision number, but the output is
.1000000020E+01

c234567
      implicit none 
      double precision x
c
      x=1.00000002d0
      write(*,100) x
 100  format(d20.10)
c
      end

I'm using DJGPP 2.01 and g77 0.5.19 from the simtel site.
---
* Tommy Bevins
* bevinst AT vicksburg DOT com
* 76510 DOT 1526 AT compuserve DOT com

- Raw text -


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