"Fossies" - the Fresh Open Source Software Archive

Member "SAOImageDS9/tcl8.6/doc/PrintDbl.3" (13 Nov 2019, 1909 Bytes) of package /linux/misc/ds9.8.1.tar.gz:


Caution: As a special service "Fossies" has tried to format the requested manual source page into HTML format but links to other man pages may be missing or even erroneous. Alternatively you can here view or download the uninterpreted manual source code. A member file download can also be achieved by clicking within a package contents listing on the according byte size field.

Tcl_PrintDouble

NAME
SYNOPSIS
ARGUMENTS
DESCRIPTION
KEYWORDS

NAME

Tcl_PrintDouble − Convert floating value to string

SYNOPSIS

#include <tcl.h>

Tcl_PrintDouble(interp, value, dst)

ARGUMENTS

Before Tcl 8.0, the tcl_precision variable in this interpreter controlled the conversion. As of Tcl 8.0, this argument is ignored and the conversion is controlled by the tcl_precision variable that is now shared by all interpreters. Floating-point value to be converted. Where to store the string representing value. Must have at least TCL_DOUBLE_SPACE characters of storage.

DESCRIPTION

Tcl_PrintDouble generates a string that represents the value of value and stores it in memory at the location given by dst. It uses %g format to generate the string, with one special twist: the string is guaranteed to contain either a or an so that it does not look like an integer. Where %g would generate an integer with no decimal point, Tcl_PrintDouble adds

If the tcl_precision value is non-zero, the result will have precisely that many digits of significance. If the value is zero (the default), the result will have the fewest digits needed to represent the number in such a way that Tcl_NewDoubleObj will generate the same number when presented with the given string. IEEE semantics of rounding to even apply to the conversion.

KEYWORDS

conversion, double-precision, floating-point, string