delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/03/03/11:37:21

Date: Thu, 03 Mar 1994 15:18:07 MET
From: @imp.ch:h_ellenberger AT p14 DOT lemas DOT chg DOT imp DOT com (Hans Ellenberger)
Subject: Bug in printf for long double?
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Lines: 20

From: Hans_Ellenberger AT p14 DOT lemas DOT chg DOT imp DOT com
Re:   Bug in printf for long double?

High precision calculations in C++ using long double correctly work, but
output like printf("res=%Le\n",res) produces garbage.

Analyzing printf (...\libsrc\c\io\doprnt.c) I found out that it does not at all
support long double floating point. Conversion is always done using modf()
which operates on double only.

In order to fix that bug, I need either a corrected _doprnt or at least some
help how to write a long double variant of of modf, preferably a piece of c++
source with embedded asm to exercise the coprocessor.

Many thanks and kind regards
H. Ellenberger

------
I can't be wrong, my modem is error correcting!

- Raw text -


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