---
name: "fmt_double"
section: "3"
platform: "linux"
package: "libowfat-dev"
version: "0.32-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/fmt_double"
---

# fmt\_double(3)

write an ASCII representation of a double

## NAME

fmt\_double - write an ASCII representation of a double

## SYNTAX

**#include \<libowfat/fmt.h\>**

size\_t **fmt\_double**(char \**dest*,double *d*,size\_t *maxlen*,size\_t *prec*);

## DESCRIPTION

fmt\_double writes an ASCII representation ('0' to '9', base 10) of *d* to *dest* and returns the number of bytes written.  No more than *maxlen* bytes will be written.  *prec* digits will be written, using scientific notation if necessary.

fmt\_double does not append \\0.

If *dest* equals FMT\_LEN (i.e. is zero), fmt\_double returns the number of bytes it would have written.

## SEE ALSO

[scan\_double(3)](/scan_double/3.md)
