Bioplib
Protein Structure C Library
|
Convert a REAL to a string. More...
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "MathType.h"
#include "SysDefs.h"
#include "macros.h"
Go to the source code of this file.
Functions | |
char * | blFtostr (char *str, int maxlen, REAL x, int precision) |
Convert a REAL to a string.
This program is not in the public domain, but it may be copied according to the conditions laid out in the accompanying file COPYING.DOC
The code may not be sold commercially or included as part of a commercial product except as described in the file COPYING.DOC.
This code is NOT IN THE PUBLIC DOMAIN, but it may be copied according to the conditions laid out in the accompanying file COPYING.DOC.
The code may be modified as required, but any modifications must be documented so that the person responsible can be identified.
The code may not be sold commercially or included as part of a commercial product except as described in the file COPYING.DOC.
Convert a REAL to a string
Definition in file ftostr.c.
char* blFtostr | ( | char * | str, |
int | maxlen, | ||
REAL | x, | ||
int | precision | ||
) |
[out] | *str | String version of number |
[in] | maxlen | Max length for f-form. Switches to e-form if exceeded |
[in] | x | Number to convert |
[in] | precision | Number of decimal places If negative, use e-form rather than f-form |
Convert a REAL to a string using precision decimal places. If precision is negative, use e-form, otherwise use f-form. This is used to generate precisely formatted string versions of numbers for applications where the appearance of a numeric value is important.