XSLPformatvalue
XSLPformatvalue |
int XPRS_CC XSLPformatvalue(double dValue, char *Buffer);
dValue
|
Double precision value to be formatted.
|
Buffer
|
Character buffer to hold the formatted result. The result will never be more than 15 characters in length including the terminating null character.
|
int i; double Value; char Buffer[16]; Value = 1; for (i=0;i<=6;i++) { XSLPformatvalue(Value,Buffer); printf("\n16^%d = %s",i,Buffer); Value = Value * 16; } Value = 1.0/16.0; for (i=1;i<=6;i++) { XSLPformatvalue(Value,Buffer); printf("\n16^-%d = %s",i,Buffer); Value = Value / 16; } The results are as follows: 16^0 = 1 16^1 = 16 16^2 = 256 16^3 = 4096 16^4 = 65536 16^5 = 1.048576e+006 16^6 = 1.677722e+007 16^-1 = 0.0625 16^-2 = 0.00390625 16^-3 = 0.00024414063 16^-4 = 1.525879e-005 16^-5 = 9.536743e-007 16^-6 = 5.960464e-008
© 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.