= writefln with floating-point numbers = ''Part of'' StandardLibraryCategory == Description == Demonstrates the use of writefln to display floating point numbers. == Example == {{{ #!d import std.stdio; void main() { float f = 1.175494351e-38; double d = 1.175494351e-38; writefln("%%s: %s", f); writefln("%%g: %g", f); writefln("%%G: %G", f); writefln("%%s: %s", d); writefln("%%g: %g", d); writefln("%%G: %G", d); } }}} == Output == {{{ %s: 1.17549e-38 %g: 1.17549e-38 %G: 1.17549E-38 %s: 1.17549e-38 %g: 1.17549e-38 %G: 1.17549E-38 }}} == Compile Tips == Sample batch file: {{{ @echo off dmd float.d float.exe pause }}} == Source == Inspired by [http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=6720 digitalmars.D.bugs/6720].