Initializing help system before first use

XPRBsetrealfmt

XPRBsetrealfmt


Purpose
Set the format for printing real numbers.
Synopsis
int XPRBsetrealfmt(XPRBprob prob, const char *fmt);
Arguments
prob 
Reference to a problem.
fmt 
Format string (as used by the C function printf). Simple format strings are of the form %n where n may be, for instance, one of
default printing format (precision: 6 digits; exponential notation if the exponent resulting from the conversion is less than -4 or greater than or equal to the precision)
.numf 
print real numbers in the style [-]d.d where the number of digits after the decimal point is equal to the given precision num.
Return value
0 if function executed successfully, 1 otherwise.
Example
This example sets the number printing format to 10 digits after the decimal point:
XPRBprob expl2;
expl2 = XPRBnewprob("example2");
XPRBsetrealfmt(expl2, "%.10f");
Further information
1. In problems with very large or very small numbers it may become necessary to change the printing format to obtain a more exact output. In particular, by changing the precision it is possible to reduce the difference between matrices loaded in memory into Xpress Optimizer and the output produced by exporting them to a file.
2. This function can be used before any problem has been created (with first argument NULL). In this case the setting applies to all problems that are created subsequently.
Related topics

© 2001-2019 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.